chongkuiqi/S2ANet

正式训练时报错

Opened this issue · 0 comments

Mei118 commented

AssertionError: train: No labels in /media/mjh/F674A9D874A99BBD/DOTA/train/labels.cache. Can not train without labels. See https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data
正式训练时候报出上面这个错误,文件路径并没有错,查到一种解决方法是改变文件目录层级
#└─ mydata

├─ images

│ ├─ test # 下面放测试集图片

│ ├─ train # 下面放训练集图片

│ └─ val # 下面放验证集图片

└─ labels

├─ test # 下面放测试集标签

├─ train # 下面放训练集标签

├─ val # 下面放验证集标签

但是这个文件目录层级与README中不同,我试了一下报出了这个错误
Exception: train: Error loading data from /home/mjh/文档/DOTA/images/train : train: /home/mjh/文档/DOTA/images/train does not exist
See https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data
我参考这篇博客,修改了一下https://blog.csdn.net/weixin_46085845/article/details/127903878
运行过后报错为
File "/home/mjh/文档/S2ANet-main/utils/general.py", line 415, in check_dataset
raise Exception('Dataset not found.')
Exception: Dataset not found.
找不到数据集位置了,请问有什么解决方法吗