• Stars
    star
    1,021
  • Rank 45,070 (Top 0.9 %)
  • Language
    Python
  • License
    MIT License
  • Created over 4 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Super Fast and Accurate 3D Object Detection based on 3D LiDAR Point Clouds (The PyTorch implementation)

Super Fast and Accurate 3D Object Detection based on 3D LiDAR Point Clouds (SFA3D)

python-image pytorch-image


Features

  • Super fast and accurate 3D object detection based on LiDAR
  • Fast training, fast inference
  • An Anchor-free approach
  • No Non-Max-Suppression
  • Support distributed data parallel training
  • Release pre-trained models

Highlights

  • The technical details are described here
  • The great introduction and explanation from Computer Vision and Perception for Self-Driving Cars Course Youtube link
  • SFA3D is used for the second course in the Udacity Self-Driving Car Engineer Nanodegree Program: Sensor Fusion and Tracking GitHub link

Update 2020.09.06: Add ROS source code. The great work has been done by @AhmedARadwan. The implementation is here

Demonstration (on a single GTX 1080Ti)

demo

Youtube link

2. Getting Started

2.1. Requirement

The instructions for setting up a virtual environment is here.

git clone https://github.com/maudzung/SFA3D.git SFA3D
cd SFA3D/
pip install -r requirements.txt

2.2. Data Preparation

Download the 3D KITTI detection dataset from here.

The downloaded data includes:

  • Velodyne point clouds (29 GB)
  • Training labels of object data set (5 MB)
  • Camera calibration matrices of object data set (16 MB)
  • Left color images of object data set (12 GB) (For visualization purpose only)

Please make sure that you construct the source code & dataset directories structure as below.

2.3. How to run

2.3.1. Visualize the dataset

To visualize 3D point clouds with 3D boxes, let's execute:

cd sfa/data_process/
python kitti_dataset.py

2.3.2. Inference

The pre-trained model was pushed to this repo.

python test.py --gpu_idx 0 --peak_thresh 0.2

2.3.3. Making demonstration

python demo_2_sides.py --gpu_idx 0 --peak_thresh 0.2

The data for the demonstration will be automatically downloaded by executing the above command.

2.3.4. Training

2.3.4.1. Single machine, single gpu
python train.py --gpu_idx 0
2.3.4.2. Distributed Data Parallel Training
  • Single machine (node), multiple GPUs
python train.py --multiprocessing-distributed --world-size 1 --rank 0 --batch_size 64 --num_workers 8
  • Two machines (two nodes), multiple GPUs

    • First machine
    python train.py --dist-url 'tcp://IP_OF_NODE1:FREEPORT' --multiprocessing-distributed --world-size 2 --rank 0 --batch_size 64 --num_workers 8
    
    • Second machine
    python train.py --dist-url 'tcp://IP_OF_NODE2:FREEPORT' --multiprocessing-distributed --world-size 2 --rank 1 --batch_size 64 --num_workers 8
    

Tensorboard

  • To track the training progress, go to the logs/ folder and
cd logs/<saved_fn>/tensorboard/
tensorboard --logdir=./

Contact

If you think this work is useful, please give me a star!
If you find any errors or have any suggestions, please contact me (Email: [email protected]).
Thank you!

Citation

@misc{Super-Fast-Accurate-3D-Object-Detection-PyTorch,
  author =       {Nguyen Mau Dung},
  title =        {{Super-Fast-Accurate-3D-Object-Detection-PyTorch}},
  howpublished = {\url{https://github.com/maudzung/Super-Fast-Accurate-3D-Object-Detection}},
  year =         {2020}
}

References

[1] CenterNet: Objects as Points paper, PyTorch Implementation
[2] RTM3D: PyTorch Implementation
[3] Libra_R-CNN: PyTorch Implementation

The YOLO-based models with the same BEV maps input:
[4] Complex-YOLO: v4, v3, v2

3D LiDAR Point pre-processing:
[5] VoxelNet: PyTorch Implementation

Folder structure

${ROOT}
└── checkpoints/
    β”œβ”€β”€ fpn_resnet_18/    
        β”œβ”€β”€ fpn_resnet_18_epoch_300.pth
└── dataset/    
    └── kitti/
        β”œβ”€β”€ImageSets/
        β”‚   β”œβ”€β”€ test.txt
        β”‚   β”œβ”€β”€ train.txt
        β”‚   └── val.txt
        β”œβ”€β”€ training/
        β”‚   β”œβ”€β”€ image_2/ (left color camera)
        β”‚   β”œβ”€β”€ calib/
        β”‚   β”œβ”€β”€ label_2/
        β”‚   └── velodyne/
        └── testing/  
        β”‚   β”œβ”€β”€ image_2/ (left color camera)
        β”‚   β”œβ”€β”€ calib/
        β”‚   └── velodyne/
        └── classes_names.txt
└── sfa/
    β”œβ”€β”€ config/
    β”‚Β Β  β”œβ”€β”€ train_config.py
    β”‚Β Β  └── kitti_config.py
    β”œβ”€β”€ data_process/
    β”‚Β Β  β”œβ”€β”€ kitti_dataloader.py
    β”‚Β Β  β”œβ”€β”€ kitti_dataset.py
    β”‚Β Β  └── kitti_data_utils.py
    β”œβ”€β”€ models/
    β”‚Β Β  β”œβ”€β”€ fpn_resnet.py
    β”‚Β Β  β”œβ”€β”€ resnet.py
    β”‚Β Β  └── model_utils.py
    └── utils/
    β”‚   β”œβ”€β”€ demo_utils.py
    β”‚   β”œβ”€β”€ evaluation_utils.py
    β”‚   β”œβ”€β”€ logger.py
    β”‚   β”œβ”€β”€ misc.py
    β”‚   β”œβ”€β”€ torch_utils.py
    β”‚   β”œβ”€β”€ train_utils.py
    β”‚   └── visualization_utils.py
    β”œβ”€β”€ demo_2_sides.py
    β”œβ”€β”€ demo_front.py
    β”œβ”€β”€ test.py
    └── train.py
β”œβ”€β”€ README.md 
└── requirements.txt

More Repositories

1

Complex-YOLOv4-Pytorch

The PyTorch Implementation based on YOLOv4 of the paper: "Complex-YOLO: Real-time 3D Object Detection on Point Clouds"
Python
1,241
star
2

TTNet-Real-time-Analysis-System-for-Table-Tennis-Pytorch

Unofficial implementation of "TTNet: Real-time temporal and spatial video analysis of table tennis" (CVPR 2020)
Python
596
star
3

RTM3D

Unofficial PyTorch implementation of "RTM3D: Real-time Monocular 3D Detection from Object Keypoints for Autonomous Driving" (ECCV 2020)
Python
291
star
4

YOLO3D-YOLOv4-PyTorch

YOLO3D: End-to-end real-time 3D Oriented Object Bounding Box Detection from LiDAR Point Cloud (ECCV 2018)
Python
289
star
5

Awesome-Autonomous-Driving-Papers

This repository provides awesome research papers for autonomous driving perception. If you do find a problem or have any suggestions, please raise this as an issue or make a pull request with information (format of the repo): Research paper title, datasets, metrics, objects, source code, publisher, and year.
79
star
6

CenterNet3D-PyTorch

Unofficial PyTorch implementation of the paper: "CenterNet3D: An Anchor free Object Detector for Autonomous Driving"
Python
71
star
7

human36m_preprocessing

This instruction will help you to pre-process the Human3.6M dataset
Python
17
star
8

Self-Driving-Car-09-Programing-A-Real-Car

The safe navigation for a self-driving car around a course using the Robot Operative System (ROS) framework
CMake
16
star
9

virtual_environment_python3

The instruction to setup a virtual environment
Shell
10
star
10

3D-Human-Pose-Estimation

An implementation of 3D human pose estimation based on 2D keypoints in images
Jupyter Notebook
9
star
11

Self-Driving-Car-02-Advance-Finding-Lanelines

Advanced Lane Finding Project
Python
5
star
12

maudzung

4
star
13

Self-Driving-Car-08-PID-Control-CPP

An implementation of a PID controller that determines the steering angle in order to keep a car in the center of the lane track during driving.
C++
4
star
14

Self-Driving-Car-07-Path-Planning-CPP

A safe path planner for the car driving on a virtual highway with other vehicles
C++
4
star
15

SFND

Sensor Fusion Nanodegree Program
C++
3
star
16

Extended-Kalman-Filter-CPP

Extended Kalman Filter Project using C++
C++
3
star
17

Self-Driving-Car-04-Behavior-Cloning

Python
2
star
18

Self-Driving-Car-06-Kidnapped-Vehicle-Particle-Filters

An implementation of a 2D particle filter in C++
C++
1
star
19

Self-Driving-Car-01-Finding-Lanelines

Using the Canny Edge Detector and the Hough Transform to find the lane lines in videos captured by a camera placed in the front of a car.
Jupyter Notebook
1
star