博主测试了在不同模式、精度下降MaskRCNN部署到Jetson TX2上的测速结果,与大家分享讨论。
对FasterRCNN的测速可见FasterRcnn在Jetson TX2上测速
使用的MaskRCNN框架:matterport/Mask_RCNN
- 参考的TensorRT代码:sampleUffFasterRCNN
- TensorRT版本: 6.0.1.0
- JetPack版本:4.3
- TensorFLow版本(用于在服务器上训练模型):1.14.0
- 服务器上用于训练的CUDA版本:9.2
表1 MaskRCNN+TensorRT在Jetson TX2上测速结果
次序 | 图像名 | 图像尺寸 | TX2模式 | 风扇 | FP | 生成engine | 推断 |
---|---|---|---|---|---|---|---|
1 | test1.ppm | 640x480 | MAXN | 开 | FP32 | 744s | 1359ms |
2 | test1.ppm | 640x480 | MAXN | 关 | FP32 | 814s | 1369ms |
3 | test1.ppm | 640x480 | MAXQ | 开 | FP32 | 1055s | 1848ms |
4 | test1.ppm | 640x480 | MAXP_CORE_ALL | 开 | FP32 | 888s | 1491ms |
5 | test1.ppm | 640x480 | MAXP_CORE_ARM | 开 | FP32 | 878s | 1458ms |
6 | test1.ppm | 640x480 | MAXN | 开 | FP16 | 2922s | 785ms |
7 | test2.ppm | 480x360 | MAXN | 开 | FP32 | 831S | 1378ms |
8 | test2.ppm | 480x360 | MAXN | 开 | FP16 | 2915s | 783ms |
其中,一些基本参数和说明
- FP32生成的engine大小: 285.4MB
- FP16生成engine大小: 251.3MB
- 这里的batch size =1,由于第一张需要预热,速度较慢,这里运行了10次求平均时间
- 在不强制开启风扇时,生成引擎过程中会自动开启风扇
为了更好地比较提速效果,博主还测试了直接使用tensorflow版本的MaskRCNN在Jetson TX2上进行测速,结果如下
表2 MaskRCNN+TensorFlow在Jetson TX2上测速
次序 | 图像名 | 模型载入 | 第一张推断 | 之后推断 | 与FP32推断时间比 | 与FP16推断时间比 |
---|---|---|---|---|---|---|
9 | test1.ppm | 32.4s | 22s | 2800ms | 2:1 | 4:1 |
10 | test2.ppm | 32.2s | 22s | 2600 | 2:1 | 4:1 |
以上两个测试都是在TX2模式为MAXN,风扇开启下完成。
原始的模式大小为244.23MB
由此可见,我们有如下结论,也欢迎大家留言讨论
其它Jetson开发板测速结果
1.MaskRCNN+TensorRT在Jetson tx2上的测速
2.FasterRCNN+TensorRT在Jetson TX2上测速
3.MaskRCNN+TensorRT在Jetson Xavier上的测速
4.pytorch+FasterRCNN在Jetson Xavier上的测速
5.MaskRCNN+TensorRT在Jetson Xavier NX上的测速
6.pytorch+FasterRCNN在Jetson Xavier NX上的测速