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

训练自己的数据集 #25

Open
Free-ToT opened this issue Jul 22, 2024 · 1 comment
Open

训练自己的数据集 #25

Free-ToT opened this issue Jul 22, 2024 · 1 comment
Labels
question Further information is requested

Comments

@Free-ToT
Copy link

Free-ToT commented Jul 22, 2024

Question

官方数据集结构为:

coco/
├── train2017/
├── val2017/
└── annotations/
├── instances_train2017.json
└── instances_val2017.json`
json文件存放了所有图片对应的标注信息;

我自己的数据集是每个图片对应一个json文件,结构目录为
coco/
├── train/
├── val/
└── annotations/
├── instances_train
├── 1.json
├── 2.json
├── instances_val
└── a.json
└── a.json

怎么修改原来的代码呢?

补充信息

@Free-ToT Free-ToT added the question Further information is requested label Jul 22, 2024
@xiuqhou
Copy link
Owner

xiuqhou commented Jul 22, 2024

我们用的COCO数据集格式,大部分检测框架都支持这种格式,评测代码是用的pycocotools包也只支持COCO格式。所以建议参考COCO格式重新组织自己的数据集,而不是根据数据集来修改代码。

看您的数据集标注文件是".json",如果是用labelme软件标注的,可以用labelme提供的脚本将格式转换成COCO格式:

https://github.com/labelmeai/labelme/tree/main/examples/instance_segmentation

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

No branches or pull requests

2 participants