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

how to change code to train single class

Open forwardxu0129 opened this issue 5 years ago • 6 comments

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 "/home/xxq/anaconda3/lib/python3.6/site-packages/tqdm/std.py", line 1081, in iter for obj in iterable: File "/home/xxq/PycharmProjects/untitled/tensorflow-yolov3-master/core/dataset.py", line 82, in next label_sbbox, label_mbbox, label_lbbox, sbboxes, mbboxes, lbboxes = self.preprocess_true_boxes(bboxes) File "/home/xxq/PycharmProjects/untitled/tensorflow-yolov3-master/core/dataset.py", line 205, in preprocess_true_boxes onehot[bbox_class_ind] = 1.0 IndexError: index 14 is out of bounds for axis 0 with size 1

anyone can help me?

forwardxu0129 avatar Oct 21 '19 12:10 forwardxu0129

@YunYang1994

forwardxu0129 avatar Oct 21 '19 12:10 forwardxu0129

修改这个文件就可以。 https://github.com/YunYang1994/tensorflow-yolov3/blob/master/data/classes/coco.names

YunYang1994 avatar Oct 21 '19 16:10 YunYang1994

修改这个文件就可以。 https://github.com/YunYang1994/tensorflow-yolov3/blob/master/data/classes/coco.names dataset.py 205lines onehot[bbox_class_ind] = 1.0 error:index 14 is out of bounds for axis 0 with size 1 咋回事

forwardxu0129 avatar Oct 23 '19 01:10 forwardxu0129

@YunYang1994

forwardxu0129 avatar Oct 23 '19 01:10 forwardxu0129

I have the same error if I try to train single class. (IndexError: index x is out of bounds). The voc_train.txt is like this: ./model/resizedImages/image00001.jpeg 153,221,233,279,0 316,174,392,231,0 227,46,305,103,0 ...

What is the problem?? @YunYang1994

andreeabodea avatar Feb 25 '20 12:02 andreeabodea

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 "/home/xxq/anaconda3/lib/python3.6/site-packages/tqdm/std.py", line 1081, in iter for obj in iterable: File "/home/xxq/PycharmProjects/untitled/tensorflow-yolov3-master/core/dataset.py", line 82, in next label_sbbox, label_mbbox, label_lbbox, sbboxes, mbboxes, lbboxes = self.preprocess_true_boxes(bboxes) File "/home/xxq/PycharmProjects/untitled/tensorflow-yolov3-master/core/dataset.py", line 205, in preprocess_true_boxes onehot[bbox_class_ind] = 1.0 IndexError: index 14 is out of bounds for axis 0 with size 1

anyone can help me?

how to solve the problem ,thanks

Linaom1214 avatar Nov 22 '20 03:11 Linaom1214