ValueError: cannot reshape array of size 588196 into shape (512,256,3,3)
I want to convert my darknet weights to tensorflow. when I use the command :
python save_model.py --weights ./data/yolov4-tier_last.weights --output ./checkpoints/yolov4-320 --input_size 320 --model yolov4
And I get the error
And I have changed the input size of picture to 320 in convert_tflite.py. But it still shows that shape 512x256x3x3.
And I have changed the coco.names to one class(person) according to some solutions but it doesn't work.
Isn't there anything I miss, please let me know
到core資料夾 -> config.py -> __C.YOLO.CLASSES 換成你的obj.names
This type of shape error occurs when you try to convert the yolov4 version other than the default i.e. on the AlexAB repository. It causes a mismatch in weights and the TensorFlow model written in this repo. So try to custom train (or use the default) weights according to AlexAB repository... Don't modify the model or you have to make the same modifications in the TensorFlow model in this repository....
@immuhammadadil any idea of how to convert a darknet model to tflite after we change its structure, using this repository. Is it possible? I have the new .weights and .cfg file Thanks
@immuhammadadil Hi, Did you have any idea about the issue :https://github.com/hunglc007/tensorflow-yolov4-tflite/issues/422? I have stuck by conversion of separable depthwise convoution. If you have any ideas, please give me some advice, tks.