tensorflow-yolov3 icon indicating copy to clipboard operation
tensorflow-yolov3 copied to clipboard

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

Open plantplant opened this issue 4 years ago • 0 comments

作者你好,我的数据集里有多张图片,且图片尺寸是不一样的,有的尺寸是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?需要到哪里修改什么吗?

plantplant avatar Feb 02 '21 09:02 plantplant