Blue Iris and CodeProject.AI ALPR

Damn... I might invest in a NVIDIA card if you guys are getting that kind of speed... I wish the Google TPUs supported the license plate reader. I wonder how that would fair..
 
Hey @MikeLud1, the updated LPR modules are working well for me except for the space it sometimes inserts into the plate interpretation. The space seems to show up randomly and prevents alerts when it does. Is there a way to turn that off, or can that space be removed from the module in a future update?
 
Hey @MikeLud1, the updated LPR modules are working well for me except for the space it sometimes inserts into the plate interpretation. The space seems to show up randomly and prevents alerts when it does. Is there a way to turn that off, or can that space be removed from the module in a future update?
Spaces should not impact alerts, post a screenshot of your camera AI settings. Also I will look into removing the spaces.
 
Spaces should not impact alerts, post a screenshot of your camera AI settings. Also I will look into removing the spaces.
Okay thanks. I did a work around in the required AI objects criteria section and listed the same plates also with the spaces (123ABC and 123 ABC), and now it seems to work. Or maybe it was a fluke when it didn't alert before.

One other thing the space impacts is the search feature in the BI alerts. For example, if it records a spaced plate and you search for the standard plate, it doesn't find it in the search results.

It would be great if BI would add a more robust search feature at some point that pulls data from more than the alert logs, which for me run only a few days.
 
It would be great if BI would add a more robust search feature at some point that pulls data from more than the alert logs, which for me run only a few days.

It's not too hard to push all the LPR data to an external database. I'm running Node Red on my Blue Iris machine and MySQL on a Raspberry Pi to do this, but if you have enough CPU horsepower everything could be run on the one BI machine. I have searchable tag data and alert images back to November 1st 2022. (I'll probably need to set up something to clean up the old data at some point.) I also set up a flow in Node Red that lets me send alerts based on both exact tag matches and partial tag matches.

See this thread: Node Red Dashboard for Blue Iris ALPR
 
17:58:32:ALPR_adapter.py: Traceback (most recent call last):
17:58:32:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR_adapter.py", line 16, in
17:58:32:ALPR_adapter.py: from ALPR import init_detect_platenumber, detect_platenumber
17:58:32:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR.py", line 19, in
17:58:32:ALPR_adapter.py: from paddleocr import PaddleOCR
17:58:32:ALPR_adapter.py: ImportError: cannot import name 'PaddleOCR' from 'paddleocr' (unknown location)

I put in a newer GPU today hoping this would help. I reinstalled CPAI, version 2.4.7. I get the above install error and ALPR isnt detecting plates, just timing out on CP.AI explorer
 
17:58:32:ALPR_adapter.py: Traceback (most recent call last):
17:58:32:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR_adapter.py", line 16, in
17:58:32:ALPR_adapter.py: from ALPR import init_detect_platenumber, detect_platenumber
17:58:32:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR.py", line 19, in
17:58:32:ALPR_adapter.py: from paddleocr import PaddleOCR
17:58:32:ALPR_adapter.py: ImportError: cannot import name 'PaddleOCR' from 'paddleocr' (unknown location)

I put in a newer GPU today hoping this would help. I reinstalled CPAI, version 2.4.7. I get the above install error and ALPR isnt detecting plates, just timing out on CP.AI explorer
Try uninstall the module the reinstall the module using Do not use download cache.

1703898821305.png
 
  • Like
Reactions: wpiman
I just (re)installed ALPR on CP.AI 2.3.4 - when testing ALPR from project Explorer, ALPR module shuts down.
Uploaded a picture of my car with clearly visible license plate.

Log entries:

Code:
12:48:22:License Plate Reader: Rec'd request for License Plate Reader command 'alpr' (...96656d) took 128ms
12:48:27:Object Detection (YOLOv5 6.2): Detecting using license-plate
12:48:27:Object Detection (YOLOv5 6.2): Rec'd request for Object Detection (YOLOv5 6.2) command 'custom' (...07f7ee) took 91ms
12:48:31:Module ALPR has shutdown
12:48:31:ALPR_adapter.py: has exited

Afterwards, the module status is "Lost Contact".
Using CUDA on a test RTX 4060.
YOLOv5 6.2 works perfectly on the same machine.

Update: I made the mistake of attempting to update to 2.4.7, now nothing works anymore, getting "ModuleNotFoundError: No module named 'PIL'" error, Yolo V8 is not detecting the GPU (uses CPU instead).
I have now uninstalled CPAI and reinstalling it in a separate directory. Hopefully that would work.

Each CPAI update from a previous version was a horror show.
 
Last edited:
Is anyone else getting the following Error when trying to install the module “License Plate Reader” on 2.3.4-Beta ?

ERROR IN INSTALL ALPR: undefined

1703949757978.jpeg
 
I make it a routine to make sure the modules and data directory get deleted if I am changing versions....

Are you on linux, windows, or mac?

I’m on windows. I have deleted all code project data from Program files and ProgramData before upgrading. I was on 2.0.7 and 2.0.8 and it never would download in those version either. I would receive “unknown” and no other information would appear. I did some testing and 2.2.4 appeared to download fine. Just figured I should update to 2.3.4 since that is what BI would suggest if I was a brand new user. If you delete code project completely and “check for updates” it will download 2.3.4
 
On a new computer build with a 4060ti and LPR 2.7.2
Under info for LPR, it shows that it doesn't see the GPU. Also, no gear icon, not working.
Using (YOLOv 5 6.2) 1.7.1 and it shows GPU(CUDA) with the gear icon.

Module 'License Plate Reader' 2.7.2 (ID: ALPR)
Module Path: <root>\modules\ALPR
AutoStart: True
Queue: alpr_queue
Platforms: windows,linux,linux-arm64,macos,macos-arm64,!orangepi,!jetson
GPU Libraries: installed if available
GPU Enabled: enabled
Parallelism: 0
Accelerator:
Half Precis.: enable
Runtime: python3.7
Runtime Loc: Local
FilePath: ALPR_adapter.py
Pre installed: False
Start pause: 1 sec
LogVerbosity:
Valid: True
Environment Variables
AUTO_PLATE_ROTATE = True
MIN_COMPUTE_CAPABILITY = 7
MIN_CUDNN_VERSION = 7
OCR_OPTIMAL_CHARACTER_HEIGHT = 60
OCR_OPTIMAL_CHARACTER_WIDTH = 36
OCR_OPTIMIZATION = True
PLATE_CONFIDENCE = 0.7
PLATE_RESCALE_FACTOR = 2
PLATE_ROTATE_DEG = 0
Started: 30 Dec 2023 9:28:27 PM Eastern Standard Time
LastSeen: Not seen
Status: Started
Processed: 0
Provider:
CanUseGPU: False
HardwareType: CPU
 
Last edited: