Depth estimation is the task of measuring the distance of each pixel relative to the camera. This repo hosts a Python implementation of the Depth-Anything Monocular Depth Estimation model, leveraging the TensorRT API for efficient real-time inference.
Install the corresponding version of TensorRT API according to your system environment.
git clone https://github.com/spacewalk01/depth-anything-tensorrt.git
cd depth-anything-tensorrt/python
pip install -r requirements.txt
python trt_infer.py --engine <path to trt engine> --img <single-img> --outdir <outdir> [--grayscale]
For example:
python trt_infer.py --engine path/to/engine --img examples/demo1.png --outdir depth_vis
To use gradio demo locally, you shoud set engine_path
in app.py
then:
python app.py