Skip to content

Commit

Permalink
simple fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SangbumChoi committed Jun 17, 2024
1 parent f165caa commit 20b2c34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/pytorch/object-detection/run_object_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@ def compute_metrics(
# here we will convert them to Pascal VOC format (x_min, y_min, x_max, y_max)
for image_target in batch:
batch_image_sizes.append(image_target["orig_size"])
batch_image_sizes = torch.tensor(batch_image_sizes)
boxes = torch.tensor(image_target["boxes"])
boxes = convert_bbox_yolo_to_pascal(boxes, image_target["orig_size"])
labels = torch.tensor(image_target["class_labels"])
post_processed_targets.append({"boxes": boxes, "labels": labels})
batch_image_sizes = torch.tensor(batch_image_sizes)
image_sizes.append(batch_image_sizes)

# Collect predictions in the required format for metric computation,
Expand Down

0 comments on commit 20b2c34

Please sign in to comment.