maskdetection
maskdetection copied to clipboard
Not able to biuld in google clab "/content/drive/My Drive/Colab Notebooks/ai/mask_detection/maskdetection/lib/include/FaceMaskDetector.hpp:9:10: fatal error: caffe/caffe.hpp: No such file or directory #include "caffe/caffe.hpp" compilation terminated."
I was able to successfully run cmake
!cmake ..
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda (found version "10.1")
-- Configuring done
-- Generating done
-- Build files have been written to: /content/drive/My Drive/Colab Notebooks/ai/mask_detection/maskdetection/build
but when I did make
!make
I got the following error
Scanning dependencies of target face_mask
[-10%] Building CXX object lib/CMakeFiles/face_mask.dir/src/FaceMaskDetector.cpp.o
In file included from /content/drive/My Drive/Colab Notebooks/ai/mask_detection/maskdetection/lib/src/FaceMaskDetector.cpp:1:0:
/content/drive/My Drive/Colab Notebooks/ai/mask_detection/maskdetection/lib/include/FaceMaskDetector.hpp:9:10: fatal error: caffe/caffe.hpp: No such file or directory
#include "caffe/caffe.hpp"
^~~~~~~~~~~~~~~~~
compilation terminated.
lib/CMakeFiles/face_mask.dir/build.make:62: recipe for target 'lib/CMakeFiles/face_mask.dir/src/FaceMaskDetector.cpp.o' failed
make[2]: *** [lib/CMakeFiles/face_mask.dir/src/FaceMaskDetector.cpp.o] Error 1
CMakeFiles/Makefile2:90: recipe for target 'lib/CMakeFiles/face_mask.dir/all' failed
make[1]: *** [lib/CMakeFiles/face_mask.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
by the way caffe-gpu is installed via sudo apt install caffe-cuda
Did you add your caffe include path in your CMakeList.txt?
@2016110071 I am facing the same issue, I have installed caffe on Google Colab (Ubuntu 18.04 system with GPU) using "sudo apt install caffe-cuda" as described here: https://caffe.berkeleyvision.org/install_apt.html
I have two doubts: a) There are two CmakeLists files, one in the root directory itself and the other inside lib folder. The root folder CMakeLists file mentions a "thirdpart" folder and to an include/openblas folder. Where I can find these. b) Secondly I am unable to file a path location to the libcaffe.so mentioned in the lib/CmakeLists file, maybe its specific to Google Colab environment. My libcaffe.so.1.0.0 is at : /usr/lib/x86_64-linux-gnu/libcaffe.so.1.0.0 Caffe 2 is at : /usr/local/lib/python3.6/dist-packages/caffe2