kevinlin311tw / caffe-cvprw15

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

when I use "make all -j8", occur this errors #4

Closed zhengchuansh closed 8 years ago

zhengchuansh commented 8 years ago

I has install caffe, and successfully run examples . erros: head lines: make: /usr/local/MATLAB/R2012a/bin/mexext: Command not found g++ src/caffe/net.cpp -pthread -fPIC -DNDEBUG -O2 -DUSE_MKL -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -I/opt/intel/mkl/include -Wall -Wno-sign-compare -c -o .build_release/src/caffe/net.o 2> .build_release/src/caffe/net.o.warnings.txt \ || (cat .build_release/src/caffe/net.o.warnings.txt; exit 1)

the last few lines: compilation terminated. make: *\ [.build_release/src/caffe/blob.o] Error 1 In file included from ./include/caffe/util/math_functions.hpp:11:0, from ./include/caffe/syncedmem.hpp:7, from ./include/caffe/blob.hpp:6, from ./include/caffe/layer.hpp:8, from src/caffe/layers/absval_layer.cpp:3: ./include/caffe/util/mkl_alternate.hpp:6:17: fatal error: mkl.h: No such file or directory

include

             ^

compilation terminated. make: *\ [.build_release/src/caffe/layers/absval_layer.o] Error 1

kevinlin311tw commented 8 years ago

Caffe has several dependencies. Check this for more information: http://caffe.berkeleyvision.org/installation.html

zhengchuansh commented 8 years ago

after I install dependencies, then run demo.m, occur this error:

In matcaffe_batch_feat at 35 In demo at 29 Invalid MEX-file '/home/zcs/caffe/examples/caffe-cvprw15-master/matlab/caffe/caffe.mexa64': /usr/local/MATLAB/R2012b/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /home/zcs/caffe/examples/caffe-cvprw15-master/matlab/caffe/caffe.mexa64)

Error in matcaffe_init_feat (line 27) caffe('init', model_def_file, model_file)

Error in matcaffe_batch_feat (line 39) matcaffe_init_feat(use_gpu, model_def_file, model_file);

Error in demo (line 29) [feat_test , list_im] = matcaffe_batch_feat(test_file_list, use_gpu, feat_len, model_def_file, model_file);

but I has GLIBCXX_3.4.15 zcs@zcs-Virtual:~$ strings /usr/lib/libstdc++.so.6 | grep GLIBCXX GLIBCXX_3.4 GLIBCXX_3.4.1 GLIBCXX_3.4.2 GLIBCXX_3.4.3 GLIBCXX_3.4.4 GLIBCXX_3.4.5 GLIBCXX_3.4.6 GLIBCXX_3.4.7 GLIBCXX_3.4.8 GLIBCXX_3.4.9 GLIBCXX_3.4.10 GLIBCXX_3.4.11 GLIBCXX_3.4.12 GLIBCXX_3.4.13 GLIBCXX_3.4.14 GLIBCXX_3.4.15 GLIBCXX_3.4.16 GLIBCXX_3.4.17 GLIBCXX_DEBUG_MESSAGE_LENGTH

kevinlin311tw commented 8 years ago

LD_LIBRARY_PATH=/usr/lib/libstdc++.so.6 or check this: https://github.com/kyamagu/mexopencv/issues/45

zhengchuansh commented 8 years ago

and I also has use: sudo ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19 /usr/local/MATLAB/R2011a/bin/glnxa64/libstdc++.so.6, so run successfully. thank you very much!

kevinlin311tw commented 8 years ago

Hope you are well. If you got "Warning: Problems with file" when running run_cifar10, make sure you have download the images or check this: https://github.com/kevinlin311tw/caffe-cvprw15/issues/1

zhengchuansh commented 8 years ago

when run demo, I got "Warning: Problems with file" , because we must add "." to img_list.txt. like this "./examples/cvprw15-cifar10/imgs/horse2.jpg" ,then everything will be ok. And I also find if I want to run run_cifar10, I must add path for other functions, such as: path(path,'./matlab/caffe/');

But the result is very strange: Elapsed time is 0.075924 seconds. Complete Query [Hamming] 0.08 seconds query 10000 Warning: Converting non-floating point data to double.

In pdist2 at 219 In precision at 20 In run_cifar10 at 61 Elapsed time is 0.081869 seconds. Complete Query [Hamming] 0.08 seconds MAP = 0.105777

MAP should be 0.897373

In analysis folder, binary-train.mat and binary-test.mat, they are all one. so the result is wrong

kevinlin311tw commented 8 years ago

You didn't get the binary codes. Some suggestions as below:

  1. Launch matlab at caffe's root folder, or run startup.m before testing any function.
  2. Add "." to train_file_list.txt and test_file_list.txt. For example, "./examples/cvprw15-cifar10/dataset/batch1/4590.jpg"
zhengchuansh commented 8 years ago

I first run startup.m, and delete other inaccurate .mat data, then got the right result. thank you!

kevinlin311tw commented 8 years ago

Great!!