-
Notifications
You must be signed in to change notification settings - Fork 1k
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
训练自己的数据集问题 #76
Comments
老哥你解决了吗?我也是遇到了相同的问题 |
When generate_coco_format_labels, this repo make BUT, when evaluating results, this repo make Then, coco tools will check these So I suggest to modify |
Thanks for your reply! I solve the problem by this way. @ExWang |
so how can I solve it?
2022-06-27 15:05:30"Nebula Wang" ***@***.***>写道:
when generate_coco_format_labels, this repo make img_id by osp.basename(img_path).split('.')[0] in datasets.py. You will get 'str' label.
BUT, when evaluating results, this repo make img_id by 'int(path.stem) if path.stem.isnumeric() else path.stem'. You may get 'int' label.
After, coco tools will check these img_id, so lead this AssertionError
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
|
之前的错误是: 我根据你的方法改了,出现了这个问题 是不是数据集的名字必须是数字吗?不能包含英文吗或者其他字符吗? |
|
no file need to be modified now, some one fix it, pull new repo will slove the problem. |
我看不是必须数字的,最早这个repo生成image_id用的 不过这个不统一的问题好像在最近的一个commit中修复了,pull一下最新的就行 |
Have already pulled the newest commit, but still get the same error: |
@nidetaoge have you fixed the problem? |
将这里的images_id修改后,仍然还是报错。感觉这一块有问题没有完全解决。其中我的环境是: 修改处 报错处 |
1.把datasets.py文件的img_id = int(path.stem) if path.stem.isnumeric() else path.stem改成img_id = path.stem |
Thanks, I made it |
谢谢博主解答,我已经按照提示将datasets.py evaler.py val.py 三个文件中关于image_id的赋值都改成了path.stem |
问题解决了,要记得删掉先前跑数据生成的json文件。 |
不用改源代码,只用一个粗暴的方式解决了:
|
训练前,自己数据集分布和制作方法跟yolov5一样,不需要json格式标签。我参考这个博主的方法训练成功了,https://blog.csdn.net/DeepLearning_/article/details/125511165?spm=1001.2014.3001.5502 |
|
官方已经解决这个问题了,重新下载工程,按照docs/Train_custom_data.md运行即可 |
yaml中只保留train和val,去掉test和anno_path |
成功啦,必须把datasets.py、evaler.py都改了才能运行起来,只改evaler.py文件还是会报错的哟 |
新版的好像datasets.py好像img_id-int()那里改了 |
Evaluating mAP by pycocotools. Training completed in 0.039 hours.
After changing to "image_id = path.stem" now this error appears !! |
This resolved in my case |
AssertionError: Results do not correspond to current coco set
The text was updated successfully, but these errors were encountered: