Spaces:
Runtime error
Runtime error
metadata
title: depth-pro
sdk: gradio
emoji: π
colorFrom: yellow
colorTo: yellow
pinned: false
app_file: app.py
short_description: web ui for depth-pro
Web UI for Depth-Pro
Metric depth estimation determines real-world distances to objects in a scene from images. This repo provides a web UI that allows users to estimate metric depth and visualize depth maps by easily uploading images using the Depth Pro model through a simple Gradio UI interface.
π οΈ Getting Started
π¦ Installation
Create and activate a virtual environment:
conda create -n depth-pro -y python=3.9 conda activate depth-pro
Clone the depth-pro repository:
git clone https://github.com/apple/ml-depth-pro.git cd ml-depth-pro pip install -e .
Clone the web UI repository:
git clone https://github.com/spacewalk01/depth-pro-webui.git cd depth-pro-webui pip install -r requirements.txt
Download the model:
Download the model from depth_pro.pt and place the file in a newly created
checkpoints
folder.
π Running the Application
Launch the Gradio interface:
python main.py
Open the provided local URL in your web browser to access the interface.
πΌοΈ Usage
- Upload an Image: Use the image uploader to select an image for depth estimation.
- Adjust Options:
- Auto Rotate: Enable or disable auto-rotation of the image.
- Remove Alpha: Enable or disable the removal of the alpha channel.
- View Results:
- The depth map will be displayed on the interface.
- The focal length in pixels will also be shown.
π License
This project is licensed under the Apple License. See the LICENSE file for details.