Skip to content

Commit

Permalink
Merge branch 'master' into fix_auroc
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda authored Nov 8, 2021
2 parents 13e84e6 + 7161bb6 commit 9b3af99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchmetrics/detection/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def _get_coco_format(
annotations = []
annotation_id = 1 # has to start with 1, otherwise COCOEval results are wrong

boxes = [box_convert(box, in_fmt="xyxy", out_fmt="xywh") if boxes[0].size(1) == 4 else box for box in boxes]
boxes = [box_convert(box, in_fmt="xyxy", out_fmt="xywh") if box.size(1) == 4 else box for box in boxes]
for image_id, (image_boxes, image_labels) in enumerate(zip(boxes, labels)):
image_boxes = image_boxes.cpu().tolist()
image_labels = image_labels.cpu().tolist()
Expand Down

0 comments on commit 9b3af99

Please sign in to comment.