Simplify TF normalized to pixels (#6494)

This commit is contained in:
Glenn Jocher authored and GitHub committed 2022-02-01 21:17:56 +01:00
1 parent 6445a8137e
commit b884ea36c4
1 file changed
+1 -4
+1 -4
View File
@@ -446,10 +446,7 @@ class DetectMultiBackend(nn.Module):
if int8:
scale, zero_point = output['quantization']
y = (y.astype(np.float32) - zero_point) * scale # re-scale
y[..., 0] *= w # x
y[..., 1] *= h # y
y[..., 2] *= w # w
y[..., 3] *= h # h
y[..., :4] *= [w, h, w, h] # xywh normalized to pixels
y = torch.tensor(y) if isinstance(y, np.ndarray) else y
return (y, []) if val else y