Tiny_yolov4_license_plates missing from model zoo

Hello, I need that model to run the license plate recognition demo, it seems to be missing from the model zoo page.
I tried to compile it using hailomz, but there doesnt seem to be any info on how to download the calibration images.

Commands I tried to run:
hailomz compile tiny_yolov4_license_plates --har tiny_yolov4_license_plates.har --hw-arch hailo8l
Start run for network tiny_yolov4_license_plates …
Initializing the hailo8l runner…
Preparing calibration data…
Traceback (most recent call last):
File “/mnt/ext/home/jribeiro/Dev/hailo_zoo/bin/hailomz”, line 33, in
sys.exit(load_entry_point(‘hailo-model-zoo’, ‘console_scripts’, ‘hailomz’)())
File “/mnt/ext/home/jribeiro/Dev/hailo_model_zoo/hailo_model_zoo/main.py”, line 122, in main
run(args)
File “/mnt/ext/home/jribeiro/Dev/hailo_model_zoo/hailo_model_zoo/main.py”, line 111, in run
return handlersargs.command
File “/mnt/ext/home/jribeiro/Dev/hailo_model_zoo/hailo_model_zoo/main_driver.py”, line 250, in compile
_ensure_optimized(runner, logger, args, network_info)
File “/mnt/ext/home/jribeiro/Dev/hailo_model_zoo/hailo_model_zoo/main_driver.py”, line 88, in _ensure_optimized
calib_feed_callback = prepare_calibration_data(
File “/mnt/ext/home/jribeiro/Dev/hailo_model_zoo/hailo_model_zoo/core/main_utils.py”, line 280, in prepare_calibration_data
calib_feed_callback = make_calibset_callback(network_info, preproc_callback, calib_path)
File “/mnt/ext/home/jribeiro/Dev/hailo_model_zoo/hailo_model_zoo/core/main_utils.py”, line 239, in make_calibset_callback
raise ValueError("Optimization requires calibration data, please modify YAML or use --calib-path "+str(dataset_name))
ValueError: Optimization requires calibration data, please modify YAML or use --calib-path license_plates

Thanks for any pointers.

Hello @j.ribeirovega,

It appears the problem lies in how you’re providing the image dataset. The system requires two separate datasets:

  1. A dataset for training
  2. A dataset for calibration

If you prefer not to use two distinct datasets, you have an alternative option:

You can modify the model’s YAML file to adjust these requirements.

Let me know if you need any guidance on making these changes or if you have any questions about this process

In addition to what @omria said, I would like to add some more info about the calibration dataset. It should consist of at least 64 instances (without label) that represent well what will be used for inference.

If you have re-trained the model, use a few instances from your train set.

But please note that if you are trying to use the tiny_yolov4_license_plates trained by Hailo, you can download the already compiled model from here.

It is what Im trying to do, but the precompiled model is for the hailo8, I need it for the hailo8l. Is a download link available for that? I want to test the precompiled models before training may own with my countrys license plates.

Thank you for reporting this to us.

I have opened a request to have hailo models compiled for Hailo-8L available for download in our ModelZoo.

For now, you can download the tiny_yolov4_license_plates compiled for Hailo-8L here.

1 Like

The link seems to have the wrong permissions, since I am getting an “access denied” error.

I have fixed the link. Please try again, sorry about that.

1 Like

How can I get this model to run on the rpi?
python basic_pipelines/detection.py --labels-json resources/barcode-labels.json --hef resources/tiny_yolov4_license_plates.hef --input resources/detection0.mp4
This doesn’t seem to work!

Error message: “could not link videoconvert0 to hailonet0”

  self.batch_size = 2
    self.network_width = 416
    self.network_height = 416
    self.network_format = "RGB"
    nms_score_threshold = 0.3 
    nms_iou_threshold = 0.45

does yours work now? can you share the code to get the model to run?

Sharing the solution that @victor sent me by dm:

I was able to fix this by changing the shape dimensions to 416x416 for the license plates tiny yolo model

Can you please share a running solution for this example?

We have an example for LPR using GStreamer on tappas: