Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault (core dumped) #8

Open
dexception opened this issue May 5, 2019 · 10 comments
Open

Segmentation fault (core dumped) #8

dexception opened this issue May 5, 2019 · 10 comments

Comments

@dexception
Copy link

dexception commented May 5, 2019

I already have opencv 3.4.0 installed

root@xyz:/home/xyz# pkg-config --cflags opencv
-I/usr/local/include/opencv -I/usr/local/include

root@xyz:/home/xyz# pkg-config --libs opencv
-L/usr/local/lib -lopencv_stitching -lopencv_superres -lopencv_videostab -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dpm -lopencv_face -lopencv_photo -lopencv_freetype -lopencv_fuzzy -lopencv_hdf -lopencv_img_hash -lopencv_line_descriptor -lopencv_optflow -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_text -lopencv_dnn -lopencv_plot -lopencv_xfeatures2d -lopencv_shape -lopencv_video -lopencv_ml -lopencv_ximgproc -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_flann -lopencv_xobjdetect -lopencv_imgcodecs -lopencv_objdetect -lopencv_xphoto -lopencv_imgproc -lopencv_core

git clone https://github.com/Bkmz21/CompactCNNCascade
cd CompactCNNCascade
mkdir build
cd build
cmake ..
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.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
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xyz/Downloads/github/CompactCNNCascade/build
root@xyz:/home/xyz# make
LOTS OF ERRORS

n file included from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:21:0: /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:44:138: error: ‘size_t’ has not been declared void conv_3x3(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:44:152: error: ‘size_t’ has not been declared void conv_3x3(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:45:138: error: ‘size_t’ has not been declared void conv_4x4(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:45:152: error: ‘size_t’ has not been declared void conv_4x4(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:46:138: error: ‘size_t’ has not been declared void conv_5x4(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:46:152: error: ‘size_t’ has not been declared void conv_5x4(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:47:138: error: ‘size_t’ has not been declared void conv_5x5(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:47:152: error: ‘size_t’ has not been declared void conv_5x5(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:48:138: error: ‘size_t’ has not been declared void conv_6x5(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:48:152: error: ‘size_t’ has not been declared void conv_6x5(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:49:138: error: ‘size_t’ has not been declared void conv_6x6(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:49:152: error: ‘size_t’ has not been declared void conv_6x6(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:50:138: error: ‘size_t’ has not been declared void conv_7x7(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:50:152: error: ‘size_t’ has not been declared void conv_7x7(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:51:138: error: ‘size_t’ has not been declared void conv_8x7(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:51:152: error: ‘size_t’ has not been declared void conv_8x7(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:52:138: error: ‘size_t’ has not been declared void conv_8x8(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:52:152: error: ‘size_t’ has not been declared void conv_8x8(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:53:140: error: ‘size_t’ has not been declared void conv_11x10(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:53:154: error: ‘size_t’ has not been declared void conv_11x10(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:54:140: error: ‘size_t’ has not been declared void conv_11x11(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:54:154: error: ‘size_t’ has not been declared void conv_11x11(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:36:8: error: prototype for ‘void NeuralNetworksLib::SIMD::CNNPP::conv_3x3(float*, int, float*, int, int, float*, size_t, size_t)’ does not match any in class ‘NeuralNetworksLib::SIMD::CNNPP’ void CNNPP::conv_3x3(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L, size_t H) ^~~~~ In file included from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:21:0: /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:44:9: error: candidate is: void NeuralNetworksLib::SIMD::CNNPP::conv_3x3(float*, int, float*, int, int, float*, int, int) void conv_3x3(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:92:8: error: prototype for ‘void NeuralNetworksLib::SIMD::CNNPP::conv_4x4(float*, int, float*, int, int, float*, size_t, size_t)’ does not match any in class ‘NeuralNetworksLib::SIMD::CNNPP’ void CNNPP::conv_4x4(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L, size_t H) ^~~~~ In file included from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:21:0: /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:45:9: error: candidate is: void NeuralNetworksLib::SIMD::CNNPP::conv_4x4(float*, int, float*, int, int, float*, int, int) void conv_4x4(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:158:8: error: prototype for ‘void NeuralNetworksLib::SIMD::CNNPP::conv_5x4(float*, int, float*, int, int, float*, size_t, size_t)’ does not match any in class ‘NeuralNetworksLib::SIMD::CNNPP’ void CNNPP::conv_5x4(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L, size_t H) ^~~~~ In file included from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:21:0: /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:46:9: error: candidate is: void NeuralNetworksLib::SIMD::CNNPP::conv_5x4(float*, int, float*, int, int, float*, int, int) void conv_5x4(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:188:8: error: prototype for ‘void NeuralNetworksLib::SIMD::CNNPP::conv_5x5(float*, int, float*, int, int, float*, size_t, size_t)’ does not match any in class ‘NeuralNetworksLib::SIMD::CNNPP’ void CNNPP::conv_5x5(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L, size_t H) ^~~~~ In file included from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:21:0: /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:47:9: error: candidate is: void NeuralNetworksLib::SIMD::CNNPP::conv_5x5(float*, int, float*, int, int, float*, int, int) void conv_5x5(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:212:8: error: prototype for ‘void NeuralNetworksLib::SIMD::CNNPP::conv_6x5(float*, int, float*, int, int, float*, size_t, size_t)’ does not match any in class ‘NeuralNetworksLib::SIMD::CNNPP’ void CNNPP::conv_6x5(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L, size_t H) ^~~~~ In file included from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:21:0: /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:48:9: error: candidate is: void NeuralNetworksLib::SIMD::CNNPP::conv_6x5(float*, int, float*, int, int, float*, int, int) void conv_6x5(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:238:8: error: prototype for ‘void NeuralNetworksLib::SIMD::CNNPP::conv_6x6(float*, int, float*, int, int, float*, size_t, size_t)’ does not match any in class ‘NeuralNetworksLib::SIMD::CNNPP’ void CNNPP::conv_6x6(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L, size_t H) ^~~~~ In file included from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:21:0: /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:49:9: error: candidate is: void NeuralNetworksLib::SIMD::CNNPP::conv_6x6(float*, int, float*, int, int, float*, int, int) void conv_6x6(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:264:8: error: prototype for ‘void NeuralNetworksLib::SIMD::CNNPP::conv_7x7(float*, int, float*, int, int, float*, size_t, size_t)’ does not match any in class ‘NeuralNetworksLib::SIMD::CNNPP’ void CNNPP::conv_7x7(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L, size_t H) ^~~~~ In file included from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:21:0: /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:50:9: error: candidate is: void NeuralNetworksLib::SIMD::CNNPP::conv_7x7(float*, int, float*, int, int, float*, int, int) void conv_7x7(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:292:8: error: prototype for ‘void NeuralNetworksLib::SIMD::CNNPP::conv_8x7(float*, int, float*, int, int, float*, size_t, size_t)’ does not match any in class ‘NeuralNetworksLib::SIMD::CNNPP’ void CNNPP::conv_8x7(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L, size_t H) ^~~~~ In file included from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:21:0: /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:51:9: error: candidate is: void NeuralNetworksLib::SIMD::CNNPP::conv_8x7(float*, int, float*, int, int, float*, int, int) void conv_8x7(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:322:8: error: prototype for ‘void NeuralNetworksLib::SIMD::CNNPP::conv_8x8(float*, int, float*, int, int, float*, size_t, size_t)’ does not match any in class ‘NeuralNetworksLib::SIMD::CNNPP’ void CNNPP::conv_8x8(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L, size_t H) ^~~~~ In file included from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:21:0: /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:52:9: error: candidate is: void NeuralNetworksLib::SIMD::CNNPP::conv_8x8(float*, int, float*, int, int, float*, int, int) void conv_8x8(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:352:8: error: prototype for ‘void NeuralNetworksLib::SIMD::CNNPP::conv_11x10(float*, int, float*, int, int, float*, size_t, size_t)’ does not match any in class ‘NeuralNetworksLib::SIMD::CNNPP’ void CNNPP::conv_11x10(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L, size_t H) ^~~~~ In file included from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:21:0: /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:53:9: error: candidate is: void NeuralNetworksLib::SIMD::CNNPP::conv_11x10(float*, int, float*, int, int, float*, int, int) void conv_11x10(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~~~~~ /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:381:8: error: prototype for ‘void NeuralNetworksLib::SIMD::CNNPP::conv_11x11(float*, int, float*, int, int, float*, size_t, size_t)’ does not match any in class ‘NeuralNetworksLib::SIMD::CNNPP’ void CNNPP::conv_11x11(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L, size_t H) ^~~~~ In file included from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp:21:0: /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h:54:9: error: candidate is: void NeuralNetworksLib::SIMD::CNNPP::conv_11x11(float*, int, float*, int, int, float*, int, int) void conv_11x11(float* __restrict dst, int dst_size_l, float* __restrict src, int src_size_l, int src_size_h, float* __restrict kernel, size_t L = 0, size_t H = 0); ^~~~~~~~~~ CMakeFiles/CNNObjectDetector.dir/build.make:278: recipe for target 'CMakeFiles/CNNObjectDetector.dir/src/CNNObjectDetector/cnnpp_cplusplus.cpp.o' failed make[2]: *** [CMakeFiles/CNNObjectDetector.dir/src/CNNObjectDetector/cnnpp_cplusplus.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/CNNObjectDetector.dir/all' failed make[1]: *** [CMakeFiles/CNNObjectDetector.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

Edited
vim github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.cpp
vim github/CompactCNNCascade/src/CNNObjectDetector/cnnpp_cplusplus.h
Add #include for size_t error

root@xyz:/home/xyz# make
LOTS OF ERRORS

Scanning dependencies of target CNNObjectDetector
[  5%] Building CXX object CMakeFiles/CNNObjectDetector.dir/src/CNNObjectDetector/test_accuracy.cpp.o
In file included from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/test_accuracy.cpp:75:0:
/home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/cnn_detector_v3.h:387:15: warning: inline function ‘void NeuralNetworksLib::CNNDetector::Merger(std::vector<NeuralNetworksLib::CNNDetector::Detection>&, std::vector<NeuralNetworksLib::CNNDetector::Detection>&, float, bool)’ used but never defined
   inline void Merger(std::vector<Detection>& detections, std::vector<Detection>& rect, float threshold = 0.5f, bool del = false);
               ^~~~~~
[ 10%] Building CXX object CMakeFiles/CNNObjectDetector.dir/src/CNNObjectDetector/cnn_simd.cpp.o
[ 15%] Building CXX object CMakeFiles/CNNObjectDetector.dir/src/CNNObjectDetector/cnn_simd_cntk.cpp.o
[ 21%] Building CXX object CMakeFiles/CNNObjectDetector.dir/src/CNNObjectDetector/cnnpp_cplusplus.cpp.o
[ 26%] Building CXX object CMakeFiles/CNNObjectDetector.dir/src/CNNObjectDetector/image.cpp.o
[ 31%] Building CXX object CMakeFiles/CNNObjectDetector.dir/src/CNNObjectDetector/image_proc.cpp.o
[ 36%] Building CXX object CMakeFiles/CNNObjectDetector.dir/src/CNNObjectDetector/image_proc_cl.cpp.o
[ 42%] Building CXX object CMakeFiles/CNNObjectDetector.dir/src/CNNObjectDetector/image_resize.cpp.o
[ 47%] Building CXX object CMakeFiles/CNNObjectDetector.dir/src/CNNObjectDetector/image_resize_cl.cpp.o
[ 52%] Building CXX object CMakeFiles/CNNObjectDetector.dir/src/CNNObjectDetector/timer.cpp.o
/home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/timer.cpp: In member function ‘void NeuralNetworksLib::Timer::start(int)’:
/home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/timer.cpp:50:69: error: no match for ‘operator=’ (operand types are ‘std::chrono::_V2::steady_clock::time_point {aka std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >}’ and ‘std::chrono::_V2::system_clock::time_point {aka std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >}’)
   this->counters[counter] = std::chrono::high_resolution_clock::now();
                                                                     ^
In file included from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/timer.h:33:0,
                 from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/timer.cpp:21:
/usr/include/c++/7/chrono:616:14: note: candidate: std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >& std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >::operator=(const std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >&)
       struct time_point
              ^~~~~~~~~~
/usr/include/c++/7/chrono:616:14: note:   no known conversion for argument 1 from ‘std::chrono::_V2::system_clock::time_point {aka std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >}’ to ‘const std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >&’
/usr/include/c++/7/chrono:616:14: note: candidate: std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >& std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >::operator=(std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >&&)
/usr/include/c++/7/chrono:616:14: note:   no known conversion for argument 1 from ‘std::chrono::_V2::system_clock::time_point {aka std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >}’ to ‘std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >&&’
/home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/timer.cpp: In member function ‘double NeuralNetworksLib::Timer::get(double, int)’:
/home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/timer.cpp:55:44: error: no match for ‘operator-’ (operand types are ‘std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >’ and ‘std::chrono::_V2::steady_clock::time_point {aka std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >}’)
   std::chrono::duration<double> diff = end - this->counters[counter];
                                        ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/timer.h:33:0,
                 from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/timer.cpp:21:
/usr/include/c++/7/chrono:752:7: note: candidate: template<class _Clock, class _Dur1, class _Dur2> constexpr typename std::common_type<_Duration1, _Duration2>::type std::chrono::operator-(const std::chrono::time_point<_Clock, _Duration1>&, const std::chrono::time_point<_Clock, _Duration2>&)
       operator-(const time_point<_Clock, _Dur1>& __lhs,
       ^~~~~~~~
/usr/include/c++/7/chrono:752:7: note:   template argument deduction/substitution failed:
/home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/timer.cpp:55:68: note:   deduced conflicting types for parameter ‘_Clock’ (‘std::chrono::_V2::system_clock’ and ‘std::chrono::_V2::steady_clock’)
   std::chrono::duration<double> diff = end - this->counters[counter];
                                                                    ^
In file included from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/timer.h:33:0,
                 from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/timer.cpp:21:
/usr/include/c++/7/chrono:741:7: note: candidate: template<class _Clock, class _Dur1, class _Rep2, class _Period2> constexpr std::chrono::time_point<_Clock, typename std::common_type<_Dur1, std::chrono::duration<_Rep2, _Period2> >::type> std::chrono::operator-(const std::chrono::time_point<_Clock, _Duration1>&, const std::chrono::duration<_Rep2, _Period2>&)
       operator-(const time_point<_Clock, _Dur1>& __lhs,
       ^~~~~~~~
/usr/include/c++/7/chrono:741:7: note:   template argument deduction/substitution failed:
/home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/timer.cpp:55:68: note:   ‘std::chrono::_V2::steady_clock::time_point {aka std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >}’ is not derived from ‘const std::chrono::duration<_Rep2, _Period2>’
   std::chrono::duration<double> diff = end - this->counters[counter];
                                                                    ^
In file included from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/timer.h:33:0,
                 from /home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/timer.cpp:21:
/usr/include/c++/7/chrono:459:7: note: candidate: template<class _Rep1, class _Period1, class _Rep2, class _Period2> constexpr typename std::common_type<std::chrono::duration<_Rep1, _Period1>, std::chrono::duration<_Rep2, _Period2> >::type std::chrono::operator-(const std::chrono::duration<_Rep1, _Period1>&, const std::chrono::duration<_Rep2, _Period2>&)
       operator-(const duration<_Rep1, _Period1>& __lhs,
       ^~~~~~~~
/usr/include/c++/7/chrono:459:7: note:   template argument deduction/substitution failed:
/home/xyz/Downloads/github/CompactCNNCascade/src/CNNObjectDetector/timer.cpp:55:68: note:   ‘std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1, 1000000000> > >’ is not derived from ‘const std::chrono::duration<_Rep1, _Period1>’
   std::chrono::duration<double> diff = end - this->counters[counter];
                                                                    ^
CMakeFiles/CNNObjectDetector.dir/build.make:422: recipe for target 'CMakeFiles/CNNObjectDetector.dir/src/CNNObjectDetector/timer.cpp.o' failed
make[2]: *** [CMakeFiles/CNNObjectDetector.dir/src/CNNObjectDetector/timer.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/CNNObjectDetector.dir/all' failed
make[1]: *** [CMakeFiles/CNNObjectDetector.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Edited the following files
vim CompactCNNCascade/src/CNNObjectDetector/timer.cpp
Replaced high_resolution_clock with steady_clock

All Code compiled perfectly.

root@xyz:/home/xyz# make
Scanning dependencies of target CNNObjectDetector
[ 5%] Building CXX object CMakeFiles/CNNObjectDetector.dir/src/CNNObjectDetector/timer.cpp.o
[ 10%] Building CXX object CMakeFiles/CNNObjectDetector.dir/src/CNNObjectDetector/cnn_detector_v3.cpp.o
[ 15%] Building CXX object CMakeFiles/CNNObjectDetector.dir/src/CNNObjectDetector/packing_2D.cpp.o
[ 21%] Linking CXX executable bin/CNNObjectDetector
[100%] Built target CNNObjectDetector

root@xyz:/home/xyz# cd bin

root@xyz:/home/xyz# ./CNNObjectDetector 
TEST ACCURACY

[CNNDetector] Initializing with max image size (1280, 720)!

[TEST ACCURACY]  test allocate memory
[TEST ACCURACY] 	cannels = 1: success
[TEST ACCURACY] 	cannels = 3: success
[TEST ACCURACY] 	cannels = 4: success

[TEST ACCURACY]  test image converter
Segmentation fault (core dumped)

@jamessmith90
Copy link

+1 Same Issue

@Bkmz21
Any resolutions ?

@Bkmz21
Copy link
Owner

Bkmz21 commented May 9, 2019

Hi,
I can not catch the error on my system.
Can you tell which function the error occurs in?

@dexception
Copy link
Author

@Bkmz21
Thanks for replying !

root@xyz:/home/xyz# ./CNNObjectDetector 
TEST ACCURACY

[CNNDetector] Initializing with max image size (1280, 720)!

[TEST ACCURACY]  test allocate memory
[TEST ACCURACY] 	cannels = 1: success
[TEST ACCURACY] 	cannels = 3: success
[TEST ACCURACY] 	cannels = 4: success

[TEST ACCURACY]  test image converter
Segmentation fault (core dumped)

https://github.com/Bkmz21/CompactCNNCascade/blob/master/src/CNNObjectDetector/test_accuracy.cpp#L350

@Bkmz21
Copy link
Owner

Bkmz21 commented May 9, 2019

Surely one of these functions falls.
https://github.com/Bkmz21/CompactCNNCascade/blob/master/src/CNNObjectDetector/test_accuracy.cpp#L405-L437
You can comment them in sequence until this block of checks is passed.

@dexception
Copy link
Author

@Bkmz21
Disabled Image Converter, Resizer, CNN [All of them are giving segmentation fault]

Changed BUILD_FaceDetector to ON inside CMakeLists.txt but there is not binary to test it.

Please review the code.. It is not stable at all.

@Bkmz21
Copy link
Owner

Bkmz21 commented May 9, 2019

Thanks, I'll try to fix it in a week.

@dexception
Copy link
Author

@Bkmz21
Tried it on windows.
Not accurate as claimed in the paper.

@Bkmz21
Copy link
Owner

Bkmz21 commented May 19, 2019

Hi,

You must change the scale_factor and minNeighbour parameters to improve accuracy.

@dexception
Copy link
Author

@Bkmz21

My Observations:

Ran on a Camera:
Size max_image_size = Size(2560, 1440);

*******************************************************************
* Compact Convolutional Neural Network Cascade for Face Detection *
* http://arxiv.org/abs/1508.01292                                 *
* Copyright (c) 2017, Ilya Kalinovskiy, e-mail: [email protected]    *
* All rights reserved                                             *
*******************************************************************


[CompactCNNLibAPI] CNN Cascade v2.0
[CompactCNNLibAPI] Face Detector v3.1
[CompactCNNLibAPI] API v2.0
[CompactCNNLibAPI] SIMD support (AVX)!
[CompactCNNLibAPI] CUDA support!
[CompactCNNLibAPI] OpenMP support (maximum 4 threads)!


[CNNDetector] Initializing with max image size (2560, 1440)!
[CNNDetector] [CUDA] Device count: 1

[CNNDetector] [CUDA] Device id: 0
[CNNDetector] [CUDA] Device name: GeForce 940MX
[CNNDetector] [CUDA] Total global memory: -2147483648
[CNNDetector] [CUDA] Shared memory per block: 49152
[CNNDetector] [CUDA] Registers per block: 65536
[CNNDetector] [CUDA] Warp size: 32
[CNNDetector] [CUDA] Memory pitch: 2147483647
[CNNDetector] [CUDA] Max threads per block: 1024
[CNNDetector] [CUDA] Max threads dimensions: x = 1024, y = 1024, z = 64
[CNNDetector] [CUDA] Max grid size: x = 2147483647, y = 65535, z = 65535
[CNNDetector] [CUDA] Clock rate: 1189000
[CNNDetector] [CUDA] Total constant memory: 65536
[CNNDetector] [CUDA] Compute capability: 5.0
[CNNDetector] [CUDA] Texture alignment: 512
[CNNDetector] [CUDA] Device overlap: 1
[CNNDetector] [CUDA] Multiprocessor count: 3
[CNNDetector] [CUDA] Kernel execution concurrent support: true
[CNNDetector] [CUDA] Kernel execution timeout enabled: true

[CNNDetector] [CUDA] CUDA device id selected: 0
time detect: 42.623 ms
time detect: 41.631 ms
time detect: 41.831 ms

With the following settings:

	param.min_face_height = 50;
	param.scale_factor = 1.1f;
	param.equalize = false;
	param.reflection = false;
	param.pipeline = CompactCNNLib::FaceDetector::Pipeline::GPU;
	param.num_threads = 4;
	param.detect_precision = CompactCNNLib::FaceDetector::DetectPrecision::high;
	param.facial_analysis = false;
  1. Got lots of false positives.
  2. Missing front faces with beard also Side faces are missed.

Am i using the wrong settings ?

@dexception
Copy link
Author

@Bkmz21
Any plan to fix the bugs ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants