Update README.md
Browse files
README.md
CHANGED
@@ -48,7 +48,7 @@ outputs = model(**inputs)
|
|
48 |
|
49 |
# convert outputs (bounding boxes and class logits) to Pascal VOC format (xmin, ymin, xmax, ymax)
|
50 |
target_sizes = torch.tensor([image.size[::-1]])
|
51 |
-
results = image_processor.post_process_object_detection(outputs, threshold=0.
|
52 |
for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
|
53 |
box = [round(i, 2) for i in box.tolist()]
|
54 |
print(
|
|
|
48 |
|
49 |
# convert outputs (bounding boxes and class logits) to Pascal VOC format (xmin, ymin, xmax, ymax)
|
50 |
target_sizes = torch.tensor([image.size[::-1]])
|
51 |
+
results = image_processor.post_process_object_detection(outputs, threshold=0.7, target_sizes=target_sizes)[0]
|
52 |
for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
|
53 |
box = [round(i, 2) for i in box.tolist()]
|
54 |
print(
|