I have several (2160,2560) images that I am splitting into (64,64) crops to run through my network.  This means each image will generate 1350 crops.
What would be the most efficient way to obtain these crops to run through my network?
Right now, I’m thinking I could generate and save all the crops before training.  I would create several folders that each contain 1350 crops from the image and have the folder name as the name of the original image.  Then, I could just load them all in or use the ImageFolder dataloader.  However, this takes up a lot of time before I can start training.
How can I load the image into memory and create crops on the go without saving them beforehand?
Thank you!