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

自定义数据集,成功导出anchor.npy和img_ann.npy,然后在训练时却发生如下错误 #20

Open
vseasky opened this issue Jul 8, 2020 · 5 comments

Comments

@vseasky
Copy link

vseasky commented Jul 8, 2020

image

@zhen8838
Copy link
Owner

zhen8838 commented Jul 8, 2020

应该是数据集类别数量和训练时指定的类别数量不同导致的。你可以将自定义数据集做成voc的格式,这样防止自定义数据集时写代码处理出错的可能性。

@BackMountainDevil
Copy link

蹲一下后续。我用公开的数据(http://faculty.neu.edu.cn/songkechen/zh_CN/zdylm/263270/list/index.htm),六类数据

修改了参数 CLSNUM=6 ,莫非是我其它参数没改?

make anchors DATASET=voc ANCNUM=3 LOW="0.0 0.0" HIGH="0.7 0.8"
# 正常出图

make train MODEL=yolo_mobilev1 DEPTHMUL=0.75 MAXEP=10 ILR=0.001 DATASET=voc CLSNUM=6 IAA=False BATCH=6
# 报错
2022-03-16 23:14:27.857126: W tensorflow/core/framework/op_kernel.cc:1639] Unknown: IndexError: index 24 is out of bounds for axis 3 with size 11
Traceback (most recent call last):

  File "/home/kearney/.conda/envs/k210/lib/python3.7/site-packages/tensorflow_core/python/ops/script_ops.py", line 233, in __call__
    return func(device, token, args)

  File "/home/kearney/.conda/envs/k210/lib/python3.7/site-packages/tensorflow_core/python/ops/script_ops.py", line 122, in __call__
    ret = self._func(*args)

  File "/home/kearney/Downloads/k210/Yolo-for-k210/Yolo-for-k210/tools/utils.py", line 424, in _dataset_parser
    labels = self.box_to_label(true_box)

  File "/home/kearney/Downloads/k210/Yolo-for-k210/Yolo-for-k210/tools/utils.py", line 228, in box_to_label
    labels[l][idy, idx, n, 5 + int(box[0])] = 1.

IndexError: index 24 is out of bounds for axis 3 with size 11


2022-03-16 23:14:27.857297: W tensorflow/core/framework/op_kernel.cc:1639] Unknown: IndexError: index 19 is out of bounds for axis 3 with size 11
Traceback (most recent call last):

  File "/home/kearney/.conda/envs/k210/lib/python3.7/site-packages/tensorflow_core/python/ops/script_ops.py", line 233, in __call__
    return func(device, token, args)

  File "/home/kearney/.conda/envs/k210/lib/python3.7/site-packages/tensorflow_core/python/ops/script_ops.py", line 122, in __call__
    ret = self._func(*args)

  File "/home/kearney/Downloads/k210/Yolo-for-k210/Yolo-for-k210/tools/utils.py", line 424, in _dataset_parser
    labels = self.box_to_label(true_box)

  File "/home/kearney/Downloads/k210/Yolo-for-k210/Yolo-for-k210/tools/utils.py", line 228, in box_to_label
    labels[l][idy, idx, n, 5 + int(box[0])] = 1.

IndexError: index 19 is out of bounds for axis 3 with size 11

@zhen8838
Copy link
Owner

zhen8838 commented Mar 17, 2022 via email

@BackMountainDevil
Copy link

BackMountainDevil commented Mar 17, 2022 via email

@BackMountainDevil
Copy link

BackMountainDevil commented Oct 11, 2022 via email

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

3 participants