initial commit 4bbc898
Younes Belkada commited on
How to use Intel/dpt-hybrid-midas with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("depth-estimation", model="Intel/dpt-hybrid-midas") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoImageProcessor, AutoModelForDepthEstimation
processor = AutoImageProcessor.from_pretrained("Intel/dpt-hybrid-midas")
model = AutoModelForDepthEstimation.from_pretrained("Intel/dpt-hybrid-midas", device_map="auto")