百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
B

BtcDet

> 编程语言
开源

幕后:学习遮挡形状以进行 3D 对象检测

200 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

幕后:学习遮挡形状以进行 3D 对象检测

Behind the Curtain: Learning Occluded Shapes for 3D Object Detection (AAAI-2022)

Reference

Please cite our paper if you are interested to use this implementation,
Behind the Curtain: Learning Occluded Shapes for 3D Object Detection.

@article{xu2021behind,
  title={Behind the Curtain: Learning Occluded Shapes for 3D Object Detection},
  author={Xu, Qiangeng and Zhong, Yiqi and Neumann, Ulrich},
  journal={arXiv preprint arXiv:2112.02205},
  year={2021}
}

The implementatin is also inspired by the ICCV-2021 paper,
SPG: Unsupervised domain adaptation for 3d object detection via semantic point generation.

@inproceedings{xu2021spg,
  title={Spg: Unsupervised domain adaptation for 3d object detection via semantic point generation},
  author={Xu, Qiangeng and Zhou, Yin and Wang, Weiyue and Qi, Charles R and Anguelov, Dragomir},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
  pages={15446--15456},
  year={2021}
}

Acknowledgement

Our model, BtcDet, is implemented based on [OpenPcdet 0.3.0]. We thank Shaohuai Shi for the discussion during our implementation.

Installation

Requirements

All the codes are tested in the following environment:

  • Linux (tested on Ubuntu 16.04, should be able to work on 18.04)
  • Python 3.6+
  • PyTorch 1.1 or higher (tested on PyTorch 1.7, 1.8.1, 1.9, 1.10)
  • CUDA 9.0 or higher (PyTorch 1.3+ needs CUDA 9.2+, tested on CUDA 10.2)
  • spconv v1.2.1 (commit fad3000249d27ca918f2655ff73c41f39b0f3127)

Install

b. Install the dependent libraries as follows:

  • Install the dependent python libraries:
bash
pip install -r requirements.txt 
  • Install the SparseConv library, we use the implementation from [spconv].
    • The very recent spconv 2.+ has significant interface changes and some issues in operators. Therefore, we do not support it for now.
    • If you use PyTorch 1.1, then make sure you install the spconv v1.0 with (commit 8da6f96) instead of the latest one.
    • If you use PyTorch 1.3+, then you need to install the spconv v1.2. As mentioned in v1.2.1 of spconv (https://github.com/traveller59/spconv/tree/v1.2.1)
    bash
    git clone -b v1.2.1  https://github.com/traveller59/spconv.git --recursive
    
    cd spconv
    
    sudo apt-get install libboost-all-dev
    
    python setup.py bdist_wheel
    
    cd ./dist 

    Inside the dist directory, use pip to install generated whl file.

    bash
    pip install spconv-1.2.1-{your system info}.whl

    After that, you should first get out of the spconv directory, then do python import spconv to see if you installed it correctly.

c. Install the operators in BtcDet by running the following command:

bash
cd BtcDet
python setup.py develop

Preparation

Use Our Preprocessed Data:

you can use our generated kitti's data including the generated complete object points, download it [here (about 31GBs)] and put the zip file inside data/kitti/ and unzip it as detection3d directory.

Alternatively, Generate Data by Yourself:

####KITTI Dataset

  • Please download the official KITTI 3D object detection dataset and organize the downloaded files as follows (the road planes could be downloaded from [road plane], which are optional for data augmentation in the training):
BtcDet
├── data
│   ├── kitti
    │   │   │──detection3d  │── ImageSets
                    │   │   │── training
                    │   │   │   ├──calib & velodyne & label_2 & image_2 & (optional: planes) & (optional: depth_2)
                    │   │   │── testing
                    │   │   │   ├──calib & velodyne & image_2
  • Generate the data infos by running the following command:
python
python -m btcdet.datasets.kitti.kitti_dataset create_kitti_infos tools/cfgs/dataset_configs/kitti_dataset.yaml

Generate Approximated complete object points:

(Under BtcDet directory, execute:)

python
python -m btcdet.datasets.multifindbestfit

Run Training:

bash
cd tools/

Single gpu training

bash
mkdir output

mkdir output/kitti_car

python train.py --cfg_file ./cfgs/model_configs/btcdet_kitti_car.yaml --output_dir ../output/kitti_car/ --batch_size 2 --gpu_str "0"

Multi gpu training, assuming you have 4 gpus:

bash scripts/dist_train.sh 4  --batch_size 8 --gpu_str "0,1,2,3" --cfg_file ./cfgs/model_configs/btcdet_kitti_car.yaml --output_dir ../output/kitti_car/

Run Testing:

bash
cd tools/

Single gpu testing for all saved checkpoints, assuming you have 4 gpus:

bash
python test.sh 4 --eval-all --cfg_file ./cfgs/model_configs/btcdet_kitti_car.yaml --gpu_str "0" --batch_size 2 --output_dir ../output/kitti_car/ --ckpt_dir  ../output/kitti_car/ckpt/

Multi gpu testing for all saved checkpoints, assuming you have 4 gpus:

bash scripts/dist_test.sh 4 --eval-all --cfg_file ./cfgs/model_configs/btcdet_kitti_car.yaml --gpu_str "0,1,2,3" --batch_size 8 --output_dir ../output/kitti_car/ --ckpt_dir  ../output/kitti_car/ckpt/

Multi gpu testing a specific checkpoint, assuming you have 4 gpus and checkpoint_39 is your best checkpoint :

bash scripts/dist_test.sh 4  --cfg_file ./cfgs/model_configs/btcdet_kitti_car.yaml --gpu_str "0,1,2,3" --batch_size 8 --output_dir ../output/kitti_car/ --ckpt  ../output/kitti_car/ckpt/checkpoint_epoch_39.pth

Issues· 26 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python3d3d-object-detectionaaai-2022aaai2022

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言