maskdetection icon indicating copy to clipboard operation
maskdetection copied to clipboard

how to compile for cpu? CMake Error at /usr/share/cmake-3.10/Modules/FindCUDA.cmake:682 (message): Specify CUDA_TOOLKIT_ROOT_DIR Call Stack (most recent call first): lib/CMakeLists.txt:4 (find_package)

Open amitjslearn opened this issue 4 years ago • 9 comments

I don't have GPU, I am using CPU. When I was following the instructions given in the README to compile. $ cmake .. I got the following errors.

-- 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
CMake Error at /usr/share/cmake-3.10/Modules/FindCUDA.cmake:682 (message):
  Specify CUDA_TOOLKIT_ROOT_DIR
Call Stack (most recent call first):
  lib/CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!

Can anyone tell me how to fix it?

amitjslearn avatar Apr 10 '20 11:04 amitjslearn

Hi, I have the same problem...I haven't GPU. Did you find other solution? Thanks

grdsvt avatar Apr 19 '20 08:04 grdsvt

use opencv dnn to load the model.

amitjslearn avatar Apr 19 '20 09:04 amitjslearn

use opencv dnn to load the model.

Hi @amitjslearn could you please show us your CMakeLists for using CPU?

Thank you!

SlouchyCat avatar Apr 26 '20 07:04 SlouchyCat

Maybe you can build your caffe with CPU-only and comment the CUDA-related lines in CMakeList.txt

2016110071 avatar Apr 26 '20 10:04 2016110071

use opencv dnn to load the model.

Hi @amitjslearn could you please show us your CMakeLists for using CPU?

Thank you!

If you have opencv (for python) installed, then you don't need to worry about cmake stuff, just use the model path to load the model in cv2.dnn

amitjslearn avatar Apr 26 '20 11:04 amitjslearn

Hey @amitjslearn, thanks for the previous comment. How is the model performing on your data? Do you think there is any way to localise the location of the mask?

raghavb avatar Apr 28 '20 15:04 raghavb

They don't have good documentation about how to perceive the model's output, so I wasn't able to make anything out of it. You can try to localize the face first then try for mask detection.

amitjslearn avatar May 02 '20 09:05 amitjslearn

I am not being able to load the model with opencv either.

Shubha777 avatar May 02 '20 19:05 Shubha777

I am not being able to load the model with opencv either.

Please, comment with the code you are using to load the model, then someone will be able to help properly.

amitjslearn avatar May 02 '20 19:05 amitjslearn