Update README.md
Browse files
README.md
CHANGED
@@ -39,12 +39,14 @@ Here is how to use this model:
|
|
39 |
from transformers import YolosFeatureExtractor, YolosForObjectDetection
|
40 |
from PIL import Image
|
41 |
import requests
|
42 |
-
|
|
|
43 |
image = Image.open(requests.get(url, stream=True).raw)
|
44 |
feature_extractor = YolosFeatureExtractor.from_pretrained('nickmuchi/yolos-small-rego-plates-detection')
|
45 |
-
model = YolosForObjectDetection.from_pretrained('nickmuchi/yolos-small-
|
46 |
inputs = feature_extractor(images=image, return_tensors="pt")
|
47 |
outputs = model(**inputs)
|
|
|
48 |
# model predicts bounding boxes and corresponding face mask detection classes
|
49 |
logits = outputs.logits
|
50 |
bboxes = outputs.pred_boxes
|
|
|
39 |
from transformers import YolosFeatureExtractor, YolosForObjectDetection
|
40 |
from PIL import Image
|
41 |
import requests
|
42 |
+
|
43 |
+
url = 'https://drive.google.com/uc?id=1p9wJIqRz3W50e2f_A0D8ftla8hoXz4T5'
|
44 |
image = Image.open(requests.get(url, stream=True).raw)
|
45 |
feature_extractor = YolosFeatureExtractor.from_pretrained('nickmuchi/yolos-small-rego-plates-detection')
|
46 |
+
model = YolosForObjectDetection.from_pretrained('nickmuchi/yolos-small-rego-plates-detection')
|
47 |
inputs = feature_extractor(images=image, return_tensors="pt")
|
48 |
outputs = model(**inputs)
|
49 |
+
|
50 |
# model predicts bounding boxes and corresponding face mask detection classes
|
51 |
logits = outputs.logits
|
52 |
bboxes = outputs.pred_boxes
|