Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

ZoeDepth is now available in 🤗 Transformers #124

Open
NielsRogge opened this issue Jul 16, 2024 · 0 comments
Open

ZoeDepth is now available in 🤗 Transformers #124

NielsRogge opened this issue Jul 16, 2024 · 0 comments

Comments

@NielsRogge
Copy link

NielsRogge commented Jul 16, 2024

Hi folks!

ZoeDepth is now available in the Transformers library, enabling easy inference in a few lines of code.

Here's how to use it:

from transformers import pipeline
from PIL import Image
import requests

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

pipe = pipeline(task="depth-estimation", model="Intel/zoedepth-nyu-kitti")
result = pipe(image)
depth = result["depth"]

You can also do the pre- and postprocessing yourself as explained here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant