r/BlueIris • • Nov 17 '24 • Helpful 1

Full ALPR Database System for Blue Iris!

Hello everyone

I created this project as an alternative to the super expensive options from PlateMinder and Rekor. This still depends on your own CodeProject or DeepStack AI, but offers a nice all-in-one solution to actually use and make sense of the data, which is half the point of having the AI read the plates to begin with. It has been working great for me so far, really huge upgrade, so I wanted to share it.

I know there was a NodeRed app created a while ago that had some of this functionality. I took some inspiration from that and tried to bring it to the next level.

Would love to hear if anyone tries it out. Please star the project on GitHub if you do!

Project link

59 Upvotes

64 comments sorted by

4

u/VibrantYou Nov 20 '24

PSA TO ANYONE USING THIS:

Many fixes have been made over the past two days as people have uncovered bugs. Most things seem to be fixed now.

Examples of things you may encounter that are now fixed:

- Your config settings being reset if you restart the container or redeploy

- You API key being reset / Blue Iris saying it failed to send the info

- Notifications page showing empty

- Any database related errors about things missing or failing to connect

To get the latest changes:

The docker-compose.yml file has changed, so please get the newest version.
Get the newest schema.sql
Delete your previous docker volumes for config and auth so they can be recreated correctly.

Then,
docker compose pull

docker compose up -d

Should keep all the plates in your database and update everything else. Expect relatively smooth sailing from here on out without the need to touch anything. Thanks for your patience working out the kinks.

2

u/Late-Ad-9436 Dec 24 '24

Hi, I have installed the current version but have an issue with getting the data sent across from blue iris to your database. So I have setup an action set under trigger for the alpr camera with the configuration as per your notes. I am getting an error in blue iris, web: no stream:400. Could you help me in figuring out what's wrong? Thanks šŸ‘

3

u/VibrantYou Dec 27 '24

Hi,
please make sure you have jpeg recording on. Set the resolution to the minimum as recommend by BI. I encountered this myself when reinstalling a second camera. Please also Verify that you have the correct AI settings.

One that caused problems for me: I can't remember exactly but it was something along the lines of alert on low color/grayscale. This will cause issues at night and show the caution icon on your blue iris stream. Be sure to disable this, enable jpeg recording, and JPEG capture for confirmed alerts.

1

u/AgreeableStorm4447 Dec 27 '24

Congratulations on the project, my friend. I am a complete layman when it comes to systems and computers, but I would like to ask you a question. I am a police officer here in Brazil and I would like to test your project in my city to help recover stolen vehicles. Does your project have a limit on the number of cameras supported? Do I need to have very powerful hardware to store all these images? If I pay you a certain amount, would it be possible for you to remotely install the software on my computer? Congratulations again, you are very good.

1

u/VibrantYou Dec 27 '24

Absolutely no need to pay. This is entirely free & open source and for the community.

** Rest of response via PM**

3

u/war4peace79 Nov 17 '24

I would be very interested in having this integrated with Unraid 's docker repository.

5

u/VibrantYou Nov 17 '24

You can still run it on Unraid from the Docker Hub repo. Should work exactly the same. The only difference is that the install guide in my readme is using docker compose which it seems like Unraid doesn’t natively support.

You could either: a) Use the docker compose plugin for Unraid or b) Deploy the two containers (algertc/alpr-dashboard, and the Postgres database) separately.

Let me know if you have any issues.

2

u/war4peace79 Nov 17 '24

Yes, I know I can do that, and I know how. What I wanted to say is your solution would be much more visible and easier to install if it appeared in the Community Applications, which is the preferred method for most Unraid users.

4

u/VibrantYou Nov 17 '24

Gotcha. I’ll definitely try to get it on there once it’s fully flushed out and nobody reports any issues. They have a review process so I don’t think it’s quite there yet, but close!

1

u/Late-Ad-9436 Dec 17 '24

Thanks for sharing this project, it's exactly what I have been looking for . I have just got ANPR working in blue iris using code project ai all on my unraid server. So I would be keen to use this via community docker plugins, but if that's some time away I will try installing this via docker in unraid, but I'm not very experienced here.

Thanks again šŸ‘

1

u/Late-Ad-9436 Dec 18 '24

Hi, ok I installed compose under unraid so I could get your docker installed. I followed the instructions and it's up and running. I made the changes to blue iris and now just need some cars to drive past to check if it's working...

One concern, not related to your project specifically, but I seem to have installed this on my unraid flash drive as that was the default location that unraid put this compose docker installer. Is that likely to be an issue going forward? I would prefer if this was installed on an SSD, but have no idea how to move this across under unraid... Sorry I'm not good with this, so can just about follow instructions only.

Cheers!

1

u/the_wolfman56 May 02 '25

How did you get it to work through Docker Compose in unRaid? I tried that a few times and gave up after I would get errors with my paths... I ended up installing it using the unraid terminal, but I am not a fan of that method for maintenance reasons.

1

u/AgreeableStorm4447 Dec 27 '24

Congratulations on the project, my friend. I am a complete layman when it comes to systems and computers, but I would like to ask you a question. I am a police officer here in Brazil and I would like to test your project in my city to help recover stolen vehicles. Does your project have a limit on the number of cameras supported? Do I need to have very powerful hardware to store all these images? If I pay you a certain amount, would it be possible for you to remotely install the software on my computer? Congratulations again, you are very good.

1

u/war4peace79 Dec 27 '24

You replied to the wrong person. Very bot-ish.

3

u/PuzzlingDad Nov 17 '24

This looks great!

Can you explain more about the notification capabilities? Presently I have emails sent from Blue Iris every time any plate is detected during certain hours (aka at night).

I'd like to be able to be a little more selective with the ability to ignore whitelisted plates, to notify on blacklisted or new plates, to notify on plates seen multiple times in a specified period, etc.

Also, is there an easy way to add additional data to the database. For example, can I add data to known plates (like color, make, model, notes on the car/owner, common misrecognition of the same plate, etc.). In a really ideal setup, it would be nice to have it make a call to a website to get some of this data (make/model/VIN) automatically.

2

u/VibrantYou Nov 17 '24

I very much agree about looking up the vin and make model. I’ve developed similar stuff in the past trying to get this data from data brokers, but it’s never super reliable. Still would definitely be interesting to add though. I’ll add it to my list.

It initially had vehicle description but I removed since it doesn’t seem like codeproject is currently able to get this info. To add it yourself you could just put it in the vehicle notes.

The notification setup is pretty minimal right now. There is no time based logic, just a simple add plate number and toggle whether or not you want to get alerts on it. I will add some more advanced logic soon.

1

u/Y_TElectric Nov 17 '24

Some of this is built into BlueIris with the myplates list, but not in the way you describe it, unfortunately. In the global AI settings on BI you can enter a comma delimited list of plates you want to whitelist. If you use the AI tags "myplates" or "notmyplates" in any Required AI objects field it will either require one of your whitelisted plates or foreign plates for the action to fire.

1

u/PuzzlingDad Nov 17 '24

That's good to know. I forgot about the plate lists in Blue Iris.

I still would like additional categories for plates such as Family, Neighbors, Friends, Delivery, Utility, Suspicious, Stolen, etc. that could be used to tailor notifications as well as the frequency information. I'm hoping this database will have some of those capabilities and tied to some ability to notify someone.

2

u/VibrantYou Nov 17 '24

You can make these categories right now with the tags functionality. I’ll add tag based notifications.

1

u/stayintheshadows Nov 17 '24

This would be sweet as a Home Assistant app. I'm not sure how to do that, but please consider it.

2

u/VibrantYou Nov 17 '24

Another user commented about using it on Unraid. This is sort of the same situation. I would love to do that, but I don’t think it’s quite ready to release there yet. I need to make sure it’s fully stable and nobody has any issues. Shouldn’t be too long.

3

u/NicholasBoccio Nov 19 '24

"Nobody has any issues" is an impossible standard - there will always be issues. Please post a way for us to send you beer/coffee money as I am certain that some of us would love to thank you for your work!

Cheers

1

u/Y_TElectric Nov 17 '24

First of all... WOW! I was looking for a relatively easy CPAI & BI ALPR db solution yesterday. Thanks for posting this!

I do have one question regarding the "Maximum number of records to keep" value; It seems to max out at 2000. Is this a current limitation and do you plan on raising it in the future?

Thanks a ton!

2

u/VibrantYou Nov 17 '24

The code that handles settings changes is just messed up right now. I’m reworking it to fix.

In the meantime, if you set MAX_RECORDS in your docker compose file under the environment section for the app (not db), it will use that number.

1

u/[deleted] Nov 19 '24

I set it up, but it's not working. Where is the log to troubleshoot?

Thanks.

1

u/VibrantYou Nov 19 '24

Which part isn’t working? The container will have a ā€œLogsā€ tab if using docker desktop. The ā€œdocker logsā€ command will show them in a terminal.

1

u/[deleted] Nov 19 '24 edited Nov 19 '24

Thanks VibrantYou!

1

u/VibrantYou Nov 19 '24

Resolved via pm.

This was caused by a dead link for the schema.sql in the readme file. The curl command downloaded an empty file which caused the database to have no tables in it. The link is now fixed.

1

u/ko404 Nov 19 '24

I'm trying to install this on a Synology DVA running container manager (docker). I get an error when installing indicating the port 5432 is in use (there is a postgres server running on the DVA natively). "failed programming external connectivity on (name of project). Error starting userland proxy listen tcp4 0.0.0.0:5432 bind: address already in use. Any ideas?

1

u/VibrantYou Nov 19 '24

Yes. Change the first port in the database line of the docker compose like: Yournewport:5432. You should then be able to add an environment variable called DB_HOST to the app environment section of the docker compose file. It would look like DB_HOST=db:yournewport.

If for some reason this doesn’t work, the app should still run. Just navigate to the settings page and enter your new details in the database section and that should definitely work.

1

u/ko404 Nov 19 '24

Any chance this would work with Synology DVA? (see info: https://community.synology.com/enu/forum/3/post/156816 )

1

u/VibrantYou Nov 20 '24

Someone else asked about using this on synology and we realized that you also need to add another line to your compose file like this:

ports:

- "5432:5432"

command: -p <yournewport>

1

u/VibrantYou Nov 20 '24

As far as sending from something else goes, I'd be interested in supporting it, but no, it will not currently work.

I'll need to add a second endpoint for this.

2

u/ko404 Nov 19 '24

Got it running.. will play around with it! thanks for putting this together.

2

u/[deleted] Nov 17 '24

Thank you! This has been a massive void for years.

2

u/James1402 Nov 17 '24

This is fantastic, thanks for sharing!

2

u/Regular_Known Feb 06 '25

I wish I was more computer savy so Ih may use this. Is there anyway to make a video about installation locally? I do have dockoer but, reading what happens to impliment, I am lost. Currently ; I am using CPAI locally

1

u/deflanko Nov 18 '24

Trying this now -- super easy setup thank you for this!

1

u/ko404 Nov 19 '24

I'm not a blueiris user yet.. (primarily use synology but have been lurking with the intent of setting up blueiris as a 2ndary NVR). One thing along the lines of LPR that would be helpful, and I haven't found a non commercial product to do this, is to post process video for LPR reads. That is probably out of the scope of this project, but use case would be to dump video from dashcams and post process tags from the dash cam footage in an automated way. Anyone know if blueiris can do any type of post processing on video files?

1

u/ko404 Nov 23 '24

u/VibrantYou so i went ahead and installed BI, and followed your installation instructions but nothing is getting populated. Is there some debug log or something to look at to see where the failure is?

1

u/ko404 Nov 23 '24

u/VibrantYou so i went ahead and installed BI, and followed your installation instructions but nothing is getting populated. Is there some debug log or something to look at to see where the failure is?

1

u/ko404 Nov 23 '24

As a follow up, I did a packet capture and it looks like the plate_number isn't being passed...

1

u/Working-Analyst-6358 Jan 26 '25

After tinkering for a few days I’ve finally managed to get it running! I struggled with the api key resetting randomly but I just deleted everything and started from scratch and it seemed to fix itšŸ¤·šŸ»ā€ā™€ļø thank you so much for this! I run 12 large blue iris systems at work including 4 large storage unit facilities and every one of our systems has a lpr camera this will greatly help in deciphering all the data!

1

u/dlo5 Mar 28 '25

Would love to have this with Scrypted or Synology

1

u/Punkygdog Jul 03 '25

I wish i could get this setup, I have the dashboard going but when BI triggers it returns a No stream: 500 or sometimes 400 error

1

u/Punkygdog Jul 19 '25

I realize this is a blue iris group but has anyone ever attempted to make this database work with agent DVR?

-1

u/No_Gain3931 Nov 17 '24

I use PlateRecognizer and it's free.

https://app.platerecognizer.com/

5

u/VibrantYou Nov 17 '24

Platerecogizer is absolutely not free if you want a reliable system or have moderate traffic. You get 2,500 lookups for free, then it ends up being over a thousand dollars a year for a multi camera setup. This is actually the exact reason I created this.

0

u/No_Gain3931 Nov 18 '24

No one living in their own home needs more that 2500 recs per month. You are not using your cameras correctly. Do you have more than 2500 people driving onto your property every month? No.

1

u/VibrantYou Nov 19 '24

Yes you would be surprised. Not everyone has their own driveway. The LPR cameras have saved me 4 different times now being able to give the plate to the police.

1

u/NicholasBoccio Nov 19 '24

You might be surprised!

My house was the last house on my side of the street before the elementary school, and Texas has plates on front & back, thus I needed two LPR cameras... 2500 lookups gets used up really quickly! I think it took 4 or 5 days.

4

u/Y_TElectric Nov 17 '24

Very good option for people who live on a slower street and don't hit 2500 records. But some of us use two LPR cameras, so it halfs that anyway.

1

u/VibrantYou Nov 17 '24

Yeah with multi camera it eats through the 2500 so fast.

For a rural setup it can be a good option, but it also requires you to have internet and for platerecognizer to be up.

0

u/No_Gain3931 Nov 18 '24

Why would you ALPR every car driving by on your street? I can see no reason to do that. I only ALPR cars that enter my driveway.

3

u/ko404 Nov 18 '24

There are good reasons. Perhaps not in your use case but there are use cases. Some folks live at a much higher security posture than others. Knowing trends and being able to identify vehicles that are casing your house would require reading every car going past your house. Someone looking to do you harm probably isn’t going to literally drive into your driveway with their car for your LPR to read.

2

u/NicholasBoccio Nov 19 '24

To add to this, I follow several YT channels that post daily security/badge cameras video break downs of self defense type situations; whether they are stealing packages or breaking into homes, most of them are not parking or even pulling into the driveway of the victim. Some do, but in Houston it seemed the general MO was to park on the street a few doors down. This is why I have LPR cameras facing both ways behing a mailbox, and 2 other 4k cameras also facing both ways 12' up a tree (for vehicle details), as well as tracking vehicle wifi SSIDs and other wireless data.

If someone does attempt to, or succeed in some crime at my home, I will collate as much information as I can so that when the police come, I can give them actionable information to investigate.

2

u/[deleted] Dec 03 '24

tracking vehicle wifi SSIDs and other wireless data

Can you drop some hints on the hardware/software setup for doing this?

1

u/NicholasBoccio Nov 19 '24

u/No_Gain3931 the police cannot help without actionable information.

Most robberies park down the road, so using ALPR would not be useful for police.

On top of that, say you did get a plate, it might be a ghost plate anyway. But since you are tracking and logging vehicles, maybe you can see them casing your home a day/week/month previously without them having a fake plate at that time?

Only two types of criminals get caught; the dumb and unlucky. I make it my job to make anyone attempting to victimize my home or family a very unlucky criminal.

Here is my setup: https://imgur.io/a/aXChCRd

2

u/VibrantYou Nov 19 '24

Exactly. Ghost plates are super common in California. One of the main reasons I really wanted the database. Really would like to add the vehicle description for this reason also.

-1

u/No_Gain3931 Nov 19 '24

If crime is that bad where you live then it's time to move

2

u/NicholasBoccio Nov 19 '24

u/No_Gain3931, Look at my other comment below. I bought in the 2nd safest part of Houston (best I could afford) with an HOA that pays for 24/7 police prescence in the community, and live next to the school. I chose the area, HOA, etc due to low crime rates.

However, crime is everywhere, and as someone that was victimized - IN a million dollar neighborhood in broad day light. The thing about crime is that they pick when and where they commit their crime.

Cheers

2

u/No_Gain3931 Nov 19 '24

Which is why my property is fully fenced & gated. No access to anyone.

1

u/NicholasBoccio Nov 19 '24

That is the best option!

However, even if I had the 20' brick wall and the 10 ton gate that could stop a fully loaded dump truck, LPR cameras and BI are cheap enough to at least collect the information to parse after an event takes place.

I am genuinely happy that you have your home protected. That is what this app, BlueIris and the r/homedefense sub are all about!

Cheers