Skip to content

Commit

Permalink
PointPillars inference pipeline (#153)
Browse files Browse the repository at this point in the history
* Fix missing argument

* more import bugfixes (#126)

* fix missing attribute 'utils'

* removed import statements for unused modules

* fix conflict

* add kitti dataset

* add readme about config files (#129)

* readme about config files

* link to predefined script

* Update README.md

* address reviews

* Simplified install instructions (#127)

* Simpliefied install instructions

Multiple requirements files for different use cases.

* minor change to README

* minor change adding link to docs for build from source.

* update install instruction, add +cpu to torch requirements.txt

Co-authored-by: Benjamin Ummenhofer <[email protected]>

* added conditionals in requirements-torch for macos (#131)

* Fix color dictionary in Semantic-KITTI bgr -> rgb (#130)

* Enable hierarchy UI feature in visualizer for SemanticKITTI (#133)

* PointPillars port from mmdet without NMS and Voxelizer. Only inference. Focal loss and smooth L1 implemented and tested.

* loss function implemented and tested

* Add bounding boxes to visualizer

* Voxelization layer for point_pillars

* apply style

* Dataset bounding boxes are now fully their own object and do hide auto-hide/show pieces associated with a geometry, but they do auto-hide irrelevant boxes when animating.

* Style fixes

* objdet metric

* removed mmdet3d dependency, o3d nms and voxelizer added

* renamed objdet to run_pipeline, implemented part of the objdet pipeline

* Added documentation, changed definition of size argument to be edge-to-edge and adjusted code accordingly

* kitti eval only 3d boxes

* test pipeline point pillars

* howto small fix

* change bbox class

* improve bbox

* style

* visualization of results

* test vis of results

* using new bounding box class

* waymo bbox

* added nuscenes bbox

* added lyft bbox

* apply style

* anchor head refactoring

* fix waymo bbox

* fix kitti bbox

* apply style;

* removed transformation of the predicted boxes

* added licenses to files

* removed unnecessary parts

* format

* Labels displayed in visualization. Kitti dataset label ordering changed to match MMDetection3D.

* using our checkpoint format

* fix ci

* apply style

* apply style

* changed list to tuple

Co-authored-by: Sanskar Agrawal <[email protected]>
Co-authored-by: Benjamin Ummenhofer <[email protected]>
Co-authored-by: YilingQiao <[email protected]>
Co-authored-by: ssheorey <[email protected]>
Co-authored-by: Ignacio Vizzo <[email protected]>
Co-authored-by: prewettg <[email protected]>
Co-authored-by: lprantl <[email protected]>
  • Loading branch information
8 people authored Dec 8, 2020
1 parent 4862fb7 commit f76c093
Show file tree
Hide file tree
Showing 25 changed files with 1,556 additions and 21 deletions.
2 changes: 1 addition & 1 deletion docs/howtos.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Second, we will construct the networks and pipelines, load the pretrained weight
pcs = get_custom_data(pc_names, data_path)
```

Third, we can run the inference and collect the results and send the results to `Visualizer.visualize(list_of_pointclouds_to_visualize)`. Note that the input to `visualize()` visualize is a list of point clouds and their predictions. Each point cloud is a dictionary like,
Third, we can run the inference and collect the results and send the results to `Visualizer.visualize(list_of_pointclouds_to_visualize)`. Note that the input to `visualize()` is a list of point clouds and their predictions. Each point cloud is a dictionary like,
```python
vis_d = {
"name": name,
Expand Down
43 changes: 43 additions & 0 deletions ml3d/configs/pointpillars_kitti.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
dataset:
name: KITTI
dataset_path: # path/to/your/dataset
cache_dir: ./logs/cache

model:
name: PointPillars
ckpt_path: # path/to/your/checkpoint

voxel_size: [0.16, 0.16, 4]
point_cloud_range: [0, -39.68, -3, 69.12, 39.68, 1]

voxelize:
max_num_points: 32
max_voxels: [16000, 40000]

voxel_encoder:
in_channels: 4
feat_channels: [64]

scatter:
in_channels: 64
output_shape: [496, 432]

backbone:
in_channels: 64
out_channels: [64, 128, 256]
layer_nums: [3, 5, 5]
layer_strides: [2, 2, 2]

neck:
in_channels: [64, 128, 256]
out_channels: [128, 128, 128]
upsample_strides: [1, 2, 4]
use_conv_for_no_stride: False

head:
num_classes: 3
in_channels: 384
feat_channels: 384

pipeline:
name: ObjectDetection
20 changes: 13 additions & 7 deletions ml3d/datasets/kitti.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ def __init__(self,

@staticmethod
def get_label_to_names():
label_to_names = {0: 'Car', 1: 'Pedestrian', 2: 'Cyclist', 3: 'Van'}
label_to_names = {
0: 'Pedestrian',
1: 'Cyclist',
2: 'Car',
3: 'Van',
4: 'DontCare'
}
return label_to_names

@staticmethod
Expand Down Expand Up @@ -172,7 +178,7 @@ def get_split_list(self, split):
elif split in ['test', 'testing']:
return self.test_files
elif split in ['val', 'validation']:
return val_files
return self.val_files
elif split in ['all']:
return self.train_files + self.val_files + self.test_files
else:
Expand Down Expand Up @@ -261,11 +267,11 @@ def cls_type_to_id(cls_type):
get object id from name.
"""
type_to_id = {
'DontCare': 0,
'Car': 1,
'Pedestrian': 2,
'Cyclist': 3,
'Van': 4
'Pedestrian': 0,
'Cyclist': 1,
'Car': 2,
'Van': 3,
'DontCare': 4,
}
if cls_type not in type_to_id.keys():
return 0
Expand Down
3 changes: 2 additions & 1 deletion ml3d/torch/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

from .randlanet import RandLANet
from .kpconv import KPFCNN
from .point_pillars import PointPillars

__all__ = ['RandLANet', 'KPFCNN']
__all__ = ['RandLANet', 'KPFCNN', 'PointPillars']
Loading

0 comments on commit f76c093

Please sign in to comment.