pseudo labeling bug fix

This commit is contained in:
Glenn Jocher 2020-05-17 19:28:06 -07:00
parent 316d99c377
commit 5b572681ff
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ def detect(save_img=False):
save_path = str(Path(out) / Path(p).name) save_path = str(Path(out) / Path(p).name)
s += '%gx%g ' % img.shape[2:] # print string s += '%gx%g ' % img.shape[2:] # print string
gn = torch.tensor(im0s.shape)[[1, 0, 1, 0]] #  normalization gain whwh gn = torch.tensor(im0.shape)[[1, 0, 1, 0]] #  normalization gain whwh
if det is not None and len(det): if det is not None and len(det):
# Rescale boxes from imgsz to im0 size # Rescale boxes from imgsz to im0 size
det[:, :4] = scale_coords(img.shape[2:], det[:, :4], im0.shape).round() det[:, :4] = scale_coords(img.shape[2:], det[:, :4], im0.shape).round()