wulingtian / yolov5_tensorrt_int8 Goto Github PK
View Code? Open in Web Editor NEWTensorRT int8 量化部署 yolov5s 模型,实测3.3ms一帧!
TensorRT int8 量化部署 yolov5s 模型,实测3.3ms一帧!
你好,能给一份yolov5s的激活函数替换为relu重新训练后的模型么?
那别的检测算法 仍需要自己写?
如果想要使用trt7.1.2.6的话,其实这个lib是用不了的
(tensorrt) bowen@bowen:/yolov5/yolov5_tensorrt_int8/build$ make/yolov5/yolov5_tensorrt_int8/build$
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:
hello, how to generate dll file on windows10?I try it but i met some error in common.h
为什么要设置三层的参数?cur_in_tensor_params[0].nDims ?
多谢
[ 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
大佬,如何进行动态shape输入?请问你这个repo支持吗
netron.start('此处填充简化后的onnx模型路径', port=3344)
[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
文件太大,我就放到百度盘了(链接: https://pan.baidu.com/s/1sF8vZ1JyBvk5Z_IUBP3CgA 密码: qlgk)
操作步骤如下:
cd Generate_LibMyTtrEngine-trt721/src
vim CMakeLists.txt 设置cuda目录(例如:/usr/local/cuda-11.0/include)
make build
cd build
cmake ..
make
在Generate_LibMyTtrEngine-trt721/bin目录下生成libMyTtrEngine-trt721.so动态库
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.