Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant