Closed jamesbaker1 closed 3 months ago
Hey everyone,
First of all, I love your work!
I am trying to get the metric depth estimation model working from the Huggingface example, but I am getting a completely black image as my output.
from transformers import pipeline from PIL import Image import requests # load pipe pipe = pipeline(task="depth-estimation", model="depth-anything/Depth-Anything-V2-Metric-Indoor-Large-hf") # load image url = 'http://images.cocodataset.org/val2017/000000039769.jpg' image = Image.open(requests.get(url, stream=True).raw) # inference depth = pipe(image)["depth"]
Error:
/usr/local/lib/python3.10/dist-packages/transformers/pipelines/depth_estimation.py:106: RuntimeWarning: invalid value encountered in divide formatted = (output * 255 / np.max(output)).astype("uint8")
Output:
I figured it out - transformers needs to be >=4.45.0 but pip does not yet have that wheel
!pip install git+https://github.com/huggingface/transformers
Hey everyone,
First of all, I love your work!
Issue Description
I am trying to get the metric depth estimation model working from the Huggingface example, but I am getting a completely black image as my output.
Code Example
Error:
Output: