TensorRTX
Project Adress: https://github.com/wang-xinyu/tensorrtx
Retina Face
Project Adress: https://github.com/wang-xinyu/Pytorch_Retinaface
Jetson AGX Xavier
Deploy: https://developer.nvidia.com/embedded/jetson-agx-xavier-developer-kit
Xavier Jetpack 4.4DP
JetPack 4.4 components:
- L4T R32.4.2
- CUDA 10.2
- cuDNN 8.0.0 (Developer Preview)
- TensorRT 7.1.0 (Developer Preview)
- VisionWorks 1.6
- OpenCV 4.1
- Vulkan 1.2
- VPI 0.2.0 (Developer Preview)
- Nsight Systems 2020.2
- Nsight Graphics 2020.1
- Nsight Compute 2019.3
通过sdk-manager刷机
1 | mkdir -p ~/sdkmanager |
选择对应xavier型号安装jetpack 4.4环境,选择离线安装(多Retry几次)
手动方式就需要自己动手进入recovery模式:
- 给xavier插上网线
- 用原装usb先将host与Xavier连接,还要注意是连接电源灯旁边的插口(lsusb可以查看到NVidia Corp);
- 确保连接电源并保持Xavier为关闭状态;
- 按住中间的按键(Force Recovery)不松手;
- 按住左边的电源(Power)不松手;
- 过一两秒,同时松手。
- 安装完第一部分后配置xavier的ubantu系统
- 完成剩余的安装
- ifconfig 查看地址
查看Xavier性能
1 | tegrastats |
or jetson monitor script
https://github.com/rbonghi/jetson_stats
PS: 测试TensorRT性能时需要跑多次测试
Retina Face TensorRTX compile
- generate retinaface.wts from pytorch
1 | // download its weights 'Resnet50_Final.pth', put it in Pytorch_Retinaface/weights |
put retinaface.wts into tensorrtx/retinaface
enviroment setting
1 | mkdir cmake |
Find TensorRT script
1 | # This module defines the following variables: |
Modify CMakeLists.txt
1 | cmake_minimum_required(VERSION 2.6) |
- Performance
Xavier:
Input IMG Size(768, 1344)
Speed: 102ms/per img