About the data translating tool im2rec, is there any option to add new images to the existing rec file?

Hi,
I have about 50G images for training, and it takes me about 2 hours to translate the images to rec file.
And I will receive thousands of new images period by period, then include them in the new training.
So i need to re-generate the rec file. Is there any way i can just add the new images to the existing rec file instead of re-create the rec file from the very beginning? That will save a lot of time.
Thanks a lot.

A record file written by im2rec is an MXIndexedRecordIO object, https://mxnet.incubator.apache.org/api/python/io/io.html?highlight=indexed#mxnet.recordio.MXIndexedRecordIO

So you can open it and write additional images/label. I am afraid there’s no elegant way to do that, but if you can read through the APIs, it is doable.

Be sure to backup the data and read through append mode.

1 Like