In [1]:
import h5py
import numpy as np
import skimage as sk
#print sk.__version__
from skimage import io
from matplotlib import pyplot as plt

In [2]:
from skimage import filters
from skimage import feature
from skimage import io
from scipy import ndimage as nd
from scipy import misc

In [2]:
from subprocess import check_output
print(check_output(["ls", "../dataset"]).decode("utf8"))


Cy3.tif
DAPI.tif
LowRes_13434_overlapping_pairs.h5
LowRes_13434_overlapping_pairs_L.h5
overlapping_chromosomes_examples.h5
overlapping_subset_pairs.h5

Loading the dataset stored in hdf5 format


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

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


(13434, 94, 93, 2)
int64
209

Looking at some examples


In [6]:
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')


Out[6]:
<matplotlib.image.AxesImage at 0x7f3358dc8978>

Problem in the groundtruth label at low resolution:

The labels are a little noisy on the edge of the groundtruth label.


In [7]:
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')


Out[7]:
<matplotlib.image.AxesImage at 0x7f3358b9f7f0>

In [ ]: