Views
No views yet
1from transformers import pipeline
2from PIL import Image
3import requests
4
5# load pipe
6depth_estimator = pipeline(task="depth-estimation", model="Intel/zoedepth-nyu")
7
8# load image
9url = 'http://images.cocodataset.org/val2017/000000039769.jpg'
10image = Image.open(requests.get(url, stream=True).raw)
11
12# inference
13outputs = depth_estimator(image)
14depth = outputs.depth1@misc{bhat2023zoedepth,
2 title={ZoeDepth: Zero-shot Transfer by Combining Relative and Metric Depth},
3 author={Shariq Farooq Bhat and Reiner Birkl and Diana Wofk and Peter Wonka and Matthias Müller},
4 year={2023},
5 eprint={2302.12288},
6 archivePrefix={arXiv},
7 primaryClass={cs.CV}
8}