Fix float zeros format (#5491)
* Fix float zeros format * 255 to integer
This commit is contained in:
1 parent
8a803f36d3
commit
5866646cc8
16 files changed
+36
-36
No files matched your search
+1
-1
@@ -802,7 +802,7 @@ def apply_classifier(x, model, img, im0):
|
||||
|
||||
im = im[:, :, ::-1].transpose(2, 0, 1) # BGR to RGB, to 3x416x416
|
||||
im = np.ascontiguousarray(im, dtype=np.float32) # uint8 to float32
|
||||
im /= 255.0 # 0 - 255 to 0.0 - 1.0
|
||||
im /= 255 # 0 - 255 to 0.0 - 1.0
|
||||
ims.append(im)
|
||||
|
||||
pred_cls2 = model(torch.Tensor(ims).to(d.device)).argmax(1) # classifier prediction
|
||||
|
||||
Reference in new issue
Block a user