Skip to content

Commit

Permalink
Merge master to dev (#400)
Browse files Browse the repository at this point in the history
* merge-open3d-ml-0.13.0 (#287)

* version update for next release

* Add Kitti object detection dataset (#128)

* Fix missing argument

* more import bugfixes (#126)

* fix missing attribute 'utils'

* removed import statements for unused modules

* fix conflict

* add kitti dataset

* address reviews

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

* Add Waymo Dataset (#136)

* add waymo preprocess

* add waymo class

* added argparse

* apply style

* add docstring

* remove cv2

* Add NuScenes dataset (#137)

* add preprocess nuscenes

* bug fix

* add argparse

* add nuscenes class

* apply style

* added label

* Fix ignore class

* add docstring

* style

* create sampler class for sampling point cloud idx and points idx (#135)

* Fix missing argument

* more import bugfixes (#126)

* fix missing attribute 'utils'

* removed import statements for unused modules

* add readme about config files (#129)

* readme about config files

* link to predefined script

* Update README.md

* 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)

* sampler

* sampler class

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

* spatially regular

* kpconv sampler

* kpconv paris lille

* delete debug information

* valid

* vlida

* default sampler

* confusion matrix

Co-authored-by: Sanskar Agrawal <[email protected]>
Co-authored-by: Benjamin Ummenhofer <[email protected]>
Co-authored-by: ssheorey <[email protected]>
Co-authored-by: Ignacio Vizzo <[email protected]>
Co-authored-by: prewettg <[email protected]>

* Add Lyft Dataset (#138)

* bug fix

* Added preprocess lyft

* bug

* add dataset_class for lyft

* style

* bug fix

Co-authored-by: germanros1987 <[email protected]>

* apply-style

* Download scripts (#145)

* add kitti download script

* fix semantickitti

* added lyft download script

* Add bounding boxes to visualizer (#140)

* Add bounding boxes to visualizer

* 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

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

* Create LICENSE

* Change Bounding box class. (#149)

* change bbox class

* improve bbox

* style

* waymo bbox

* added nuscenes bbox

* added lyft bbox

* apply style

* fix waymo bbox

* fix kitti bbox

* apply style;

* address review

* Update README.md

* Added Agroverse 3D Dataset (#155)

* added argoverse

* style

* change classes

* use open3d for reading pcd

* link to kpconv parislille3d models in readme (#160)

* readme for parislille3d kpconv models

* PointPillars inference pipeline (#153)

* 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]>

* add comments for visualize predictions (#151)

* Fix missing argument

* more import bugfixes (#126)

* fix missing attribute 'utils'

* removed import statements for unused modules

* add readme about config files (#129)

* readme about config files

* link to predefined script

* Update README.md

* 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)

* Import os (#148)

I am getting also another error later about 

NameError                                 Traceback (most recent call last)
<ipython-input-5-bed5d0e06c9a> in <module>
     22 pipeline_k.load_ckpt(model.cfg.ckpt_path)
     23 
---> 24 data_path = os.path.dirname(os.path.realpath(__file__)) + "/demo_data"
     25 pc_names = ["000700", "000750"]
     26 

NameError: name '__file__' is not defined


for this

data_path = os.path.dirname(os.path.realpath(__file__)) + "/demo_data"

* Create LICENSE

* add comments

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: Albhox <[email protected]>
Co-authored-by: germanros1987 <[email protected]>

* Fix broken link to torch RandLA-Net Toronto 3d model (#163)

* Updating documentation (#154)

* Editing documentation for TF and Torch dataloaders.

* Updating datasets documentation

* Updates after fixing style issues

* Updating semantic segmentation

* Updating dataset.py to fix semantic issues

* Updating semantic segmentation

* Updating base_dataset.py to fix semantic issues

* Updating custom_dataset.py to fix semantic issues

* Updating dataset.py to fix semantic issues

* Updating visualizer documentation

Updating files for visualizer documentation

* Update customdataset.py

* Fixing PR comment

Fixing indentation issue

* fix indent

* Updating customdataset comments

Updating customdataset to fix indentation issue.

* Adding Jupyter tutorials

Adding jupyter tutorials for: Training SS using PyTorch and Traing SS using TF

* Update customdataset.py

Fixing indentation issue.

Co-authored-by: Sanskar Agrawal <[email protected]>

* Add Tensorflow model and inference pipeline. (#159)

* 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.

* added tf voxel class

* added PFNlayer

* add pillar feature net

* added pointpillar scatter class

* add class SECOND

* added SECONDFPN layer

* fix ragged tensor

* implemented tf bbox generator, improved some torch helpers of pointpillars

* batch support for box generation

* add call method

* fix name conflicts

* fix bugs

* added tf objdet pipeline

* fix scatter tf

* fix conv2d channels last

* apply style

* added crossentropy

* add focal loss

* added smooth L1 loss

* apply style

* fix batchnorm

* add load/save ckpt

* apply style

* simplify inference torch

* simplify inference tf

* fix bug

* fix ci

* fix ci tf

* apply style

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: Lukas Prantl <[email protected]>
Co-authored-by: lprantl <[email protected]>

* Fixes for changes from TensorList to Tesor for t.geometry objects (#161)

* Yiling/readme randlanet semantic3d (#167)

* readme for randlanet semantic3d models

* readme change

* Prantl/point pillars train (#170)

* 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.

* added tf voxel class

* added PFNlayer

* add pillar feature net

* added pointpillar scatter class

* add class SECOND

* added SECONDFPN layer

* fix ragged tensor

* implemented tf bbox generator, improved some torch helpers of pointpillars

* batch support for box generation

* add call method

* fix name conflicts

* fix bugs

* added tf objdet pipeline

* fix scatter tf

* fix conv2d channels last

* apply style

* added crossentropy

* add focal loss

* added smooth L1 loss

* apply style

* using our checkpoint format

* fix batchnorm

* add load/save ckpt

* apply style

* simplify inference torch

* simplify inference tf

* fix bug

* fix ci

* fix ci tf

* apply style

* implemented loss calculation of pointpillars, not yet tested

* training working, evaluation and augmentation missing

* fixed batched inference

* style

* new bev bounding box class

* validation added

* small fixes

* small fix

* reset yaw transformation in kitti bbox

* fixed bug in loss calculation, fixed bug in save logs

* removed debugging bug

* fixed cls loss bug

* style

* Update kitti.py

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]>

* Prantl/point pillars train tf (#171)

* 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.

* added tf voxel class

* added PFNlayer

* add pillar feature net

* added pointpillar scatter class

* add class SECOND

* added SECONDFPN layer

* fix ragged tensor

* implemented tf bbox generator, improved some torch helpers of pointpillars

* batch support for box generation

* add call method

* fix name conflicts

* fix bugs

* added tf objdet pipeline

* fix scatter tf

* fix conv2d channels last

* apply style

* added crossentropy

* add focal loss

* added smooth L1 loss

* apply style

* using our checkpoint format

* fix batchnorm

* add load/save ckpt

* apply style

* simplify inference torch

* simplify inference tf

* fix bug

* fix ci

* fix ci tf

* apply style

* implemented loss calculation of pointpillars, not yet tested

* training working, evaluation and augmentation missing

* fixed batched inference

* style

* new bev bounding box class

* validation added

* small fixes

* small fix

* reset yaw transformation in kitti bbox

* fixed bug in loss calculation, fixed bug in save logs

* removed debugging bug

* fixed cls loss bug

* trainings pipeline for tensorflow

* style

* style

* Update kitti.py

* style

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]>

* new validation for torch (#169)

* infer

* test and infer

* testing

* test inference

* modify

* before merge

* inference dummy

* add back save results

* update model zoo (#175)

* added weight initialization (#174)

* Added ShapeNet dataset (#157)

* Added ShapeNet dataset

* Applied style

* Added dummy part segmentation labels

This is a hack as there aren't any official part labels (as far as I know).

Co-authored-by: Matthias Humt <[email protected]>
Co-authored-by: germanros1987 <[email protected]>

* Fix for changes in t::geometry (#173)

* Add wide lines (#176)

* Prantl/point pillars metrics (#172)

* 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

* setup

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

* added temporary metric test + numba operators

* added tf voxel class

* added PFNlayer

* add pillar feature net

* added pointpillar scatter class

* add class SECOND

* added SECONDFPN layer

* fix ragged tensor

* add mAP metric

* implemented tf bbox generator, improved some torch helpers of pointpillars

* batch support for box generation

* add call method

* fix name conflicts

* fix bugs

* added tf objdet pipeline

* fix scatter tf

* fix conv2d channels last

* apply style

* added crossentropy

* add focal loss

* added smooth L1 loss

* apply style

* using our checkpoint format

* fix batchnorm

* add load/save ckpt

* apply style

* simplify inference torch

* simplify inference tf

* fix bug

* fix ci

* fix ci tf

* fix ci

* apply style

* apply style

* apply style

* implemented loss calculation of pointpillars, not yet tested

* changed list to tuple

* training working, evaluation and augmentation missing

* fixed batched inference

* style

* using same mAP technique as mmdet, 1 percent off

* new bev bounding box class

* validation added

* small fixes

* small fix

* reset yaw transformation in kitti bbox

* fixed bug in loss calculation, fixed bug in save logs

* removed debugging bug

* undone removing debug code for test run

* old loader

* some small fixes

* cls loss fixed

* undone changes in demo script

* fixed cls loss bug

* small bug fix in mAP calculation

* metric bug fixes, o3d iou intergrated

* trainings pipeline for tensorflow

* fixed cumulative prediction calculation of mAP, no more deviation in mAP calculation, removed debugging code

* mAP validation added to tf model

* fixed convertion to eval data

* small fixes

* fixed infinite epoch

* style

* style

* iou gpu/cpu depending on o3d build

* Update kitti.py

* replaced adamW with adam in tf training pipeline

* removed legacy setup

* style

* fixed bug in loss computation of tf model, fixed bug in scatter operation of pointpillars tf

* renamed tensorboard writer

* tf summary writer

* tf summary fix

* mAP in tensorboard

* fixed tf writer

* fixed some merge artifacts

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]>

* Filter kitti point cloud (#177)

* reduce kitti pc

* apply style

* PointPillars bug fixes (#179)

* fixed resuming from checkpoint

* fixed offset in reassume

* fixed missing device definition in pointpillars

* Update object_detection.py

removed debug log

* Data Augmentation (#178)

* shuffle

* object range filter

* add sample objects

* added collect bbox

* add box points in preprocessing

* add object sample

* add augment in config

* bug fixes

* apply style

* remove duplicate

* filter by min points

* apply style

* improve speed

* fix tf

* apply style

* optional out_path

* vectorization of points in shape, small bug fixes, removed pickle path

Co-authored-by: praluk <[email protected]>

* fixed absolute path bug (#182)

* Disable data augmentation while testing. (#181)

* disable test augment

* - validation without augmentation
- transform returns bbox_obj
- labels and bboxes single elements instead of list
- fixed ignored min_points

Co-authored-by: Lukas Prantl <[email protected]>

* update readme and config files for parislille3d; align points for parislille3d (#180)

* randlanet parislille

* config

* merge

* model path

* minor changes

* trans normalize

* trans norm

* fixed infinte dataset iteration (#184)

* fixed infinte dataset iteration

* - fixed obj det demo
- preprocess full points

* style

* fix collision (#183)

* Abhishek/documentation (#185)

* Editing documentation for TF and Torch dataloaders.

* Updating datasets documentation

* Updates after fixing style issues

* Updating semantic segmentation

* Updating dataset.py to fix semantic issues

* Updating semantic segmentation

* Updating base_dataset.py to fix semantic issues

* Updating custom_dataset.py to fix semantic issues

* Updating dataset.py to fix semantic issues

* Updating visualizer documentation

Updating files for visualizer documentation

* Update customdataset.py

* Fixing PR comment

Fixing indentation issue

* fix indent

* Updating customdataset comments

Updating customdataset to fix indentation issue.

* Adding Jupyter tutorials

Adding jupyter tutorials for: Training SS using PyTorch and Traing SS using TF

* Update customdataset.py

Fixing indentation issue.

* Updates to readme

Added object detection updates to the readme.md in Open3D ML and Open3D ML\Script for the new release.

* Update __init__.py

* Fixing style errors

Fixing style errors.

Co-authored-by: Sanskar Agrawal <[email protected]>

* In dataset mode, only bounding boxes from visible names are visible. Also update set_background_color() -> set_background() (#186)

* Fix absolute path. (#187)

* fix abs path

* fix order of paths

* fix skewed argoverse

* Abhishek/documentation (#188)

* Editing documentation for TF and Torch dataloaders.

* Updating datasets documentation

* Updates after fixing style issues

* Updating semantic segmentation

* Updating dataset.py to fix semantic issues

* Updating semantic segmentation

* Updating base_dataset.py to fix semantic issues

* Updating custom_dataset.py to fix semantic issues

* Updating dataset.py to fix semantic issues

* Updating visualizer documentation

Updating files for visualizer documentation

* Update customdataset.py

* Fixing PR comment

Fixing indentation issue

* fix indent

* Updating customdataset comments

Updating customdataset to fix indentation issue.

* Adding Jupyter tutorials

Adding jupyter tutorials for: Training SS using PyTorch and Traing SS using TF

* Update customdataset.py

Fixing indentation issue.

* Updates to readme

Added object detection updates to the readme.md in Open3D ML and Open3D ML\Script for the new release.

* Update __init__.py

* Fixing style errors

Fixing style errors.

* Updating Readme

Updating readme to include image for visualization.

* Replacing bounding_boxes image.

Co-authored-by: Sanskar Agrawal <[email protected]>

* Prantl/dataset fixes (#189)

* - Object3D of datasets inherit from BEVBox, calib unified, output path of preprocessing scripts optional, label names instead of numbers

* dataset configs

* small bugfixes

* fixes for Lyft training

* added missing file

* small bugfixes

* added sample split

* style

* Update .gitignore

* Fix Label LUT and Waymo (#190)

* fix lut

* fix waymo

* address review

* fixed style for mAP log in tf (#191)

* Change the line width factor now that line widths are working (#192)

* Prantl/pointpillars readme (#193)

* updated pointpillar metrics

* updated weights

* object sampler fix (#194)

* upload link (#195)

* Added CI tests for Object detection (#208)

* Dev (#197)

* version update for next release

* Add Kitti object detection dataset (#128)

* Fix missing argument

* more import bugfixes (#126)

* fix missing attribute 'utils'

* removed import statements for unused modules

* fix conflict

* add kitti dataset

* address reviews

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

* Add Waymo Dataset (#136)

* add waymo preprocess

* add waymo class

* added argparse

* apply style

* add docstring

* remove cv2

* Add NuScenes dataset (#137)

* add preprocess nuscenes

* bug fix

* add argparse

* add nuscenes class

* apply style

* added label

* Fix ignore class

* add docstring

* style

* create sampler class for sampling point cloud idx and points idx (#135)

* Fix missing argument

* more import bugfixes (#126)

* fix missing attribute 'utils'

* removed import statements for unused modules

* add readme about config files (#129)

* readme about config files

* link to predefined script

* Update README.md

* 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)

* sampler

* sampler class

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

* spatially regular

* kpconv sampler

* kpconv paris lille

* delete debug information

* valid

* vlida

* default sampler

* confusion matrix

Co-authored-by: Sanskar Agrawal <[email protected]>
Co-authored-by: Benjamin Ummenhofer <[email protected]>
Co-authored-by: ssheorey <[email protected]>
Co-authored-by: Ignacio Vizzo <[email protected]>
Co-authored-by: prewettg <[email protected]>

* Add Lyft Dataset (#138)

* bug fix

* Added preprocess lyft

* bug

* add dataset_class for lyft

* style

* bug fix

Co-authored-by: germanros1987 <[email protected]>

* apply-style

* Download scripts (#145)

* add kitti download script

* fix semantickitti

* added lyft download script

* Add bounding boxes to visualizer (#140)

* Add bounding boxes to visualizer

* 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

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

* Create LICENSE

* Change Bounding box class. (#149)

* change bbox class

* improve bbox

* style

* waymo bbox

* added nuscenes bbox

* added lyft bbox

* apply style

* fix waymo bbox

* fix kitti bbox

* apply style;

* address review

* Update README.md

* Added Agroverse 3D Dataset (#155)

* added argoverse

* style

* change classes

* use open3d for reading pcd

* link to kpconv parislille3d models in readme (#160)

* readme for parislille3d kpconv models

* PointPillars inference pipeline (#153)

* 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]>

* add comments for visualize predictions (#151)

* Fix missing argument

* more import bugfixes (#126)

* fix missing attribute 'utils'

* removed import statements for unused modules

* add readme about config files (#129)

* readme about config files

* link to predefined script

* Update README.md

* 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)

* Import os (#148)

I am getting also another error later about 

NameError                                 Traceback (most recent call last)
<ipython-input-5-bed5d0e06c9a> in <module>
     22 pipeline_k.load_ckpt(model.cfg.ckpt_path)
     23 
---> 24 data_path = os.path.dirname(os.path.realpath(__file__)) + "/demo_data"
     25 pc_names = ["000700", "000750"]
     26 

NameError: name '__file__' is not defined


for this

data_path = os.path.dirname(os.path.realpath(__file__)) + "/demo_data"

* Create LICENSE

* add comments

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: Albhox <[email protected]>
Co-authored-by: germanros1987 <[email protected]>

* Fix broken link to torch RandLA-Net Toronto 3d model (#163)

* Updating documentation (#154)

* Editing documentation for TF and Torch dataloaders.

* Updating datasets documentation

* Updates after fixing style issues

* Updating semantic segmentation

* Updating dataset.py to fix semantic issues

* Updating semantic segmentation

* Updating base_dataset.py to fix semantic issues

* Updating custom_dataset.py to fix semantic issues

* Updating dataset.py to fix semantic issues

* Updating visualizer documentation

Updating files for visualizer documentation

* Update customdataset.py

* Fixing PR comment

Fixing indentation issue

* fix indent

* Updating customdataset comments

Updating customdataset to fix indentation issue.

* Adding Jupyter tutorials

Adding jupyter tutorials for: Training SS using PyTorch and Traing SS using TF

* Update customdataset.py

Fixing indentation issue.

Co-authored-by: Sanskar Agrawal <[email protected]>

* Add Tensorflow model and inference pipeline. (#159)

* 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.

* added tf voxel class

* added PFNlayer

* add pillar feature net

* added pointpillar scatter class

* add class SECOND

* added SECONDFPN layer

* fix ragged tensor

* implemented tf bbox generator, improved some torch helpers of pointpillars

* batch support for box generation

* add call method

* fix name conflicts

* fix bugs

* added tf objdet pipeline

* fix scatter tf

* fix conv2d channels last

* apply style

* added crossentropy

* add focal loss

* added smooth L1 loss

* apply style

* fix batchnorm

* add load/save ckpt

* apply style

* simplify inference torch

* simplify inference tf

* fix bug

* fix ci

* fix ci tf

* apply style

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: Lukas Prantl <[email protected]>
Co-authored-by: lprantl <[email protected]>

* Fixes for changes from TensorList to Tesor for t.geometry objects (#161)

* Yiling/readme randlanet semantic3d (#167)

* readme for randlanet semantic3d models

* readme change

* Prantl/point pillars train (#170)

* 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.

* added tf voxel class

* added PFNlayer

* add pillar feature net

* added pointpillar scatter class

* add class SECOND

* added SECONDFPN layer

* fix ragged tensor

* implemented tf bbox generator, improved some torch helpers of pointpillars

* batch support for box generation

* add call method

* fix name conflicts

* fix bugs

* added tf objdet pipeline

* fix scatter tf

* fix conv2d channels last

* apply style

* added crossentropy

* add focal loss

* added smooth L1 loss

* apply style

* using our checkpoint format

* fix batchnorm

* add load/save ckpt

* apply style

* simplify inference torch

* simplify inference tf

* fix bug

* fix ci

* fix ci tf

* apply style

* implemented loss calculation of pointpillars, not yet tested

* training working, evaluation and augmentation missing

* fixed batched inference

* style

* new bev bounding box class

* validation added

* small fixes

* small fix

* reset yaw transformation in kitti bbox

* fixed bug in loss calculation, fixed bug in save logs

* removed debugging bug

* fixed cls loss bug

* style

* Update kitti.py

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]>

* Prantl/point pillars train tf (#171)

* 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.

* added tf voxel class

* added PFNlayer

* add pillar feature net

* added pointpillar scatter class

* add class SECOND

* added SECONDFPN layer

* fix ragged tensor

* implemented tf bbox generator, improved some torch helpers of pointpillars

* batch support for box generation

* add call method

* fix name conflicts

* fix bugs

* added tf objdet pipeline

* fix scatter tf

* fix conv2d channels last

* apply style

* added crossentropy

* add focal loss

* added smooth L1 loss

* apply style

* using our checkpoint format

* fix batchnorm

* add load/save ckpt

* apply style

* simplify inference torch

* simplify inference tf

* fix bug

* fix ci

* fix ci tf

* apply style

* implemented loss calculation of pointpillars, not yet tested

* training working, evaluation and augmentation missing

* fixed batched inference

* style

* new bev bounding box class

* validation added

* small fixes

* small fix

* reset yaw transformation in kitti bbox

* fixed bug in loss calculation, fixed bug in save logs

* removed debugging bug

* fixed cls loss bug

* trainings pipeline for tensorflow

* style

* style

* Update kitti.py

* style

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]>

* new validation for torch (#169)

* infer

* test and infer

* testing

* test inference

* modify

* before merge

* inference dummy

* add back save results

* update model zoo (#175)

* added weight initialization (#174)

* Added ShapeNet dataset (#157)

* Added ShapeNet dataset

* Applied style

* Added dummy part segmentation labels

This is a hack as there aren't any official part labels (as far as I know).

Co-authored-by: Matthias Humt <[email protected]>
Co-authored-by: germanros1987 <[email protected]>

* Fix for changes in t::geometry (#173)

* Add wide lines (#176)

* Prantl/point pillars metrics (#172)

* 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

* setup

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

* added temporary metric test + numba operators

* added tf voxel class

* added PFNlayer

* add pillar feature net

* added pointpillar scatter class

* add class SECOND

* added SECONDFPN layer

* fix ragged tensor

* add mAP metric

* implemented tf bbox generator, improved some torch helpers of pointpillars

* batch support for box generation

* add call method

* fix name conflicts

* fix bugs

* added tf objdet pipeline

* fix scatter tf

* fix conv2d channels last

* apply style

* added crossentropy

* add focal loss

* added smooth L1 loss

* apply style

* using our checkpoint format

* fix batchnorm

* add load/save ckpt

* apply style

* simplify inference torch

* simplify inference tf

* fix bug

* fix ci

* fix ci tf

* fix ci

* apply style

* apply style

* apply style

* implemented loss calculation of pointpillars, not yet tested

* changed list to tuple

* training working, evaluation and augmentation missing

* fixed batched inference

* style

* using same mAP technique as mmdet, 1 percent off

* new bev bounding box class

* validation added

* small fixes

* small fix

* reset yaw transformation in kitti bbox

* fixed bug in loss calculation, fixed bug in save logs

* removed debugging bug

* undone removing debug code for test run

* old loader

* some small fixes

* cls loss fixed

* undone changes in demo script

* fixed cls loss bug

* small bug fix in mAP calculation

* metric bug fixes, o3d iou intergrated

* trainings pipeline for tensorflow

* fixed cumulative prediction calculation of mAP, no more deviation in mAP calculation, removed debugging code

* mAP validation added to tf model

* fixed convertion to eval data

* small fixes

* fixed infinite epoch

* style

* style

* iou gpu/cpu depending on o3d build

* Update kitti.py

* replaced adamW with adam in tf training pipeline

* removed legacy setup

* style

* fixed bug in loss computation of tf model, fixed bug in scatter operation of pointpillars tf

* renamed tensorboard writer

* tf summary writer

* tf summary fix

* mAP in tensorboard

* fixed tf writer

* fixed some merge artifacts

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]>

* Filter kitti point cloud (#177)

* reduce kitti pc

* apply style

* PointPillars bug fixes (#179)

* fixed resuming from checkpoint

* fixed offset in reassume

* fixed missing device definition in pointpillars

* Update object_detection.py

removed debug log

* Data Augmentation (#178)

* shuffle

* object range filter

* add sample objects

* added collect bbox

* add box points in preprocessing

* add object sample

* add augment in config

* bug fixes

* apply style

* remove duplicate

* filter by min points

* apply style

* improve speed

* fix tf

* apply style

* optional out_path

* vectorization of points in shape, small bug fixes, removed pickle path

Co-authored-by: praluk <[email protected]>

* fixed absolute path bug (#182)

* Disable data augmentation while testing. (#181)

* disable test augment

* - validation without augmentation
- transform returns bbox_obj
- labels and bboxes single elements instead of list
- fixed ignored min_points

Co-authored-by: Lukas Prantl <[email protected]>

* update readme and config files for parislille3d; align points for parislille3d (#180)

* randlanet parislille

* config

* merge

* model path

* minor changes

* trans normalize

* trans norm

* fixed infinte dataset iteration (#184)

* fixed infinte dataset iteration

* - fixed obj det demo
- preprocess full points

* style

* fix collision (#183)

* Abhishek/documentation (#185)

* Editing documentation for TF and Torch dataloaders.

* Updating datasets documentation

* Updates after fixing style issues

* Updating semantic segmentation

* Updating dataset.py to fix semantic issues

* Updating semantic segmentation

* Updating base_dataset.py to fix semantic issues

* Updating custom_dataset.py to fix semantic issues

* Updating dataset.py to fix semantic issues

* Updating visualizer documentation

Updating files for visualizer documentation

* Update customdataset.py

* Fixing PR comment

Fixing indentation issue

* fix indent

* Updating customdataset comments

Updating customdataset to fix indentation issue.

* Adding Jupyter tutorials

Adding jupyter tutorials for: Training SS using PyTorch and Traing SS using TF

* Update customdataset.py

Fixing indentation issue.

* Updates to readme

Added object detection updates to the readme.md in Open3D ML and Open3D ML\Script for the new release.

* Update __init__.py

* Fixing style errors

Fixing style errors.

Co-authored-by: Sanskar Agrawal <[email protected]>

* In dataset mode, only bounding boxes from visible names are visible. Also update set_background_color() -> set_background() (#186)

* Fix absolute path. (#187)

* fix abs path

* fix order of paths

* fix skewed argoverse

* Abhishek/documentation (#188)

* Editing documentation for TF and Torch dataloaders.

* Updating datasets documentation

* Updates after fixing style issues

* Updating semantic segmentation

* Updating dataset.py to fix semantic issues

* Updating semantic segmentation

* Updating base_dataset.py to fix semantic issues

* Updating custom_dataset.py to fix semantic issues

* Updating dataset.py to fix semantic issues

* Updating visualizer documentation

Updating files for visualizer documentation

* Update customdataset.py

* Fixing PR comment

Fixing indentation issue

* fix indent

* Updating customdataset comments

Updating customdataset to fix indentation issue.

* Adding Jupyter tutorials

Adding jupyter tutorials for: Training SS using PyTorch and Traing SS using TF

* Update customdataset.py

Fixing indentation issue.

* Updates to readme

Added object detection updates to the readme.md in Open3D ML and Open3D ML\Script for the new release.

* Update __init__.py

* Fixing style errors

Fixing style errors.

* Updating Readme

Updating readme to include image for visualization.

* Replacing bounding_boxes image.

Co-authored-by: Sanskar Agrawal <[email protected]>

* Prantl/dataset fixes (#189)

* - Object3D of datasets inherit from BEVBox, calib unified, output path of preprocessing scripts optional, label names instead of numbers

* dataset configs

* small bugfixes

* fixes for Lyft training

* added missing file

* small bugfixes

* added sample split

* style

* Update .gitignore

* Fix Label LUT and Waymo (#190)

* fix lut

* fix waymo

* address review

* fixed style for mAP log in tf (#191)

* Change the line width factor now that line widths are working (#192)

* Prantl/pointpillars readme (#193)

* updated pointpillar metrics

* updated weights

* object sampler fix (#194)

* upload link (#195)

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: Prantl <[email protected]>
Co-authored-by: lprantl <[email protected]>
Co-authored-by: KENTO Yamamoto <[email protected]>
Co-authored-by: Albhox <[email protected]>
Co-authored-by: amirshal <[email protected]>
Co-authored-by: AbhishekS <[email protected]>
Co-authored-by: Matthias Humt <[email protected]>
Co-authored-by: Matthias Humt <[email protected]>

* do not import CUDA functions when CUDA device is not available (#198)

* Do not import CUDA functions when CUDA device is not available

* update name

* update wording

* Use scikit-learn instead of sklearn (#200)

* torch test

* tf objdet test

* apply style

Co-authored-by: germanros1987 <[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: Prantl <[email protected]>
Co-authored-by: lprantl <[email protected]>
Co-authored-by: KENTO Yamamoto <[email protected]>
Co-authored-by: Albhox <[email protected]>
Co-authored-by: amirshal <[email protected]>
Co-authored-by: AbhishekS <[email protected]>
Co-authored-by: Matthias Humt <[email protected]>
Co-authored-by: Matthias Humt <[email protected]>
Co-authored-by: Yixing Lao <[email protected]>

* Added Scannet dataset (#212)

* add scannet resources

* added preprocess scannet

* change init

* add class mapping resource

* add scannet class

* apply style

* Add Bounding boxes in S3DIS (#210)

* modify s3dis

* find min bbox

* add bev box

* apply style

* Add SunRGBD Dataset (#215)

* sunrgbd download script

* added preprocess sunrgbd

* add data class for sunrgbd

* modify download script

* apply style

* remove folder

* Abhishek/documentation (#206)

* Editing documentation for TF and Torch dataloaders.

* Updating datasets documentation

* Updates after fixing style issues

* Updating semantic segmentation

* Updating dataset.py to fix semantic issues

* Updating semantic segmentation

* Updating base_dataset.py to fix semantic issues

* Updating custom_dataset.py to fix semantic issues

* Updating dataset.py to fix semantic issues

* Updating visualizer documentation

Updating files for visualizer documentation

* Update customdataset.py

* Fixing PR comment

Fixing indentation issue

* fix indent

* Updating customdataset comments

Updating customdataset to fix indentation issue.

* Addin…
  • Loading branch information
1 parent 7313fdf commit 0300cfa
Show file tree
Hide file tree
Showing 41 changed files with 210 additions and 143 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ The table shows the available models and datasets for the segmentation task and

| Model / Dataset | SemanticKITTI | Toronto 3D | S3DIS | Semantic3D | Paris-Lille3D | ScanNet |
|--------------------|---------------|----------- |-------|--------------|-------------|---------|
| RandLA-Net (tf) | [53.7](https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantickitti_202010091306.zip) | [69.0](https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_toronto3d_202010091250.zip) | [67.0](https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_s3dis_202010091238.zip) | [76.0](https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantic3d_202012120312utc.zip) | [70.0](https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_parislille3d_202012160654utc.zip) | - |
| RandLA-Net (tf) | [53.7](https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantickitti_202010091306.zip) | [69.0](https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_toronto3d_202010091250.zip) | [67.0](https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_s3dis_202106011448utc.zip) | [76.0](https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantic3d_202012120312utc.zip) | [70.0](https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_parislille3d_202012160654utc.zip) | - |
| RandLA-Net (torch) | [52.8](https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantickitti_202009090354utc.pth) | [71.2](https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_toronto3d_202010091306utc.pth) | [67.0](https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_s3dis_202010091238.pth) | [76.0](https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_semantic3d_202012120312utc.pth) | [70.0](https://storage.googleapis.com/open3d-releases/model-zoo/randlanet_parislille3d_202012160654utc.pth) | - |
| KPConv (tf) | [58.7](https://storage.googleapis.com/open3d-releases/model-zoo/kpconv_semantickitti_202010021102utc.zip) | [65.6](https://storage.googleapis.com/open3d-releases/model-zoo/kpconv_toronto3d_202012221551utc.zip) | [65.0](https://storage.googleapis.com/open3d-releases/model-zoo/kpconv_s3dis_202010091238.zip) | - | [76.7](https://storage.googleapis.com/open3d-releases/model-zoo/kpconv_parislille3d_202011241550utc.zip) | - |
| KPConv (torch) | [58.0](https://storage.googleapis.com/open3d-releases/model-zoo/kpconv_semantickitti_202009090354utc.pth) | [65.6](https://storage.googleapis.com/open3d-releases/model-zoo/kpconv_toronto3d_202012221551utc.pth) | [60.0](https://storage.googleapis.com/open3d-releases/model-zoo/kpconv_s3dis_202010091238.pth) | - | [76.7](https://storage.googleapis.com/open3d-releases/model-zoo/kpconv_parislille3d_202011241550utc.pth) | - |
Expand Down
2 changes: 1 addition & 1 deletion docs/howtos.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Second, we will construct the networks and pipelines, load the pretrained weight

# see this function in examples/vis_pred.py,
# or it can be your customized dataloader,
# or you can use the exsisting get_data() methods in ml3d/datasets
# or you can use the existing get_data() methods in ml3d/datasets
pcs = get_custom_data(pc_names, data_path)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/notebook/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Jupyter Notebooks
===================================================================

The following tutorials will demonstrate how you can create Jupyter Notebooks that can train a semantic segmentation usign TensorFlow and PyTorch.
The following tutorials will demonstrate how you can create Jupyter Notebooks that can train a semantic segmentation using TensorFlow and PyTorch.

.. toctree::

Expand Down
63 changes: 31 additions & 32 deletions examples/visualize.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
#!/usr/bin/env python
import open3d.ml.torch as ml3d
from open3d.ml.datasets import (SemanticKITTI, ParisLille3D, Semantic3D, S3DIS,
Toronto3D, KITTI)
from open3d.ml.vis import Visualizer, LabelLUT
from open3d.ml.utils import get_module

import argparse
import math
import numpy as np
import os
import random
import sys
from os.path import exists, join

import numpy as np
import open3d.ml.torch as ml3d
import tensorflow as tf
import torch
from os.path import exists, join, isfile, dirname, abspath, split
from open3d.ml.datasets import (
KITTI,
S3DIS,
ParisLille3D,
Semantic3D,
SemanticKITTI,
Toronto3D,
)
from open3d.ml.vis import LabelLUT, Visualizer


def print_usage_and_exit():
Expand Down Expand Up @@ -125,33 +126,31 @@ def pred_custom_data(pc_names, pcs, pipeline_r, pipeline_k):

# ------------------------------

from open3d.ml.torch.models import KPFCNN, RandLANet
from open3d.ml.torch.pipelines import SemanticSegmentation
from open3d.ml.torch.models import RandLANet, KPFCNN


def main():
args = parse_args()

which = args.dataset_name
which = args.dataset_name.lower()
path = args.dataset_path

if which == "kitti":
dataset = KITTI(path)
elif which == "semantickitti":
dataset = SemanticKITTI(path)
elif which == "paris":
dataset = ParisLille3D(path)
elif which == "toronto":
dataset = Toronto3D(path)
elif which == "semantic3d":
dataset = Semantic3D(path)
elif which == "s3dis":
dataset = S3DIS(path)
elif which == "custom":
dataset = None
else:
print("[ERROR] '" + which + "' is not a valid dataset")
funcs = {
"kitti": KITTI,
"paris": ParisLille3D,
"s3dis": S3DIS,
"semantic3d": Semantic3D,
"semantickitti": SemanticKITTI,
"toronto": Toronto3D,
"custom": None,
}
try:
func = funcs[which]
except KeyError:
print(f"[ERROR] '{which}' is not a valid dataset")
print_usage_and_exit()
dataset = func(path) if func else None

v = Visualizer()
if dataset is None: # custom
Expand All @@ -172,15 +171,15 @@ def main():
ckpt_path = "../dataset/checkpoints/vis_weights_{}.pth".format(
'RandLANet')
if not exists(ckpt_path):
cmd = "wget {} -O {}".format(randlanet_url, ckpt_path)
cmd = f"wget {randlanet_url} -O {ckpt_path}"
os.system(cmd)
model = RandLANet(ckpt_path=ckpt_path)
pipeline_r = SemanticSegmentation(model)
pipeline_r.load_ckpt(model.cfg.ckpt_path)

ckpt_path = "../dataset/checkpoints/vis_weights_{}.pth".format('KPFCNN')
if not exists(ckpt_path):
cmd = "wget {} -O {}".format(kpconv_url, ckpt_path)
cmd = f"wget {kpconv_url} -O {ckpt_path}"
os.system(cmd)
model = KPFCNN(ckpt_path=ckpt_path, in_radius=10)
pipeline_k = SemanticSegmentation(model)
Expand Down
4 changes: 2 additions & 2 deletions ml3d/datasets/argoverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __init__(self,

@staticmethod
def get_label_to_names():
"""Returns a label to names dictonary object.
"""Returns a label to names dictionary object.
Returns:
A dict where keys are label numbers and values are the corresponding
Expand Down Expand Up @@ -189,7 +189,7 @@ def is_tested(self):
attr: The attribute that needs to be checked.
Returns:
If the dataum attribute is tested, then resturn the path where the
If the dataum attribute is tested, then return the path where the
attribute is stored; else, returns false.
"""
pass
Expand Down
1 change: 1 addition & 0 deletions ml3d/datasets/augment/augmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pickle
import warnings
from ..utils.operations import *
from ..utils.transforms import in_range_bev


class Augmentation():
Expand Down
2 changes: 1 addition & 1 deletion ml3d/datasets/base_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self, **kwargs):
@staticmethod
@abstractmethod
def get_label_to_names():
"""Returns a label to names dictonary object.
"""Returns a label to names dictionary object.
Returns:
A dict where keys are label numbers and
Expand Down
4 changes: 2 additions & 2 deletions ml3d/datasets/customdataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def __init__(self,

@staticmethod
def get_label_to_names():
"""Returns a label to names dictonary object.
"""Returns a label to names dictionary object.
Returns:
A dict where keys are label numbers and
Expand Down Expand Up @@ -199,7 +199,7 @@ def is_tested(self, attr):
attr: The attribute that needs to be checked.
Returns:
If the dataum attribute is tested, then resturn the path where the
If the dataum attribute is tested, then return the path where the
attribute is stored; else, returns false.
"""
cfg = self.cfg
Expand Down
4 changes: 2 additions & 2 deletions ml3d/datasets/kitti.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(self,

@staticmethod
def get_label_to_names():
"""Returns a label to names dictonary object.
"""Returns a label to names dictionary object.
Returns:
A dict where keys are label numbers and values are the corresponding
Expand Down Expand Up @@ -230,7 +230,7 @@ def is_tested(self):
attr: The attribute that needs to be checked.
Returns:
If the dataum attribute is tested, then resturn the path where the
If the dataum attribute is tested, then return the path where the
attribute is stored; else, returns false.
"""
pass
Expand Down
4 changes: 2 additions & 2 deletions ml3d/datasets/lyft.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def __init__(self,

@staticmethod
def get_label_to_names():
"""Returns a label to names dictonary object.
"""Returns a label to names dictionary object.
Returns:
A dict where keys are label numbers and
Expand Down Expand Up @@ -184,7 +184,7 @@ def is_tested():
attr: The attribute that needs to be checked.
Returns:
If the dataum attribute is tested, then resturn the path where the attribute is stored; else, returns false.
If the dataum attribute is tested, then return the path where the attribute is stored; else, returns false.
"""
pass

Expand Down
4 changes: 2 additions & 2 deletions ml3d/datasets/nuscenes.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def __init__(self,

@staticmethod
def get_label_to_names():
"""Returns a label to names dictonary object.
"""Returns a label to names dictionary object.
Returns:
A dict where keys are label numbers and
Expand Down Expand Up @@ -182,7 +182,7 @@ def is_tested():
attr: The attribute that needs to be checked.
Returns:
If the dataum attribute is tested, then resturn the path where the attribute is stored; else, returns false.
If the dataum attribute is tested, then return the path where the attribute is stored; else, returns false.
"""
pass

Expand Down
2 changes: 1 addition & 1 deletion ml3d/datasets/s3dis.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def __init__(self,

@staticmethod
def get_label_to_names():
"""Returns a label to names dictonary object.
"""Returns a label to names dictionary object.
Returns:
A dict where keys are label numbers and
Expand Down
2 changes: 1 addition & 1 deletion ml3d/datasets/samplers/semseg_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class SemSegRandomSampler(object):
"""Random sampler for semantic segmentation datsets."""
"""Random sampler for semantic segmentation datasets."""

def __init__(self, dataset):
self.dataset = dataset
Expand Down
2 changes: 1 addition & 1 deletion ml3d/datasets/samplers/semseg_spatially_regular.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class SemSegSpatiallyRegularSampler(object):
"""Spatially regularSampler sampler for semantic segmentation datsets."""
"""Spatially regularSampler sampler for semantic segmentation datasets."""

def __init__(self, dataset):
self.dataset = dataset
Expand Down
2 changes: 1 addition & 1 deletion ml3d/datasets/semantic3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def __init__(self,

@staticmethod
def get_label_to_names():
"""Returns a label to names dictonary object.
"""Returns a label to names dictionary object.
Returns:
A dict where keys are label numbers and
Expand Down
6 changes: 4 additions & 2 deletions ml3d/datasets/semantickitti.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def __init__(self,

@staticmethod
def get_label_to_names():
"""Returns a label to names dictonary object.
"""Returns a label to names dictionary object.
Returns:
A dict where keys are label numbers and
Expand Down Expand Up @@ -186,6 +186,8 @@ def save_test_result(self, results, attr):
save_path = join(test_path, name_seq, 'predictions')
make_dir(save_path)
test_file_name = name_points
pred = results['predict_labels']

for ign in cfg.ignored_label_inds:
pred[pred >= ign] += 1

Expand Down Expand Up @@ -214,7 +216,7 @@ def save_test_result_kpconv(self, results, inputs):

store_path = join(save_path, name_points + '.label')
pred = pred + 1
pred = remap_lut[pred].astype(np.uint32)
pred = self.remap_lut[pred].astype(np.uint32)
pred.tofile(store_path)

def get_split_list(self, split):
Expand Down
4 changes: 2 additions & 2 deletions ml3d/datasets/shapenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def __init__(self,

@staticmethod
def get_label_to_names(task="classification"):
"""Returns a label to names dictonary object depending on the task. The
"""Returns a label to names dictionary object depending on the task. The
valid values for task for classification and segmentation.
Returns:
Expand Down Expand Up @@ -234,7 +234,7 @@ def save_test_result(self, results, attr):


class ShapeNetSplit:
"""The class gets data and atributes based on the split and
"""The class gets data and attributes based on the split and
classification.
"""

Expand Down
4 changes: 4 additions & 0 deletions ml3d/datasets/utils/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ def center_to_corner_box2d(boxes, origin=0.5):
Returns:
np.ndarray: Corners with the shape of (N, 4, 2).
"""
if len(boxes) == 0:
return np.zeros((0, 4, 2))
flat_boxes = np.array([box.to_xyzwhlr() for box in boxes])
centers = flat_boxes[:, 0:2]
dims = flat_boxes[:, 3:5]
Expand Down Expand Up @@ -350,6 +352,8 @@ def points_in_box(points,
Returns:
np.ndarray, shape=[N, M]: Indices of points in each box.
"""
if len(rbbox) == 0:
return np.zeros((0, 7))
if camera_frame:
assert cam_world is not None, "Provide cam_to_world matrix if points are in camera frame."

Expand Down
4 changes: 2 additions & 2 deletions ml3d/datasets/waymo.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def __init__(self,

@staticmethod
def get_label_to_names():
"""Returns a label to names dictonary object.
"""Returns a label to names dictionary object.
Returns:
A dict where keys are label numbers and
Expand Down Expand Up @@ -207,7 +207,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
14 changes: 11 additions & 3 deletions ml3d/metrics/mAP.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def filter_data(data, labels, diffs=None):
(optional)
Returns:
Tuple wit dictionary with same as format as input, with only the given labels
Tuple with dictionary with same as format as input, with only the given labels
and difficulties and the indices.
"""
cond = np.any([data['label'] == label for label in labels], axis=0)
Expand Down Expand Up @@ -231,21 +231,29 @@ def mAP(pred,
detection[:, :, box_cnts[i]:box_cnts[i + 1]] = d
fns += f

mAP = np.empty((len(classes), len(difficulties), 1))
mAP = np.zeros((len(classes), len(difficulties), 1))
if samples <= 0:
# No samples to compute mAP against, so all results are zero.
return mAP

for i in range(len(classes)):
for j in range(len(difficulties)):
det = detection[i, j, np.argsort(-detection[i, j, :, 0])]

#gt_cnt = np.sum(det[:,1]) + fns[i, j]
thresholds = sample_thresholds(det[np.where(det[:, 1] > 0)[0], 0],
gt_cnt[i, j], samples)
if len(thresholds) == 0:
# No predictions met cutoff thresholds, skipping AP computation to avoid NaNs.
continue

prec = np.zeros((len(thresholds),))
for ti in range(len(thresholds))[::-1]:
d = det[np.where(det[:, 0] >= thresholds[ti])]
tp_acc = np.sum(d[:, 1])
fp_acc = np.sum(d[:, 2])
prec[ti] = tp_acc / (tp_acc + fp_acc)
if (tp_acc + fp_acc) > 0:
prec[ti] = tp_acc / (tp_acc + fp_acc)
prec[ti] = np.max(prec[ti:], axis=-1)

if len(prec[::4]) < int(samples / 4 + 1):
Expand Down
Loading

0 comments on commit 0300cfa

Please sign in to comment.