wulingtian / nanodet_tensorrt_int8 Goto Github PK
View Code? Open in Web Editor NEWnanodet int8 量化,实测推理2ms一帧!
nanodet int8 量化,实测推理2ms一帧!
感谢题主的开源代码,受益匪浅!
我有两个疑问请教一下 :
1 输入层tensor的Shape, ( nanodet_infer.cc 的235行 ):
// 第一个输入tensor
cur_in_tensor_params[0].nDims = 4;
cur_in_tensor_params[0].type = DT_FLOAT;
cur_in_tensor_params[0].pShape[0] = 1; //batch size can't set to -1
cur_in_tensor_params[0].pShape[1] = 3;
cur_in_tensor_params[0].pShape[2] = INPUT_W;
cur_in_tensor_params[0].pShape[3] = INPUT_H;
输入的tensor的shape按道理是NCHW, 即上述应该是 pShape[2] = INPUT_H, pShape[3] = INPUT_W。不知道我的理解是否正确? 是因为nanodet的输入尺寸是320x320, 所以这里即使反了,运行和结果才没出现问题 ?
2 题主在另一个Issue (https://github.com/Wulingtian/nanodet_tensorrt_int8/issues/1) 中提供的 LibMyTtrEngine-trt721.so生成代码,与github上TensorRT的模型加载运行的代码(例如 https://hub.fastgit.org/linghu8812/tensorrt_inference/tree/master/nanodet )不太相同,但题主的nanodet推理的效果和精度有明显的提升! 请问题主做了哪些相关的优化?
谢谢。 期待题主的回复!
Thank your for open this project.
**.trt is int8 model, however input data is float. code
文件太大,我就放到百度盘了(链接: 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.