赞
踩
YOLOV8:FileNotFoundError: train: No labels found in /home/smy/new-yolov5/ultralytic
yolov8FileNotFoundError: train: No labels found in /home/smy/new-yolov5/ultralytic/…/JPEGImages.cache:
raise FileNotFoundError(f'{self.prefix}No labels found in {cache_path}, can not start training. {HELP_URL}')
FileNotFoundError: train: No labels found in /home/smy/new-yolov5/ultralytics-main/data/VOCdevkit/VOC2007/JPEGImages.cache, can not start training. See https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data
}
在/home/smy/anaconda3/envs/yolo/lib/python3.9/site-packages/ultralytics-8.0.51-py3.9.egg/ultralytics/yolo/data/utils.py中修改下列代码
要在环境当中修改!!
其中JPEGImages
要对应的修改为自己的数据文件夹中存放图片的子文件夹名称。具体如下图
def img2label_paths(img_paths):
# Define label paths as a function of image paths
sa, sb = f'{os.sep}JPEGImages{os.sep}', f'{os.sep}labels{os.sep}' # /images/, /labels/ substrings
# sa, sb = f'{os.sep}images{os.sep}', f'{os.sep}labels{os.sep}' # /images/, /labels/ substrings
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。