• Stars
    star
    239
  • Rank 168,733 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created about 5 years ago
  • Updated over 1 year ago

Reviews

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

Repository Details

The PyTorch Implementation of F-ConvNet for 3D Object Detection

Frustum ConvNet: Sliding Frustums to Aggregate Local Point-Wise Features for Amodal 3D Object Detection

This repository is the code for our IROS 2019 paper [arXiv],[IEEEXplore].

Citation

If you find this work useful in your research, please consider citing.

@inproceedings{wang2019frustum,
    title={Frustum ConvNet: Sliding Frustums to Aggregate Local Point-Wise Features for Amodal 3D Object Detection},
    author={Wang, Zhixin and Jia, Kui},
    booktitle={2019 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
    pages={1742--1749},
    year={2019},
    organization={IEEE}
}

Installation

Requirements

  • PyTorch 1.0+
  • Python 3.6+

We test our code under Ubuntu-16.04 with CUDA-9.0, CUDNN-7.0, Python-3.7.2, PyTorch-1.0.

Clone the repository and install dependencies

git clone https://github.com/zhixinwang/frustum-convnet.git

You may need to install extra packages, like pybind11, opencv, yaml, tensorflow(optional).

If you want to use tensorboard to visualize the training status, you should install tensorflow (CPU version is enough). Otherwise, you should set the config 'USE_TFBOARD: False' in cfgs/*.yaml.

Compile extension

cd ops
bash clean.sh
bash make.sh

Download data

Download the KITTI 3D object detection dataset from here and organize them as follows.

data/kitti
โ”œโ”€โ”€ testing
โ”‚ย ย  โ”œโ”€โ”€ calib
โ”‚ย ย  โ”œโ”€โ”€ image_2
โ”‚ย ย  โ””โ”€โ”€ velodyne
โ””โ”€โ”€ training
    โ”œโ”€โ”€ calib
    โ”œโ”€โ”€ image_2
    โ”œโ”€โ”€ label_2
    โ””โ”€โ”€ velodyne

Training and evaluation

First stage

Run following command to prepare pickle files for car training. We use the 2D detection results from F-PointNets. The pickle files will be saved in kitti/data/pickle_data.

python kitti/prepare_data.py --car_only --gen_train --gen_val --gen_val_rgb_detection

Run following commands to train and evaluate the final model. You can use export CUDA_VISIBLE_DEVICES=? to specify which GPU to use. And you can modify the setting after OUTPUT_DIR to set a directory to save the log, model files and evaluation results. All the config settings are under the configs/config.py.

python train/train_net_det.py --cfg cfgs/det_sample.yaml OUTPUT_DIR output/car_train
python train/test_net_det.py --cfg cfgs/det_sample.yaml OUTPUT_DIR output/car_train TEST.WEIGHTS output/car_train/model_0050.pth

We also provide the shell script, so you can also run bash scripts/car_train.sh instead.

Refinement stage

Run following command to prepare pickle files for car training. We use the first stage predicted results. If you don't use the default directory in the first stage, you should change the corresponding directory in here and here before running following commands. The pickle files will be saved in kitti/data/pickle_data_refine.

python kitti/prepare_data_refine.py --car_only --gen_train --gen_val_det --gen_val_rgb_detection

Run following commands to train and evaluate the final model.

python train/train_net_det.py --cfg cfgs/refine_car.yaml OUTPUT_DIR output/car_train_refine
python train/test_net_det.py --cfg cfgs/refine_car.yaml OUTPUT_DIR output/car_train_refine TEST.WEIGHTS output/car_train_refine/model_0050.pth

We also provide the shell script, so you can also run bash scripts/car_train_refine.sh instead.

All commands in one script file

You can simply run bash scripts/car_all.sh to execute all the above commands.

Pretrained models

We provide the pretrained models for car category, you can download from here. After extracting the files under root directory, you can run bash scripts/eval_pretrained_models.sh to evaluate the pretrained models. The performance on validation set is as follows:

# first stage
Car [email protected], 0.70, 0.70:
bbox AP:98.33, 90.40, 88.24
bev  AP:90.32, 88.02, 79.41
3d   AP:87.76, 77.41, 68.79

# refinement stage
Car [email protected], 0.70, 0.70:
bbox AP:98.43, 90.39, 88.15
bev  AP:90.42, 88.99, 86.88
3d   AP:89.31, 79.08, 77.17

SUNRGBD dataset

Please follow the instruction here.

Note

Since we update our code from PyTorch-0.3.1 to PyTorch-1.0 and our code uses many random sampling operations, the results may be not exactly the same as those reported in our paper. But the difference should be +-0.5%, if you can not get the similar results, please contact me. I am still working to make results stable.

Our code is supported multiple GPUs for training, but now the training is very fast for small dataset, like KITTI, SUN-RGBD. All the steps will finish in one day on single GPU.

Acknowledgements

Part of the code was adapted from F-PointNets.

License

Our code is released under MIT license.

More Repositories

1

Fantasia3D

(ICCV2023) official repository for "Fantasia3D: Disentangling Geometry and Appearance for High-quality Text-to-3D Content Creation"
Python
721
star
2

tango

[NeurIPS 2022] Official code repository for "TANGO: Text-driven Photorealistic and Robust 3D Stylization via Lighting Decomposition"
Python
141
star
3

VISTA

This repo presents you the official code of "VISTA: Boosting 3D Object Detection via Dual Cross-VIew SpaTial Attention"
Python
127
star
4

DADA-AAAI2020

Code release for Discriminative Adversarial Domain Adaptation (AAAI2020).
Python
117
star
5

SSTNet

Instance Segmentation in 3D Scenes using Semantic Superpoint Tree Networks
Python
97
star
6

HelixSurf

official implementation of "HelixSurf: A Robust and Efficient Neural Implicit Surface Learning of Indoor Scenes with Iterative Intertwined Regularization"
Python
92
star
7

SymNets

The official project for CVPR19 paper: Domain-Symmetric Networks for Adversarial Domain Adaptation
Python
85
star
8

SRDC-CVPR2020

Code release for Unsupervised Domain Adaptation via Structurally Regularized Deep Clustering (CVPR2020-Oral).
Python
80
star
9

SkeletonBridgeRecon

The code for CVPR2019 Oral paper "A Skeleton-bridged Deep Learning Approach for Generating Meshes of Complex Topologies from Single RGB Images"
Python
78
star
10

MultiClassDA

TPAMI2020 "Unsupervised Multi-Class Domain Adaptation: Theory, Algorithms, and Practice"
Python
74
star
11

AffordanceNet

Python
72
star
12

AnalyticMesh

An Efficient Implementation of Analytic Mesh Algorithm for 3D Iso-surface Extraction from Neural Networks
C++
71
star
13

Visual-Auditory-Fusion-Perception

ๅนฟไธœ็œโ€œ็ ๆฑŸไบบๆ‰่ฎกๅˆ’โ€โ€”โ€”ๆœๅŠกๆœบๅ™จไบบๆ™บ่ƒฝๅผ•ๆ“Žๅนณๅฐ
Python
56
star
14

SkeletonNet

Code and datasets for TPAMI 2021 "SkeletonNet: A Topology-Preserving Solution for Learning Mesh Reconstruction of Object Surfaces from RGB Images "
C++
48
star
15

TTAC

[NeurIPS 2022] Revisiting Realistic Test-Time Training: Sequential Inference and Adaptation by Anchored Clustering
Python
42
star
16

DualPoseNet

Code for "DualPoseNet: Category-level 6D Object Pose and Size EstimationUsing Dual Pose Network with Refined Learning of Pose Consistency"
Python
40
star
17

SCUTSurface-code

Python
37
star
18

SS-Conv

Code for "Sparse Steerable Convolutions: An Efficient Learning of SE(3)-Equivariant Features for Estimation and Tracking of Object Poses in 3D Space"
Python
32
star
19

LPDC-Net

CVPR2021 paper "Learning Parallel Dense Correspondence from Spatio-Temporal Descriptorsfor Efficient and Robust 4D Reconstruction"
Python
29
star
20

GPNet

Python
28
star
21

MetaFGNet

The source code of the ECCV 2018 paper: Fine-Grained Visual Categorization using Meta-Learning Optimization with Sample Selection of Auxiliary Data
Python
27
star
22

GeoA3

Code for Geometry-Aware Generation of Adversarial Point Clouds
Python
26
star
23

Label-Propagation-with-Augmented-Anchors

A2LP for short, ECCV2020 spotlight, Investigating SSL principles for UDA problems
Python
20
star
24

PartNet

The source code for the TMM paper: Part-Aware Fine-grained Object Categorization using Weakly Supervised Part Detection Network
Python
20
star
25

TRIBE

[AAAI 2024] Towards Real-World Test-Time Adaptation: Tri-Net Self-Training with Balanced Normalization
Python
20
star
26

DCL-Net

DCL-Net: Deep Correspondence Learning Network for 6D Pose Estimation
Python
17
star
27

BiCo-Net

Code for "BiCo-Net: Regress Globally, Match Locally for Robust 6D Pose Estimation"
Python
16
star
28

QS3

The official implementation for ECCV22 paper: Quasi-Balanced Self-Training on Noise-Aware Synthesis of Object Point Clouds for Closing Domain Gap
Python
12
star
29

OrthDNNs

Code for OrthDNNs: Orthogonal Deep Neural Networks
Python
11
star
30

UB2DA

This repository provides code for the paper ---- On Universal Black-Box Domain Adaptation.
Python
10
star
31

gorilla-core

Python
8
star
32

raycastmesh

ray cast mesh to get normal, depth and face_ids
Cuda
7
star
33

gorilla-3d

Python
7
star
34

gmvs

This repo is a module for PatchMatch Stereo
Cuda
5
star
35

TTAC2

[TPAMI 2024] The official implementation of "Revisiting Realistic Test-Time Training: Sequential Inference and Adaptation by Anchored Clustering Regularized Self-Training"
Python
5
star
36

MAST

[IJCAI 2023] Manifold-Aware Self-Training for Unsupervised Domain Adaptation on Regressing 6D Object Pose Installation
Python
4
star
37

GPNetPP

2
star