Fix float zeros format (#5491)

* Fix float zeros format

* 255 to integer
This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-11-03 23:36:53 +01:00
1 parent 8a803f36d3
commit 5866646cc8
16 files changed
+36 -36

No files matched your search

+1 -1
View File
@@ -136,7 +136,7 @@ def run(weights=ROOT / 'yolov5s.pt', # model.pt path(s)
else:
img = torch.from_numpy(img).to(device)
img = img.half() if half else img.float() # uint8 to fp16/32
img /= 255.0 # 0 - 255 to 0.0 - 1.0
img /= 255 # 0 - 255 to 0.0 - 1.0
if len(img.shape) == 3:
img = img[None] # expand for batch dim
t2 = time_sync()