filipradenovic/cnnimageretrieval-pytorch

"Training" by using the default parameters as stated in README

2danlin opened this issue · 1 comments

Environment: Linux

Parameter Setting: I used all the parameters as stated in README, i.e., the command line as follows:

python3.6 -m cirtorch.examples.train export_model --gpu-id '0' --training-dataset 'retrieval-SfM-120k' --test-datasets 'roxford5k,rparis6k' --arch 'resnet101' --pool 'gem' --loss 'contrastive' --loss-margin 0.85 --optimizer 'adam' --lr 5e-7 --neg-num 5 --query-size=2000 --pool-size=22000 --batch-size 5 --image-size 362

Error I occurred:
File "/tmp/dlinaf/ENV/lib/python3.6/site-packages/PIL/Image.py", line 2687, in open OSError: cannot identify image file <_io.BufferedReader name='/home/data/dlinaf/manifold_ranking/cnn_ir/source_code/cnnimageretrieval-pytorch-master/data/train/retrieval-SfM-120k/ims/0d/40/18/100dda42e5994d9e921060abcd18400d'>

When I trained the model, it works for 2 epochs but the error occurs in the 3rd epoch. It seems that one image cannot be identified. However, I have re-downloaded the dataset but it still does not work.

Could you please help me?

Hi,

I don't have any problem loading this specific image. I would propose that you try to load it with some other image loader, and manually resave it.