Skip to content

CenterPoint model trained with MMDetection3d on custom dataset, and deployed with TensorRT

Notifications You must be signed in to change notification settings

Tartisan/MMDet3d-CenterPoint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CenterPoint inferenced with TensorRT

This repository contains sources and model for CenterPoint inference using TensorRT. The model is created with mmdetection3d.

Overall inference has five phases:

  • Convert points cloud into 4-channle voxels
  • Extend 4-channel voxels to 10-channel voxel features
  • Run pfe TensorRT engine to get 64-channel voxel features
  • Run rpn backbone TensorRT engine to get 3D-detection raw data
  • Parse bounding box, class type and direction

Model && Data

The demo used the custom dataset like KITTI. The onnx file can be converted by onnx_tools

Prerequisites

To build the centerpoint inference, TensorRT and CUDA are needed.

Environments

  • NVIDIA RTX A4000 Laptop GPU
  • CUDA 11.1 + cuDNN 8.2.1 + TensorRT 8.2.3

Compile && Run

$ mkdir build && cd build
$ cmake .. && make -j$(nproc)
$ ./demo

Visualization

You should install open3d in python environment.

$ cd tools
$ python viewer.py
trt fp16 pytorch
trt fp16 pytorch

Performance in FP16

| Function(unit:ms) | NVIDIA RTX A4000 Laptop GPU | NVIDIA Jetson AGX Orin      |
| ----------------- | --------------------------- | --------------------------- |
| Preprocess        | 0.950476 ms                 | 3.52855  ms                 |
| Pfe               | 4.37507  ms                 | 18.2881  ms                 |
| Scatter           | 0.204093 ms                 | 1.33041  ms                 |
| Backbone          | 9.84435  ms                 | 20.7511  ms                 |
| Postprocess       | 2.91952  ms                 | 4.61471  ms                 |
| Summary           | 18.2961  ms                 | 48.5218  ms                 |

Note

  • The pretrained model in this project doesn't predict vx, vy.
  • The demo will cache the onnx file to improve performance. If a new onnx will be used, please remove the cache file in "./model".

References

About

CenterPoint model trained with MMDetection3d on custom dataset, and deployed with TensorRT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published