Skip to content

Fully-Featured Automated License Plate Recognition Database for Blue Iris + CodeProject AI Server 🚘

License

Notifications You must be signed in to change notification settings

algertc/ALPR-Database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ALPR Database

A Fully-Featured Automated License Plate Recognition Database for Blue Iris + CodeProject AI Server

Feature Requests & Roadmap Docker Hub Plates Processed Release

⭐ Please star the repository if you find the project useful ⭐


App Screens

🌟 Overview

I've been using CodeProject AI with Mike Lud's license plate model on Blue Iris for a couple years now, but in this setup, the ALPR doesn't really do a whole lot. Really, you have more of a license plate camera with some OCR as a bonus, and no nice way to take advantage the data other than parsing Blue Iris logs or paying $600+/year for PlateMinder or Rekor ALPR.

This project serves as a complement to a CodeProject Blue Iris setup, giving you a full-featured database to store and actually use your ALPR data, completely for free. Complete with the following it has a very solid initial feature set and is a huge upgrade over the standard setup.

Features:

  • Searchable database & fuzzy search
  • Build labeled training sets from your traffic
  • Live recognition feed
  • Traffic Analytics
  • Categorization and filtering
  • Store information on known vehicles
  • Push notifications
  • Automation rules
  • Customizable tagging
  • Configurable retention
  • Flexible API
  • HomeAssistant integration
  • Permissioned users

πŸ”§ Installation

Setup Time

The application is packaged as a Docker image. This is the fastest and most reliable way to deploy. Below is a done-for-you installation script that will create a Docker stack with both the application and a PostgreSQL database. The installation script is recommended and more carefully maintained, but manual installation instructions are also available here.


Prerequisites

You will need the following installed on your system.

  • Docker
  • Docker Compose
  • Docker engine enabled and running

Tip

If unfamiliar with Docker, an easy way to check all three of these boxes at once is to install Docker Desktop, which has a GUI and bunch of nice tools.


Linux/MacOS

Create a new directory wherever you would like to store your ALPR data. Enter the directory in your terminal and paste in the below command. After that, everything will be set up automatically!

curl -sSL https://raw.githubusercontent.com/algertc/ALPR-Database/main/install.sh | bash

Or, if you prefer:

wget -qO- https://raw.githubusercontent.com/algertc/ALPR-Database/main/install.sh | bash

‼️ Note for Linux:

If your user is not in the Docker group, you will need to run with sudo using the command below:

curl -sSL https://raw.githubusercontent.com/algertc/ALPR-Database/main/install.sh | sudo bash

Windows

Running the install script on Windows may require an additional step. I will make a Powershell version at some point, but as of now it is Bash. There are two popular options to use Bash in Windows:


Using one of these shells, create a new directory on your Windows file system. Cd into the directory and paste in the below command. After that, everything will be set up automatically!

curl -sSL https://raw.githubusercontent.com/algertc/ALPR-Database/main/install.sh | bash


βš™οΈ Setup

Get Your API Key

To start sending data, log in to the application and navigate to settings -> security in the bottom left hand corner. At the bottom of the page you should see an API key. Click the eye to reveal the key and copy it down for use in Blue Iris.

enter image description here


Set up an alert action within Blue Iris:

ALPR recognitions are sent to the api/plate-reads endpoint.

We can make use of the built-in macros to dynamically get the alert data and send it as our payload. It should look like this:

{ "plate_number":"&PLATE", "Image":"&ALERT_JPEG", "camera":"&CAM", "ALERT_PATH": "&ALERT_PATH", "ALERT_CLIP": "&ALERT_CLIP", "timestamp":"&ALERT_TIME" }

Set your API key with the x-api-key header as seen below. enter image description here

Note: The &PLATE macro will only send one plate number per alert. If you need to detect multiple plates in a single alert/image, you can optionally use the memo instead of the plate number. Your payload should look like this:

{ "memo":"&MEMO", "Image":"&ALERT_JPEG", "camera":"&CAM", "timestamp":"&ALERT_TIME" }

Thats it! You're now collecting and storing your ALPR data.


πŸ“· Screenshots

enter image description here enter image description here enter image description here enter image description here enter image description here

⚠️ Disclaimer

This is meant to be a helpful hobby project and is still a work-in-progress. There's a good amount of spaghetti code in here and random things left over from the initial release. Not to be relied on for anything critical.

About

Fully-Featured Automated License Plate Recognition Database for Blue Iris + CodeProject AI Server 🚘

Topics

Resources

License

Stars

Watchers

Forks