h5f = h5py.File('../dataset/LowRes_13434_overlapping_pairs.h5','r')
pairs = h5f['dataset_1'][:]
h5f.close()

print(pairs.shape)
print(pairs[0,:,:,0].dtype)
print(pairs[0,:,:,0].max())

"""
Explanation: Loading the dataset stored in hdf5 format
End of explanation
"""


grey = pairs[0,:,:,0]
mask = pairs[0,:,:,1]
%matplotlib inline
plt.figure(figsize = (10,8))
plt.subplot(121)
plt.imshow(grey)
plt.title('max='+str(grey.max()))
plt.subplot(122)
plt.imshow(mask, interpolation = 'nearest')

"""
Explanation: Looking at some examples
End of explanation
"""


plt.figure(figsize = (10,12))
plt.subplot(141)
plt.imshow(mask, interpolation = 'nearest')
plt.subplot(142)
plt.title('label 1')
plt.imshow(mask == 1, interpolation = 'nearest')
plt.subplot(143)
plt.title('label 2')
plt.imshow(mask == 2, interpolation = 'nearest')
plt.subplot(144)
plt.title('label 3')
plt.imshow(mask == 3,  interpolation = 'nearest')

"""
Explanation: Problem in the groundtruth label at low resolution:
The labels are a little noisy on the edge of the groundtruth label.
End of explanation
"""


