Fix `imgsz` bug (#5948)
Browse files* fix imgsz bug
* Update detect.py
Co-authored-by: Glenn Jocher <[email protected]>
detect.py
CHANGED
@@ -38,7 +38,7 @@ from utils.torch_utils import select_device, time_sync
|
|
38 |
@torch.no_grad()
|
39 |
def run(weights=ROOT / 'yolov5s.pt', # model.pt path(s)
|
40 |
source=ROOT / 'data/images', # file/dir/URL/glob, 0 for webcam
|
41 |
-
imgsz=640, # inference size (
|
42 |
conf_thres=0.25, # confidence threshold
|
43 |
iou_thres=0.45, # NMS IOU threshold
|
44 |
max_det=1000, # maximum detections per image
|
|
|
38 |
@torch.no_grad()
|
39 |
def run(weights=ROOT / 'yolov5s.pt', # model.pt path(s)
|
40 |
source=ROOT / 'data/images', # file/dir/URL/glob, 0 for webcam
|
41 |
+
imgsz=(640, 640), # inference size (height, width)
|
42 |
conf_thres=0.25, # confidence threshold
|
43 |
iou_thres=0.45, # NMS IOU threshold
|
44 |
max_det=1000, # maximum detections per image
|