Update README.md
Browse files
README.md
CHANGED
|
@@ -50,7 +50,7 @@ outputs = model(**inputs)
|
|
| 50 |
# Target image sizes (height, width) to rescale box predictions [batch_size, 2]
|
| 51 |
target_sizes = torch.Tensor([image.size[::-1]])
|
| 52 |
# Convert outputs (bounding boxes and class logits) to COCO API
|
| 53 |
-
results = processor.
|
| 54 |
|
| 55 |
i = 0 # Retrieve predictions for the first image for the corresponding text queries
|
| 56 |
text = texts[i]
|
|
|
|
| 50 |
# Target image sizes (height, width) to rescale box predictions [batch_size, 2]
|
| 51 |
target_sizes = torch.Tensor([image.size[::-1]])
|
| 52 |
# Convert outputs (bounding boxes and class logits) to COCO API
|
| 53 |
+
results = processor.post_process_object_detection(outputs=outputs, target_sizes=target_sizes)
|
| 54 |
|
| 55 |
i = 0 # Retrieve predictions for the first image for the corresponding text queries
|
| 56 |
text = texts[i]
|