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

训练自己的数据集时报错IndexError: index 5 is out of bounds for axis 0 with size 1 #595

Open
plantplant opened this issue Feb 2, 2021 · 0 comments

Comments

@plantplant
Copy link

作者你好,我的数据集里有多张图片,且图片尺寸是不一样的,有的尺寸是1551512,有的是1192512,以前使用darknet可以放在一起训练,将darknet的.cfg文件配置为“‘’”width=1280 height=512”。 使用tensorflow-yolov3训练时,报错:
=> Now it starts to train YOLOV3 from scratch ...
0%| | 0/2 [00:00<?, ?it/s]
Traceback (most recent call last):
File "train.py", line 184, in
if name == 'main': YoloTrain().train()
File "train.py", line 144, in train
for train_data in pbar:
File "D:\install\anaconda\envs\pycharm\lib\site-packages\tqdm\std.py", line 11
66, in iter
for obj in iterable:
File "F:\tensorflow-yolov3-master\core\dataset.py", line 82, in next
label_sbbox, label_mbbox, label_lbbox, sbboxes, mbboxes, lbboxes = self.prep
rocess_true_boxes(bboxes)
File "F:\tensorflow-yolov3-master\core\dataset.py", line 224, in preprocess_tr
ue_boxes
onehot[bbox_class_ind] = 1.0
IndexError: index 5 is out of bounds for axis 0 with size 1
该怎么解决这个error?需要到哪里修改什么吗?

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