简体   繁体   中英

Dataset not found .. Missing Path .. while training the model using yolo v8

code cell-

    from ultralytics import YOLO
    model = YOLO("yolov8n.pt")
    results =  model.train(data="/workspace/awadh/nvidia/apis_mellifera/v8/datasets/Apis_mellifera_IIT_front_view-1/data.yaml", epochs=200, batch=16, imgsz=640)

Error displayed-

/usr/local/lib/python3.8/dist-packages/ultralytics/yolo/data/utils.py in check_dataset_yaml(dataset, autodownload)
    232                 LOGGER.warning(msg)
    233             else:
--> 234                 raise FileNotFoundError(msg)
    235             t = time.time()
    236             if s.startswith('http') and s.endswith('.zip'):  # URL

FileNotFoundError: 
Dataset '/workspace/awadh/nvidia/apis_mellifera/v8/datasets/Apis_mellifera_IIT_front_view-1/data.yaml' not found ⚠️, missing paths ['/workspace/awadh/nvidia/Species_detection/Apis_Mellifera/y8/datasets/Apis_mellifera_IIT_front_view-1/valid/images']

So, the same line of codes are working in google colab but when I am using jupyter it is not working.The dataset is present in the file location and yet this error is coming.

According to the official python usage source, release 8.0.20:

from ultralytics.yolo.engine.model import YOLO

model = YOLO("/path/to/your/model.pt")
results = model.predict(stream=True, source='ultralytics/ultralytics/assets', save=True) # source already setup

This has happened to me on a Cloud GPU Instance using ultralytics 8.0.22. Downgrading to ultralytics 8.0.20 solved the issue for me, running the pytorch/pytorch Docker image.

pip uninstall ultralytics
pip install ultralytics==8.0.20

However, this issue still persists on my local machine running MacOS Ventura (Apple Silicon).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM