{"id":13958412,"url":"https://github.com/zongdai/AutoShape","last_synced_at":"2025-07-20T23:31:36.665Z","repository":{"id":37411297,"uuid":"396767639","full_name":"zongdai/AutoShape","owner":"zongdai","description":"ICCV2021 Paper: AutoShape: Real-Time Shape-Aware Monocular 3D Object Detection","archived":false,"fork":false,"pushed_at":"2021-10-15T09:25:06.000Z","size":3603,"stargazers_count":119,"open_issues_count":4,"forks_count":17,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-08-09T13:18:48.039Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zongdai.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-08-16T11:41:09.000Z","updated_at":"2024-07-24T03:00:17.000Z","dependencies_parsed_at":"2022-07-08T01:30:45.331Z","dependency_job_id":null,"html_url":"https://github.com/zongdai/AutoShape","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/zongdai%2FAutoShape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zongdai%2FAutoShape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zongdai%2FAutoShape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zongdai%2FAutoShape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zongdai","download_url":"https://codeload.github.com/zongdai/AutoShape/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226845022,"owners_count":17691143,"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":[],"created_at":"2024-08-08T13:01:32.930Z","updated_at":"2024-11-28T01:32:02.144Z","avatar_url":"https://github.com/zongdai.png","language":"Python","funding_links":[],"categories":["对象检测、分割"],"sub_categories":["网络服务_其他"],"readme":"# AutoShape\nICCV2021 Paper: AutoShape: Real-Time Shape-Aware Monocular 3D Object Detection\n\n[arXiv](https://arxiv.org/abs/2108.11127)\n## Auto-labeled Car Shape for KITTI\nWe release our Auto-labeled car shape data for KITTI with COCO formate. Each car instance has been assigned a 3D model. [Trainset](https://drive.google.com/file/d/1U6d4Z0l4FsAKUiv6jehT7esgsJ5ULWaI/view?usp=sharing) and [Valset](https://drive.google.com/file/d/1KfHiPOjWyV-pW3jxyTogzG07KjLvsF2g/view?usp=sharing) with  3000 vertexes 3D models annotations can be downloaded from Google Drive. \n\n\n\u003cimg src=\"https://github.com/zongdai/AutoShape/blob/main/README/autoshape_data_exmaple.png\" width=\"860\"/\u003e\n\n### Data Formate\n```python\n# we add 2D/3D keypoints in KITTI car instance annotations\nannotations: [\n    '2dkeypoints': list # (3000 + 9) * 3 (u, v, visiblity),\n    '3dkeypoints': list # (3000 + 9) * 3 (x, y, z in model local coordinate)\n    ...\n    ], ...\n```\n## Paddle Implement(incomplete)\n### Requirements\n*   Ubuntu 18.04\n*   Python 3.7\n*   PaddlePaddle 2.1.0\n*   CUDA 10.2\n### PaddlePaddle installation\n```bash\n\nconda create -n paddle_latest python=3.7\n\nconda actviate paddle_latest\n\npip install paddlepaddle -i https://mirror.baidu.com/pypi/simple\n\npip install -r requirement.txt\n```\n## Pytorch Implement\n### Requirements\n*   Ubuntu 18.04\n*   Python 3.6\n### Install\n1. Install pytorch1.0.0:\n    ~~~\n    conda install pytorch=1.0.0 torchvision==0.2.1 cuda100 -c pytorch\n    ~~~\n2. Install the requirements\n    ~~~\n    pip install -r requirements.txt\n    ~~~\n3. Compile deformable convolutional (from [DCNv2](https://github.com/CharlesShang/DCNv2/tree/pytorch_0.4)).\n    ~~~\n    cd $AutoShape_ROOT/pytorch/src/lib/models/networks/ \n    unzip DCNv2-pytorch_1.0.zip\n    cd DCNv2\n    ./make.sh\n    ~~~\n4. Compile iou3d (from [pointRCNN](https://github.com/sshaoshuai/PointRCNN)).\n    ~~~\n    cd $AutoShape_ROOT/pytorch/src/lib/utiles/iou3d\n    python setup.py install\n    ~~~\n### Dataset preparation\nPlease download the official [KITTI 3D object detection](http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d) dataset and [AutoShape keypoints annotations](https://drive.google.com/file/d/1iMKU9OGLbNRHqclQUd9O9JUrQ0qNkgjy/view?usp=sharing) organize the downloaded files as follows: \n```\npytorch\n├── kitti_format\n│   ├── data\n│   │   ├── kitti\n│   │   |   ├── annotations_48 / kitti_train.json .....\n│   │   |   ├── annotations_16 / kitti_train.json .....\n│   │   │   ├── calib /000000.txt .....\n│   │   │   ├── image(left[0-7480] right[7481-14961] for data augmentation)\n│   │   │   ├── label /000000.txt .....\n|   |   |   ├── train.txt val.txt trainval.txt\n├── src\n├── requirements.txt\n``` \n### Training\nRun following command to train model with DLA-34 backbone and 57(48+9) keypoints with 2 GPUs.\n   ~~~\n   cd pytorch\n   python ./src/main.py --data_dir ./kitti_format --exp_id AutoShape_dla34_trainval_rightaug --arch dla_34 --num_joints 57 --sample_pc 48 --batch_size 16 --master_batch_size 8 --lr 1.5e-4 --gpus 0,1 --num_epochs 200 --stereo_aug\n   ~~~\n\n### Inference\n~~~\npython ./src/faster.py --demo  test_image_dir_path --calib_dir calib_dir_path --load_model trained_model_path --gpus 0 --arch dla_34 --num_joints 57 --sample_pc 48\n~~~\n### Kitti TestServer Evaluation Model\n\n- Training on KITTI trainval split and evaluation on test server.\n    - Backbone: DLA-34\n    - Num Keypoints: 48 + 9\n    - Model: ([Google Drive](https://drive.google.com/file/d/1mTIl2pSw1ekL4i7BmmO_HGtCjS_hFCTf/view?usp=sharing))\n    \n| Class      |Easy      | Moderate     |Hard       |\n| :----:     | :----:   | :----:       |:----:                   \n| Car        | 22.47    | 14.17        | 11.36    \n\n\n## Acknowledgement\n- [**RTM3D**](https://github.com/Banconxuan/RTM3D)\n- [**CenterNet**](https://github.com/xingyizhou/CenterNet)\n## License\n\nAutoShape is released under the MIT License (refer to the LICENSE file for details).\nSome of the code are borrowed from, [RTM3D](https://github.com/Banconxuan/RTM3D), [CenterNet](https://github.com/xingyizhou/CenterNet), [dla](https://github.com/ucbdrive/dla) (DLA network), [DCNv2](https://github.com/CharlesShang/DCNv2)(deformable convolutions), [iou3d](https://github.com/sshaoshuai/PointRCNN) and [kitti_eval](https://github.com/prclibo/kitti_eval) (KITTI dataset evaluation). Please refer to the original License of these projects.\n## Citation\n\nIf you find this project useful for your research, please use the following BibTeX entry.\n\n    \n    @inproceedings{liu2021autoshape,\n      title={AutoShape: Real-Time Shape-Aware Monocular 3D Object Detection},\n      author={Liu, Zongdai and Zhou, Dingfu and Lu, Feixiang and Fang, Jin and Zhang, Liangjun},\n      booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},\n      pages={15641--15650},\n      year={2021}\n    }\n    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzongdai%2FAutoShape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzongdai%2FAutoShape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzongdai%2FAutoShape/lists"}