Skip to content

Commit 2a38df2

Browse files
committed
add squeeze to boxes
1 parent d64bd3d commit 2a38df2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ def evaluate(model, data_loader, cfg, device, logger=None, **kwargs):
493493
for img, target, (boxes, confs) in zip(images, targets, outputs):
494494
img_height, img_width = img.shape[:2]
495495
# boxes = output[...,:4].copy() # output boxes in yolo format
496-
boxes = boxes.cpu().detach().numpy()
496+
boxes = boxes.squeeze(2).cpu().detach().numpy()
497497
boxes[...,:2] = boxes[...,:2] - boxes[...,2:]/2 # to coco format
498498
boxes[...,0] = boxes[...,0]*img_width
499499
boxes[...,1] = boxes[...,1]*img_height

0 commit comments

Comments
 (0)