Spaces:
Sleeping
Sleeping
Commit
·
dfba72c
1
Parent(s):
bf039a9
Bug fix
Browse files
app.py
CHANGED
@@ -46,6 +46,7 @@ def inference(input_img, conf_thres, iou_thres):
|
|
46 |
|
47 |
with dt[0]:
|
48 |
im = torch.from_numpy(input_img).to(model.device)
|
|
|
49 |
im = im.half() if model.fp16 else im.float() # uint8 to fp16/32
|
50 |
im /= 255 # 0 - 255 to 0.0 - 1.0
|
51 |
if len(im.shape) == 3:
|
|
|
46 |
|
47 |
with dt[0]:
|
48 |
im = torch.from_numpy(input_img).to(model.device)
|
49 |
+
im = im.transpose((2, 0, 1))[::-1]
|
50 |
im = im.half() if model.fp16 else im.float() # uint8 to fp16/32
|
51 |
im /= 255 # 0 - 255 to 0.0 - 1.0
|
52 |
if len(im.shape) == 3:
|