{"id":16517380,"url":"https://github.com/vietanhdev/open-adas","last_synced_at":"2025-04-05T03:09:25.510Z","repository":{"id":37422787,"uuid":"249122777","full_name":"vietanhdev/open-adas","owner":"vietanhdev","description":"An open source advanced driver assistance system (ADAS) that uses Jetson Nano as the hardware. Features: Traffic sign detection, Forward collision warning, Lane departure warning.","archived":false,"fork":false,"pushed_at":"2023-10-24T00:59:23.000Z","size":27942,"stargazers_count":445,"open_issues_count":11,"forks_count":129,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-03-29T02:04:56.258Z","etag":null,"topics":["adas","jetson-nano","lane-lines-detection","object-detection","semantic-segmentation"],"latest_commit_sha":null,"homepage":"","language":"C++","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/vietanhdev.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":"vietanhdev"}},"created_at":"2020-03-22T05:57:00.000Z","updated_at":"2025-03-18T12:14:01.000Z","dependencies_parsed_at":"2023-01-19T12:17:47.841Z","dependency_job_id":"b8b988cd-c47f-47e4-85e8-ee53cc6c31a9","html_url":"https://github.com/vietanhdev/open-adas","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vietanhdev%2Fopen-adas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vietanhdev%2Fopen-adas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vietanhdev%2Fopen-adas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vietanhdev%2Fopen-adas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vietanhdev","download_url":"https://codeload.github.com/vietanhdev/open-adas/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280272,"owners_count":20912967,"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":["adas","jetson-nano","lane-lines-detection","object-detection","semantic-segmentation"],"created_at":"2024-10-11T16:30:21.740Z","updated_at":"2025-04-05T03:09:25.474Z","avatar_url":"https://github.com/vietanhdev.png","language":"C++","funding_links":["https://github.com/sponsors/vietanhdev"],"categories":[],"sub_categories":[],"readme":"# OpenADAS - An advanced driver-assistance system using Jetson Nano\n\n[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://aicurious.io/donation/)\n\nAn advanced driver-assistance system on Jetson Nano embedded computer with four main functions: forward collision warning, lane departure warning, traffic sign recognition and overspeed warning. This repository contains source code for Jetson Nano, not including the source code for model training and conversion.\n\n[![](docs/images/image.png)](https://www.youtube.com/watch?v=0ykWIfkZxmY)\n\n![The system design](docs/images/hardware-design.png)\n\n## Documentation:\n\n- **(Blog) Intro and Hardware:** \u003chttps://aicurious.io/blog/2020-09-10-adas-jetson-nano-intro-and-hardware\u003e.\n- **(Blog) Software stack**: \u003chttps://aicurious.io/blog/2020-09-12-adas-jetson-nano-software\u003e.\n- **(Blog) Deep neural networks:** \u003chttps://aicurious.io/blog/2020-09-21-adas-jetson-nano-experimental-results\u003e.\n- **(Documentation) OpenADAS:** *Design, CANbus, Calibration, Model training and deployment notes*: [docs/open-adas.md](docs/open-adas.md).\n- **(Documentation) How to setup on a Jetson Xavier:** [docs/setup-jetson-xavier.md](docs/setup-jetson-xavier.md).\n\n**For TensorRT 7 support:** Currently, only TensorRT 5 and 6 are supported. TensorRT 7 has a lot of deprecated APIs and I think there is no way to run this project directly with that version. I don't have time to continue with this project soon, so I really need your contributions to extend this project further.\n\n## Quick setup on Jetson Nano: SD Card image\n\nI created an image of my SD card [here](https://1drv.ms/u/s!Av71xxzl6mYZgdZxDoxDnxR-sOERSw?e=S2o1uR). You can flash and run this image on Jetson Nano.\n\n**Note:**\n\n- The source code and binary files in this SD card image is older than in `master` branch. Please upgrade to the lastest source code and recompile on your device.\n- Use Alt+F4 to exit the GUI and start editing your source code.\n- Login information:\n    + Username: `smartcam`.\n    + Password: Open Terminal and type `sudo passwd smartcam` to change the password.\n\n## Compile from source\n\n### Requirements:\n\n- CMake \u003e= 3.10\n- Qt 5\n- OpenCV \u003e= 4.0.1\n- C++ 17 compiler\n- CUDA 10.x\n- TensorRT 5.1.5-1+cuda10.1, or - TensorRT 6.0.1.8+10.2. **This project should work with TensorRT 5 and TensorRT 6. TensorRT 7 is not supported for now.**\n\n### Setup for Linux - Ubuntu 18.04\n\n#### Setup\n\n- Install QT:\n\n```\nsudo apt-get install build-essential\nsudo apt-get install qt5-default qtcreator qt5-doc qt5-doc-html qtbase5-doc-html qtbase5-examples -y\nsudo /sbin/ldconfig -v\n```\n\n- Install OpenCV\n\n```\nhttps://linuxize.com/post/how-to-install-opencv-on-ubuntu-18-04/\n```\n\n- Install protobuf 3.6.1\n\n```\nhttps://github.com/protocolbuffers/protobuf\n```\n\n#### Models and test data\n\n- Download models and testing data [here](https://1drv.ms/u/s!Av71xxzl6mYZgddQHbzrtbw9fBGegA?e=M4CvIq) and put into root folder of this project.\n\n#### Compile and Run\n\n- Update `GPU_ARCHS`: Modify `GPU_ARCHS` in `CMakeLists.txt` to suit your GPU. For Jetson Nano, GPU_ARCHS = 53 and for my RTX 2070, GPU_ARCHS = 75. Read more in following posts:\n  + \u003chttps://www.programmersought.com/article/28125950847/\u003e\n  + \u003chttps://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/\u003e\n\n- Compile\n```\ncd \u003cproject directory\u003e\nmkdir build\ncd build\ncmake -DCUDA_INCLUDE_DIRS=/usr/local/cuda-10.2/include ..\nmake\n```\n\nReplace `CUDA_INCLUDE_DIRS` with your own path.\n\n- Setup virtual CAN (run once)\n\n```\nsudo bash setup_vcan.sh\n```\n\n- Run\n```\ncd build/bin\n./OpenADAS\n```\n\n**Arguments:**\n\n- `--input_source` | default: `simulation` : Input source. 'camera' or 'simulation'.\n- `--input_video_path` | optional : Path to video file for simulation.\n- `--input_data_path`  | optional : Path to data file for simulation.\n- `--on_dev_machine`   | default: `true` : On development machine or not. When this value is set to `false`, OpenADAS will be launched in fullscreen mode without mouse (touch UI). You should this value to `true` in development environment.\n\nSpecify `input_video_path` and `input_data_path` if you want to load a simulation scenario by default. Otherwise, you can select scenarios from simulation selector.\n\n#### Known issues\n\n**Issue: cublas_v2.h not found**\n\n```\nfatal error: cublas_v2.h: No such file or directory\n #include \u003ccublas_v2.h\u003e\n          ^~~~~~~~~~~~~\ncompilation terminated.\n```\n\n- Step 1: Find lib: `find /usr/local/ -name cublas_v2.h`.\n- Step 2: Export to path: `export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/local/cuda-10.2/targets/x86_64-linux/include/`.\n- Step 3: Use CMake and build.\n\n**Issue:  `/usr/bin/ld: cannot find -lcudart`, `/usr/bin/ld: cannot find -lcublas`**\n\n```\nsudo ln -s /usr/local/cuda/lib64/libcudart.so /usr/lib/libcudart.so\n```\n```\nsudo ln -s /usr/local/cuda/lib64/libcublas.so /usr/lib/libcublas.so\n```\n\n**Note:** The paths can be different on your computer.\n\n**Issue: Qt5Multimedia missing**\n\n```\nCould not find a package configuration file provided by \"Qt5Multimedia\"\n  with any of the following names:\n\n    Qt5MultimediaConfig.cmake\n    qt5multimedia-config.cmake\n```\n\nHow to fix?\n\n```\nsudo apt-get install qttools5-dev-tools libqt5svg5-dev qtmultimedia5-dev\n```\n\n**Issue:  Need to specify CUDA root**\n\n```\n[cmake] CMake Error at /usr/share/cmake-3.10/Modules/FindCUDA.cmake:682 (message):\n[cmake]   Specify CUDA_TOOLKIT_ROOT_DIR\n```\n\nHow to fix? \n\n```\nexport CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.2/\n```\n\nYou should change the path corresponding to your environment.\n\n**Issue: Qt5 library not found**\n\n```\n fatal error: QtWidgets/QCloseEvent: No such file or directory\n #include \u003cQtWidgets/QCloseEvent\u003e\n          ^~~~~~~~~~~~~~~~~~~~~~~\ncompilation terminated.\n```\n\n**Issue: SIOCGIFINDEX: No such device**\n\n```\nsudo bash setup_vcan.sh\n```\n\n## References:\n\n- Objects as Points - Xingyi Zhou, Dequan Wang, Philipp Krähenbühl: [https://arxiv.org/abs/1904.07850](https://arxiv.org/abs/1904.07850).\n\n- U-Net: Convolutional Networks for Biomedical Image Segmentation - Olaf Ronneberger, Philipp Fischer, Thomas Brox: [https://arxiv.org/abs/1505.04597](https://arxiv.org/abs/1505.04597).\n\n- Deep Residual Learning for Image Recognition - Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun: [https://arxiv.org/abs/1512.03385](https://arxiv.org/abs/1512.03385).\n\n- Dark Theme for Qt5 by Juergen Skrotzky: [https://github.com/Jorgen-VikingGod/Qt-Frameless-Window-DarkStyle](https://github.com/Jorgen-VikingGod/Qt-Frameless-Window-DarkStyle).\n\n- ICSim: \u003chttps://github.com/zombieCraig/ICSim\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvietanhdev%2Fopen-adas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvietanhdev%2Fopen-adas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvietanhdev%2Fopen-adas/lists"}