Git Product home page Git Product logo

centerpoint's Introduction

CenterPoint-PonintPillars Pytroch model convert to ONNX and TensorRT

Welcome to CenterPoint! This project is fork from tianweiy/CenterPoint. I implement some code to export CenterPoint-PonintPillars ONNX model and deploy the onnx model using TensorRT.

Center-based 3D Object Detection and Tracking

3D Object Detection and Tracking using center points in the bird-eye view.

Center-based 3D Object Detection and Tracking,
Tianwei Yin, Xingyi Zhou, Philipp Krähenbühl,
arXiv technical report (arXiv 2006.11275)

@article{yin2020center,
  title={Center-based 3D Object Detection and Tracking},
  author={Yin, Tianwei and Zhou, Xingyi and Kr{\"a}henb{\"u}hl, Philipp},
  journal={arXiv:2006.11275},
  year={2020},
}

NEWS

[2021-01-06] CenterPoint v1.0 is released. Without bells and whistles, we rank first among all Lidar-only methods on Waymo Open Dataset with a single model that runs at 11 FPS. Check out CenterPoint's model zoo for Waymo and nuScenes.

[2020-12-11] 3 out of the top 4 entries in the recent NeurIPS 2020 nuScenes 3D Detection challenge used CenterPoint. Congratualations to other participants and please stay tuned for more updates on nuScenes and Waymo soon.

Contact

Any questions or suggestions are welcome!

Tianwei Yin [email protected] Xingyi Zhou [email protected]

Abstract

Three-dimensional objects are commonly represented as 3D boxes in a point-cloud. This representation mimics the well-studied image-based 2D bounding-box detection but comes with additional challenges. Objects in a 3D world do not follow any particular orientation, and box-based detectors have difficulties enumerating all orientations or fitting an axis-aligned bounding box to rotated objects. In this paper, we instead propose to represent, detect, and track 3D objects as points. Our framework, CenterPoint, first detects centers of objects using a keypoint detector and regresses to other attributes, including 3D size, 3D orientation, and velocity. In a second stage, it refines these estimates using additional point features on the object. In CenterPoint, 3D object tracking simplifies to greedy closest-point matching. The resulting detection and tracking algorithm is simple, efficient, and effective. CenterPoint achieved state-of-the-art performance on the nuScenes benchmark for both 3D detection and tracking, with 65.5 NDS and 63.8 AMOTA for a single model. On the Waymo Open Dataset, CenterPoint outperforms all previous single model method by a large margin and ranks first among all Lidar-only submissions.

Highlights

  • Simple: Two sentences method summary: We use standard 3D point cloud encoder with a few convolutional layers in the head to produce a bird-eye-view heatmap and other dense regression outputs including the offset to centers in the previous frame. Detection is a simple local peak extraction with refinement, and tracking is a closest-distance matching.

  • Fast and Accurate: Our best single model achieves 71.9 mAPH on Waymo and 65.5 NDS on nuScenes while running at 11FPS+.

  • Extensible: Simple replacement for anchor-based detector in your novel algorithms.

Main results

3D detection on Waymo test set

#Frame Veh_L2 Ped_L2 Cyc_L2 MAPH FPS
VoxelNet 1 71.9 67.0 68.2 69.0 13
VoxelNet 2 73.0 71.5 71.3 71.9 11

3D detection on Waymo domain adaptation test set

#Frame Veh_L2 Ped_L2 Cyc_L2 MAPH FPS
VoxelNet 2 56.1 47.8 65.2 56.3 11

3D detection on nuScenes test set

MAP ↑ NDS ↑ PKL ↓ FPS ↑
VoxelNet 58.0 65.5 0.69 11

3D tracking on Waymo test set

#Frame Veh_L2 Ped_L2 Cyc_L2 MOTA FPS
VoxelNet 2 59.4 56.6 60.0 58.7 11

3D Tracking on nuScenes test set

AMOTA ↑ AMOTP ↓
VoxelNet (flip test) 63.8 0.555

All results are tested on a Titan RTX GPU with batch size 1.

Third-party resources

  • AFDet: another work inspired by CenterPoint achieves good performance on KITTI/Waymo dataset.
  • mmdetection3d: CenterPoint in mmdet framework.

Use CenterPoint

Installation

Please refer to INSTALL to set up libraries needed for distributed training and sparse convolution.

First download the model (By default, centerpoint_pillar_512) and put it in work_dirs/centerpoint_pillar_512_demo.

We provide a driving sequence clip from the nuScenes dataset. Donwload the folder and put in the main directory.
Then run a demo by python tools/demo.py. If setup corectly, you will see an output video like (red is gt objects, blue is the prediction):

Benchmark Evaluation and Training

Please refer to GETTING_START to prepare the data. Then follow the instruction there to reproduce our detection and tracking results. All detection configurations are included in configs and we provide the scripts for all tracking experiments in tracking_scripts.

Export ONNX

I divide Pointpillars model into two parts, pfe(include PillarFeatureNet) and rpn(include RPN and CenterHead). The PointPillarsScatter isn't exported. I use ScatterND node instead of PointPillarsScatter.

  • Install packages

    pip install onnx onnx-simplifier onnxruntime
  • step 1. Download the trained model(latest.pth) and nuscenes mini dataset(v1.0-mini.tar)

  • step 2 Prepare dataset. Please refer to docs/NUSC.md

  • step 3. Export pfe.onnx and rpn.onnx

    python tools/export_pointpillars_onnx.py
  • step 4. Use onnx-simplify and scripte to simplify pfe.onnx and rpn.onnx.

    python tools/simplify_model.py
  • step 5. Merge pfe.onnx and rpn.onnx. We use ScatterND node to connect pfe and rpn. TensorRT doesn't support ScatterND operater. If you want to run CenterPoint-pointpillars by TensorRT, you can run pfe.onnx and rpn.onnx respectively.

    python tools/merge_pfe_rpn_model.py

    All onnx model are saved in onnx_model.

    I add an argument(export_onnx) for export onnx model in config file

    model = dict(
      type="PointPillars",
      pretrained=None,
      export_onnx=True, # for export onnx model
      reader=dict(
          type="PillarFeatureNet",
          num_filters=[64, 64],
          num_input_features=5,
          with_distance=False,
          voxel_size=(0.2, 0.2, 8),
          pc_range=(-51.2, -51.2, -5.0, 51.2, 51.2, 3.0),
          export_onnx=True, # for export onnx model
      ),
      backbone=dict(type="PointPillarsScatter", ds_factor=1),
      neck=dict(
          type="RPN",
          layer_nums=[3, 5, 5],
          ds_layer_strides=[2, 2, 2],
          ds_num_filters=[64, 128, 256],
          us_layer_strides=[0.5, 1, 2],
          us_num_filters=[128, 128, 128],
          num_input_features=64,
          logger=logging.getLogger("RPN"),
      ),

Centerpoint Pointpillars For TensorRT

see Readme

Compare the TensorRT result with Pytorch result.

TensoRT Pytroch
avatar avatar

3D detection on nuScenes Mini dataset

TensorRT postprocess use aligned NMS on Bev, so there are some precision loss.

mAP mATE mASE mAOE mAVE mAAE NDS
Pytorch 0.4163 0.4438 0.4516 0.5674 0.4429 0.3288 0.4847
TensorRT 0.4007 0.4433 0.4537 0.5665 0.4416 0.3191 0.4779

License

CenterPoint is release under MIT license (see LICENSE). It is developed based on a forked version of det3d. We also incorperate a large amount of code from CenterNet and CenterTrack. See the NOTICE for details. Note that both nuScenes and Waymo datasets are under non-commercial licenses.

Acknowlegement

This project is not possible without multiple great opensourced codebases. We list some notable examples below.

centerpoint's People

Contributors

carkusl avatar liyouzhou avatar muzi2045 avatar qihuacheng avatar tianweiy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

centerpoint's Issues

problem about tensorrt inference

Thanks for your excellent work. In CenterPoint/tensorrt/samples/centerpoint)/README.md, Do i have to install docker and run the step2. (Because i run centerpoint in anaconda) or just need to run step1 then step3 and 4? thanks again.

could not find plugin ScatterND

Hi。I can run your tensorrt code sucessfully following your README in tensorrt/samples.
But I cannot get scatterND plugin when I using your code out of the root of tensorrt :

`
Doc string:

input.name():input.1
input.name():indices_input
[01/29/2018-00:52:33] [W] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/onnx2trt_utils.cpp:220: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:107: Parsing node: pfe_MatMul_0 [Conv]
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:129: pfe_MatMul_0 [Conv] inputs: [input.1 -> (1, 10, 30000, 20)], [48 -> (32, 10, 1, 1)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:183: pfe_MatMul_0 [Conv] outputs: [16 -> (1, 32, 30000, 20)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:107: Parsing node: pfe_BatchNormalization_2 [BatchNormalization]
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:129: pfe_BatchNormalization_2 [BatchNormalization] inputs: [16 -> (1, 32, 30000, 20)], [pfn_layers.0.norm.weight -> (32)], [pfn_layers.0.norm.bias -> (32)], [pfn_layers.0.norm.running_mean -> (32)], [pfn_layers.0.norm.running_var -> (32)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:183: pfe_BatchNormalization_2 [BatchNormalization] outputs: [18 -> (1, 32, 30000, 20)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:107: Parsing node: pfe_Relu_4 [Relu]
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:129: pfe_Relu_4 [Relu] inputs: [18 -> (1, 32, 30000, 20)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:183: pfe_Relu_4 [Relu] outputs: [20 -> (1, 32, 30000, 20)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:107: Parsing node: pfe_ReduceMax_5 [MaxPool]
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:129: pfe_ReduceMax_5 [MaxPool] inputs: [20 -> (1, 32, 30000, 20)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:183: pfe_ReduceMax_5 [MaxPool] outputs: [21 -> (1, 32, 30000, 1)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:107: Parsing node: pfe_Tile_16 [Tile]
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:129: pfe_Tile_16 [Tile] inputs: [21 -> (1, 32, 30000, 1)], [34 -> (4)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:183: pfe_Tile_16 [Tile] outputs: [38 -> (1, 32, 30000, 20)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:107: Parsing node: pfe_Concat_17 [Concat]
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:129: pfe_Concat_17 [Concat] inputs: [20 -> (1, 32, 30000, 20)], [38 -> (1, 32, 30000, 20)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:183: pfe_Concat_17 [Concat] outputs: [39 -> (1, 64, 30000, 20)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:107: Parsing node: pfe_MatMul_18 [Conv]
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:129: pfe_MatMul_18 [Conv] inputs: [39 -> (1, 64, 30000, 20)], [53 -> (64, 64, 1, 1)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:183: pfe_MatMul_18 [Conv] outputs: [41 -> (1, 64, 30000, 20)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:107: Parsing node: pfe_BatchNormalization_20 [BatchNormalization]
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:129: pfe_BatchNormalization_20 [BatchNormalization] inputs: [41 -> (1, 64, 30000, 20)], [pfn_layers.1.norm.weight -> (64)], [pfn_layers.1.norm.bias -> (64)], [pfn_layers.1.norm.running_mean -> (64)], [pfn_layers.1.norm.running_var -> (64)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:183: pfe_BatchNormalization_20 [BatchNormalization] outputs: [43 -> (1, 64, 30000, 20)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:107: Parsing node: pfe_Relu_22 [Relu]
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:129: pfe_Relu_22 [Relu] inputs: [43 -> (1, 64, 30000, 20)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:183: pfe_Relu_22 [Relu] outputs: [45 -> (1, 64, 30000, 20)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:107: Parsing node: pfe_ReduceMax_23 [MaxPool]
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:129: pfe_ReduceMax_23 [MaxPool] inputs: [45 -> (1, 64, 30000, 20)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:183: pfe_ReduceMax_23 [MaxPool] outputs: [46 -> (1, 64, 30000, 1)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:107: Parsing node: pfe_Squeeze_1 [Squeeze]
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:129: pfe_Squeeze_1 [Squeeze] inputs: [46 -> (1, 64, 30000, 1)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:183: pfe_Squeeze_1 [Squeeze] outputs: [pfe_squeeze_1 -> (1, 64, 30000)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:107: Parsing node: pfe_Transpose_1 [Transpose]
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:129: pfe_Transpose_1 [Transpose] inputs: [pfe_squeeze_1 -> (1, 64, 30000)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:183: pfe_Transpose_1 [Transpose] outputs: [pfe_transpose_1 -> (1, 30000, 64)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:107: Parsing node: ScatterND_1 [ScatterND]
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:129: ScatterND_1 [ScatterND] inputs: [scatter_data -> (1, 262144, 64)], [indices_input -> (1, 30000, 2)], [pfe_transpose_1 -> (1, 30000, 64)],
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/ModelImporter.cpp:139: No importer registered for op: ScatterND. Attempting to import as plugin.
[01/29/2018-00:52:33] [I] [TRT] /home/ubuntu/work/onnx-tensorrt-v7.0/builtin_op_importers.cpp:3762: Searching for plugin: ScatterND, plugin_version: 1, plugin_namespace:
[01/29/2018-00:52:33] [E] [TRT] INVALID_ARGUMENT: getPluginCreator could not find plugin ScatterND version 1
While parsing node number 187 [ScatterND]:
ERROR: /home/ubuntu/work/onnx-tensorrt-v7.0/builtin_op_importers.cpp:3764 In function importFallbackPluginImporter:
[8] Assertion failed: creator && "Plugin not found, are the plugin name, version, and namespace correct?"
`

My environment is :
platform : jetson AGX xavier
cuda : 10.2
tensorrt: 7.x

can you give me some advance? thank you very much!!!

Segmentation fault (core dumped)

i follwed your instruction, and run 'python tools/create_data.py waymo_data_prep --root_path=data/Waymo --split train --nsweeps=1', but failed, shows 'Segmentation fault (core dumped)'
did u ever meet this problem? hope for help

free(): invalid next size (normal)

I observed that infer() function ends succesfully, however any of the parts coming after the execution of the infer() cant execute because of the error free(): invalid next size (normal). When I ran valgrind ;

valgrind: m_mallocfree.c:307 (get_bszB_as_is): Assertion 'bszB_lo == bszB_hi' failed. valgrind: Heap block lo/hi size mismatch: lo = 24002528, hi = 3181631744. This is probably caused by your program erroneously writing past the end of a heap block and corrupting heap metadata. If you fix any invalid writes reported by Memcheck, this assertion failure will probably go away. Please try that before reporting this as a bug.

size mismatch happened when I use your config file xxx_export_onnx.py for train, when I set export_onnx=False in config file, the train process is ok.

(centerpoint-trt) qwe@qwe:~/project/centerpoint-trt/CenterPoint$ python -m torch.distributed.launch --nproc_per_node=4 ./tools/train.py ./configs/nusc/pp/nusc_centerpoint_pp_02voxel_two_pfn_10sweep_demo_export_onnx.py
No Tensorflow
No Tensorflow
No Tensorflow
No Tensorflow
2021-10-22 16:18:38,149 - INFO - Distributed training: True
2021-10-22 16:18:38,151 - INFO - torch.backends.cudnn.benchmark: False
Use HM Bias: -2.19
Use HM Bias: -2.19
Use HM Bias: -2.19
2021-10-22 16:18:38,219 - INFO - Finish RPN Initialization
2021-10-22 16:18:38,219 - INFO - num_classes: [1, 2, 2, 1, 2, 2]
Use HM Bias: -2.19
2021-10-22 16:18:38,269 - INFO - Finish CenterHead Initialization
2021-10-22 16:18:43,309 - INFO - {'car': 5, 'truck': 5, 'bus': 5, 'trailer': 5, 'construction_vehicle': 5, 'traffic_cone': 5, 'barrier': 5, 'motorcycle': 5, 'bicycle': 5, 'pedestrian': 5}
2021-10-22 16:18:43,310 - INFO - [-1]
2021-10-22 16:18:47,357 - INFO - load 62964 traffic_cone database infos
2021-10-22 16:18:47,357 - INFO - load 65262 truck database infos
2021-10-22 16:18:47,357 - INFO - load 339949 car database infos
2021-10-22 16:18:47,357 - INFO - load 161928 pedestrian database infos
2021-10-22 16:18:47,357 - INFO - load 26297 ignore database infos
2021-10-22 16:18:47,358 - INFO - load 11050 construction_vehicle database infos
2021-10-22 16:18:47,358 - INFO - load 107507 barrier database infos
2021-10-22 16:18:47,358 - INFO - load 8846 motorcycle database infos
2021-10-22 16:18:47,358 - INFO - load 8185 bicycle database infos
2021-10-22 16:18:47,358 - INFO - load 12286 bus database infos
2021-10-22 16:18:47,358 - INFO - load 19202 trailer database infos
10
2021-10-22 16:18:48,855 - INFO - After filter database:
2021-10-22 16:18:48,857 - INFO - load 55823 traffic_cone database infos
2021-10-22 16:18:48,857 - INFO - load 60428 truck database infos
2021-10-22 16:18:48,857 - INFO - load 294575 car database infos
2021-10-22 16:18:48,857 - INFO - load 148872 pedestrian database infos
2021-10-22 16:18:48,857 - INFO - load 26297 ignore database infos
2021-10-22 16:18:48,857 - INFO - load 10591 construction_vehicle database infos
2021-10-22 16:18:48,857 - INFO - load 102093 barrier database infos
2021-10-22 16:18:48,857 - INFO - load 8055 motorcycle database infos
2021-10-22 16:18:48,857 - INFO - load 7533 bicycle database infos
2021-10-22 16:18:48,857 - INFO - load 11622 bus database infos
2021-10-22 16:18:48,857 - INFO - load 18104 trailer database infos

2021-10-22 16:18:53,526 - INFO - Start running, host: xxx@xxx, work_dir: /home/qwe/project/centerpoint-trt/CenterPoint/work_dirs/nusc_centerpoint_pp_02voxel_two_pfn_10sweep_demo_export_onnx
2021-10-22 16:18:53,526 - INFO - workflow: [('train', 1)], max: 20 epochs
2021-10-22 16:19:03,373 - INFO - finding looplift candidates
2021-10-22 16:19:04,209 - INFO - finding looplift candidates
2021-10-22 16:19:04,322 - INFO - finding looplift candidates
2021-10-22 16:19:04,345 - INFO - finding looplift candidates
2021-10-22 16:19:04,520 - INFO - finding looplift candidates
2021-10-22 16:19:04,530 - INFO - finding looplift candidates
2021-10-22 16:19:04,562 - INFO - finding looplift candidates
2021-10-22 16:19:04,812 - INFO - finding looplift candidates
Traceback (most recent call last):
File "./tools/train.py", line 137, in
main()
File "./tools/train.py", line 132, in main
logger=logger,
File "/home/qwe/project/centerpoint-trt/CenterPoint/det3d/torchie/apis/train.py", line 327, in train_detector
trainer.run(data_loaders, cfg.workflow, cfg.total_epochs, local_rank=cfg.local_rank)
File "/home/qwe/project/centerpoint-trt/CenterPoint/det3d/torchie/trainer/trainer.py", line 543, in run
epoch_runner(data_loaders[i], self.epoch, **kwargs)
File "/home/qwe/project/centerpoint-trt/CenterPoint/det3d/torchie/trainer/trainer.py", line 410, in train
self.model, data_batch, train_mode=True, **kwargs
File "/home/qwe/project/centerpoint-trt/CenterPoint/det3d/torchie/trainer/trainer.py", line 368, in batch_processor_inline
losses = model(example, return_loss=True)
File "/home/qwe/anaconda3/envs/centerpoint-trt/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/qwe/anaconda3/envs/centerpoint-trt/lib/python3.6/site-packages/torch/nn/parallel/distributed.py", line 376, in forward
output = self.module(*inputs[0], **kwargs[0])
File "/home/qwe/anaconda3/envs/centerpoint-trt/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/qwe/project/centerpoint-trt/CenterPoint/det3d/models/detectors/point_pillars.py", line 50, in forward
x = self.extract_feat(data)
File "/home/qwe/project/centerpoint-trt/CenterPoint/det3d/models/detectors/point_pillars.py", line 25, in extract_feat
data["features"], data["num_voxels"], data["coors"]
File "/home/qwe/anaconda3/envs/centerpoint-trt/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/qwe/project/centerpoint-trt/CenterPoint/det3d/models/readers/pillar_encoder.py", line 156, in forward
features = pfn(features)
File "/home/qwe/anaconda3/envs/centerpoint-trt/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/qwe/project/centerpoint-trt/CenterPoint/det3d/models/readers/pillar_encoder.py", line 42, in forward
x = self.linear(inputs)
File "/home/qwe/anaconda3/envs/centerpoint-trt/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in call
result = self.forward(*input, **kwargs)
File "/home/qwe/anaconda3/envs/centerpoint-trt/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 92, in forward
return F.linear(input, self.weight, self.bias)
File "/home/qwe/anaconda3/envs/centerpoint-trt/lib/python3.6/site-packages/torch/nn/functional.py", line 1408, in linear
output = input.matmul(weight.t())
RuntimeError: size mismatch, m1: [1683720 x 5], m2: [10 x 32] at /opt/conda/conda-bld/pytorch_1556653099582/work/aten/src/THC/generic/THCTensorMathBlas.cu:268


Just as I mentioned above, some thing is wrong when I set export_onnx=True in the config file for nuscenes data train, is there anything wrong in the part when export_onnx=True? Thank you. Hope to receive your reply.

Help with use of onnx model and TensorRT

Hello @CarkusL, I haven't tested yet your code for exporting to onnx model, but congratulations. I tried to implement the same exports to onnx in the last few days until I realized that exporting PointPillars as a whole model was difficult because of the PillarsScatter backbone.

Have you tried using your onnx model in TensorRT or what's the purpose of converting the model to onnx in your case?
In my attempts the "ScatterND" operation was not supported in TensorRT, that's why I gave up
Do you have maybe and idea how to do the same operation without Scatter, another alternative?

I noticed in order to get the final results for training or inference, the functions here

return self.bbox_head.loss(example, preds)
self.bbox_head.loss and self.bbox_head.predict should be adapted to the output of onnx because originally in PyTorch code the output of the head is a list of dictionaries, but in onnx the outputs are quiet different... are you also working on this adaption of the bbox_head functions to onnx output for further post-processing?

Slightly different result

.pth file from the link was loaded and then evaluated.
However my pytorch result is slightly different from yours.

PyTorch results

Yours Mine
car 0.886 0.887
truck 0.660 0.660
bus 0.967 0.964
trailer 0.000 0.000
construction vehicle 0.000 0.000
pedestrian 0.886 0.889
motorcycle 0.505 0.510
bicycle 0.216 0.223
traffic cone 0.023 0.046
barrier 0.000 0.000

I think the result from the same .pth file should be the same.

So I have 2 questions.

  1. Did you use same .pth file from the link?
  2. Can you tell me what library / framework version did you use?

My setting

  • GPUs: GTX 1070 ti
  • CUDA: 11.3
  • PyTorch: 1.10.0
  • torchvision: 0.11.1
  • ONNX: 1.12.0
  • spconv: 2.2.6
  • nuscenes-devkit: 1.0.5

Can not compile CenterPoint for TensorRT 8.6.1

Hi, when I use: "sudo make" in /usr/src/tensorrt/samples/centerpoint I get:

../Makefile.config:10: CUDA_INSTALL_DIR variable is not specified, using /usr/local/cuda by default, use CUDA_INSTALL_DIR=<cuda_directory> to change.
../Makefile.config:15: CUDNN_INSTALL_DIR variable is not specified, using /usr/local/cuda by default, use CUDNN_INSTALL_DIR=<cudnn_directory> to change.
../Makefile.config:28: TRT_LIB_DIR is not specified, searching ../../lib, ../../lib, ../lib by default, use TRT_LIB_DIR=<trt_lib_directory> to change.
if [ ! -d ../../bin/chobj/../common ]; then mkdir -p ../../bin/dchobj/../common; fi; :
Compiling: samplecenterpoint.cpp
samplecenterpoint.cpp:325:115: warning: backslash and newline separated by space
325 | << " " << predResult[idx].velY << " " << predResult[idx].theta << " " << predResult[idx].score <<
|
samplecenterpoint.cpp: In function ‘std::vector<std::__cxx11::basic_string > glob(std::string)’:
samplecenterpoint.cpp:70:26: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
70 | for(auto idx =0; idx <glob_result.gl_pathc; idx++){
| ~~~~^~~~~~~~~~~~~~~~~~~~~
samplecenterpoint.cpp: In member function ‘bool SampleCenterPoint::build()’:
samplecenterpoint.cpp:145:60: error: ‘NetworkDefinitionCreationFlag’ has not been declared
145 | const auto explicitBatch = 1U << static_cast<uint32_t>(NetworkDefinitionCreationFlag::kEXPLICIT_BATCH);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
samplecenterpoint.cpp: In member function ‘bool SampleCenterPoint::constructNetwork(SampleCenterPoint::SampleUniquePtrnvinfer1::IBuilder&, SampleCenterPoint::SampleUniquePtrnvinfer1::INetworkDefinition&, SampleCenterPoint::SampleUniquePtrnvinfer1::IBuilderConfig&, SampleCenterPoint::SampleUniquePtrnvonnxparser::IParser&)’:
samplecenterpoint.cpp:212:33: error: unable to find numeric literal operator ‘operator""_GiB’
212 | config->setMaxWorkspaceSize(1_GiB);
| ^~~~~
samplecenterpoint.cpp:212:33: note: use ‘-fext-numeric-literals’ to enable more built-in suffixes
samplecenterpoint.cpp:215:25: error: ‘BuilderFlag’ has not been declared
215 | config->setFlag(BuilderFlag::kFP16);
| ^~~~~~~~~~~
samplecenterpoint.cpp: In member function ‘bool SampleCenterPoint::testFun(const samplesCommon::BufferManager&)’:
samplecenterpoint.cpp:231:1: warning: no return statement in function returning non-void [-Wreturn-type]
231 | }
| ^
samplecenterpoint.cpp: In member function ‘bool SampleCenterPoint::infer()’:
samplecenterpoint.cpp:256:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
256 | for(auto idx = 0; idx < filePath.size(); idx++){
| ~~~~^~~~~~~~~~~~~~~~~
samplecenterpoint.cpp: In member function ‘void SampleCenterPoint::saveOutput(std::vector&, std::string&)’:
samplecenterpoint.cpp:316:5: error: ‘ofstream’ was not declared in this scope; did you mean ‘std::ofstream’?
316 | ofstream resultFile;
| ^~~~~~~~
| std::ofstream
In file included from /usr/include/c++/9/ios:38,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from ../common/argsParser.h:25,
from samplecenterpoint.cpp:26:
/usr/include/c++/9/iosfwd:165:34: note: ‘std::ofstream’ declared here
165 | typedef basic_ofstream ofstream;
| ^~~~~~~~
samplecenterpoint.cpp:318:5: error: ‘resultFile’ was not declared in this scope
318 | resultFile.exceptions ( std::ifstream::failbit | std::ifstream::badbit );
| ^~~~~~~~~~
samplecenterpoint.cpp:330:35: warning: catching polymorphic type ‘class std::ios_base::failure’ by value [-Wcatch-value=]
330 | catch (std::ifstream::failure e) {
| ^
make: *** [../Makefile.config:316: ../../bin/dchobj/samplecenterpoint.o] Error 1

Does anyone know what to do?

bbox_head Module not included in the ONNX model?

Hi @CarkusL ,
I came across your repo and I am trying out something similar. It helped me a lot in understanding things. I am trying to serve the PointPillar model to an inference engine with ONNX runtime on it. For that I need the ONNX model. But I noticed that the Pytorch model in your repo includes the bbox_head and predicts the boxes directly which are then filtered with NMS. However, the ONNX model does not have this bbox_head included. Did I understand this correctly?
Also the inputs to the ONNX model are: input.1 with shape [1, 10, 30000, 20] and indices_input with shape [1, 30000, 2]. How do I feed the input from the voxel generator to such a model? Any help would be appreciated.

Onnx inference

Anybody has implemented onnx inference using onnx runtime and using two onnx model files? if so, can you plz share any reference or source code? Thanks!

RuntimeError: Only tuples, lists and Variables supported as JIT inputs, but got dict

hello everyone

my dockerfile base "wowowoxuan/centerpoint:latest"

cuda : 10.0
torch : 1.1.0
torchvision : 0.3.0

training is very well....

But I try "python tools/export_pointpillars.py" and

ValueError: Unsupported ONNX opset version: 11

so I change

torch.onnx.export(pp_model, ((rpn_input)),"onnx_model/rpn.onnx",opset_version=10)

but " RuntimeError: Only tuples, lists and Variables supported as JIT inputs, but got dict "

main code opset_version=11 but torch=1.1.0 can't opset_version=11

so i try torch version up but spconv fail...

how can i do?

voxelnet onnx

hi,thanks for your awsome work, i wonder that do you have try export voxelnet model onnx? or could you give some suggestions?

engine.cpp (1036) - Cuda Error in executeInternal: 700 (an illegal memory access was encountered)

Created the onnx models without any problem. There was also nothing wrong with compilation of TRT sample. However I get the below output when sample is run.

filePath[idx]: ../data/centerpoint//points/0106a9b8e65f4ad1867b44591aeed8b0.bin [12/30/2021-15:56:31] [I] [INFO] pointNum : 282378 [12/30/2021-15:56:31] [I] PreProcess Time: 31.4462 ms [12/30/2021-15:56:31] [I] inferenceDuration Time: 9.84006 ms [12/30/2021-15:56:31] [I] PostProcessDuration Time: 1.9788 ms filePath[idx]: ../data/centerpoint//points/048a45dd2cf54aa5808d8ccc85731d44.bin [12/30/2021-15:56:31] [I] [INFO] pointNum : 278690 [12/30/2021-15:56:31] [I] PreProcess Time: 30.7371 ms [12/30/2021-15:56:31] [I] inferenceDuration Time: 9.28456 ms [12/30/2021-15:56:31] [I] PostProcessDuration Time: 11.9031 ms filePath[idx]: ../data/centerpoint//points/05bc09f952ab4cf8b754405f20d503c5.bin [12/30/2021-15:56:31] [I] [INFO] pointNum : 243328 [12/30/2021-15:56:31] [I] PreProcess Time: 22.8271 ms [12/30/2021-15:56:31] [I] inferenceDuration Time: 10.7552 ms [12/30/2021-15:56:31] [I] PostProcessDuration Time: 2.65588 ms filePath[idx]: ../data/centerpoint//points/06be0e3b665c44fa8d17d9f4770bdf9c.bin [12/30/2021-15:56:31] [I] [INFO] pointNum : 258553 [12/30/2021-15:56:31] [I] PreProcess Time: 29.4288 ms [12/30/2021-15:56:31] [I] inferenceDuration Time: 9.25186 ms [12/30/2021-15:56:31] [I] PostProcessDuration Time: 7.31504 ms filePath[idx]: ../data/centerpoint//points/07fad91090c746ccaa1b2bdb55329e20.bin [12/30/2021-15:56:31] [I] [INFO] pointNum : 285130 [12/30/2021-15:56:31] [I] PreProcess Time: 29.1292 ms [12/30/2021-15:56:31] [I] inferenceDuration Time: 9.2483 ms [12/30/2021-15:56:31] [I] PostProcessDuration Time: 8.86581 ms filePath[idx]: ../data/centerpoint//points/092051710b7b4d9294e98dcb3f0f7be1.bin [12/30/2021-15:56:31] [I] [INFO] pointNum : 285204 [12/30/2021-15:56:31] [E] [TRT] engine.cpp (1036) - Cuda Error in executeInternal: 700 (an illegal memory access was encountered) [12/30/2021-15:56:31] [E] [TRT] FAILED_EXECUTION: std::exception [12/30/2021-15:56:31] [E] [TRT] engine.cpp (169) - Cuda Error in ~ExecutionContext: 700 (an illegal memory access was encountered) [12/30/2021-15:56:31] [E] [TRT] INTERNAL_ERROR: std::exception [12/30/2021-15:56:31] [E] [TRT] Parameter check failed at: safeContext.cpp::terminateCommonContext::216, condition: cudnnDestroy(context.cudnn) failure. [12/30/2021-15:56:31] [E] [TRT] Parameter check failed at: safeContext.cpp::terminateCommonContext::221, condition: cudaEventDestroy(context.start) failure. [12/30/2021-15:56:31] [E] [TRT] Parameter check failed at: safeContext.cpp::terminateCommonContext::226, condition: cudaEventDestroy(context.stop) failure. [12/30/2021-15:56:31] [E] [TRT] ../rtSafe/safeRuntime.cpp (32) - Cuda Error in free: 700 (an illegal memory access was encountered) terminate called after throwing an instance of 'nvinfer1::CudaError' what(): std::exception

Demo dataset is not available

I'v successfully install the environment,but seems the clip from the nuScenes dataset google drive folder for the output demo video is not available for now, I would be really appreciate if you can upload it again. Thanks

export_pointpillars_onnx

did you put backbone in the onnx while converting the pytorch model to onnx? I can't seem to find the backbone part?

Visualisation or infernce from TensorRT

Hello @CarkusL I have tried you method for converting centerpoint into onnx and then into tensorRT. Is there a way can visualize the engine file output or calculating the validation accuracy of the engine file generated?

centerhead decode

I want to know why the centerhead onnx do not contain decode part. If I make the centerhead decode part into tensorrt *.engine, how it would infulence the inference speed.

BAD RESULT

Hi, thaks for your great work!
but i have some problem in this work

This is my device
GPU:GTX1080Ti
CUDA : 10.2
cudnn :8.2
TensorRT:7.1.3.4

image

but the result is bad
i found that the time used almost increase hundredfold than your report(PostProcessDuration Time)
[11/18/2021-10:12:50] [I] [INFO] pointNum : 278272
[11/18/2021-10:12:51] [I] PreProcess Time: 49.6466 ms
[11/18/2021-10:12:51] [I] inferenceDuration Time: 28.344 ms
[11/18/2021-10:12:51] [I] PostProcessDuration Time: 124.939 m

0a0d6b8c2e884134a3b48df43d54c36a.bin.txt

and i open the result
found the ouput has 1445 point
i follow your readme
https://github.com/CarkusL/CenterPoint/tree/main/tensorrt/samples/centerpoint

CAN YOU HELP ME

Error when starting training: TypeError: string indices must be integers

Hi, when I try to run the training on a single GPU with "python3 -m torch.distributed.launch --nproc_per_node=1 ./tools/train.py /home/tom/ws/CenterPoint-Onnx/configs/nusc/pp/nusc_centerpoint_pp_02voxel_two_pfn_10sweep_demo.py" I get an error message:

No Tensorflow
No APEX!
2023-12-30 15:48:32,300 - INFO - Distributed training: False
2023-12-30 15:48:32,300 - INFO - torch.backends.cudnn.benchmark: False
2023-12-30 15:48:32,347 - INFO - Finish RPN Initialization
2023-12-30 15:48:32,347 - INFO - num_classes: [1, 2, 2, 1, 2, 2]
Use HM Bias: -2.19
2023-12-30 15:48:32,369 - INFO - Finish CenterHead Initialization
Traceback (most recent call last):
File "./tools/train.py", line 138, in
main()
File "./tools/train.py", line 113, in main
datasets = [build_dataset(cfg.data.train)]
File "/home/tom/ws/CenterPoint-Onnx/det3d/datasets/builder.py", line 41, in build_dataset
dataset = build_from_cfg(cfg, DATASETS, default_args)
File "/home/tom/ws/CenterPoint-Onnx/det3d/utils/registry.py", line 78, in build_from_cfg
return obj_cls(**args)
File "/home/tom/ws/CenterPoint-Onnx/det3d/datasets/nuscenes/nuscenes.py", line 45, in init
super(NuScenesDataset, self).init(
File "/home/tom/ws/CenterPoint-Onnx/det3d/datasets/custom.py", line 37, in init
self._set_group_flag()
File "/home/tom/ws/CenterPoint-Onnx/det3d/datasets/custom.py", line 164, in _set_group_flag
self.flag = np.ones(len(self), dtype=np.uint8)
File "/home/tom/ws/CenterPoint-Onnx/det3d/datasets/nuscenes/nuscenes.py", line 126, in len
self.load_infos(self._info_path)
File "/home/tom/ws/CenterPoint-Onnx/det3d/datasets/nuscenes/nuscenes.py", line 88, in load_infos
for name in set(info["gt_names"]):
TypeError: string indices must be integers

When I checked what the info variable looks like, then its just "pedestrian" at this stage on the loop, so a string no dict. That explains where the error comes from but not why it is just the string at this stage. Other than that I think I followed the setup pretty precisely. Can anyone help?

Question When Parsing Bin File

Hi i want to know why you set constexpr int featureNum = 5; when reading bin file? Is it because XYZI and what is the 5th?
is it ringindex?
do you have idea what to put in feature if the lidar dont provide ringindex?

Thank you

On which GPU did you test centerpoint TensorRT engine

Hi @CarkusL , I am using Tensor 7.2.3.4 on V100. I find the latency is almost twice slower than reported. Could you share us your specific environment settings?

&&&& RUNNING TensorRT.sample_onnx_centerpoint # ./centerpoint
[09/15/2021-10:37:46] [I] Building and running a GPU inference engine for CenterPoint
----------------------------------------------------------------
Input filename:   ../data/centerpoint/pointpillars_trt.onnx
ONNX IR version:  0.0.6
Opset version:    11
Producer name:    pytorch
Producer version: 1.7
Domain:           
Model version:    0
Doc string:       
----------------------------------------------------------------
[09/15/2021-10:37:47] [W] [TRT] onnx2trt_utils.cpp:220: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
[09/15/2021-10:37:47] [I] [TRT] ModelImporter.cpp:135: No importer registered for op: ScatterND. Attempting to import as plugin.
[09/15/2021-10:37:47] [I] [TRT] builtin_op_importers.cpp:3771: Searching for plugin: ScatterND, plugin_version: 1, plugin_namespace: 
[09/15/2021-10:37:47] [I] [TRT] builtin_op_importers.cpp:3788: Successfully created plugin: ScatterND
[09/15/2021-10:37:47] [W] [TRT] Tensor DataType is determined at build time for tensors not marked as input or output.
[09/15/2021-10:37:47] [W] [TRT] Tensor DataType is determined at build time for tensors not marked as input or output.
[09/15/2021-10:37:47] [W] [TRT] Tensor DataType is determined at build time for tensors not marked as input or output.
[09/15/2021-10:37:47] [W] [TRT] Tensor DataType is determined at build time for tensors not marked as input or output.
[09/15/2021-10:37:47] [W] [TRT] Tensor DataType is determined at build time for tensors not marked as input or output.
[09/15/2021-10:37:47] [W] [TRT] Tensor DataType is determined at build time for tensors not marked as input or output.
[09/15/2021-10:37:48] [W] [TRT] TensorRT was linked against cuDNN 8.1.0 but loaded cuDNN 8.0.3
[09/15/2021-10:37:53] [I] [TRT] Some tactics do not have sufficient workspace memory to run. Increasing workspace size may increase performance, please check verbose output.
[09/15/2021-10:38:05] [I] [TRT] Detected 2 inputs and 42 output network tensors.
[09/15/2021-10:38:05] [W] [TRT] TensorRT was linked against cuDNN 8.1.0 but loaded cuDNN 8.0.3
[09/15/2021-10:38:05] [I] getNbInputs: 2 

[09/15/2021-10:38:05] [I] getNbOutputs: 42 

[09/15/2021-10:38:05] [I] getNbOutputs Name: 594 

[09/15/2021-10:38:05] [W] [TRT] TensorRT was linked against cuDNN 8.1.0 but loaded cuDNN 8.0.3
filePath[idx]: ../data/centerpoint//points/0a0d6b8c2e884134a3b48df43d54c36a.bin
[09/15/2021-10:38:05] [I] [INFO] pointNum : 278272
[09/15/2021-10:38:05] [I] PreProcess Time: 13.3244 ms
[09/15/2021-10:38:05] [I] inferenceDuration Time: 13.3018 ms
[09/15/2021-10:38:05] [I] PostProcessDuration Time: 7.13283 ms
&&&& PASSED TensorRT.sample_onnx_centerpoint # ./centerpoint

simplify_model.py script has broken links

Hi, when I run the simplify_model.py script it results in a broken graph for pfe_sim.onnx, when seen on netron. Please refer to the image attached.

model_broken

Output log for: export_pointpillars_onnx.py

workspace/Tracking/CenterPoint/det3d/core/bbox/geometry.py:149: NumbaDeprecationWarning: The keyword argument 'nopython=False' was supplied. From Numba 0.59.0 the default is being changed to True and use of 'nopython=False' will raise a warning as the argument will have no effect. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  @numba.jit(nopython=False)
workspace/Tracking/CenterPoint/det3d/core/bbox/geometry.py:162: NumbaDeprecationWarning: The keyword argument 'nopython=False' was supplied. From Numba 0.59.0 the default is being changed to True and use of 'nopython=False' will raise a warning as the argument will have no effect. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  @numba.jit(nopython=False)
workspace/Tracking/CenterPoint/det3d/core/bbox/geometry.py:280: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  def points_in_convex_polygon_jit(points, polygon, clockwise=True):
2023-08-08 16:01:49.883573: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 AVX512F AVX512_VNNI FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-08-08 16:01:50.013546: I tensorflow/core/util/port.cc:104] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2023-08-08 16:01:50.689251: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /lib/python3.8/site-packages/cv2/../../lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
2023-08-08 16:01:50.689325: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /lib/python3.8/site-packages/cv2/../../lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
2023-08-08 16:01:50.689335: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
No Tensorflow
Object type:  PointPillars
Object type:  PillarFeatureNet
Object type:  PointPillarsScatter
Object type:  RPN
Object type:  CenterHead
Use HM Bias:  -2.19
Object type:  NuScenesDataset
Object type:  LoadPointCloudFromFile
Object type:  LoadPointCloudAnnotations
Object type:  Preprocess
Object type:  Voxelization
Object type:  AssignLabel
Object type:  Reformat
10
Warning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied.
Warning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied.
Warning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied.
Warning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied.
Warning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied.
Warning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied.
Warning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied.
Warning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied.
Warning: Constant folding - Only steps=1 can be constant folded for opset >= 10 onnx::Slice op. Constant folding not applied.
Done

Output for: simplify_model.py

Done

Please help!

onnx result and torch result don't match

Hi, Carkusl:
thanks a lot for your work.
I use the same tools and the same config to turn torch model to onnx model; I get pfe_onnx and rpn_onnx. Before simplify the onnx model, I use onnxruntime to test the onnx result to validation if the reuslt consistent with the torch model. But I got the negative results.
Wheather the pfe or the rpn, the onnx inferenc results are very different with the torch results.
I have not do the simplify. dose the simiplification work for the big difference of the model-inference-result?

Do you have any idea about the problem.

Fps of TensorRT implementation

Hello, @CarkusL! It's really interesting project and a lot of work has been done. I'm wondering what fps the resulting TensorRT model has. Have you evaluated the final FPS?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.