shubhtuls / ViewpointsAndKeypoints

Code Release for "Viewpoints and Keypoints" CVPR 2015.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

warning: unused variable ‘sumFilt’ [-Wunused-variable] float sumFilt = 0;

qingnanli opened this issue · comments

I can compile caffe from https://github.com/BVLC/caffe/ and run the mnist demo well, however, when I follow the README.md here
cd external/caffe
cp Makefile.config.example Makefile.config
make -j 8 (I change the num to 4)
An error occured:
In file included from /usr/local/include/opencv2/highgui/highgui_c.h:47:0,
from /usr/local/include/opencv2/highgui.hpp:701,
from /usr/local/include/opencv2/highgui/highgui.hpp:48,
from src/caffe/layers/window_multiclass_keypoint_data_layer.cpp:10:
/usr/local/include/opencv2/imgcodecs/imgcodecs_c.h:62:5: error: previous declaration of ‘ CV_LOAD_IMAGE_COLOR’
CV_LOAD_IMAGE_COLOR =1,
^
src/caffe/layers/window_multiclass_keypoint_data_layer.cpp: In instantiation of ‘void caffe::WindowMulticlassKeypointDataLayer::Forward_cpu(const std::vector<caffe::Blob>&, const std::vector<caffe::Blob>&) [with Dtype = float]’:
src/caffe/layers/window_multiclass_keypoint_data_layer.cpp:536:1: required from here
src/caffe/layers/window_multiclass_keypoint_data_layer.cpp:525:9: warning: unused variable ‘sumFilt’ [-Wunused-variable]
float sumFilt = 0;
^
src/caffe/layers/window_multiclass_keypoint_data_layer.cpp: In instantiation of ‘void caffe::WindowMulticlassKeypointDataLayer::Forward_cpu(const std::vector<caffe::Blob>&, const std::vector<caffe::Blob>&) [with Dtype = double]’:
src/caffe/layers/window_multiclass_keypoint_data_layer.cpp:536:1: required from here
src/caffe/layers/window_multiclass_keypoint_data_layer.cpp:525:9: warning: unused variable ‘sumFilt’ [-Wunused-variable]
make: *** [.build_release/src/caffe/layers/window_multiclass_keypoint_data_layer.o] Error 1
make: *** Waiting for unfinished jobs....

I try to uncomment the float sumFilt = 0; which seems useless. The error is as follows:

g++ src/caffe/layers/exp_layer.cpp -pthread -fPIC -DNDEBUG -O2 -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 -Wall -Wno-sign-compare -c -o .build_release/src/caffe/layers/exp_layer.o 2> .build_release/src/caffe/layers/exp_layer.o.warnings.txt
|| (cat .build_release/src/caffe/layers/exp_layer.o.warnings.txt; exit 1)
src/caffe/layers/window_multiclass_keypoint_data_layer.cpp:26:11: error: ‘const int CV_LOAD_IMAGE_COLOR’ redeclared as different kind of symbol
const int CV_LOAD_IMAGE_COLOR = cv::IMREAD_COLOR;
^
In file included from /usr/local/include/opencv2/highgui/highgui_c.h:47:0,
from /usr/local/include/opencv2/highgui.hpp:701,
from /usr/local/include/opencv2/highgui/highgui.hpp:48,
from src/caffe/layers/window_multiclass_keypoint_data_layer.cpp:10:
/usr/local/include/opencv2/imgcodecs/imgcodecs_c.h:62:5: error: previous declaration of ‘ CV_LOAD_IMAGE_COLOR’
CV_LOAD_IMAGE_COLOR =1,
^
make: *** [.build_release/src/caffe/layers/window_multiclass_keypoint_data_layer.o] Error 1
make: *** Waiting for unfinished jobs....

Could you give me some advice?
(I edit the MATLAB_DIR as /home/usrname/Downloads/bin/glnxa64 in the Makefile.config file first and make -j 4 latter)

I solved the above problem by reinstalling opencv2.x instead of opencv3.x. It works! However, when I run the debugger to the breakpoint at line 6 in getNingPreds.m, the ningKeypoints direction in cachedir and voc_data file can not be found. Could you give some advice to me?

Hi,
Good to know that a new OpenCV resolved the issue !
Sorry about the bug in the evaluation - it is just trying to evaluate a baseline from a previous paper from our lab (by Jon and Ning - denoted as 'Long et al.' in tables of the paper) and cannot find the saved results.
The simplest workaround would be to just comment the two corresponding lines.

If you do want to reproduce their results as well, I can try to find the precomputed predictions.

It works! many thx for your help :)