Blue Iris and CodeProject.AI ALPR

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.
 
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
 
  • Like
Reactions: actran and Tygunn
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!
 
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.
 
I don’t remove timestamps for any camera.

Why not just move the timestamp down to the lower left or right?
 
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.
 
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?
 
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
 
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.
 
  • Like
Reactions: VideoDad
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.
 
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.
 
  • Like
Reactions: Skinny1
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!
 
with ALPR enabled how do I als trigger it to find cars. Sometimes ALPR misses the plates but I want it to at least grab the car. Should

To confirm: *,car,Car


Would that be correct.
 
with ALPR enabled how do I als trigger it to find cars. Sometimes ALPR misses the plates but I want it to at least grab the car. Should

To confirm: *,car,Car


Would that be correct.

I have a clone of the ALPR camera in BI to just identify vehicles and people.
 
It depends on what model you are using to find the car, post a screenshot of your AI settings.
I am using the settings you have been recommending as posted above, however will miss some plates.
I was using

"DayPlate,NightPlate,motorcycle,MotorcycleCar,car" previously which would catch majority of vehicles.

Based on your recommended settings would it be
To confirm: *,DayPlate,NightPlate,motorcycle,MotorcycleCar,car
To cancel: DoNotCancel
Custom Models: objects:0,alpr,license-plate,ipcam-dark,ipcam-combined
Mark as vehicle: *
 
  • Like
Reactions: colipto
It looks like the module did not install correctly. Try uninstalling the module then reinstall using Do not use download cache

View attachment 193028

Thanks Mike that fixed it. When I use the explorer I can see the plate being identified but its not showing up in my list of vehicle alerts so I can search by the plate number? At one point it showed up so I could search the plate number to find all those recordings?

1714914949247.png