caffe icon indicating copy to clipboard operation
caffe copied to clipboard

How to set iteration and batch for test images

Open nrasiwas opened this issue 11 years ago • 1 comments

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?

nrasiwas avatar Mar 04 '15 14:03 nrasiwas

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.

n-zhang avatar Mar 12 '15 23:03 n-zhang