usama-x930 / VT-LPR

Automatic Toll Tax Collection With Vehicle Type And License Plate Recognition Using Deep Learning
33 stars 12 forks source link

ValueError: cannot reshape array of size 4554552 into shape (1024,512,3,3) #2

Open AIGirl10 opened 2 years ago

AIGirl10 commented 2 years ago

Trying to convert custom model for License Plate

@usama-x930

can you please help me out ?

usama-x930 commented 2 years ago

There are few steps to follow:

  1. First clone this repository.
  2. Download weights from google drive link.
  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.
  4. Edit "tensorflow_yolov4_tflite/core/config.py" file -->> Line 14 to -->> "./data/classes/obj.names"
  5. Make sure to install all the required libraries as mentioned in requirements.txt
  1. 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.

Hope your will problem be solve from this. Thanks