Coder Social home page Coder Social logo

wangguojun2018 / centernet3d Goto Github PK

View Code? Open in Web Editor NEW
118.0 6.0 16.0 9.54 MB

CenterNet3D An Anchor free Object Detector for Autonomous Driving

License: Apache License 2.0

Python 86.80% Shell 0.09% C++ 8.04% Cuda 4.77% MATLAB 0.25% Dockerfile 0.04%

centernet3d's Introduction

CenterNet3D: An Anchor free Object Detector for Autonomous Driving (Arxiv 2020) [paper]

Based on the center point, we propose an anchor-free CenterNet3D Network that performs 3D object detection without anchors. Our CenterNet3D uses keypoint estimation to find center points and directly regresses 3D bounding boxes. Besides, our CenterNet3D is Non-Maximum Suppression free which makes it more efficient and simpler. On the KITTI benchmark, our proposed CenterNet3D achieves competitive performance with other one stage anchor-based methods.

Updates

2021-06-06: CenterNet3D V1.1 is released!

We develop an efficient keypoint-sensitive warping operation to align the confidences to the predicted bounding boxes

Performance in KITTI validation set (50/50 split)

centernet3d.py(epochs 25,batch size 2):

Car AP(Average Precision)@0.70, 0.70, 0.70:
bbox AP:90.65, 89.55, 88.85
bev  AP:89.98, 87.99, 86.98
3d   AP:89.02, 79.11, 77.76
aos  AP:90.63, 89.39, 88.62
Car AP(Average Precision)@0.70, 0.50, 0.50:
bbox AP:90.65, 89.55, 88.85
bev  AP:90.66, 89.76, 89.28
3d   AP:90.66, 89.72, 89.20
aos  AP:90.63, 89.39, 88.62

Demo

Demo

Introduction

model
Accurate and fast 3D object detection from point clouds is a key task in autonomous driving. Existing one-stage 3D object detection methods can achieve real-time performance, however, they are dominated by anchor-based detectors which are inefficient and require additional post-processing. In this paper, we eliminate anchors and model an object as a single point the center point of its bounding box. Based on the center point, we propose an anchor-free CenterNet3D Network that performs 3D object detection without anchors. Our CenterNet3D uses keypoint estimation to find center points and directly regresses 3D bounding boxes. However, because inherent sparsity of point clouds, 3D object center points are likely to be in empty space which makes it difficult to estimate accurate boundary. To solve this issue, we propose an auxiliary corner attention module to enforce the CNN backbone to pay more attention to object boundaries which is effective to obtain more accurate bounding boxes. Besides, our CenterNet3D is Non-Maximum Suppression free which makes it more efficient and simpler. On the KITTI benchmark, our proposed CenterNet3D achieves competitive performance with other one stage anchor-based methods which show the efficacy of our proposed center point representation.

Installation

  1. Clone this repository.
  2. Our CenterNet3D is based on mmdetection3d, Please check INSTALL.md for installation instructions.

Train

To train the CenterNet3D, run the following command:

cd CenterNet3d
python tools/train.py ./configs/centernet3d.py

Eval

To evaluate the model, run the following command:

cd CenterNet3d
python tools/test.py ./configs/centernet3d.py ./work_dirs/centernet3d/epoch_25.pth

Citation

If you find this work useful in your research, please consider cite:

@misc{wang2020centernet3dan,
    title={CenterNet3D:An Anchor free Object Detector for Autonomous Driving},
    author={Guojun Wang and Bin Tian and Yunfeng Ai and Tong Xu and Long Chen and Dongpu Cao},
    year={2020},
    eprint={2007.07214},
    archivePrefix={arXiv},
    primaryClass={cs.CV}
}

Acknowledgement

The code is devloped based on mmdetection3d and mmdetecton, some part of codes are borrowed from SECOND and PointRCNN.

centernet3d's People

Contributors

dreamerlin avatar encore-zhou avatar hellock avatar kickcellardoor avatar lliuz avatar meng-zha avatar tai-wang avatar wangguojun2018 avatar xavierwu95 avatar yezhen17 avatar yinchimaoliang avatar zwwwayne 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

centernet3d's Issues

val result 3D AP always 0.00000

Hi,thank you for your excellent work.
But some error occurs,I hope you can give me some suggestions.
When I train the model.the 3D result is always

Car [email protected], 0.70, 0.70:
bbox AP:9.8673, 10.1657, 10.5502
bev  AP:0.0000, 0.0005, 0.0005
3d   AP:0.0000, 0.0000, 0.0000
aos  AP:4.86, 5.01, 5.21
Car [email protected], 0.50, 0.50:
bbox AP:9.8673, 10.1657, 10.5502
bev  AP:0.0000, 0.0009, 0.0013
3d   AP:0.0000, 0.0005, 0.0006
aos  AP:4.86, 5.01, 5.21

Can you help me to points to the bug? thank you~

KeyError: 'CenterNet3D is not in the detector registry'

Sorry to raise an issue again.
After I tried to change to my own dataset directory, it started running. But when I run this line 'python tools/train.py ./configs/centernet3d.py', I encountered this problem.
Thank you again for giving me some tips.

2020-09-07 15:53:01,409 - mmdet - INFO - Set random seed to 0, deterministic: False
Traceback (most recent call last):
File "tools/train.py", line 173, in
main()
File "tools/train.py", line 146, in main
cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg)
File "/home/lijiale/thirdspace/mmdetection3d/mmdet3d/models/builder.py", line 38, in build_detector
return build(cfg, DETECTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg))
File "/home/lijiale/anaconda3/envs/open-mmlab/lib/python3.6/site-packages/mmdet/models/builder.py", line 32, in build
return build_from_cfg(cfg, registry, default_args)
File "/home/lijiale/anaconda3/envs/open-mmlab/lib/python3.6/site-packages/mmcv/utils/registry.py", line 157, in build_from_cfg
f'{obj_type} is not in the {registry.name} registry')
KeyError: 'CenterNet3D is not in the detector registry'

How to visualize the results of trained model?

Hi,

First of all, thank you for your excellent work.

I just follow your code and train the model, and now I can get the result such as kitti_000008_points.obj & kitti_000008_pred.ply, but how could I get Visualization Results such as your demo image in README? I would appreciate it if you could give me some advice.

Look to your reply and wish you have a nice day!

Can't get test results after python tools/test.py configs/centernet3d.py latest.pth

Thanks for your error report and we appreciate it a lot.

Checklist

  1. I have searched related issues but cannot get the expected help.
  2. The bug has not been fixed in the latest version.

Describe the bug
A clear and concise description of what the bug is.

Reproduction

  1. What command or script did you run?
A placeholder for the command.
  1. Did you make any modifications on the code or config? Did you understand what you have modified?
  2. What dataset did you use?

Environment

  1. Please run python mmdet3d/utils/collect_env.py to collect necessary environment infomation and paste it here.
  2. You may add addition that may be helpful for locating the problem, such as
    • How you installed PyTorch [e.g., pip, conda, source]
    • Other environment variables that may be related (such as $PATH, $LD_LIBRARY_PATH, $PYTHONPATH, etc.)

Error traceback
If applicable, paste the error trackback here.

A placeholder for trackback.

Bug fix
If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!

ImportError: cannot import name 'points_op_cpu'

Hi, thank you for providing a interesting project.

I kick off CenterNet3d to train my local dataset. However, When I run the following code:

python tools/train.py ./configs/centernet3d.py

I get an error:

Traceback (most recent call last):
  File "tools/train.py", line 15, in <module>
    from mmdet3d.datasets import build_dataset
  File "/home/liqi/Code/CenterNet3d/mmdet3d/datasets/__init__.py", line 2, in <module>
    from .custom_3d import Custom3DDataset
  File "/home/liqi/Code/CenterNet3d/mmdet3d/datasets/custom_3d.py", line 8, in <module>
    from ..core.bbox import get_box_type
  File "/home/liqi/Code/CenterNet3d/mmdet3d/core/__init__.py", line 2, in <module>
    from .bbox import *  # noqa: F401, F403
  File "/home/liqi/Code/CenterNet3d/mmdet3d/core/bbox/__init__.py", line 4, in <module>
    from .iou_calculators import (BboxOverlaps3D, BboxOverlapsNearest3D,
  File "/home/liqi/Code/CenterNet3d/mmdet3d/core/bbox/iou_calculators/__init__.py", line 1, in <module>
    from .iou3d_calculator import (BboxOverlaps3D, BboxOverlapsNearest3D,
  File "/home/liqi/Code/CenterNet3d/mmdet3d/core/bbox/iou_calculators/iou3d_calculator.py", line 3, in <module>
    from ..structures import get_box_type
  File "/home/liqi/Code/CenterNet3d/mmdet3d/core/bbox/structures/__init__.py", line 1, in <module>
    from .base_box3d import BaseInstance3DBoxes
  File "/home/liqi/Code/CenterNet3d/mmdet3d/core/bbox/structures/base_box3d.py", line 5, in <module>
    from mmdet3d.ops.iou3d import iou3d_cuda
  File "/home/liqi/Code/CenterNet3d/mmdet3d/ops/__init__.py", line 18, in <module>
    from .points_op import pts_in_boxes3d,points_to_voxel
  File "/home/liqi/Code/CenterNet3d/mmdet3d/ops/points_op/__init__.py", line 3, in <module>
    from . import points_op_cpu
ImportError: cannot import name 'points_op_cpu'

could you help me with this problem?thanks very much!!!

Environment

Ubuntu16.04、GTX 1080ti 、driver 410.78、cuda 9.2、cudnn 7.4.1
python 3.6、pytorch 1.5.0、torchvision 0.6.0、mmcv-full 1.1.1

How to set configs for multi classes?

Hello, wangguojun2018!
Thanks for your great work of CenterNet3d. The default config is for car class. But it also has potential for pedestrian and cylicst detection, can you provide a multi class config as in MMdetection3d.

Build error in mmdet3d/ops/points_op

/home/jaya/.local/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:341:7: note: declared here
T * data() const {
^~~~
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

how to prepare the dataset

Hello.
It is unclear how to prepare the dataset in this project. And in the dataset config (such as configs/base/datasets/kitti-3d-car.py), you use your own local directory.
I also refer to the README of mmdet3D, but I am still confused about how to prepare the dataset in this project.
Would you like to provide some instructions?

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.