问题:
在NVIDIA Quadro P4000 GPU(显存8G)训练后,测试图片时,foward time:0.153s | decode time:0.044s | viz time:0.663s
在jetson nano 2GB部署,forward time: 51.641s | decode time: 20.472s | viz time: 2.428s
尝试使用TensorRT加速:
1、查看TensorRT版本:
dpkg -l | grep TensorRT
我的版本为7.1.3。
2、安装jetson-inference,实现pytorch模型到tensorrt模型的转换与GPU加速。
参考:https://blog.csdn.net/qianbin3200896/article/details/108949723?spm=1001.2014.3001.5502
(1)下载与编译:
git config --global http.postBuffer 524288000
git clone --recursive https://github.com/dusty-nv/jetson-inference.git
cd jetson-inference
mkdir build
cd build
cmake ../
make -j$(nproc)
(2)取消预训练模型与pytorch的安装。
(3)安装:
sudo make install
sudo ldconfig
(4)测试,输入python3:
3、模型的转换:
(1)NanoDet模型:
参考: