Open ghurtado1097 opened 5 years ago
Did you make sure your that the NEW classes and anchors files are being loaded in the yolo script?
Hey, I have the same problem, however I loaded the anchor files and new classes only in train.py and not yolo.py. Probably, it used the default values from yolo , IDK.
@ghurtado1097 , Did you figure out anything about it ?
I have the same problem. Anyone with a solution?
@2008hsk , For me the problem was with classes.txt file (file with classes). Make sure your file has only as many number of lines as number of classes. Also, Load this file in ''yolo.py" as classes_path. I hope it works for you as well.
My classes file have only as many numbers of lines as number of classes. I also changed path in the yolo script. But again it gives me the same mismatch error.
Hi, I manually changed the path to new trained weights file in model_path
_defaults = {
"model_path": 'model_data/yolo.h5',
"model_path": 'model_data/trained_weights_final.h5', "anchors_path": 'model_data/yolo_anchors.txt', "classes_path": 'model_data/camry.txt', "score" : 0.3, "iou" : 0.45, "model_image_size" : (416, 416), "gpu_num" : 1, }
This worked for me and was able to make custom detections
I have a question about "model_image_size" : (416, 416), what is the height and the width? Because I need to train with width:832 x 1248:height and i dont know how to write correctly in the file. Any help?
I am trying to train the converted YOLOv3 model with pretrained weights and by using my own class (single class inside the file classes.txt) and my own anchors created with kmeans.py.
However after successful training, running YOLO on a single image, I get a mismatch error: "Mismatch between model and given anchor and class sizes". It is not clear to me and also missing from the documentation where the mismatch results. If I use pretrained weights and train on my own dataset, aren't the last fully connected layers of the model adapted to the new dataset in terms of output units, image width/height?