Update README.md
Browse files
README.md
CHANGED
@@ -39,6 +39,7 @@ model = AutoModelForZeroShotObjectDetection.from_pretrained(model_id).to(device)
|
|
39 |
image_url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
40 |
image = Image.open(requests.get(image_url, stream=True).raw)
|
41 |
# Check for cats and remote controls
|
|
|
42 |
text = "a cat. a remote control."
|
43 |
|
44 |
inputs = processor(images=image, text=text, return_tensors="pt").to(device)
|
|
|
39 |
image_url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
40 |
image = Image.open(requests.get(image_url, stream=True).raw)
|
41 |
# Check for cats and remote controls
|
42 |
+
# VERY important: text queries need to be lowercased + end with a dot
|
43 |
text = "a cat. a remote control."
|
44 |
|
45 |
inputs = processor(images=image, text=text, return_tensors="pt").to(device)
|