-
Notifications
You must be signed in to change notification settings - Fork 61
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
源码编译make遇到的问题 #57
Comments
CheckModelPath()
|
如果你不要pose的话,把pose相关的头文件什么的都去掉,包括头文件include之类的,仅仅保留你需要的东西即可(cmake文件也把相关的去掉) |
好的,谢谢作者,我在cmakelist里增加上onnxpose.cpp文件就生成了YOLOV8文件了 |
还有一个问题,如果要推理一段视频,需要将视频文件放在哪里呢?我看video demo 里没有传入视频路径? |
你好,请问在哪添加呢,我没有看到这个文件呀 |
在cmakelist文件里,那里有一行写了各种cpp和.h文件的,你把漏编译的cpp和.h 文件放进去就好了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
请问make的时候出现以下错误是什么问题呢?我想用它进行ONNXRUNTIME C++(CPU) 推理视频和图片
系统是Ubuntu24
onnxruntime是1.17的
opencv是4.5.3
在conda虚拟环境下编译的
g++是13.2.0
/usr/bin/ld: CMakeFiles/YOLOv8.dir/main.cpp.o: in function
int yolov8_onnx<Yolov8PoseOnnx>(Yolov8PoseOnnx&, cv::Mat&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': main.cpp:(.text._Z11yolov8_onnxI14Yolov8PoseOnnxEiRT_RN2cv3MatERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_Z11yolov8_onnxI14Yolov8PoseOnnxEiRT_RN2cv3MatERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x56): undefined reference to
Yolov8PoseOnnx::ReadModel(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool, int, bool)'/usr/bin/ld: main.cpp:(.text._Z11yolov8_onnxI14Yolov8PoseOnnxEiRT_RN2cv3MatERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_Z11yolov8_onnxI14Yolov8PoseOnnxEiRT_RN2cv3MatERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x1f1): undefined reference to
Yolov8PoseOnnx::OnnxDetect(cv::Mat&, std::vector<OutputParams, std::allocator<OutputParams> >&)' /usr/bin/ld: CMakeFiles/YOLOv8.dir/main.cpp.o: in function
int video_demo(Yolov8PoseOnnx&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&)':main.cpp:(.text._Z10video_demoI14Yolov8PoseOnnxEiRT_RNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_Z10video_demoI14Yolov8PoseOnnxEiRT_RNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x204): undefined reference to
Yolov8PoseOnnx::ReadModel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int, bool)' /usr/bin/ld: main.cpp:(.text._Z10video_demoI14Yolov8PoseOnnxEiRT_RNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_Z10video_demoI14Yolov8PoseOnnxEiRT_RNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x31d): undefined reference to
Yolov8PoseOnnx::OnnxDetect(cv::Mat&, std::vector<OutputParams, std::allocator >&)'/usr/bin/ld: CMakeFiles/YOLOv8.dir/yolov8.cpp.o: in function
Yolov8::ReadModel(cv::dnn::dnn4_v20210608::Net&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool)': yolov8.cpp:(.text+0x4a): undefined reference to
CheckModelPath(std::__cxx11::basic_string<char, std::char_traits, std::allocator >)'/usr/bin/ld: CMakeFiles/YOLOv8.dir/yolov8_onnx.cpp.o: in function
Yolov8Onnx::ReadModel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int, bool)': yolov8_onnx.cpp:(.text+0x88): undefined reference to
CheckModelPath(std::__cxx11::basic_string<char, std::char_traits, std::allocator >)'/usr/bin/ld: yolov8_onnx.cpp:(.text+0x22e): undefined reference to
OrtSessionOptionsAppendExecutionProvider_CUDA' /usr/bin/ld: CMakeFiles/YOLOv8.dir/yolov8_seg.cpp.o: in function
Yolov8Seg::ReadModel(cv::dnn::dnn4_v20210608::Net&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, bool)':yolov8_seg.cpp:(.text+0x4a): undefined reference to
CheckModelPath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)' /usr/bin/ld: CMakeFiles/YOLOv8.dir/yolov8_seg_onnx.cpp.o: in function
Yolov8SegOnnx::ReadModel(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool, int, bool)':yolov8_seg_onnx.cpp:(.text+0x88): undefined reference to
CheckModelPath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)' /usr/bin/ld: yolov8_seg_onnx.cpp:(.text+0x230): undefined reference to
OrtSessionOptionsAppendExecutionProvider_CUDA'collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/YOLOv8.dir/build.make:234:YOLOv8] 错误 1
make[1]: *** [CMakeFiles/Makefile2:83:CMakeFiles/YOLOv8.dir/all] 错误 2
make: *** [Makefile:91:all] 错误 2
cmakelist如下
The text was updated successfully, but these errors were encountered: