kevinlin311tw / caffe-cvprw15

:heart::coffee: Deep Learning of Binary Hash Codes for Fast Image Retrieval (CVPRW15)
Other
526 stars 218 forks source link

Hi,I follow the README to accomplish the run_cifar10.m.It said that I will got MAP=0.89 (about),but finnaly I got it about 0.1 .Is there anyone who hace the same problem with me or can give me some suggestion?thank you #17

Open iWeisskohl opened 7 years ago

kevinlin311tw commented 7 years ago

Okay. Let us debug. For the very first step, can you check your output binary codes?

I guess you didn't successfully download some of the files including SSDH48_iter_50000.caffemodel, bvlc_reference_caffenet.caffemodel, as well as the cifar10-dataset.zip. Make sure you have these files. If the file is exist but the file size is only 0KB, you may manually download the file again.

iWeisskohl commented 7 years ago

I have download theKevinNet_CIFAR10_48.caffemodel, bvlc_reference_caffenet.caffemodel, as well as the cifar10-dataset.zip.And the binary file are all 0,feat-test are all 0.5 。what is the SSDH48_iter_50000.caffemodel?it seems you haven't refer it before ?

iWeisskohl commented 7 years ago

yesterday i try to get the < feat_test>by myself ,but it takes all night for only 300 pictures .Is there any pproblem for my operation ?

Li-Lai commented 7 years ago

You can try this way: Open ./matlab/caffe/matcaffe_batch_feat.m and change line 42: d = load('ilsvrc_2012_mean');-->d = load('./matlab/caffe/ilsvrc_2012_mean.mat'); then run run_cifar10.m, I solved this problem by above modify.

kevinlin311tw commented 7 years ago

Thanks @CBIR-LL. So, this is the path problem. Sorry for the typo @iWeisskohl, it should be KevinNet_CIFAR10_48.caffemodel. Not the SSDH one.

iWeisskohl commented 7 years ago

Thankyou !I tried it ,but get the same map=0.10577.Your feat_test ,feat_train, binary_test,binary_train are get after run_cifar10.m ,right?it seems my parameters have some problem.the binary are all 0,and feat are all 0.5

kevinlin311tw commented 7 years ago

@iWeisskohl Did you unzip the cifar10 dataset, and put it to the correct folder?

iWeisskohl commented 7 years ago

I run the ./prepare_eval.sh to set the dataset ,and they are in the correct folder.

kevinlin311tw commented 7 years ago

Can you remove the output files (-train.mat, -test.mat), and extract the features again?

iWeisskohl commented 7 years ago

I have done it twice ,but make no changes .

kevinlin311tw commented 7 years ago

Please provide your matlab log information, so we can look into your problem.

iWeisskohl commented 7 years ago

image image my feat-train and feat-test file have some problem , i can't get the right file

kevinlin311tw commented 7 years ago

Dose Matlab have any warning during feature extraction? We have to check your feature extraction. It seems like there is a GIGO problem.

iWeisskohl commented 7 years ago

yes,The waring: converting non-floating point data to double
what do you mean with the GIGO problem?

kevinlin311tw commented 7 years ago

GIGO means garbage in garbage out.. It's hard to debug because I can not reproduce your error. Since you have the CNN model, input data and evaluation codes, you should get the correct output..

sjean commented 7 years ago

I got the same mAP and error. did anyone figure this out? please post it here, thanks.

Li-Lai commented 7 years ago

@sjean you can try using the plan I mentioned above. At the same time, you have to strictly according to the author's instructions to check for each item. Download theKevinNet_CIFAR10_48.caffemodel, bvlc_reference_caffenet.caffemodel, as well as the cifar10-dataset.zip, unzip and put them in correct path.

sjean commented 7 years ago

@CBIR-LL ok, i did not notice before. thank you very much

kevinlin311tw commented 7 years ago

@sjean If you fix the error, please report your solution here to help other people.

sjean commented 7 years ago

I GOT the correct result with the way @CBIR-LL mentioned. as for @iWeisskohl 's issue, i think maybe he/she did not configure correctly

Li-Lai commented 7 years ago

@sjean Because the mean file is not in the currently running script path, caused the mean not loaded correctly, specified mean file path can solve MAP problem. @iWeisskohl I met this waring: converting non-floating point data to double, but not affect the results. You should be careful checking your configuration.

iWeisskohl commented 7 years ago

@ CBIR_LL @kevinlin311tw @sjean thank you for your suggestion ,I got the correct by Open ./matlab/caffe/matcaffe_batch_feat.m and change line 42: d = load('ilsvrc_2012_mean');-->d = load('./matlab/caffe/ilsvrc_2012_mean.mat') ,and train the model by myself and use my own model .Appreciate for all of your help !

kevinlin311tw commented 7 years ago

Before running any evaluation codes, please run startup.m or launch Matlab at the caffe's root folder. This can avoid the path problem.

zchrissirhcz commented 6 years ago

Hi, I just encounter same problem, and finally figure out that the test images' paths contained in the list file are not correct, and just by prepending correct prefix to all of them brings correct mAP. Hope this helps!

koalaofpoint commented 6 years ago

who can provide the model and dataset for me,please

hulinh commented 6 years ago

Please help me, I have download the KevinNet_CIFAR10_48.caffemodel, bvlc_reference_caffenet.caffemodel, cifar10-dataset.zip.

In matcaffe_init.m if nargin < 2 || isempty(model_def_file) model_def_file = './examples/cvprw15-cifar10/deploy.prototxt'; end if nargin < 3 || isempty(model_file) model_file = './examples/cvprw15-cifar10/bvlc_reference_caffenet.caffemodel'; end

in matcaffe_init_feat.m if nargin < 2 || isempty(model_def_file) model_def_file = './examples/cvprw15-cifar10/ KevinNet_CIFAR10_48_deploy.prototxt’; end if nargin < 3 || isempty(model_file) model_file = './examples/cvprw15-cifar10/ KevinNet_CIFAR10_48.caffemodel’; end

In matcaffe_batch_feat.m change line d = load('ilsvrc_2012_mean'); --> d = load('./matlab/ilsvrc_2012_mean.mat');

in run_cifar10.m model_file = './examples/cvprw15-cifar10/ KevinNet_CIFAR10_48.caffemodel’; model_def_file = './examples/cvprw15-cifar10/ KevinNet_CIFAR10_48_deploy.prototxt’;

(all files put in correct path)

then run startup.m; run_cifar10.m but get MAP =0.105777