mirror of https://github.com/WongKinYiu/yolov7.git
minor fix
parent
894a93e318
commit
2596994f39
|
@ -73,7 +73,7 @@ def detect(save_img=False):
|
|||
|
||||
# Inference
|
||||
t1 = time_synchronized()
|
||||
pred = model(img, augment=opt.augment)
|
||||
pred = model(img, augment=opt.augment)[0]
|
||||
|
||||
# Apply NMS
|
||||
pred = non_max_suppression(pred, opt.conf_thres, opt.iou_thres, classes=opt.classes, agnostic=opt.agnostic_nms)
|
||||
|
|
|
@ -59,7 +59,7 @@ class Detect(nn.Module):
|
|||
y = torch.cat((xy, wh, y[..., 4:]), -1)
|
||||
z.append(y.view(bs, -1, self.no))
|
||||
|
||||
return x if self.training else torch.cat(z, 1)
|
||||
return x if self.training else (torch.cat(z, 1), x)
|
||||
|
||||
@staticmethod
|
||||
def _make_grid(nx=20, ny=20):
|
||||
|
|
Loading…
Reference in New Issue