{"id":13443559,"url":"https://github.com/Xharlie/BtcDet","last_synced_at":"2025-03-20T16:32:18.540Z","repository":{"id":45519963,"uuid":"434487683","full_name":"Xharlie/BtcDet","owner":"Xharlie","description":"Behind the Curtain: Learning Occluded Shapes for 3D Object Detection","archived":false,"fork":false,"pushed_at":"2021-12-20T02:05:04.000Z","size":12364,"stargazers_count":193,"open_issues_count":25,"forks_count":42,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-08-01T03:44:01.965Z","etag":null,"topics":["3d","3d-object-detection","aaai-2022","aaai2022","autonomous-driving","autonomous-vehicles","computer-vision","deep-learning","generative-model","lidar","lidar-point-cloud","object-detection","occlusion","occlusion-handling","point-cloud","pytorch","self-driving","self-driving-car"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Xharlie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-03T06:16:57.000Z","updated_at":"2024-07-15T16:44:21.000Z","dependencies_parsed_at":"2022-07-19T14:39:03.413Z","dependency_job_id":null,"html_url":"https://github.com/Xharlie/BtcDet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xharlie%2FBtcDet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xharlie%2FBtcDet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xharlie%2FBtcDet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xharlie%2FBtcDet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xharlie","download_url":"https://codeload.github.com/Xharlie/BtcDet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221780064,"owners_count":16879040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","3d-object-detection","aaai-2022","aaai2022","autonomous-driving","autonomous-vehicles","computer-vision","deep-learning","generative-model","lidar","lidar-point-cloud","object-detection","occlusion","occlusion-handling","point-cloud","pytorch","self-driving","self-driving-car"],"created_at":"2024-07-31T03:02:03.764Z","updated_at":"2025-03-20T16:32:18.534Z","avatar_url":"https://github.com/Xharlie.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Behind the Curtain: Learning Occluded Shapes for 3D Object Detection (AAAI-2022)\n\n## Reference\n\nPlease cite our paper if you are interested to use this implementation,  \n \u003cstrong\u003eBehind the Curtain: Learning Occluded Shapes for 3D Object Detection\u003c/strong\u003e.\n```\n@article{xu2021behind,\n  title={Behind the Curtain: Learning Occluded Shapes for 3D Object Detection},\n  author={Xu, Qiangeng and Zhong, Yiqi and Neumann, Ulrich},\n  journal={arXiv preprint arXiv:2112.02205},\n  year={2021}\n}\n```\n\nThe implementatin is also inspired by the ICCV-2021 paper,  \n \u003cstrong\u003eSPG: Unsupervised domain adaptation for 3d object detection via semantic point generation\u003c/strong\u003e.\n``` \n@inproceedings{xu2021spg,\n  title={Spg: Unsupervised domain adaptation for 3d object detection via semantic point generation},\n  author={Xu, Qiangeng and Zhou, Yin and Wang, Weiyue and Qi, Charles R and Anguelov, Dragomir},\n  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},\n  pages={15446--15456},\n  year={2021}\n}\n``` \n\n\n## Acknowledgement\nOur model, BtcDet, is implemented based on [`[OpenPcdet 0.3.0]`](https://github.com/open-mmlab/OpenPCDet). We thank Shaohuai Shi for the discussion during our implementation.\n  \n  \n     \n## Installation\n\n### Requirements\nAll the codes are tested in the following environment:\n* Linux (tested on Ubuntu 16.04, should be able to work on 18.04)\n* Python 3.6+\n* PyTorch 1.1 or higher (tested on PyTorch 1.7, 1.8.1, 1.9, 1.10)\n* CUDA 9.0 or higher (PyTorch 1.3+ needs CUDA 9.2+, tested on CUDA 10.2)\n* [`spconv v1.2.1 (commit fad3000249d27ca918f2655ff73c41f39b0f3127)`](https://github.com/traveller59/spconv/commit/fad3000249d27ca918f2655ff73c41f39b0f3127)\n\n\n### Install\nb. Install the dependent libraries as follows:\n\n* Install the dependent python libraries: \n```\npip install -r requirements.txt \n```\n\n* Install the SparseConv library, we use the implementation from [`[spconv]`](https://github.com/traveller59/spconv). \n    * The very recent spconv 2.+ has significant interface changes and some issues in operators. Therefore, we do not support it for now.\n    * If you use PyTorch 1.1, then make sure you install the `spconv v1.0` with ([commit 8da6f96](https://github.com/traveller59/spconv/tree/8da6f967fb9a054d8870c3515b1b44eca2103634)) instead of the latest one.\n    * 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)`](https://github.com/traveller59/spconv/tree/v1.2.1)\n    ```\n    git clone -b v1.2.1  https://github.com/traveller59/spconv.git --recursive\n    \n    cd spconv\n    \n    sudo apt-get install libboost-all-dev\n    \n    python setup.py bdist_wheel\n    \n    cd ./dist \n    ```\n    Inside the `dist` directory, use pip to install generated whl file.\n    ```\n    pip install spconv-1.2.1-{your system info}.whl\n    ```\n    After that, you should first get out of the spconv directory, then do python import spconv to see if you installed it correctly.\n    \n\nc. Install the operators in `BtcDet` by running the following command:\n```shell\ncd BtcDet\npython setup.py develop\n```\n\n## Preparation\n\n### Use Our Preprocessed Data: \nyou can use our generated kitti's data including the generated complete object points, download it [[here (about 31GBs)]](https://drive.google.com/drive/folders/1mK4akt3Qro9nbw_NRfP__p2nb3a_rzxv?usp=sharing)  and put the zip file inside data/kitti/ and unzip it as detection3d directory.\n\n### Alternatively, Generate Data by Yourself:\n####KITTI Dataset\n* Please download the official [KITTI 3D object detection](http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d) dataset and organize the downloaded files as follows (the road planes could be downloaded from [[road plane]](https://drive.google.com/file/d/1d5mq0RXRnvHPVeKx6Q612z0YRO1t2wAp/view?usp=sharing), which are optional for data augmentation in the training):\n```\nBtcDet\n├── data\n│   ├── kitti\n    │   │   │──detection3d  │── ImageSets\n                    │   │   │── training\n                    │   │   │   ├──calib \u0026 velodyne \u0026 label_2 \u0026 image_2 \u0026 (optional: planes) \u0026 (optional: depth_2)\n                    │   │   │── testing\n                    │   │   │   ├──calib \u0026 velodyne \u0026 image_2\n```\n\n* Generate the data infos by running the following command: \n```python \npython -m btcdet.datasets.kitti.kitti_dataset create_kitti_infos tools/cfgs/dataset_configs/kitti_dataset.yaml\n```\n#### Generate Approximated complete object points:\n(Under `BtcDet` directory, execute:)\n```python \npython -m btcdet.datasets.multifindbestfit\n```\n\n\n\n\n\n## Run Training:\n```\ncd tools/\n```\nSingle gpu training\n```\nmkdir output\n\nmkdir output/kitti_car\n\npython train.py --cfg_file ./cfgs/model_configs/btcdet_kitti_car.yaml --output_dir ../output/kitti_car/ --batch_size 2 --gpu_str \"0\"\n```\n\nMulti gpu training, assuming you have 4 gpus:\n```\nbash 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/\n```\n\n## Run Testing:\n```\ncd tools/\n```\nSingle gpu testing for all saved checkpoints, assuming you have 4 gpus:\n```\npython 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/\n```\n\nMulti gpu testing for all saved checkpoints, assuming you have 4 gpus:\n```\nbash 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/\n```\n\nMulti gpu testing a specific checkpoint, assuming you have 4 gpus and checkpoint_39 is your best checkpoint :\n```\nbash 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\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXharlie%2FBtcDet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FXharlie%2FBtcDet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXharlie%2FBtcDet/lists"}