opencv / opencv/opencv_contrib

Compile error in module cnn_3dobj

Open
#1,069 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

category: build/install category: cnn_3dobj
Dominant language
C++
Stars
10.2k
Forks
6k
Avg merge
1d 23h
Merged PRs (30d)
1

Description

I'm getting the following compile error when trying to build OpenCV:

[62%] Building CXX object modules/cnn_3dobj/CMakeFiles/opencv_cnn_3dobj.dir/src/cnn_feature.cpp.o
/home/user/abs/opencv-noffmpeg-git/src/opencv_contrib/modules/cnn_3dobj/src/cnn_feature.cpp: In member function ‘void cv::cnn_3dobj::descriptorExtractor::loadNet(const cv::String&, const cv::String&, const cv::String&)’:
/home/user/abs/opencv-noffmpeg-git/src/opencv_contrib/modules/cnn_3dobj/src/cnn_feature.cpp:92:54: error: no matching function for call to ‘caffe::Net<float>::Net(const cv::String&, caffe::Phase)’
             convnet = new Net<float>(model_file, TEST);
                                                      ^
System information (version)
  • OpenCV => git master (currently at 3.2.0.r332.gc1007c7276)
  • OpenCV contrib modules => git master (currently at 3.2.0.r160.g58f7afcb)
  • Caffe => rc5
  • protobuf => 3.2.0
  • OpenBLAS => 0.2.19
  • Operating System / Platform => Arch Linux x86_64
  • Compiler => gcc 6.3.1
Detailed description

The cnn_3dobj readme instructs to compile with -DWITH_QT:BOOL=OFF but this does not interfered in the error. Also, compiling with or without examples/tests did not make any difference regarding to this issue.
Caffe was manually compiled using OpenBLAS as the BLAS/CBLAS/Lapack provider and with CUDA support.

Steps to reproduce

Attached.
Complete output also provided.

opencv-cnn_3dobj-steps.txt
opencv-cnn_3dobj-output.txt

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with modules/cnn_3dobj/src/cnn_feature.cpp at line 92 and compare the reported Caffe rc5 constructor error with the module's build configuration. Use opencv-cnn_3dobj-steps.txt and opencv-cnn_3dobj-output.txt to reproduce the failure; done means the cnn_3dobj module compiles successfully with the stated versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, computer-vision
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.