ifzhang / ByteTrack

[ECCV 2022] ByteTrack: Multi-Object Tracking by Associating Every Detection Box
MIT License
4.69k stars 891 forks source link

how to solver this error when I compile bytetrack with ncnn? #267

Open CachCheng opened 2 years ago

CachCheng commented 2 years ago

(base) cash@cash:~/CNN/ncnn/build/examples$ cmake .. -- CMAKE_INSTALL_PREFIX = /home/cash/CNN/ncnn/build/install -- NCNN_VERSION_STRING = 1.0.20220828 CMake Warning at CMakeLists.txt:410 (message): The compiler does not support avx vnni extension. NCNN_AVXVNNI will be OFF.

CMake Warning at CMakeLists.txt:421 (message): The compiler does not support avx512 vnni extension. NCNN_AVX512VNNI will be OFF.

CMake Warning at CMakeLists.txt:428 (message): The compiler does not support avx512 bf16 extension. NCNN_AVX512BF16 will be OFF.

CMake Warning at CMakeLists.txt:435 (message): The compiler does not support avx512 fp16 extension. NCNN_AVX512FP16 will be OFF.

-- Target arch: x86 -- OpenCV library: /usr/local -- version: 4.3.0 -- libraries: opencv_core;opencv_highgui;opencv_imgproc;opencv_imgcodecs;opencv_videoio -- include path: /usr/local/include/opencv4 -- Configuring done -- Generating done -- Build files have been written to: /home/cash/CNN/ncnn/build (base) cash@cash:~/CNN/ncnn/build/examples$ make [ 0%] Built target ncnn-generate-spirv Consolidate compiler generated dependencies of target ncnn [ 91%] Built target ncnn Consolidate compiler generated dependencies of target squeezenet [ 91%] Built target squeezenet Consolidate compiler generated dependencies of target squeezenet_c_api [ 91%] Built target squeezenet_c_api Consolidate compiler generated dependencies of target fasterrcnn [ 91%] Built target fasterrcnn Consolidate compiler generated dependencies of target rfcn [ 91%] Built target rfcn Consolidate compiler generated dependencies of target yolov2 [ 91%] Built target yolov2 Consolidate compiler generated dependencies of target yolov3 [ 92%] Built target yolov3 Consolidate compiler generated dependencies of target yolov4 [ 92%] Built target yolov4 Consolidate compiler generated dependencies of target yolov5 [ 92%] Built target yolov5 Consolidate compiler generated dependencies of target yolox [ 93%] Built target yolox Consolidate compiler generated dependencies of target mobilenetv2ssdlite [ 94%] Built target mobilenetv2ssdlite Consolidate compiler generated dependencies of target mobilenetssd [ 94%] Built target mobilenetssd Consolidate compiler generated dependencies of target squeezenetssd [ 95%] Built target squeezenetssd Consolidate compiler generated dependencies of target shufflenetv2 [ 95%] Built target shufflenetv2 Consolidate compiler generated dependencies of target peleenetssd_seg [ 95%] Built target peleenetssd_seg Consolidate compiler generated dependencies of target simplepose [ 96%] Built target simplepose Consolidate compiler generated dependencies of target retinaface [ 97%] Built target retinaface Consolidate compiler generated dependencies of target yolact [ 97%] Built target yolact Consolidate compiler generated dependencies of target nanodet [ 97%] Built target nanodet Consolidate compiler generated dependencies of target scrfd [ 98%] Built target scrfd Consolidate compiler generated dependencies of target scrfd_crowdhuman [ 98%] Built target scrfd_crowdhuman Consolidate compiler generated dependencies of target rvm [ 98%] Built target rvm Consolidate compiler generated dependencies of target bytetrack [ 98%] Building CXX object examples/CMakeFiles/bytetrack.dir/src/bytetrack.cpp.o /home/cash/CNN/ncnn/examples/src/bytetrack.cpp: In function ‘int main(int, char*)’: /home/cash/CNN/ncnn/examples/src/bytetrack.cpp:329:22: error: ‘CV_CAP_PROP_FRAME_WIDTH’ was not declared in this scope int img_w = cap.get(CV_CAP_PROP_FRAME_WIDTH); ^~~~~~~ /home/cash/CNN/ncnn/examples/src/bytetrack.cpp:330:22: error: ‘CV_CAP_PROP_FRAME_HEIGHT’ was not declared in this scope int img_h = cap.get(CV_CAP_PROP_FRAME_HEIGHT); ^~~~~~~~ /home/cash/CNN/ncnn/examples/src/bytetrack.cpp:331:23: error: ‘CV_CAP_PROP_FPS’ was not declared in this scope int fps = cap.get(CV_CAP_PROP_FPS); ^~~~~~~ /home/cash/CNN/ncnn/examples/src/bytetrack.cpp:331:23: note: suggested alternative: ‘CV_PROP_RW’ int fps = cap.get(CV_CAP_PROP_FPS); ^~~~~~~ CV_PROP_RW /home/cash/CNN/ncnn/examples/src/bytetrack.cpp:332:45: error: ‘CV_CAP_PROP_FRAME_COUNT’ was not declared in this scope long nFrame = static_cast(cap.get(CV_CAP_PROP_FRAME_COUNT)); ^~~~~~~ /home/cash/CNN/ncnn/examples/src/bytetrack.cpp:332:45: note: suggested alternative: ‘NCNN_MAX_PARAM_COUNT’ long nFrame = static_cast(cap.get(CV_CAP_PROP_FRAME_COUNT)); ^~~~~~~ NCNN_MAX_PARAM_COUNT /home/cash/CNN/ncnn/examples/src/bytetrack.cpp:335:36: error: ‘CV_FOURCC’ was not declared in this scope VideoWriter writer("demo.mp4", CV_FOURCC('m', 'p', '4', 'v'), fps, Size(img_w, img_h)); ^~~~~ /home/cash/CNN/ncnn/examples/src/bytetrack.cpp:335:36: note: suggested alternative: ‘CV_16UC’ VideoWriter writer("demo.mp4", CV_FOURCC('m', 'p', '4', 'v'), fps, Size(img_w, img_h)); ^~~~~ CV_16UC /home/cash/CNN/ncnn/examples/src/bytetrack.cpp:383:124: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘std::vector::size_type {aka long unsigned int}’ [-Wformat=] num: %d", num_frames, num_frames 1000000 / total_ms, output_stracks.size()),


examples/CMakeFiles/bytetrack.dir/build.make:103: recipe for target 'examples/CMakeFiles/bytetrack.dir/src/bytetrack.cpp.o' failed
make[2]: *** [examples/CMakeFiles/bytetrack.dir/src/bytetrack.cpp.o] Error 1
CMakeFiles/Makefile2:913: recipe for target 'examples/CMakeFiles/bytetrack.dir/all' failed
make[1]: *** [examples/CMakeFiles/bytetrack.dir/all] Error 2
Makefile:135: recipe for target 'all' failed
make: *** [all] Error 2