Open phamngocthanhtrung opened 5 years ago
The problem is at line 80 of util.py.
If you only have one class, the load_class function at util.py will return an empty list instead of a list with one item. It can be fixed by replacing the load_class function in util.py (line 212) with:
def load_classes(namesfile): fp = open(namesfile, "r") names = [i.strip('\n') for i in fp.readlines()] return names
Thanks @TiongSun for your response it actually resolved this error for me!
Hi everyone,
I already have a Cfg-file and weight file for YOLOv3, which I got with Darknet-Framework after the successful training with one class. I wanted to use these files to analyze the performance of Pytorch. Unfortunately, the running of YOLOv3 failed and I got the following error message:
In the detect.py I set the number of classes in 112th line to 1. I also changed the list of class names in the voc.names file to the name of my class. I'd be very happy if you could help me with that.
Best regards