Chesebrough commited on
Commit
e166db4
1 Parent(s): c9a8046

two changes have to made to remove deprecation warning. DPTFeatureExtractor has to be replaced by DPTImageProcessor in two locations

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -36,14 +36,14 @@ 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
 
43
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"
44
  image = Image.open(requests.get(url, stream=True).raw)
45
 
46
- feature_extractor = DPTFeatureExtractor.from_pretrained("Intel/dpt-large-ade")
47
  model = DPTForSemanticSegmentation.from_pretrained("Intel/dpt-large-ade")
48
 
49
  inputs = feature_extractor(images=image, return_tensors="pt")
 
36
  Here is how to use this model:
37
 
38
  ```python
39
+ from transformers import DPTImageProcessor , DPTForSemanticSegmentation
40
  from PIL import Image
41
  import requests
42
 
43
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"
44
  image = Image.open(requests.get(url, stream=True).raw)
45
 
46
+ feature_extractor = DPTImageProcessor.from_pretrained("Intel/dpt-large-ade")
47
  model = DPTForSemanticSegmentation.from_pretrained("Intel/dpt-large-ade")
48
 
49
  inputs = feature_extractor(images=image, return_tensors="pt")