Creating dataset slow

Thanks for the reply. Here are some details.
I read data from hdf5 files. And trying to build a hf dataset for training purpose.
The item of my dataset is contained with 3 images and labels.
For instance, pseudo code like
mygen():
files = readfiles(path)
for hdf5_item in files:
with readfile(hdf5) :
yield{{“img1”,img1},{“img2”,img2},{“img3”,img3}}.

The resolutions of imgs are 640X1080X3. It contains larger than 40,000 items.
I would appreciate it if you could provide some concrete examples or ideas for building a dataset like this.

1 Like