Full ALPR Database System for Blue Iris!

So can I add "Motion Type" (&TYPE) to the database? And maybe put the confidence in the row as well?

For example, I have a zone B and zone C (left and right respectively). When a car goes by, I have BI report via MQTT.....

Plate detected: 2US673 Probability: 65% MOTION TYPE Motion_B>C

That said, I am having huge issues with my motion..... Not sure it is related to this thread.... Maybe I'll add it to another ALPR thread.

Adding the column yourself won’t do anything without the code to handle it which is a number of different places.

Confidence is coming soon with all of the AI training stuff. I can add the zone too. I think I’m going to add a selector that lets users show/hide columns. I’ll try to add the multi select also.
 
  • Like
Reactions: wpiman
This issue seems to have been fixed in 0.1.7.

As it turns out, I actually accounted for this when I originally added that functionality, but there was a tiny error in the migrations file that was keeping it from actually working. I forgot that I ever even did it, and just happened to fix it without even noticing while making the rest of that file more flexible.
 
  • Like
Reactions: Vettester
I have only continuous, so there might be some differences. My continuous also splice every hour and when I was using &ALERT_CLIP I landed (probably) at the beginning of the splice, but surely far away from the actual alert.
As you said, it's definitely not something to handle on the app side, just wanted to point out that someone can be in the same shoes as me, where this would help, or if &ALERT_DB works generally, then maybe it would make sense to change to that, so no decision point and/or trial and error.
 
As it turns out, I actually accounted for this when I originally added that functionality, but there was a tiny error in the migrations file that was keeping it from actually working. I forgot that I ever even did it, and just happened to fix it without even noticing while making the rest of that file more flexible.
I was already on version 0.1.7 when this issue occurred, so I'll need to investigate why I'm still experiencing it.
 
I have only continuous, so there might be some differences. My continuous also splice every hour and when I was using &ALERT_CLIP I landed (probably) at the beginning of the splice, but surely far away from the actual alert.
As you said, it's definitely not something to handle on the app side, just wanted to point out that someone can be in the same shoes as me, where this would help, or if &ALERT_DB works generally, then maybe it would make sense to change to that, so no decision point and/or trial and error.

Hopefully we hear from others if they encounter the same thing. I think you're right that the having + alerts on vs off is definitely the differentiating factor. The BI macros include a bunch of temporary paths for stuff which aren't really what we want, and no way to just send the full direct link. I ended up digging through the UI3 code (which has LONG files) since UI3 has the copy/share alert button if you right click. I tested it with the ALERT_DB too, and that didn't work for me, even though in theory it still should? The way I figured out how to get it to work was just by looking at the URLs I got by clicking the button in UI3 and comparing the parts I got from all the different macros and then just piecing them together to create a path that is then given to the button.

I was already on version 0.1.7 when this issue occurred, so I'll need to investigate why I'm still experiencing it.

That fix may have been after the first time I built it, so maybe double check your migrations file and see if its any different than the one in the repo. If it is, updating that and restarting the container should fix it.
 
Hopefully we hear from others if they encounter the same thing. I think you're right that the having + alerts on vs off is definitely the differentiating factor. The BI macros include a bunch of temporary paths for stuff which aren't really what we want, and no way to just send the full direct link. I ended up digging through the UI3 code (which has LONG files) since UI3 has the copy/share alert button if you right click. I tested it with the ALERT_DB too, and that didn't work for me, even though in theory it still should? The way I figured out how to get it to work was just by looking at the URLs I got by clicking the button in UI3 and comparing the parts I got from all the different macros and then just piecing them together to create a path that is then given to the button.

Interesting how many iterations are possible based on different BI settings... :)

That fix may have been after the first time I built it, so maybe double check your migrations file and see if its any different than the one in the repo. If it is, updating that and restarting the container should fix it.

I manually rerun the migration.sql command (since I’m the unRAID guy and have to do this manually), but it doesn’t work for me. I always have to go back to the /update page and run a database backfill cycle to correct the occurrence count.
However, it indeed seems that something has changed somewhere during this process. Now, when I correct a plate, its occurrence counter no longer resets to 0. Instead, it takes on the same occurrence count as the plate number it was corrected to.
When I go to the /update page and run a db backfill cycle, the occurrence counter gets incremented with the number of corrected plates.
Does this make any sense? :)
 
Definitely wouldn't recommend exposing this to the internet at the moment. Eventually, yes, but not a good idea for now.

As far as a UI3 built-in goes, no, it couldn't really be integrated unfortunately. It's programmed pretty differently and would require the UI3 developer to basically remake it.
I'm recording Continuous and using ALERT_CLIP, and it works fine for me. In my ALPR Database > BI Settings I'm using my myDNSHostname.dyndns.org:81, and the clips open correctly in UI3, which just as good as the "UI3 integration" that I was requesting originally!
 
Interesting how many iterations are possible based on different BI settings... :)



I manually rerun the migration.sql command (since I’m the unRAID guy and have to do this manually), but it doesn’t work for me. I always have to go back to the /update page and run a database backfill cycle to correct the occurrence count.
However, it indeed seems that something has changed somewhere during this process. Now, when I correct a plate, its occurrence counter no longer resets to 0. Instead, it takes on the same occurrence count as the plate number it was corrected to.
When I go to the /update page and run a db backfill cycle, the occurrence counter gets incremented with the number of corrected plates.
Does this make any sense? :)

I also see the occurrence count being wrong and /update using the backfill fixes it.
 
  • Like
Reactions: algertc
First part of ALPR training integration is done! Just need to set up the export processing and sharing now. Also adds the ability to do this which is cool (only laggy in the gif):
cropin.gif


Sets the focal point as close as possible to the center of the plate for quick zoom in.

I'm also playing with some better use of layers in the UI:
Screenshot 2025-02-13 at 4.16.24 PM.png
Screenshot 2025-02-13 at 4.16.47 PM.png
 

Attachments

  • Screenshot 2025-02-13 at 4.16.24 PM.png
    Screenshot 2025-02-13 at 4.16.24 PM.png
    265.2 KB · Views: 0
Super excited about this feature. Is this to train a local model or is this a submission engine to provides images to train a common model that we would all use?
 
I also see the occurrence count being wrong and /update using the backfill fixes it.
I'm still seeing the broken behavior also. The count of plates that were corrected doesn't get added to existing plates already read correctly. For example, if I have 10 plates labeled "GOOD" and 3 plates labeled "BAD", when I correct them to "GOOD" the count should update to 13, but it doesn't. It says there are still only 10 plates labeled "GOOD".
 
  • Like
Reactions: algertc
First part of ALPR training integration is done! Just need to set up the export processing and sharing now. Also adds the ability to do this which is cool (only laggy in the gif):
View attachment 214482

Sets the focal point as close as possible to the center of the plate for quick zoom in.

I'm also playing with some better use of layers in the UI:
View attachment 214483View attachment 214485
Is this going to be a new feature that we can detect plates in the future LOL

1739500278929.png
 
Super excited about this feature. Is this to train a local model or is this a submission engine to provides images to train a common model that we would all use?
It would be a submission engine.

Could do both. You’ll be able to export your data if you want to test stuff yourself also, but the goal is to collect a huge diverse set of images and utilize the user input to improve the model for everyone.
 
Is this going to be a new feature that we can detect plates in the future LOL

View attachment 214489

Could've just been my testing, or maybe Dahua is developing an advanced warning predictive ALPR cam, powered by starlink satellites and deepseek in the motherland to warn you of the traffic days before it even gets to your home, and I was able to get my hands on a smuggled out prototype unit… Maybe available from empire tech soon if we’re lucky.
 
Last edited:
AI training data functionality is 90% done. Should be ready very soon. Will require updated codeproject models, but hopefully they can be included in the official CPAI soon.

Entirely unrelated to the thread, but I must rant:

I spent six full hours today revisiting an old cat5 cable that I have tried to trace 10+ times over the last 5 years without success and found the most infuriating reason why. It is clearly wired to a camera location and had a dangling end on the exterior but was nowhere to be found in the network closet where all the other connections come in. The entire low voltage job for the house is insanely sloppy and just visibly careless, even to someone who would have no idea what they are looking at. I had tried everything in the past to locate the other end of this cable and mostly gave up, but I had a strange urge today to check a few other things in the crawlspace.

TURNS OUT IT WAS WIRED TO THE DOORBELL TRANSFORMER. WTF??

After having no luck testing some other wires with the toner, I was pretty much accepting defeat again. I stuck the cable toning wand in my pocket and moved on to the other to-do list items and went to look at the doorbell. Lo and behold, I hear a very faint muffled tone from my pocket. Thought, Oh I forgot to turn it off... Pulled it out of my pocket to hit the off button, and the sound got louder. I stuck it into the cluster of doorbell wires (which, by the way, are literally just conventional doorbell wiring that they used twisted pairs for and wire-nutted the rest), not expecting to find anything at all, and there it was. An unterminated cable shoved into the wall, routed completely to the wrong place despite being zip-tied to the other camera cables like 5 other times along the run.

So the original installer realized that they ran it to the wrong place, didn't fix it, and instead went and got the cable they originally wanted and just shoved this one into the wall, leaving the other end of it dangling out of a camera hole on an exterior wall completely unsealed...

Absolute last place I ever would have even fathomed to look for it. Glad I can at least use it now - a decade later, but I just can't even believe that, especially knowing from the previous owners how much they paid for the whole setup.


Anyways, thanks for reading. If you ever find yourself a mystery cable in a low-voltage retrofitted home, maybe check your doorbell...
 
Does the changes I made to the ALPR work fine or do you need me to change anything. If no changes are need I will work on getting the code update

I have not installed them yet. Going to do it tomorrow so I can accumulate some testing data to finish the export part with the code you sent. I have the new plate-reads route handler set up to accept all of the data correctly and a cloud system set up to accept all of the training sets.

Will report if any issues tomorrow
 
  • Like
Reactions: MikeLud1
@MikeLud1 I'm not sure if your models have this or not, but I believe some of the others have an option under the ... on the right of their row to "download model" or have the different sizes.

This could be a nice way to do it when you update it. That can allow users to download the newest model without updating cpai. Also don't remember exactly what for or where, but I've also seen things about needing to set no-cache for the download. Maybe that's part of the dropdown menu? Not sure.. You would know. But just a suggestion to make it easier. Updating codeproject on linux is pretty streamlined, but I remember it being an enormous pain on windows, so if that could be avoided just to update the model, that could probably be very helpful.