- Notifications
You must be signed in to change notification settings - Fork18
Python scripts for performing road segemtnation and car detection using the HybridNets multitask model in ONNX.
License
ibaiGorordo/ONNX-HybridNets-Multitask-Road-Detection
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Python scripts for performing road segemtnation and car detection using the HybridNets multitask model in ONNX.
- Check therequirements.txt file. Additionally,pafy andyoutube-dl are required for youtube video inference.
pip install -r requirements.txtpip install youtube_dlpip install git+https://github.com/zizo-pro/pafy@b8976f22c19e4ab5515cacbfae0a3970370c102b
The original models were converted to different formats (including .onnx) byPINTO0309, download the models fromhis repository and save them into themodels folder.
The Pytorch pretrained model was taken from theoriginal repository.
- Image inference:
Original image:https://commons.wikimedia.org/wiki/File:2021-02-23_Tuesday_16.02.01-16.11.18_UTC-3_Route_S-40_(Chile).webm?uselang=es
python image_road_detection.py
- Video Bird Eye View:https://youtu.be/SbJ7C5d6X1w
Original video:https://youtu.be/jvRDlJvG8E8
python video_bird_eye_view_road_detection.py
- Video inference:https://youtu.be/GGa8MayeKtQhttps://youtu.be/SbJ7C5d6X1w
Original video:https://youtu.be/jvRDlJvG8E8
python video_road_detection.py
If you use a different video for teh bird eye view, you will have to modify the horizon points. Sethorizon_points=None
to trigger the horizon point selection mode. This mode will show the image and wait until the two horizon points are selected as in the image below. A horizontal line is used as a guide, if the road does not reach that height, you can ignore the horizontal line. Copy the printed output into thehorizon_points
variable for next inferences.
- HyrbidNets model:https://github.com/datvuthanh/HybridNets
- PINTO0309's model zoo:https://github.com/PINTO0309/PINTO_model_zoo
- PINTO0309's model conversion tool:https://github.com/PINTO0309/openvino2tensorflow
- Non maximum suppression:https://python-ai-learn.com/2021/02/14/nmsfast/
- Original paper:https://arxiv.org/abs/2203.09035
About
Python scripts for performing road segemtnation and car detection using the HybridNets multitask model in ONNX.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.