AkashDataScience commited on
Commit
dfba72c
·
1 Parent(s): bf039a9
Files changed (1) hide show
  1. app.py +1 -0
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: