Code Monkey home page Code Monkey logo

yolov5_tensorrt_int8's Issues

make编译错误

(tensorrt) bowen@bowen:/yolov5/yolov5_tensorrt_int8/build$ make
Scanning dependencies of target YoloV5sEngine
[ 50%] Building CXX object CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o
/home/bowen/yolov5/yolov5_tensorrt_int8/yolov5s_infer.cc:18:22: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
18 | char* output_name1 = "output";
| ^~~~~~~~
/home/bowen/yolov5/yolov5_tensorrt_int8/yolov5s_infer.cc:19:22: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
19 | char* output_name2 = "417";
| ^~~~~
/home/bowen/yolov5/yolov5_tensorrt_int8/yolov5s_infer.cc:20:22: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
20 | char* output_name3 = "437";
| ^~~~~
/home/bowen/yolov5/yolov5_tensorrt_int8/yolov5s_infer.cc:21:24: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
21 | char* trt_model_path = "/home/bowen/yolov5/yolov5_tensorrt_int8/models/yolov5s-4.0-int8-relu.trt";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[100%] Linking CXX executable YoloV5sEngine
/usr/bin/ld: CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o: in function renderBoundingBox(cv::Mat, std::vector<Bbox, std::allocator<Bbox> > const&)': yolov5s_infer.cc:(.text+0x7a2): undefined reference to cv::Mat::Mat(cv::Mat&&)'
/usr/bin/ld: CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o: in function preprocess_img(cv::Mat&)': yolov5s_infer.cc:(.text+0x17dd): undefined reference to cv::Mat::Mat(int, int, int)'
/usr/bin/ld: yolov5s_infer.cc:(.text+0x184f): undefined reference to cv::Mat::Mat(int, int, int, cv::Scalar_<double> const&)' /usr/bin/ld: CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o: in function main':
yolov5s_infer.cc:(.text+0x1eaa): undefined reference to `cv::Mat::Mat()'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/YoloV5sEngine.dir/build.make:84:YoloV5sEngine] 错误 1
make[1]: *** [CMakeFiles/Makefile2:76:CMakeFiles/YoloV5sEngine.dir/all] 错误 2
make: *** [Makefile:84:all] 错误 2
(tensorrt) bowen@bowen:
/yolov5/yolov5_tensorrt_int8/build$

make 编译报错,用的是提供的opencv-3.4.2

[ 50%] Building CXX object CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o
In file included from /usr/local/opencv-3.4.2/include/opencv2/calib3d.hpp:48:0,
from /usr/local/opencv-3.4.2/include/opencv2/opencv.hpp:56,
from /home/wangyuanwen/tensorrt_test/yolov5_tensorrt_int8/yolov5s_infer.cc:6:
/usr/local/opencv-3.4.2/include/opencv2/features2d.hpp:50:10: fatal error: opencv2/flann/miniflann.hpp: No such file or directory
#include "opencv2/flann/miniflann.hpp"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/YoloV5sEngine.dir/build.make:62: recipe for target 'CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o' failed
make[2]: *** [CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/YoloV5sEngine.dir/all' failed
make[1]: *** [CMakeFiles/YoloV5sEngine.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

make报错,总是显示undefined reference

[100%] Linking CXX executable YoloV5sEngine
CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o: In function main': yolov5s_infer.cc:(.text+0x1de2): undefined reference to my_init_tensors'
yolov5s_infer.cc:(.text+0x1e7b): undefined reference to my_load_model' yolov5s_infer.cc:(.text+0x21c5): undefined reference to my_inference_tensors'
yolov5s_infer.cc:(.text+0x2610): undefined reference to my_deinit_tensors' yolov5s_infer.cc:(.text+0x261f): undefined reference to my_release_model'
collect2: error: ld returned 1 exit status
CMakeFiles/YoloV5sEngine.dir/build.make:100: recipe for target 'YoloV5sEngine' failed
make[2]: *** [YoloV5sEngine] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/YoloV5sEngine.dir/all' failed
make[1]: *** [CMakeFiles/YoloV5sEngine.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.