Traceback (most recent call last):
File "save_model.py", line 58, in <module>
app.run(main)
File "/home/user/.local/lib/python3.6/site-packages/absl/app.py", line 312, in run
_run_main(main, args)
File "/home/user/.local/lib/python3.6/site-packages/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "save_model.py", line 54, in main
save_tf()
File "save_model.py", line 49, in save_tf
utils.load_weights(model, FLAGS.weights, FLAGS.model, FLAGS.tiny)
File "/home/user/Videos/newpro/number-plate/VT-LPR/tensorflow_yolov4_tflite/core/utils.py", line 63, in load_weights
conv_weights = conv_weights.reshape(conv_shape).transpose([2, 3, 1, 0])
ValueError: cannot reshape array of size 4554552 into shape (1024,512,3,3)
Put the single model weights in the "tensorflow_yolov4_tflite/data/" folder and also put "obj.names" file in the "tensorflow_yolov4_tflite/data/classes/" folder.
Edit "tensorflow_yolov4_tflite/core/config.py" file -->> Line 14 to -->> "./data/classes/obj.names"
Make sure to install all the required libraries as mentioned in requirements.txt
opencv-python==4.1.1.26
lxml
tqdm
tensorflow==2.3.0rc0
absl-py
easydict
matplotlib
pillow
You can install using PIP Package. For example pip install easydict
Now run this command:
python save_model.py --weights ./data/yolov4_custom_last.weights --output ./checkpoints/custom-416 --input_size 416 --model yolov4
You will find the converted model in:
tensorflow_yolov4_tflite\checkpoints\custom-416 folder.
Trying to convert custom model for License Plate
@usama-x930
can you please help me out ?