Python scripts for performing line detection using the HAWP model in ONNX.
Original image: https://commons.wikimedia.org/wiki/File:Bedroom_Mitcham.jpg
- Check the requirements.txt file.
- For ONNX, if you have a NVIDIA GPU, then install the onnxruntime-gpu, otherwise use the onnxruntime library.
- Additionally, pafy and youtube-dl are required for youtube video inference.
git clone https://github.com/ibaiGorordo/ONNX-HAWP-Line-Detection.git --recursive
cd ONNX-HAWP-Line-Detection
pip install -r requirements.txt
For Nvidia GPU computers:
pip install onnxruntime-gpu
Otherwise:
pip install onnxruntime
pip install youtube_dl
pip install git+https://github.com/zizo-pro/pafy@b8976f22c19e4ab5515cacbfae0a3970370c102b
The original model was converted to different formats (including .onnx) by PINTO0309. Download the model from his repository using the download script and save them into the models folder
- Image Line Detection:
python image_line_detection.py
- Webcam Line Detection:
python webcam_line_detection.py
- Video Line Detection: https://youtu.be/AKdwQwBCaTk
python video_line_detection.py
Original video: https://youtu.be/om6s2jmDJ2c
- HAWP: https://github.com/cherubicXN/hawp
- PINTO0309's model zoo: https://github.com/PINTO0309/PINTO_model_zoo
- PINTO0309's model conversion tool: https://github.com/PINTO0309/openvino2tensorflow
- HAWP Original paper: https://arxiv.org/abs/2003.01663

