How to create and format an image dataset from scratch for machine learning?
Looking at existing challenges around and their data format (for example http://www.kaggle.com/c/datasciencebowl/data) I would say put the images in a folder per class. You can use the file names for the index.