Home

Awesome

TensorRT-CenterNet

demo (GT 1070)

Performance

modelinput_sizeGPUmodeinference Time
mobilenetv2512x512gtx 1070float323.798ms
mobilenetv2512x512gtx 1070int81.75ms
mobilenetv2512x512jetson TX2float1622ms
dla34512x512gtx 1070float3224ms
dla34512x512gtx 1070int819.6ms
dla34512x512jetson TX2fp32209ms
dla34512x512jetson TX2fp16186ms
dla34v0512x512gtx 1070float3212.6ms
dla34v0512x512gtx 1070int86.76ms
dla34v0512x512jetson TX2fp32114ms
dla34v0512x512jetson TX2fp1680ms
resdcn101512x512gtx 1070float3220.9ms
resdcn18512x512gtx 1070float325.81ms
resdcn18512x512gtx 1070int83.63ms
resdcn18512x512jetson TX2fp3254ms
resdcn18512x512jetson TX2fp1641ms
  1. support Deform Conv v2.
  2. no nms.
  3. support fp32 fp16 int8 mode.

Eval Result

modelGPUmodeAP<sup>trt</sup>/AP<sup>paper</sup>AP<sup>trt</sup><sub>50</sub>AP<sup>trt</sup><sub>75</sub>AP<sup>trt</sup><sub>S</sub>AP<sup>trt</sup><sub>M</sub>AP<sup>trt</sup><sub>L</sub>
ctdet_coco_dla_2xgtx 1070float320.365/0.3740.5430.3900.1640.3980.536
ctdet_coco_dlav0_1xgtx 1070float320.324/--0.5110.3430.1400.3500.476
ctdet_coco_dlav0_1xgtx 1070int80.295/--0.4680.3110.1230.3180.446
ctdet_coco_resdcn101gtx 1070float320.332/0.3460.5160.3490.1150.3670.531
ctdet_coco_resdcn18gtx 1070float320.277/0.2810.4480.2860.0830.2900.454
ctdet_coco_resdcn18gtx 1070int80.242/0.2810.4010.2500.0610.2550.409

notes

Enviroments

  1. gtx 1070
pytorch 1.0-1.1
ubuntu 1604
TensorRT 5.0
onnx-tensorrt v5.0
cuda 9.0
  1. jetson TX2
jetpack 4.2

Models

  1. Convert CenterNet model to onnx. See here for details.
  2. Use netron to observe whether the output of the converted onnx model is (hm, reg, wh)

Example

git clone https://github.com/CaoWGG/TensorRT-CenterNet.git
cd TensorRT-CenterNet
mkdir build
cd build && cmake .. && make
cd ..

##ctdet | config include/ctdetConfig.h 
## float32
./buildEngine -i model/ctdet_coco_dla_2x.onnx -o model/ctdet_coco_dla_2x.engine 
./runDet -e model/ctdet_coco_dla_2x.engine -i test.jpg -c test.h264

##cthelmet   | config include/ctdetConfig.h
## flaot32
./buildEngine -i model/ctdet_helmet.onnx -o model/ctdet_helmet.engine -m 0
./runDet -e model/ctdet_helmet.engine -i test.jpg -c test.h264
## int8
./buildEngine -i model/ctdet_helmet.onnx -o model/ctdet_helmet.engine -m 2 -c calib_img_list.txt
./runDet -e model/ctdet_helmet.engine -i test.jpg -c test.h264

##centerface | config include/ctdetConfig.h 
./buildEngine -i model/centerface.onnx -o model/centerface.engine
./runDet -e model/centerface.engine -i test.jpg -c test.h264

## run eval_coco.py | conifg your cocodaset and ctdet_coco engine 
python3 eval_coco.py model/ctdet_coco_dla_2x.engine

Related projects