ZoeDepth / app.py
RamAnanth1's picture
Create app.py
e74e489
raw
history blame
890 Bytes
import gradio as gr
import torch
from utils import get_image_from_url, colorize
from PIL import Image
import matplotlib.pyplot as plt
title = "Interactive demo: ZoeDepth"
description = "Unofficial Gradio Demo for using ZoeDepth: Zero-shot Transfer by Combining Relative and Metric Depth. To use it, simply upload an image or use one of the examples below and click 'Submit'. Results will show up in a few seconds."
zoe = torch.hub.load(".", "ZoeD_N", source="local", pretrained=True)
def process_image(raw_image):
return raw_image
interface = gr.Interface(fn=process_image,
inputs=[gr.Image(type="pil")],
outputs=[gr.Image(type="pil", label ="Depth")
],
title=title,
description=description,
)
interface.launch(debug=True)