|
|
|
|
|
|
|
|
@torch.no_grad() |
|
|
@torch.no_grad() |
|
|
def run(weights=ROOT / 'yolov5s.pt', # model.pt path(s) |
|
|
def run(weights=ROOT / 'yolov5s.pt', # model.pt path(s) |
|
|
source=ROOT / 'data/images', # file/dir/URL/glob, 0 for webcam |
|
|
source=ROOT / 'data/images', # file/dir/URL/glob, 0 for webcam |
|
|
imgsz=640, # inference size (pixels) |
|
|
|
|
|
|
|
|
imgsz=(640, 640), # inference size (height, width) |
|
|
conf_thres=0.25, # confidence threshold |
|
|
conf_thres=0.25, # confidence threshold |
|
|
iou_thres=0.45, # NMS IOU threshold |
|
|
iou_thres=0.45, # NMS IOU threshold |
|
|
max_det=1000, # maximum detections per image |
|
|
max_det=1000, # maximum detections per image |