Blue Iris and CodeProject.AI ALPR

pm3klb

n3wb
Joined
Jun 23, 2016
Messages
5
Reaction score
1

sp3ctre

Getting the hang of it
Joined
Sep 29, 2018
Messages
53
Reaction score
28
Location
UK
Do you know has anyone written directions how to use CodeProject.AI to create this SQL database solution?
I searched the forums and the closest thing I found was OpenALPR Tool - Save and Query CSV Exports but this didn't seem correct since it was using OpenALPR and not CPAI.
There are many ways to do this and it all depends on what you want to achieve and whether it's all in the same environment. For example, I have created a PHP API that BlueIris calls with the plate dats and a Base64 encoded image. The API then writes the plate data to the database and compresses and resizes the image for storage. I them have a dashboard system where I can search for plates etc. This works best for me, but others have gone a different route and grabbed the plates directly from BI, as their solution was on the same machine (or even network)... mine is on the internet.

If I ever get finished with my project I may write it up, but it's a moving target at the moment as I am constantly evolving it.
 

pm3klb

n3wb
Joined
Jun 23, 2016
Messages
5
Reaction score
1
There are many ways to do this and it all depends on what you want to achieve and whether it's all in the same environment. For example, I have created a PHP API that BlueIris calls with the plate dats and a Base64 encoded image. The API then writes the plate data to the database and compresses and resizes the image for storage. I them have a dashboard system where I can search for plates etc. This works best for me, but others have gone a different route and grabbed the plates directly from BI, as their solution was on the same machine (or even network)... mine is on the internet.

If I ever get finished with my project I may write it up, but it's a moving target at the moment as I am constantly evolving it.
Thank you, my main goal would be to create a local database on the same machine that I have BI and CPAI. I'm currently not running HA but can setup if it is needed as part of the solution. I would like to be able to query and run different SQL's to find how many times or timeframe a specific plate might have been picked up on the camera. Looking at the screenshot from Vettester it seems those columns along with the image he is showing is the same thing I would want to capture in my database. Saying all that I am open to do it online or anyother solution if that seems a bit easier.
 

sp3ctre

Getting the hang of it
Joined
Sep 29, 2018
Messages
53
Reaction score
28
Location
UK
Thank you, my main goal would be to create a local database on the same machine that I have BI and CPAI. I'm currently not running HA but can setup if it is needed as part of the solution. I would like to be able to query and run different SQL's to find how many times or timeframe a specific plate might have been picked up on the camera. Looking at the screenshot from Vettester it seems those columns along with the image he is showing is the same thing I would want to capture in my database. Saying all that I am open to do it online or anyother solution if that seems a bit easier.
The easiest way of doing that is just to log a row to the datbase every time you see a plate, then you can query the database based on date/times to give you the counts. I have a "risk factor" on my solution based on how many times the plate has been seen in the past month, as well as an alerting system based on known plates. Hot really sure why HA would be needed but I guess you could use it if you weren't familiar with coding.

In terms of just wanting to lookupplates and see counts etc, I imagine this may well be coming to BI soon (they already have the search function), but I wanted to do something totally bespoke with graphs and charts etc, hence I did it myself.
 

Vettester

Getting comfortable
Joined
Feb 5, 2017
Messages
743
Reaction score
698
Do you know has anyone written directions how to use CodeProject.AI to create this SQL database solution?
I'm using @Alan_F 's node-red dashboard.
 

pm3klb

n3wb
Joined
Jun 23, 2016
Messages
5
Reaction score
1
I'm using @Alan_F 's node-red dashboard.
Thank you I will give that a try.
 

MnM

Young grasshopper
Joined
May 14, 2014
Messages
95
Reaction score
20
I am running CodeProject.AI in a separate virtual linux PC via Docker + CUDA.

All working as it should for Object Detection using CUDA and getting good results.

I have tried to enable CUDA for License Plate Reader and it just doesn't work. It always defaults back to CPU.
Any ideas on how I should enable CUDA for ALPR?

1676547940982.png

1676547960970.png
 

ffzeus

n3wb
Joined
Mar 31, 2020
Messages
19
Reaction score
4
Hi,

After reading through everything and a lot of trial and error, I have been able to get CodeProject,AI operational, for the most part. I am hoping someone can point me to the piece I am still missing. If I drop the .dat file on the AI pane, or use the CodeProject interface to check the picture, the license plate number is shown. When BI detects the plate, it doesn't show the plate number in the log, the alert, or on the photo of the alert. Can some one point me in the right direction?

i do have , * at the end of the To Confirm entry.

I have also noticed if I click on the Log tab, the system "hangs" for 30-60 seconds before allowing me to interact with it again. If I leave it long enough the Log window will eventually populate. All other tabs work fine. Any thoughts on this?

Thank you.

Z

Plates.png
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,214
Reaction score
4,253
Location
Brooklyn, NY
Hi,

After reading through everything and a lot of trial and error, I have been able to get CodeProject,AI operational, for the most part. I am hoping someone can point me to the piece I am still missing. If I drop the .dat file on the AI pane, or use the CodeProject interface to check the picture, the license plate number is shown. When BI detects the plate, it doesn't show the plate number in the log, the alert, or on the photo of the alert. Can some one point me in the right direction?

i do have , * at the end of the To Confirm entry.

I have also noticed if I click on the Log tab, the system "hangs" for 30-60 seconds before allowing me to interact with it again. If I leave it long enough the Log window will eventually populate. All other tabs work fine. Any thoughts on this?

Thank you.

Z

View attachment 154590
Post a screenshot of you camera's AI settings.
 

AlphaBlueIris

Getting the hang of it
Joined
Jan 17, 2022
Messages
125
Reaction score
27
Location
Boston
Yes. Sorry. I must have clicked something wromng befoer I made the screen grab.

View attachment 154597
On the same token, I have been going thru all the posts and I can not find a place that would describe how to use immediate action or alerts with MQTT, could anyone show me how to do that? Do you need to put your plate number in the box or will trigger for every plate found?

Sent from my SM-S906U using Tapatalk
 

truglo

Pulling my weight
Joined
Jun 28, 2017
Messages
275
Reaction score
103
Immediate actions, and alerts with mqtt are kinda 2 different subjects, with some overlap. You don't have to add any plate numbers to BI. BI will "trigger for every plate found" when configured properly, and you can get alerts or send mqtt messages with those plates if you desire (with minimal additional configuration).
 

truglo

Pulling my weight
Joined
Jun 28, 2017
Messages
275
Reaction score
103
Thank you very much. It appears to be working now.

Z
FWIW, the world of programming is very unforgiving of such mistakes. There are many languages that don't care much about "white space", but generally when copy/pasting modern code/settings from online, white space is very important!
 

truglo

Pulling my weight
Joined
Jun 28, 2017
Messages
275
Reaction score
103
Quick update for dev types regarding the latest BI and cpai versions...

I just updated to the latest, and let the cpai and bi installers do their thing. After rebooting and starting BI the first time with cpai 2.0.8, the splashscreen did show a new message "configuring AI...", which gave me some hope. However after a subsequent reboot, business as usual, AI was not working. The BI menu looked more promising though... showing the custom models and "large" model setting after reboot, without having to restart cpai like before.

So I did like before, and setup BI service to have a delayed start. As expected, this makes everything work after a reboot. So unfortunately the latest versions still seem to carry this bug along. It's minor and everything else is working tops... in fact I swear alpr is way faster now (from ~150msec to 80msec)... but probably should give it a few days before I make that a hard claim.
 
Top