Spaces:
Sleeping
Sleeping
Commit
·
ac46e37
1
Parent(s):
7b45f67
Updated stride value
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ def inference(input_img, conf_thres, iou_thres):
|
|
46 |
seen, windows, dt = 0, [], (Profile(), Profile(), Profile())
|
47 |
|
48 |
with dt[0]:
|
49 |
-
im = letterbox(input_img, imgsz, stride=
|
50 |
im = im.transpose((2, 0, 1))[::-1]
|
51 |
im = torch.from_numpy(im).to(model.device)
|
52 |
im = im.half() if model.fp16 else im.float() # uint8 to fp16/32
|
|
|
46 |
seen, windows, dt = 0, [], (Profile(), Profile(), Profile())
|
47 |
|
48 |
with dt[0]:
|
49 |
+
im = letterbox(input_img, imgsz, stride=stride, auto=True)[0] # padded resize
|
50 |
im = im.transpose((2, 0, 1))[::-1]
|
51 |
im = torch.from_numpy(im).to(model.device)
|
52 |
im = im.half() if model.fp16 else im.float() # uint8 to fp16/32
|