Python scripts for performing lane detection using the Lane Shape Prediction with Transformers (LSTR) model in ONNX.
- OpenCV, scipy, googledrivedownloader, onnx and onnxruntime. pafy and youtube-dl are required for youtube video inference.
pip install -r requirements.txt
pip install pafy youtube-dl
The original model was converted to different formats (including .onnx) by PINTO0309, the models can be found in his repository.
The pretrained Pytorch model was taken from the original repository.
- Image inference:
python image_lane_detection.py
- Video inference:
python video_lane_detection.py
Original video: https://youtu.be/2CIxM7x-Clc (by Yunfei Guo)