fix batch inference bug (#413)

pull/415/head
RangiLyu 2022-12-29 17:18:54 +08:00 committed by GitHub
parent 99af3c980f
commit cdc359c2de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -365,7 +365,7 @@ class YOLOv5Head(BaseDenseHead):
]
flatten_objectness = torch.cat(flatten_objectness, dim=1).sigmoid()
else:
flatten_objectness = [None for _ in range(len(featmap_sizes))]
flatten_objectness = [None for _ in range(num_imgs)]
results_list = []
for (bboxes, scores, objectness,