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

有关于自定义coco格式数据集进行训练的问题 #49

Open
mortal-Zero opened this issue Aug 9, 2021 · 1 comment
Open

有关于自定义coco格式数据集进行训练的问题 #49

mortal-Zero opened this issue Aug 9, 2021 · 1 comment

Comments

@mortal-Zero
Copy link

您好,请问一下,在tools下的cocotools.py文件中的clsid2catid和catid2clsid两个字典代表什么?
我在使用自己定义的coco标注格式的数据集进行训练时遇到以下的报错,看起来像是因为数据信息造成的。

我的环境是这样的:
操作系统 Ubuntu 18.04
gcc版本 7.5.0
tensorflow 1.14
keras 2.2.5
cuda 10.1
cudnn 7.6.5

然后,我制作的coco数据集有四类标签,catid分别是1,2,3,4。

loading annotations into memory...
Done (t=0.14s)
creating index...
index created!
Traceback (most recent call last):
File "train.py", line 248, in
train_dataset, train_img_ids, _catid2clsid, cfg.train_pre_path)
File "/home/mortal/ETOP/Document_Layout_Analysis/keras_yolov4/tools/data_process.py", line 60, in data_clean
gt_class[i][0] = catid2clsid[catid]
KeyError: 4

@mortal-Zero
Copy link
Author

如果您方便,麻烦您解答一下,非常感谢。

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

1 participant