yilei0620 / RGBD-Slam-Semantic-Seg-DeepLab

The package is common Slam combined with DeepLab-V2-CRF Library.
62 stars 20 forks source link

the deeplab package provided cannot be compiled #1

Closed feiran-l closed 7 years ago

feiran-l commented 7 years ago

Hi yilei0620,

I have been trying to use your code but I encountered this problem when compiling the deeplab package:

__/home/li/deeplab_v2/python/caffe/_caffe.cpp: In function ‘void caffe::Net_SetInputArrays(caffe::Net, boost::python::api::object, boost::python::api::object)’: /home/li/deeplab_v2/python/caffe/_caffe.cpp:133:32: error: no matching function for call to ‘caffe::MemoryDataLayer::Reset(caffe::Dtype, caffe::Dtype, npy_intp&)’ PyArray_DIMS(data_arr)[0]); ^ In file included from /home/li/deeplab_v2/python/caffe/_caffe.cpp:18:0: /home/li/deeplab_v2/include/caffe/layers/memory_data_layer.hpp:39:8: note: candidate: void caffe::MemoryDataLayer::Reset(Dtype, Dtype, Dtype, int) [with Dtype = float] void Reset(Dtype data, Dtype label, Dtype* datadims, int n); ^ /home/li/deeplab_v2/include/caffe/layers/memory_data_layer.hpp:39:8: note: candidate expects 4 arguments, 3 provided python/CMakeFiles/pycaffe.dir/build.make:62: recipe for target 'python/CMakeFiles/pycaffe.dir/caffe/_caffe.cpp.o' failed make[2]: [python/CMakeFiles/pycaffe.dir/caffe/_caffe.cpp.o] Error 1 CMakeFiles/Makefile2:1085: recipe for target 'python/CMakeFiles/pycaffe.dir/all' failed make[1]: [python/CMakeFiles/pycaffe.dir/all] Error 2

it seems the function ask for another parameter, could you help me? Thank you

yilei0620 commented 7 years ago

Did you use my deeplab package for compiling?

If so, when you generate cmake file, please don't let it compile python api or python layers.

I change some src code for memory data layer but I didn't correct it for python api.

feiran-l commented 7 years ago

Sorry but I am not familiar with cmake, would you like to be more specific?

And I used your deeplab package

yilei0620 commented 7 years ago

You can use cmake-gui instead of cmake ...

Then, you can disable the python apis and python layers in graphic interface and then generate cmake file.

Also, you need to disable matlab apis.

feiran-l commented 7 years ago

Thank you ver much. I have successfully compiled the deeplab now. But a new case happened when I tried to compile the slam-deeplab package. I have copied the full contains of deeplab/cmake and ceres-solver/cmake to slam-deeplab/cmake_modules, but error occured during the cmake .. like this:

CMake Error at src/CMakeLists.txt:16 (FIND_PACKAGE): By not providing "FindCSparse.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "CSparse", but CMake did not find one.

Could not find a package configuration file provided by "CSparse" with any of the following names:

CSparseConfig.cmake
csparse-config.cmake

Add the installation prefix of "CSparse" to CMAKE_PREFIX_PATH or set "CSparse_DIR" to a directory containing one of the above files. If "CSparse" provides a separate development package or SDK, be sure it has been installed.

also, there was a lot of warning like

Could NOT find ensenso (missing: ENSENSO_LIBRARY ENSENSO_INCLUDE_DIR) WARNING io features related to ensenso will be disabled -- Could NOT find DAVIDSDK (missing: DAVIDSDK_LIBRARY DAVIDSDK_INCLUDE_DIR) WARNING io features related to davidSDK will be disabled -- Could NOT find DSSDK (missing: _DSSDK_LIBRARIES) WARNING io features related to dssdk will be disabled WARNING io features related to pcap will be disabled WARNING io features related to png will be disabled

and like

-- The imported target "vtkWrapTcl" references the file "/usr/bin/vtkWrapTcl" but this file does not exist. Possible reasons include:

I am using ubuntu16.04 and the installation guidance says the CMakelist.txt should be modified but there is not any instructions in it. Would you like to show me how to proceed?

yilei0620 commented 7 years ago

It is my mistake, you need to see /src/Cmakelist.txt.

And you need to copy Ceres and DeepLab cmake files (for example files in /ceres_solver/cmake/) in to directory slam_deeplab/cmake_modules/.