CoolFace
Apppublic

selmee/depth-pro

sourceHugging Faceupdated 2y agoView on Hugging Face
4likes
App README

<h1 align="center">Web UI for Depth-Pro</h1>

<p align="center"> <img src="./example.jpg" alt="Web UI for Depth-Pro Depth Estimation" /> </p>

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

  1. 1.Create and activate a virtual environment:
bash
   conda create -n depth-pro -y python=3.9
   conda activate depth-pro
  1. 1.Clone the depth-pro repository:
bash
   git clone https://github.com/apple/ml-depth-pro.git
   cd ml-depth-pro
   pip install -e .
  1. 1.Clone the web UI repository:
bash
   git clone https://github.com/spacewalk01/depth-pro-webui.git
   cd depth-pro-webui
   pip install -r requirements.txt
  1. 1.Download the model:

Download the model from depth_pro.pt and place the file in a newly created checkpoints folder.

๐Ÿš€ Running the Application

  1. 1.Launch the Gradio interface:
bash
   python main.py
  1. 1.Open the provided local URL in your web browser to access the interface.

๐Ÿ–ผ๏ธ Usage

  1. 1.Upload an Image: Use the image uploader to select an image for depth estimation.
  2. 2.Adjust Options:
  3. 3.Auto Rotate: Enable or disable auto-rotation of the image.
  4. 4.Remove Alpha: Enable or disable the removal of the alpha channel.
  5. 5.View Results:
  6. 6.The depth map will be displayed on the interface.
  7. 7.The focal length in pixels will also be shown.

๐Ÿ“œ License

This project is licensed under the Apple License. See the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • โ€”Gradio for providing an easy interface for machine learning models.
  • โ€”Depth Pro for enabling sharp monocular metric depth estimation in less than a second.