minor fix
This commit is contained in:
parent
894a93e318
commit
2596994f39
@ -73,7 +73,7 @@ def detect(save_img=False):
|
|||||||
|
|
||||||
# Inference
|
# Inference
|
||||||
t1 = time_synchronized()
|
t1 = time_synchronized()
|
||||||
pred = model(img, augment=opt.augment)
|
pred = model(img, augment=opt.augment)[0]
|
||||||
|
|
||||||
# Apply NMS
|
# Apply NMS
|
||||||
pred = non_max_suppression(pred, opt.conf_thres, opt.iou_thres, classes=opt.classes, agnostic=opt.agnostic_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)
|
y = torch.cat((xy, wh, y[..., 4:]), -1)
|
||||||
z.append(y.view(bs, -1, self.no))
|
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
|
@staticmethod
|
||||||
def _make_grid(nx=20, ny=20):
|
def _make_grid(nx=20, ny=20):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user