Instructions to use Intel/dpt-large-ade with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Intel/dpt-large-ade with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-segmentation", model="Intel/dpt-large-ade")# Load model directly from transformers import AutoImageProcessor, DPTForSemanticSegmentation processor = AutoImageProcessor.from_pretrained("Intel/dpt-large-ade") model = DPTForSemanticSegmentation.from_pretrained("Intel/dpt-large-ade") - Inference
- Notebooks
- Google Colab
- Kaggle
Change usage code to avoid deprecated DPTFeatureExtractor --> DPTImageProcessor
#3
by Chesebrough - opened
README.md
CHANGED
|
@@ -36,7 +36,8 @@ fine-tuned versions on a task that interests you.
|
|
| 36 |
Here is how to use this model:
|
| 37 |
|
| 38 |
```python
|
| 39 |
-
from transformers import DPTFeatureExtractor, DPTForSemanticSegmentation
|
|
|
|
| 40 |
from PIL import Image
|
| 41 |
import requests
|
| 42 |
|
|
|
|
| 36 |
Here is how to use this model:
|
| 37 |
|
| 38 |
```python
|
| 39 |
+
#from transformers import DPTFeatureExtractor, DPTForSemanticSegmentation # Deprecated
|
| 40 |
+
from transformers import DPTImageProcessor , DPTForSemanticSegmentation
|
| 41 |
from PIL import Image
|
| 42 |
import requests
|
| 43 |
|