I use the DOTA dataset (15 classes)
when i run train.py, appear
Traceback (most recent call last):
File "train.py", line 176, in
ap_table += [[c, class_names[c], "%.5f" % AP[i]]]
IndexError: list index out of range
Why is that?
Thank U
solved. Because the last line of the names file is missing a newline.
Thank you
@Adoreee Hello, I have the same problem but I don't know what you mean?How exactly did you change it?thanks!
@Adoreee Hello, I have the same problem but I don't know what you mean?How exactly did you change it?thanks!
Add a "\n" to the last line of *.names
@Adoreee Thank you very much!
add check code can solve?
if c < len(class_names):
ap_table += [[c, class_names[c], "%.5f" % AP[i]]]
else:
print("!!! invalid class index:", c)
Most helpful comment
solved. Because the last line of the names file is missing a newline.
Thank you