Skip to content

ibaiGorordo/ONNX-GLPDepth

Repository files navigation

ONNX-GLPDepth

Python scripts for performing monocular depth estimation using the GLPDepth model in ONNX

GLPDepth monocular depth estimation ONNX Original image:https://commons.wikimedia.org/wiki/File:401_Gridlock.jpg

Requirements

  • Check the requirements.txt file. Additionally, pafy and youtube-dl are required for youtube video inference.

Known issues

The KITTI model (for road scenes) has poor performance in the upper parts of the image due to the lack of ground truth lidar data in the dataset. The code tries to find where the depth starts to fail, and fills the depth with zeros that upper part.

Installation

pip install -r requirements.txt
pip install pafy youtube_dl==2021.12.17

ONNX model

The original models were converted to different formats (including .onnx) by PINTO0309, download the models from his repository and save them into the models folder.

Original Pytorch model

The Pytorch pretrained model was taken from the original repository.

Examples

  • Image inference:
python image_depth_estimation.py 
  • Video inference:
python video_depth_estimation.py
  • Webcam inference:
python webcam_depth_estimation.py

GLPDepth monocular depth estimation ONNX

Original video: https://www.youtube.com/watch?v=jc3uSpXYZqY

References:

About

Python scripts for performing monocular depth estimation using the GLPDepth model in ONNX

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages