Skip to content

Latest commit

 

History

History
 
 

python

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Depth-Anything TensorRT Python

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.

Usage

Installation

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

Running

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

Gradio demo

To use gradio demo locally, you shoud set engine_path in app.py then:

python app.py