Keras-yolo3: AssertionError: class id must be less than num_classes

Created on 30 Jul 2018  路  3Comments  路  Source: qqwweee/keras-yolo3

I am getting following error when running train.py

...model.py", line 248, in preprocess_true_boxes
assert (true_boxes[..., 4] AssertionError: class id must be less than num_classes

Most helpful comment

In my case, it was the label in train.txt starting with 1 that cause the problem. When I changed the label starting with 0, the error disappear.

All 3 comments

was this issue solved? How was it done. I am getting the same issue

In my case, it was the label in train.txt starting with 1 that cause the problem. When I changed the label starting with 0, the error disappear.

I got the same issue too. It turns out num_classes that I listed in model_data folder is less than what I have in my label, which is incorrect. You should check your labels.

Was this page helpful?
0 / 5 - 0 ratings