nielsr HF staff commited on
Commit
e63efb8
1 Parent(s): a4adc0d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -1
README.md CHANGED
@@ -56,7 +56,17 @@ The model card has been written in combination by the Hugging Face team and Inte
56
 
57
  ### How to use
58
 
59
- Here is how to use this model for zero-shot depth estimation on an image:
 
 
 
 
 
 
 
 
 
 
60
 
61
  ```python
62
  from transformers import DPTImageProcessor, DPTForDepthEstimation
 
56
 
57
  ### How to use
58
 
59
+ The easiest is leveraging the pipeline API:
60
+
61
+ ```
62
+ from transformers import pipeline
63
+
64
+ pipe = pipeline(task="depth-estimation", model="Intel/dpt-large")
65
+ result = pipe(image)
66
+ result["depth"]
67
+ ```
68
+
69
+ In case you want to implement the entire logic yourself, here's how to do that for zero-shot depth estimation on an image:
70
 
71
  ```python
72
  from transformers import DPTImageProcessor, DPTForDepthEstimation