hunglc007 / tensorflow-yolov4-tflite

YOLOv4, YOLOv4-tiny, YOLOv3, YOLOv3-tiny Implemented in Tensorflow 2.0, Android. Convert YOLO v4 .weights tensorflow, tensorrt and tflite
https://github.com/hunglc007/tensorflow-yolov4-tflite
MIT License
2.24k stars 1.24k forks source link

utils.load_weights doesn't work for custom number of classes #449

Open D10752002 opened 2 years ago

D10752002 commented 2 years ago

Loading yolov4.weights for 80 classes works fine but I wanted to use yolov4.conv.137 for the custom number of classes (as this is available in the official darknet repo for training for the custom number of classes, I read that this weights file contains the weights for the layers except for the Yolo layer), but it doesn't work and gives all outputs as nan. Any suggestions on how to modify the utils.load_weights function so that I can load this file?

ahoereth commented 1 year ago

Related: #180 & #181