{"id":19984533,"url":"https://github.com/intellabs/csg","last_synced_at":"2025-06-12T03:38:30.213Z","repository":{"id":41261747,"uuid":"491488049","full_name":"IntelLabs/csg","owner":"IntelLabs","description":"IV 2020 \"CSG: Critical Scenario Generation from Real Traffic Accidents\"","archived":false,"fork":false,"pushed_at":"2024-10-24T20:04:39.000Z","size":101539,"stargazers_count":18,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-26T06:55:54.494Z","etag":null,"topics":["autonomous-driving","scenario"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IntelLabs.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-12T11:37:47.000Z","updated_at":"2024-10-24T20:04:41.000Z","dependencies_parsed_at":"2023-01-29T20:16:02.866Z","dependency_job_id":"b144839d-c702-4c6f-95dc-97525a747a18","html_url":"https://github.com/IntelLabs/csg","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelLabs%2Fcsg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelLabs%2Fcsg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelLabs%2Fcsg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IntelLabs%2Fcsg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IntelLabs","download_url":"https://codeload.github.com/IntelLabs/csg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224386199,"owners_count":17302615,"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":["autonomous-driving","scenario"],"created_at":"2024-11-13T04:19:25.646Z","updated_at":"2024-11-13T04:19:26.202Z","avatar_url":"https://github.com/IntelLabs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Critical Scenario Generation Toolkit\n\n## Introduction \n  This repo offers the source code for Critical Scnenario Generation (CSG) toolkit. The toolkit aims to extract dynamic (trajectories) and static (road) elements from a given surveillance or dash camera video, and fromulated as OpenDrive and OpenScenario files as outputs.  \n## How to build\n\n1. Install system dependencies: \n```Shell\nsudo apt-get install python3-tk\n``` \n2. Install python3 package: \n```Shell\npip3 install Cython numpy\npip3 install -r requirements.txt\n```\n3. compile cython package\n```Shell\ncd src/track/kcf \u0026\u0026 make \u0026 cd ../../../\n```\n\n## How to run:\n1. Edit variables in config.py (Optional)\n2. Download machine learning models from [Google Drive](https://drive.google.com/file/d/1QAyzSvLjLBETgSk5w7hOp-1WGwD9aH9I/view?usp=sharing ) and unzip to \"data\" folder. \n3. Run \n\n- For survelliance video: \n```Shell\npython3 CSG.py \n```\n\n- For dash camera video: \n\nIt uses [ORB-SLAM2](https://github.com/raulmur/ORB_SLAM2 \"ORB-SLAM2\") to get extrinsic parameters of moving camera.  Please install ORB-SLAM2 first and put the executable file under the \"/src/SLAM\" folder. \n\nThen run:\n```Shell\npython3 CSG_ego.py \n```\n\n## Reqruiments\n\nAt least 1 GPU is needed. By default, the models are deployed on gpu:0. You can change your settings in \"config\" file. \n## Folder structure\n```bash\n+-- critical-scenario-generation\n¦   +-- data\n¦   ¦   +-- yolo\n¦   ¦   +-- vehicle_reid\n¦   ¦   +-- mask_rcnn_ego\n¦   ¦   +-- mask_rcnn\n¦   ¦   +-- lane\n¦   ¦   +-- depth\n¦   +-- src\n¦   ¦   +-- SLAM\n¦   ¦   ¦   +-- mono_kitti\n¦   ¦   +-- ...\n¦   +-- Lib_OpenSCENARIO\n¦   +-- icon\n¦   +-- CSG.py\n¦   +-- CSG_ego.py\n¦   +-- ScaleSolver.py\n¦   +-- config.py\n¦   +-- requirements.txt\n```\n\n## Licence\ncheck [LICENSE](LICENSE)\n\n## Citation\nIf you use our source code, please consider citing the following:\n```bibtex\n@InProceedings{csg2020,\n  title={CSG: critical scenario generation from real traffic accidents},\n  author={Zhang, Xinxin and Li, Fei and Wu, Xiangbin},\n  booktitle = {IV},\n  year={2020}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintellabs%2Fcsg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintellabs%2Fcsg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintellabs%2Fcsg/lists"}