I'm saving a large dataset of images (flickr25k dataset) into hdf5 using h5py. However image are different in size, thus I can't create a dataset with shape (nb_images, height, width)
.
Now I'm using multiple datasets to handle this problem. Thus create_dataset('image1', shape=shape1)
, create_dataset('image2', shape=shape2)
, etc.
In python we can use a list to save multiple numpy.array
with different size easily. I'm wondering if we can do the same thing with h5py, and fetch data with syntax like:
images = h5file.get('images')
images[id_img][:,:]