Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

数据集标签格式 #21

Open
liuzhan123456 opened this issue Nov 7, 2023 · 6 comments
Open

数据集标签格式 #21

liuzhan123456 opened this issue Nov 7, 2023 · 6 comments

Comments

@liuzhan123456
Copy link

您好,请问一下您数据集标签格式是五点法,还是4点坐标表示法,我用4点坐标表示法进行训练时,提示没有找到标签。
184.0 350.0 944.0 185.0 981.0 355.0 221.0 521.0 1 0这是我其中一个标签
部分报错
train: WARNING: Ignoring corrupted image and/or label data/ship-hrsc/train/images/100001680.jpg: The DType <class 'numpy._IntegerAbstractDType'> could not be promoted by <class 'numpy.dtypes.StrDType'>. This means that no common DType exists for the given inputs. For example they cannot be stored in a single array unless the dtype is object. The full list of DTypes is: (<class 'numpy._IntegerAbstractDType'>, <class 'numpy.dtypes.StrDType'>)
train: Scanning 'data/ship-hrsc/train/labelTxt' images and labels... 617 found, 0 missing, 0 empty, 617 corrupted: 100%|█| 617/617
train: New cache created: data/ship-hrsc/train/labelTxt.cache
Traceback (most recent call last):
File "/T2021069/YOLOv7cfg/train.py", line 618, in
train(hyp, opt, device, tb_writer)
File "/T2021069/YOLOv7cfg/train.py", line 247, in train
dataloader, dataset = create_dataloader(train_path, imgsz, batch_size, gs, opt, names,
File "/T2021069/YOLOv7cfg/utils/datasets.py", line 70, in create_dataloader
dataset = LoadImagesAndLabels(path, names, imgsz, batch_size,
File "/T2021069/YOLOv7cfg/utils/datasets.py", line 409, in init
labels, shapes, self.segments = zip(*cache.values())
ValueError: not enough values to unpack (expected 3, got 0)

@lx-cly
Copy link
Owner

lx-cly commented Nov 7, 2023

Yolov7-OBB labels require 10 columns, which same as DOTA Dataset.也就是4点坐标+类别+难易程度。
ValueError: not enough values to unpack (expected 3, got 0) 就是你的cache文件中,没有一个有效标签。

@liuzhan123456
Copy link
Author

好的,谢谢大哥,但看我数据集也没问题,在另一个yolov7代码也跑通了,想请问一下大哥,我该从哪方面下手排查问题

@lx-cly
Copy link
Owner

lx-cly commented Nov 8, 2023

可以考虑下面的方法排查:

  1. 删除cache文件,然后打断点到utils->datasets.py->cache_labels(函数);
  2. 函数中找到try语句那里,一行一行运行,看看是为什么跳到except中。

@HeiXiaoPi
Copy link

你好,我也遇到了相关的问题,解决了好几天,可否加个QQ一块研究,QQ:3317999280

@hecheng000
Copy link

3317999280

加你了 可以讨论一下

@zzbbzz626
Copy link

好的,谢谢大哥,但看我数据集也没问题,在另一个yolov7代码也跑通了,想请问一下大哥,我该从哪方面下手排查问题

请问你解决这个问题了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants