def parse_opt():
parser.add_argument('--source', type=str, default='/home/fly100/fsdownload/01_014', help='file/dir/URL/glob, 0 for webcam')
运行输出:
detect: weights=yolov5s.pt, source=/home/fly100/fsdownload/01_014, data=data/coco128.yaml, imgsz=[640, 640], conf_thres=0.25, iou_thres=0.45, max_det=1000, device=, view_img=False, save_txt=False, save_conf=False, save_crop=False, nosave=False, classes=None, agnostic_nms=False, augment=False, visualize=False, update=False, project=runs/detect, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False
YOLOv5 2022-5-20 torch 1.12.1+cu102 CPU
Fusing layers...
YOLOv5s summary: 213 layers, 7225885 parameters, 0 gradients
image 1/265 /home/fly100/fsdownload/01_014/000.jpg: 384x640 2 persons, 1 frisbee, Done. (0.466s)
……
image 265/265 /home/fly100/fsdownload/01_014/264.jpg: 384x640 3 persons, 2 frisbees, Done. (0.121s)
Speed: 1.8ms pre-process, 141.0ms inference, 0.9ms NMS per image at shape (1, 3, 640, 640)
Results saved to runs/detect/exp
parser.add_argument('--name', default='exp', help='save results to project/name')
parser.add_argument(‘–save-txt’, default= True , help=‘save results to *.txt’)
设置保存之后在文件夹下会有labels的文件夹