Skip to content

Commit

Permalink
fix shape bug when rect eval
Browse files Browse the repository at this point in the history
  • Loading branch information
shensheng272 authored Sep 19, 2022
1 parent 2bae8a9 commit 8a3dc21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yolov6/core/evaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ def predict_model(self, model, dataloader, task):

# target boxes
tbox = xywh2xyxy(labels[:, 1:5])
tbox[:, [0, 2]] *= imgs[si].shape[1:][0]
tbox[:, [1, 3]] *= imgs[si].shape[1:][1]
tbox[:, [0, 2]] *= imgs[si].shape[1:][1]
tbox[:, [1, 3]] *= imgs[si].shape[1:][0]

self.scale_coords(imgs[si].shape[1:], tbox, shapes[si][0], shapes[si][1]) # native-space labels

Expand Down

0 comments on commit 8a3dc21

Please sign in to comment.