Open vseasky opened 4 years ago
应该是数据集类别数量和训练时指定的类别数量不同导致的。你可以将自定义数据集做成voc的格式,这样防止自定义数据集时写代码处理出错的可能性。
蹲一下后续。我用公开的数据(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
检查你生成的数据集label,看看有没有大于6的值。
发自我的iPhone
------------------ 原始邮件 ------------------ 发件人: Kearney @.> 发送时间: 2022年3月16日 23:40 收件人: zhen8838/K210_Yolo_framework @.> 抄送: 郑启航 @.>, Comment @.> 主题: 回复:[zhen8838/K210_Yolo_framework] 自定义数据集,成功导出anchor.npy和img_ann.npy,然后在训练时却发生如下错误 (#20)
蹲一下后续。我用公开的数据(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
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>
我知道错误原因了,我修改了分类数目为6,还修改了makefile里的imagesize,把这个imagesize还原就可以跑了。 虽然很疑惑🤔
From An idea
在 2022年3月17日,09:40,郑启航 @.***> 写道:
检查你生成的数据集label,看看有没有大于6的值。
发自我的iPhone
------------------ 原始邮件 ------------------ 发件人: Kearney @.> 发送时间: 2022年3月16日 23:40 收件人: zhen8838/K210_Yolo_framework @.> 抄送: 郑启航 @.>, Comment @.> 主题: 回复:[zhen8838/K210_Yolo_framework] 自定义数据集,成功导出anchor.npy和img_ann.npy,然后在训练时却发生如下错误 (#20)
蹲一下后续。我用公开的数据(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
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***> — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.
我发现只有五项 0~4,差个5。笑死,我再生成下。 请教下 make anchors ANCNUM 这个参数要从3改成6吗?
From An idea
在 2022年3月17日,09:40,郑启航 @.***> 写道:
检查你生成的数据集label,看看有没有大于6的值。
发自我的iPhone
------------------ 原始邮件 ------------------ 发件人: Kearney @.> 发送时间: 2022年3月16日 23:40 收件人: zhen8838/K210_Yolo_framework @.> 抄送: 郑启航 @.>, Comment @.> 主题: 回复:[zhen8838/K210_Yolo_framework] 自定义数据集,成功导出anchor.npy和img_ann.npy,然后在训练时却发生如下错误 (#20)
蹲一下后续。我用公开的数据(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
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***> — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.