Overriding D:\download\Python39\Lib\site-packages\ultralytics\cfg\default.yaml with ultralytics\cfg\default.yaml
WARNING  'model' is missing. Using default 'model=yolov8n.pt'.
Ultralytics YOLOv8.0.152  Python-3.9.4 torch-1.13.1+cu117 CUDA:0 (NVIDIA GeForce RTX 3050 Laptop GPU, 4096MiB)
WARNING  Upgrade to torch>=2.0.0 for deterministic training.
engine\trainer: task=detect, mode=train, model=yolov8n.pt, data=data.yaml, epochs=100, patience=50, batch=16, imgsz=640, save=True, save_period=-1, cache=False, device=None, workers=4, project=None, name=N
one, exist_ok=False, pretrained=True, optimizer=auto, verbose=True, seed=0, deterministic=True, single_cls=False, rect=False, cos_lr=False, close_mosaic=10, resume=False, amp=True, fraction=1.0, profile=Fa
lse, overlap_mask=True, mask_ratio=4, dropout=0.0, val=True, split=val, save_json=False, save_hybrid=False, conf=None, iou=0.7, max_det=300, half=False, dnn=False, plots=True, source=None, show=False, save
_txt=False, save_conf=False, save_crop=False, show_labels=True, show_conf=True, vid_stride=1, line_width=None, visualize=False, augment=False, agnostic_nms=False, classes=None, retina_masks=False, boxes=Tr
ue, format=torchscript, keras=False, optimize=False, int8=False, dynamic=False, simplify=False, opset=None, workspace=4, nms=False, lr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.
0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=7.5, cls=0.5, dfl=1.5, pose=12.0, kobj=1.0, label_smoothing=0.0, nbs=64, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0,
 perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0, copy_paste=0.0, cfg=None, tracker=botsort.yaml, save_dir=runs\detect\train2
Traceback (most recent call last):
  File "D:\download\Python39\lib\site-packages\ultralytics\engine\trainer.py", line 123, in __init__
    self.data = check_det_dataset(self.args.data)
  File "D:\download\Python39\lib\site-packages\ultralytics\data\utils.py", line 256, in check_det_dataset
    raise FileNotFoundError(m)
FileNotFoundError:
Dataset 'data.yaml' images not found ⚠️, missing path 'F:\download\ultralytics-main\datasets\dataset\images\val'
Note dataset download directory is 'F:\download\ultralytics-main\datasets'. You can update this in 'C:\Users\10636\AppData\Roaming\Ultralytics\settings.yaml'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:\download\Python39\Scripts\yolo-script.py", line 33, in <module>
    sys.exit(load_entry_point('ultralytics==8.0.152', 'console_scripts', 'yolo')())
  File "D:\download\Python39\lib\site-packages\ultralytics\cfg\__init__.py", line 432, in entrypoint
    getattr(model, mode)(**overrides)  # default args from model
  File "D:\download\Python39\lib\site-packages\ultralytics\engine\model.py", line 372, in train
    self.trainer = trainer(overrides=overrides, _callbacks=self.callbacks)
  File "D:\download\Python39\lib\site-packages\ultralytics\engine\trainer.py", line 127, in __init__
    raise RuntimeError(emojis(f"Dataset '{clean_url(self.args.data)}' error ❌ {e}")) from e
RuntimeError: Dataset 'data.yaml' error
Dataset 'data.yaml' images not found , missing path 'F:\download\ultralytics-main\datasets\dataset\images\val'
Note dataset download directory is 'F:\download\ultralytics-main\datasets'. You can update this in 'C:\Users\10636\AppData\Roaming\Ultralytics\settings.yaml'

网上还有很多种解法都没用,最后还是找了chatgpt

 发现可能是配置文件的问题,于是按照步骤一进行文件的更改

 把后面的删掉了,就变成了主目录

随后问题就解决啦

 

Logo

欢迎加入我们的广州开发者社区,与优秀的开发者共同成长!

更多推荐