{"id":20731470,"url":"https://github.com/opendrivelab/thinktwice","last_synced_at":"2025-04-09T14:09:41.895Z","repository":{"id":163761758,"uuid":"615387590","full_name":"OpenDriveLab/ThinkTwice","owner":"OpenDriveLab","description":"[CVPR 2023] Pytorch implementation of ThinkTwice, a SOTA Decoder for End-to-end Autonomous Driving under BEV.","archived":false,"fork":false,"pushed_at":"2024-03-04T15:48:52.000Z","size":12648,"stargazers_count":232,"open_issues_count":2,"forks_count":22,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-06T03:38:45.462Z","etag":null,"topics":["carla-simulator","end-to-end-autonomous-driving"],"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/OpenDriveLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["OpenDriveLab"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-03-17T15:20:46.000Z","updated_at":"2025-03-24T09:58:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"32211137-9dd2-4cc4-99ea-42af47e8c87e","html_url":"https://github.com/OpenDriveLab/ThinkTwice","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/OpenDriveLab%2FThinkTwice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenDriveLab%2FThinkTwice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenDriveLab%2FThinkTwice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenDriveLab%2FThinkTwice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenDriveLab","download_url":"https://codeload.github.com/OpenDriveLab/ThinkTwice/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054194,"owners_count":21039952,"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":["carla-simulator","end-to-end-autonomous-driving"],"created_at":"2024-11-17T05:14:57.973Z","updated_at":"2025-04-09T14:09:41.874Z","avatar_url":"https://github.com/OpenDriveLab.png","language":"Python","funding_links":["https://github.com/sponsors/OpenDriveLab"],"categories":[],"sub_categories":[],"readme":"# Think Twice before Driving: Towards Scalable Decoders for End-to-End Autonomous Driving\n\n- A SOTA Decoder for End-to-End Autonomous Driving under BEV\n- [arXiv Paper](https://arxiv.org/abs/2305.06242) (CVPR 2023)\n\n![pipeline](src/pipeline.PNG)\n \n## Demo Video\n[![Demo](src/demo_start.png)](https://youtu.be/ZhSH63O4Hsg)\n\n## Getting Started\n\n- [Installation](docs/INSTALL.md)\n- [Closed-Loop Evaluation in Carla](docs/EVAL.md)\n- [Prepare Dataset](docs/DATA_PREP.md)\n- [Train Your Own Model](docs/TRAIN.md)\n- [Calibrations for Different Camera Settings](camera_calibration/README.md) (Optional)\n\n## Quick Run in Carla\n\nInstall the environment as in [Installation](docs/INSTALL.md), download our checkpoint ([GoogleDrive](https://drive.google.com/file/d/1Y2bWf8qVwqVQxqM2GOKTiR9kE9nGtkYV/view?usp=share_link) or [BaiduYun](https://pan.baidu.com/s/1OamwKOUpqK0EOqWa1Luv_g)(提取码 m5di).) (189K frames training set), put it into **open_loop_training/ckpt**, and run:\n\n```shell\n## In the ThinkTwice/ directory\nCUDA_VISIBLE_DEVICES=0  nohup bash ./leaderboard/scripts/evaluation_town05long.sh 22023 22033 thinktwice_agent  False True open_loop_training/ckpt/thinktwice.pth+open_loop_training/configs/thinktwice.py all_towns_traffic_scenarios_no256 thinktwice_town05long 2\u003e\u00261 \u003e thinktwice_town05long.log \u0026\n```\n\nCheck [closed_loop_eval_log/eval_log](closed_loop_eval_log/eval_log) to see how our model drives in Carla! :oncoming_automobile:\n\n(In case you have a screen to see the interface of Carla simulator, you could remove *DISPLAY=* in [leaderboard/leaderboard/leaderboard_evaluator.py](leaderboard/leaderboard/leaderboard_evaluator.py) and then you could directly watch with Carla.) \n\n\n## Code Structure\n\nWe give the structure of our code. Note that we only introduce those folders/files are commonly used and modified.\n\n    ThinkTwice/\n    ├── agents                  # From Carla official\n    ├── camera_calibration      # When you want to use cameras with different FOV\n    ├── closed_loop_eval_log    # Save eval logs\n    ├── collect_data_json       # Save data collection logs\n    ├── dataset                 # Data and metadata for training\n    ├── leaderboard             # Code for Closed-Loop Evaluation\n    │   ├── data                    # Save routes and scenarios\n    │   ├── scripts                 # Run with Carla\n    │   ├── team_code               # Your\n    |   |   ├── roach_ap_agent_data_collection.py # Data collection\n    │   |   └── thinktwice_agent.py      # Interface for closed-loop evaluation of our model\n    │   ├── leaderboard             # From Carla official\n    |   |   └── leaderboard_evaluator.py # Entrance of closed-loop evaluation\n    ├── roach                   # Roach for data collection\n    ├── scenario_runner         # From Carla official\n    ├── open_loop_training      # Training and Neural Network\n    |    ├── ckpt                    # Checkpoints\n    |    ├── work_dirs               # Training Log\n    |    ├── code                    # Preprocessing, DataLoader, Model\n    |    │   ├── apis                    # Training pipeline for mmdet3D\n    |    │   ├── core                    # The hooks for mmdet3D\n    |    │   ├── datasets                # Preprocessing and DataLoader\n    |    |   |   ├── pipelines                # Functions of Preprocessing and DataLoader\n    |    │   |   ├── samplers                 # For DDP\n    |    │   |   └── carla_dataset.py         # Framework of Preprocessing and DataLoading\n    |    │   ├── model_code                   # Neural Network\n    |    |   |   ├── backbones                # Module of Encoder\n    |    |   |   └── dense_heads              # Module of Decoder and Loss Functions\n    |    │   └── encoder_decoder_framework.py # Entrance of Neural Network\n    |    └── train.py                # Entrance of Training\n\n## License\n\nAll assets and code are under the [Apache 2.0 license](./LICENSE) unless specified otherwise.\n\n## Bibtex\nIf this work is helpful for your research, please consider citing the following BibTeX entry.\n\n```\n@inproceedings{jia2023thinktwice,\n  title={Think Twice before Driving: Towards Scalable Decoders for End-to-End Autonomous Driving},\n  author={Jia, Xiaosong and Wu, Penghao and Chen, Li and Xie, Jiangwei and He, Conghui and Yan, Junchi and Li, Hongyang},\n  booktitle={CVPR},\n  year={2023}\n}\n```\n\n## Related Resources\nMany thanks to the open-source community!\n\n[![Awesome](https://awesome.re/badge.svg)](https://awesome.re) \n- [End-to-end Autonomous Driving Survey](https://github.com/OpenDriveLab/End-to-end-Autonomous-Driving) (:rocket:Ours!)\n- [TCP](https://github.com/OpenPerceptionX/TCP) (:rocket:Ours!)\n- [BEVFormer](https://github.com/fundamentalvision/BEVFormer) (:rocket:Ours!)\n- [UniAD](https://github.com/OpenDriveLab/UniAD) (:rocket:Ours!)\n- [ST-P3](https://github.com/OpenPerceptionX/ST-P3) (:rocket:Ours!)\n- [Carla](https://github.com/carla-simulator/carla)\n- [Roach](https://github.com/zhejz/carla-roach)\n- [Transfuser](https://github.com/autonomousvision/transfuser)\n- [CARLA_GARGE](https://github.com/autonomousvision/carla_garage)\n- [LAV](https://github.com/dotchen/LAV)\n- [IBISCape](https://github.com/AbanobSoliman/IBISCape)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopendrivelab%2Fthinktwice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopendrivelab%2Fthinktwice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopendrivelab%2Fthinktwice/lists"}