/GGA

[ECCV'24] A novel weakly supervised framework for 3D object detection from 2D bounding boxes. It can easily extend to novel scenarios and classes.

Primary LanguagePythonApache License 2.0Apache-2.0

General Geometry-aware Weakly Supervised 3D Object Detection

This repo is the official implementation of ECCV24 paper General Geometry-aware (GGA) Weakly Supervised 3D Object Detection. Our GGA exhibits promising generalization capabilites, allowing it to be easily extend to various novel scenarios and classes. GGA achieves state-of-the-art performance on 2D bbox-supervised Monocular 3D object Detection. GGA is built on the codebase of MMDetection3D.

πŸ”₯News

-[24-07-04] Our GGA is accepted by ECCV'24 πŸŽ‰πŸŽ‰πŸŽ‰, if you find it helpful, please give it a star.
-[24-07-18] Code of KITTI is released.

πŸ‘€Overview

πŸ“˜TODO

  • Release the code of KITTI.
  • Release the arxiv version.
  • Release the pseudo labels.
  • Release more detail results.

Notice

We are currently updating this repository due to a code reorganization. There may be some issues. Please feel free to report any problems in the issues section.

πŸ†Main Results

Outdoor Monocular 3D Object Detection (on KITTI test)

APBEV AP3D
Model Easy Mod. Hard Easy Mod. Hard
PGD+GGA 17.42 10.21 8.09 10.42 6.08 4.65

Outdoor Monocular 3D Object Detection (on KITTI validation)

APBEV AP3D
Model Easy Mod. Hard Easy Mod. Hard
MonoDETR+GGA 30.07 21.49 18.23 21.18 14.96 10.89

Indoor Point Cloud 3D Object Detection (on SUN-RGBD)

Model bathtub bed bkshelf chair desk dresser nstand sofa table toilet mAP
FCAF3D+GGA 55.4 69.9 22.4 59.1 22.5 31.3 59.3 58.9 34.8 71.4 48.5

πŸš€Quick Start

Installation

conda create --name gga python=3.8 -y  
conda activate gga  
conda install pytorch torchvision -c pytorch  
pip install openmim  
mim install mmcv-full  
mim install mmdet  
mim install mmsegmentation  
git clone https://github.com/gwenzhang/GGA.git  
cd GGA  
pip install -e .  

Data Preparation

KITTI

mmdetection3d
β”œβ”€β”€ data
β”‚   β”œβ”€β”€ kitti
β”‚   β”‚   β”œβ”€β”€ ImageSets
β”‚   β”‚   β”œβ”€β”€ testing
β”‚   β”‚   β”‚   β”œβ”€β”€ calib
β”‚   β”‚   β”‚   β”œβ”€β”€ image_2
β”‚   β”‚   β”‚   β”œβ”€β”€ velodyne
β”‚   β”‚   β”œβ”€β”€ training
β”‚   β”‚   β”‚   β”œβ”€β”€ calib
β”‚   β”‚   β”‚   β”œβ”€β”€ image_2
β”‚   β”‚   β”‚   β”œβ”€β”€ label_2
β”‚   β”‚   β”‚   β”œβ”€β”€ velodyne
  • Generate the data infos by running the following command (it may take several hours):
cd GGA  
python ./tools/create_data_gga.py kitti --root_path ./data/kitti --out_dir ./data/kitti  
# Create dataset info file, and lidar pseudo database
  • The format of the generated data is as follows:
mmdetection3d
β”œβ”€β”€ data
β”‚   β”œβ”€β”€ kitti
β”‚   β”‚   β”œβ”€β”€ ImageSets
β”‚   β”‚   β”œβ”€β”€ testing
β”‚   β”‚   β”œβ”€β”€ training
β”‚   β”‚   β”œβ”€β”€ kitti_gt_database_GGA
β”‚   β”‚   β”œβ”€β”€ kitti_infos_train_GGA.pkl
β”‚   β”‚   β”œβ”€β”€ kitti_infos_val_GGA.pkl
β”‚   β”‚   β”œβ”€β”€ kitti_infos_trainval_GGA.pkl
β”‚   β”‚   β”œβ”€β”€ kitti_infos_test.pkl
β”‚   β”‚   β”œβ”€β”€ kitti_dbinfos_train_GGA.pkl
β”‚   β”œβ”€β”€ kitti_GGA_split_file

Training GGA

./tools/dist_train.sh configs/gga/gga_kitti_config.py 8  

Generate Pseudo 3D Labels

./tools/dist_pseudo.sh configs/gga/gga_kitti_matching_config.py {checkpoints} 8  --eval mAP  
python create_data_gga_retrain_mono.py kitti --root_path ./data/kitti --out_dir ./data/kitti  
  • The format of the generated data is as follows:
mmdetection3d
β”œβ”€β”€ data
β”‚   β”œβ”€β”€ kitti
β”‚   β”‚   β”œβ”€β”€ ImageSets
β”‚   β”‚   β”œβ”€β”€ testing
β”‚   β”‚   β”œβ”€β”€ training
β”‚   β”‚   β”œβ”€β”€ kitti_gt_database_GGA
β”‚   β”‚   β”œβ”€β”€ kitti_infos_train_GGA.pkl
β”‚   β”‚   β”œβ”€β”€ kitti_infos_val_GGA.pkl
β”‚   β”‚   β”œβ”€β”€ kitti_infos_trainval_GGA.pkl
β”‚   β”‚   β”œβ”€β”€ kitti_infos_test.pkl
β”‚   β”‚   β”œβ”€β”€ kitti_dbinfos_train_GGA.pkl
β”‚   β”‚   β”œβ”€β”€ kitti_infos_trainval_GGA_mono3d.coco.json
β”‚   β”‚   β”œβ”€β”€ kitti_infos_test_mono3d.coco.json
β”‚   β”œβ”€β”€ kitti_GGA_split_file

Retraining

./tools/dist_train.sh configs/gga/gga_pgd.py 8  

Testing (Generate submission files)

./tools/dist_test.sh configs/gga/gga_pgd.py {checkpoint_dir} 8  --format-only --eval-options 'pklfile_prefix=./gga_results' 'submission_prefix=./gga_results' 

Citation

Please consider citing our work as follows if it is helpful.

@article{zhang2024general,
  title={General Geometry-aware Weakly Supervised 3D Object Detection},
  author={Zhang, Guowen and Fan, Junsong and Chen, Liyi and Zhang, Zhaoxiang and Lei, Zhen and Zhang, Lei},
  booktitle={European Conference on Computer Vision},
  organization={Springer},
  year={2024},
}

Acknowledgments

GGA is based on MMDetection3D.
We also thank the FGR, MonoDETR, PDG, CenterPoint and FCAF3D authors for their efforts.