Blue Iris and CodeProject.AI ALPR

Tygunn

Getting comfortable
Joined
Dec 24, 2016
Messages
398
Reaction score
313
I'm going to cross-post this from my other thread.

I've been unable to use the license plate CP.AI with the GPU since it just stops for no reason. Works GREAT with the CPU only.

So I reinstalled the CUDA 11.8 drivers (I guess I hadn't done that and was running 12.X). GPU inference now doesn't crash the LPR module, however, it seems it is hallucinating pretty badly:
1713454370500.png
Changing back to CPU-only this again works perfect.

This is consistent; all plates with the GPU come out as gobbledygook...

Anyone seen this before? I'm guessing just a bug somewhere.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,214
Reaction score
4,253
Location
Brooklyn, NY
I'm going to cross-post this from my other thread.

I've been unable to use the license plate CP.AI with the GPU since it just stops for no reason. Works GREAT with the CPU only.

So I reinstalled the CUDA 11.8 drivers (I guess I hadn't done that and was running 12.X). GPU inference now doesn't crash the LPR module, however, it seems it is hallucinating pretty badly:
View attachment 192626
Changing back to CPU-only this again works perfect.

This is consistent; all plates with the GPU come out as gobbledygook...

Anyone seen this before? I'm guessing just a bug somewhere.
I have seen this before, I do not remember what the cause was. It might be the cuDNN version not matching the CUDA version
 

Brad42

n3wb
Joined
Apr 14, 2024
Messages
5
Reaction score
1
Location
Parker, CO
See the below link, this might fix the issue

Thanks @MikeLud1. I probably need the Media Foundation feature - since my OS is screwed up enough I can't install it. LOL!
 

Tygunn

Getting comfortable
Joined
Dec 24, 2016
Messages
398
Reaction score
313
Does everyone remove the timestamp from their LPR camera?

I recently noticed that the car with plate "PM" was passing by quite a lot and finally figured out what was up:
1713730385355.png

I did notice that the license plate model in YOLO v8 doesn't seem to capture the timestamps.

For now I'll just disable the timestamps on this camera. I considered logging each inference from the raw JSON but then I'd still have to filter out PM and whatever other hallucinations the AI finds. :)

I've been logging the plates and data to a database for a couple days now. It is interesting how many distinct plates drive by. I would have thought there would be far more repeat traffic than there is.
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,573
Reaction score
2,858
I don’t remove timestamps for any camera.

Why not just move the timestamp down to the lower left or right?
 

Tygunn

Getting comfortable
Joined
Dec 24, 2016
Messages
398
Reaction score
313
I don’t remove timestamps for any camera.

Why not just move the timestamp down to the lower left or right?
Worth a shot I guess. :) I've also considered 24 hr time and a smaller font size. I think I'll still set up my tracking app to pull all inferences not just the first one. Then I can clearly see if I'm getting odd patterns.
 

Brad42

n3wb
Joined
Apr 14, 2024
Messages
5
Reaction score
1
Location
Parker, CO
I would like BI to only confirm an alert when CodeProject.AI actually gets a license plate read, not just finds a DayPlate or NightPlate. My thinking is that the To Confirm box is looking at labels returned by AI models, so I should input something like "Plate*" since the alpr module returns labels such as "Plate: 123 ABC". This does not seem to be correct. What's the right criteria?
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,214
Reaction score
4,253
Location
Brooklyn, NY
I would like BI to only confirm an alert when CodeProject.AI actually gets a license plate read, not just finds a DayPlate or NightPlate. My thinking is that the To Confirm box is looking at labels returned by AI models, so I should input something like "Plate*" since the alpr module returns labels such as "Plate: 123 ABC". This does not seem to be correct. What's the right criteria?
Use the below AI settings

1713828940694.png
 

Vettester

Getting comfortable
Joined
Feb 5, 2017
Messages
743
Reaction score
698
Worth a shot I guess. :) I've also considered 24 hr time and a smaller font size. I think I'll still set up my tracking app to pull all inferences not just the first one. Then I can clearly see if I'm getting odd patterns.
You can also use zones in BI and mask the area where your overlays are located.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,214
Reaction score
4,253
Location
Brooklyn, NY
Thank you. It would be nice if I could use a model to find DayPlate,NightPlate to identify vehicles (presumably a faster model) before running alpr on the image, then limit confirmation to an alpr read. Maybe a new syntax like [model]label:confidence. Thanks for all the work you do @MikeLud1
The ALPR module uses the license-plate model first to find the license plates in the images sent. If the module does not find any license plates it returns nothing found. If it finds a license plate then it crops the plate and runs OCR on the cropped plate and send the OCR results.
 

Brad42

n3wb
Joined
Apr 14, 2024
Messages
5
Reaction score
1
Location
Parker, CO
The ALPR module uses the license-plate model first to find the license plates in the images sent. If the module does not find any license plates it returns nothing found. If it finds a license plate then it crops the plate and runs OCR on the cropped plate and send the OCR results.
Excellent! Thanks for the education.
 

rhwd2003

Young grasshopper
Joined
Jul 23, 2023
Messages
43
Reaction score
7
Location
Kentucky
Need help! License plate reading was working perfectly and then I updated something and now its broke again.
When I use the explorer and put a plate in it says no predictions found. The plate text no longer shows in my alerts on the left of the car snapshots.

I am seeing this error in the logs:
14:28:48:Stopping License Plate Reader
14:28:50:Update ALPR. Setting AutoStart=true
14:28:50:Restarting License Plate Reader to apply settings change
14:28:50:
14:28:50:Module 'License Plate Reader' 3.1.0 (ID: ALPR)
14:28:50:Valid: True
14:28:50:Module Path: <root>\modules\ALPR
14:28:50:AutoStart: True
14:28:50:Queue: alpr_queue
14:28:50:Runtime: python3.9
14:28:50:Runtime Loc: Local
14:28:50:FilePath: ALPR_adapter.py
14:28:50:Start pause: 3 sec
14:28:50:parallelism: 0
14:28:50:LogVerbosity:
14:28:50:platforms: all
14:28:50:GPU Libraries: installed if available
14:28:50:GPU Enabled: enabled
14:28:50:Accelerator:
14:28:50:Half Precis.: enable
14:28:50:Environment Variables
14:28:50:AUTO_PLATE_ROTATE = true
14:28:50:CROPPED_PLATE_DIR = <root>\Server\wwwroot
14:28:50:MIN_COMPUTE_CAPABILITY = 6
14:28:50:MIN_CUDNN_VERSION = 7
14:28:50:OCR_OPTIMAL_CHARACTER_HEIGHT = 60
14:28:50:OCR_OPTIMAL_CHARACTER_WIDTH = 30
14:28:50:OCR_OPTIMIZATION = true
14:28:50:pLATE_CONFIDENCE = 0.50
14:28:50:pLATE_RESCALE_FACTOR = 2
14:28:50:pLATE_ROTATE_DEG = 0
14:28:50:REMOVE_SPACES = False
14:28:50:ROOT_PATH = <root>
14:28:50:SAVE_CROPPED_PLATE = False
14:28:50:
14:28:50:Started License Plate Reader module
14:28:50:ALPR_adapter.py: Traceback (most recent call last):
14:28:50:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\ALPR_adapter.py", line 8, in
14:28:50:ALPR_adapter.py: from module_runner import ModuleRunner
14:28:50:ALPR_adapter.py: File "C:\Program Files\CodeProject\AI\modules\ALPR\../../SDK/Python\module_runner.py", line 30, in
14:28:50:ALPR_adapter.py: import aiohttp
14:28:50:ALPR_adapter.py: ModuleNotFoundError: No module named 'aiohttp'
14:28:50:Module ALPR has shutdown

Any thoughts on what could be wrong?


View attachment 192358
@MikeLud1 any idea what is wrong here? Your help is amazinggggg!
 
Top