Open jpiabrantes opened 8 years ago
The caffe was forked from earlier versions, so it may be not compatible with opencv 3. The long term solution would be merging our caffe with more recent caffe, but for short-term I would suggest build an earlier opencv (I was using 2.4.10) without "sudo make install" to avoid conflicting your original use of opencv 3, and point caffe to the location you build it in Makefile.config (add stuff at the head of INCLUDE_DIRS and LIBRARY_DIRS).
I succeeded compiling with doing this on a machine with installed opencv 3, but with default python. There might be further problems to solve with anaconda.
Thanks. I was able to fix the problem with OpenCV. I now receive another error that I think it's related with my cuDNN version.
joao@joao:~/github/caffe-shen$ make test -j8
NVCC src/caffe/layers/cudnn_conv_layer.cu
src/caffe/layers/cudnn_conv_layer.cu(33): error: argument of type "cudnnAddMode_t" is incompatible with parameter of type "const void *"
detected during instantiation of "void caffe::CuDNNConvolutionLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=float]"
(115): here
src/caffe/layers/cudnn_conv_layer.cu(33): error: argument of type "const void *" is incompatible with parameter of type "cudnnTensorDescriptor_t"
detected during instantiation of "void caffe::CuDNNConvolutionLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=float]"
(115): here
src/caffe/layers/cudnn_conv_layer.cu(33): error: argument of type "const void *" is incompatible with parameter of type "cudnnTensorDescriptor_t"
detected during instantiation of "void caffe::CuDNNConvolutionLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=float]"
(115): here
src/caffe/layers/cudnn_conv_layer.cu(33): error: too many arguments in function call
detected during instantiation of "void caffe::CuDNNConvolutionLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=float]"
(115): here
src/caffe/layers/cudnn_conv_layer.cu(33): error: argument of type "cudnnAddMode_t" is incompatible with parameter of type "const void *"
detected during instantiation of "void caffe::CuDNNConvolutionLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=double]"
(115): here
src/caffe/layers/cudnn_conv_layer.cu(33): error: argument of type "const void *" is incompatible with parameter of type "cudnnTensorDescriptor_t"
detected during instantiation of "void caffe::CuDNNConvolutionLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=double]"
(115): here
src/caffe/layers/cudnn_conv_layer.cu(33): error: argument of type "const void *" is incompatible with parameter of type "cudnnTensorDescriptor_t"
detected during instantiation of "void caffe::CuDNNConvolutionLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=double]"
(115): here
src/caffe/layers/cudnn_conv_layer.cu(33): error: too many arguments in function call
detected during instantiation of "void caffe::CuDNNConvolutionLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=double]"
(115): here
8 errors detected in the compilation of "/tmp/tmpxft_00006036_00000000-16_cudnn_conv_layer.compute_50.cpp1.ii".
Makefile:567: recipe for target '.build_release/cuda/src/caffe/layers/cudnn_conv_layer.o' failed
make: *** [.build_release/cuda/src/caffe/layers/cudnn_conv_layer.o] Error 1
I am using Cuda 7.5 and cudNN 5. Which ones did you use?
I was using cuda 7.5 and cudnn 3.
Could you let me know how did you solve the earlier problem ? I'm having the same problem now.
Please see this. https://github.com/Nerei/kinfu_remake/issues/8 It worked for me.
@ShangxuanWu Please let me know what worked for you. The link is not found. @jpiabrantes @congwang1985 Have you solved this issue? If so, please share the solution...
@shihenw Hey, I've got the same issue when compiling your caffe. By using opencv 3.2, your caffe is not compiled with 'make all' command, so I tried to use nvidia caffe now. For using opencv 2.4.x with your caffe, could you tell me more details for pointing opencv 2.4.x build location in Makefile.config file? I comment # OPENCV_VERSION := 3, and I put INCLUDE_DIRS+= /home/handale/opencv-2.4.13/include, LIBRARY_DIRS += /home/handale/opencv-2.4.13/release/lib Is this supposed to be right? It's not working.. so I wonder if there is another way to do it. Also, I am wondering which matlab version you are using. When I use Matlab 2014b with nvidia-caffe and opencv3.2, imshow doesn't really show the image corretly so it's difficult to make bounding box in the image. Please let me know which matlab version you are using. Thanks!
hi, I got the same issue and can't complete building caffe src/caffe/CMakeFiles/caffe.dir/build.make:883: recipe for target 'src/caffe/CMakeFiles/caffe.dir/layers/euclidean_loss_layer.cpp.o' failed make[2]: [src/caffe/CMakeFiles/caffe.dir/layers/euclidean_loss_layer.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... CMakeFiles/Makefile2:272: recipe for target 'src/caffe/CMakeFiles/caffe.dir/all' failed make[1]: [src/caffe/CMakeFiles/caffe.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: [all] Error 2
vector
I building with opencv3.0 @shihenw @ShangxuanWu @congwang1985 @handale88 @jpiabrantes please help me,thanks!
I find the solution from some one else, just remove the contrib module in the Makefile and uncomment the contrib.hpp in some files used the *hpp and make all
This is similar to above answers.
find caffe/src/caffe/ -type f -print0 | xargs -0 sed -i 's/#include <opencv2\/contrib\/contrib.hpp>/\/\/#include <opencv2\/contrib\/contrib.hpp>/g'
I had the same error. My solution was: Change from Opencv 3.3 to 2.4.8 by entering 2.4.8`s build. then sudo make install
I am having problems compiling your Caffe version. It seems to a be a problem with OpenCV. I am using opencv 3.0.0 Here's the error: