当前位置:   article > 正文

Yolov8执行时FileNotFoundError的问题_upgrade to torch>=2.0.0 for deterministic training

upgrade to torch>=2.0.0 for deterministic training.
  1. Overriding D:\download\Python39\Lib\site-packages\ultralytics\cfg\default.yaml with ultralytics\cfg\default.yaml
  2. WARNING 'model' is missing. Using default 'model=yolov8n.pt'.
  3. Ultralytics YOLOv8.0.152 Python-3.9.4 torch-1.13.1+cu117 CUDA:0 (NVIDIA GeForce RTX 3050 Laptop GPU, 4096MiB)
  4. WARNING Upgrade to torch>=2.0.0 for deterministic training.
  5. 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
  6. 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
  7. 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
  8. _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
  9. 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.
  10. 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,
  11. 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
  12. Traceback (most recent call last):
  13. File "D:\download\Python39\lib\site-packages\ultralytics\engine\trainer.py", line 123, in __init__
  14. self.data = check_det_dataset(self.args.data)
  15. File "D:\download\Python39\lib\site-packages\ultralytics\data\utils.py", line 256, in check_det_dataset
  16. raise FileNotFoundError(m)
  17. FileNotFoundError:
  18. Dataset 'data.yaml' images not found ⚠️, missing path 'F:\download\ultralytics-main\datasets\dataset\images\val'
  19. Note dataset download directory is 'F:\download\ultralytics-main\datasets'. You can update this in 'C:\Users\10636\AppData\Roaming\Ultralytics\settings.yaml'
  20. The above exception was the direct cause of the following exception:
  21. Traceback (most recent call last):
  22. File "D:\download\Python39\Scripts\yolo-script.py", line 33, in <module>
  23. sys.exit(load_entry_point('ultralytics==8.0.152', 'console_scripts', 'yolo')())
  24. File "D:\download\Python39\lib\site-packages\ultralytics\cfg\__init__.py", line 432, in entrypoint
  25. getattr(model, mode)(**overrides) # default args from model
  26. File "D:\download\Python39\lib\site-packages\ultralytics\engine\model.py", line 372, in train
  27. self.trainer = trainer(overrides=overrides, _callbacks=self.callbacks)
  28. File "D:\download\Python39\lib\site-packages\ultralytics\engine\trainer.py", line 127, in __init__
  29. raise RuntimeError(emojis(f"Dataset '{clean_url(self.args.data)}' error ❌ {e}")) from e
  30. RuntimeError: Dataset 'data.yaml' error
  31. Dataset 'data.yaml' images not found , missing path 'F:\download\ultralytics-main\datasets\dataset\images\val'
  32. Note dataset download directory is 'F:\download\ultralytics-main\datasets'. You can update this in 'C:\Users\10636\AppData\Roaming\Ultralytics\settings.yaml'

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

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

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

随后问题就解决啦

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/618057
推荐阅读
相关标签
  

闽ICP备14008679号