Update README.md
Browse files
README.md
CHANGED
@@ -45,8 +45,9 @@ import requests
|
|
45 |
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
46 |
image = Image.open(requests.get(url, stream=True).raw)
|
47 |
|
48 |
-
|
49 |
-
|
|
|
50 |
|
51 |
inputs = processor(images=image, return_tensors="pt")
|
52 |
outputs = model(**inputs)
|
|
|
45 |
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
46 |
image = Image.open(requests.get(url, stream=True).raw)
|
47 |
|
48 |
+
# you can specify the revision tag if you don't want the timm dependency
|
49 |
+
processor = DetrImageProcessor.from_pretrained("facebook/detr-resnet-50", revision="no_timm")
|
50 |
+
model = DetrForObjectDetection.from_pretrained("facebook/detr-resnet-50", revision="no_timm")
|
51 |
|
52 |
inputs = processor(images=image, return_tensors="pt")
|
53 |
outputs = model(**inputs)
|