B4A Library ANPR with YOLOv8 + OCR (B4A) – rectangles OK, OCR optimized

Hi everyone,
I'm working on an ANPR (license plate recognition) project in B4A using:
CamEx2 for the camera
YOLOv8 (TensorFlow Lite) via a custom Java wrapper
ML Kit TextRecognizer (Latin) for OCR
Currently:
✔️ License plate detection is working correctly
✔️ The red rectangle is aligned with the preview
✔️ The license plate is cropped correctly
✔️ I've implemented simple tracking to avoid continuous OCR
I've optimized the OCR so that it only runs when the license plate is stable for a few frames, to improve performance and reduce latency.
The link is below.
, , , ,
 

Attachments

  • YoloAnpl0.zip
    12.4 KB · Views: 44
  • YOLOv8ANPR.zip
    4.7 KB · Views: 46
I keep getting this error during compile process. Any idea why? I have already added tensorflow-lite-api-2.9.0 and tensorflow-lite-2.9.0 to b4x libraries folder :
[IDE message - 9:43:46]
An error occurred.
Failed to create zip file: Could not find file 'C:\Users\....\Downloads\YoloAnpl0\B4A/Files/best_float16.tflite'.
 

Johan Schoeman

Expert
Licensed User
Longtime User
I keep getting this error during compile process. Any idea why? I have already added tensorflow-lite-api-2.9.0 and tensorflow-lite-2.9.0 to b4x libraries folder :
Just a guess. The file was deleted when you compiled the b4a project as it (property) was not set to read only....? I have not downloaded it or tried it - just a guess. Looks like you are missing a font (best_float16.tflite). See if you can find it on the web and add it to your b4a project's /Files folder. Guess is it was not added to the Files tab when project was exported to a zip.
 

Sia Kong Lam

Member
Licensed User
Longtime User
Ciao, per funzionare deve essere in versione release, i file sono troppo grandi, è tutto su Google Drive
1770512768372.png

Can't access your shared Google Drive. tq
 
Just a guess. The file was deleted when you compiled the b4a project as it (property) was not set to read only....? I have not downloaded it or tried it - just a guess. Looks like you are missing a font (best_float16.tflite). See if you can find it on the web and add it to your b4a project's /Files folder. Guess is it was not added to the Files tab when project was exported to a zip.
Thank you, but my understanding is that float16.tflite is the float16 quantization of Tensor flow Lite model.
 

Johan Schoeman

Expert
Licensed User
Longtime User
Thank you, but my understanding is that float16.tflite is the float16 quantization of Tensor flow Lite model.
You are correct but it nevertheless seems to be missing from your project's /Files folder
 

roberto64

Active Member
Licensed User
Longtime User
I removed it simply because the zipped package was too large. The project with the missing file is in the Google Driver. However, I had to create the float16.tflite file from scratch, specifying the image coordinates. Best regards.
 
Top