How to set iteration and batch for test images
I have about 2916 test images I am trying to compute fc7 features on. I am using extract_features to extract the features.
./build/tools/extract_features.bin models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel my_imagenet_val.prototxt fc7 my_dir/features 60 leveldb GPU 0
My assumption is that the iteration argument (60 above) times the batch size (inside the prototxt file, batch_size: 50), i.e. total 3000, is the number of images it processes (which I confirmed in leveldb as it as 3000 keys). Given I had 2916 images, how can I know which key corresponds to which image in my test set. Alternatively, is there a way to have just 2916 (or the number of test images) lines / keys in the output?
I think the output will be in the same order as your leveldb order. So if you didn't do shuffle when you create that leveldb. the first 2916 lines should correspond to the the first 2916 images.