Grok 3’s Step-by-Step Guide: Setting Up ALPR Cameras with Blue Iris and CodeProject.AI

sunny0101786

Getting the hang of it
Jul 15, 2017
147
28
Here’s a step-by-step guide to setting up Automatic License Plate Recognition (ALPR) using CodeProject.AI with Blue Iris, based on best practices and insights from the IPCamTalk forum and GitHub resources. This assumes you have a working Blue Iris installation and a camera positioned to capture license plates effectively. Let’s break it down clearly and naturally.


Step 1: Install Blue Iris (if not already done)


  • What you need: A Windows PC (Blue Iris is Windows-only). Minimum recommended specs are a 6th-gen Intel CPU or better, 16GB RAM, and an NVIDIA GPU if you want faster processing (more on this later).
  • Action: Download Blue Iris from its official site (it’s not free—$70 one-time fee for the full version). Install it, and ensure it’s updated to the latest version (as of February 22, 2025, check for updates in the software).
  • Tip: Set up your camera in Blue Iris first to confirm it’s streaming properly. Right-click the main screen, select “Add new camera,” and configure it with your camera’s IP address and credentials.

Step 2: Install CodeProject.AI


  • Download: Go to the CodeProject.AI website or GitHub page and grab the latest installer for Windows (version 2.6.5 or higher as of early 2025 is ideal—check for updates).
  • Install: Run the installer. Choose the default settings unless you’re running it in Docker (advanced setup, not covered here). It’ll install to C:\Program Files\CodeProject\AI by default.
  • GPU Setup (Optional): If you have an NVIDIA GPU, ensure CUDA 11.8 is installed (not 12.x, as the ALPR module works best with 11.8 per IPCamTalk threads). Download CUDA 11.8 from NVIDIA’s site and install it, along with cuDNN for CUDA 11.x. This speeds up processing significantly.
  • Start the Server: Open the CodeProject.AI Server from the Start menu. It runs as a local service (default port 32168). Confirm it’s running by visiting in your browser—you’ll see the dashboard.

Step 3: Add ALPR Module to CodeProject.AI


  • Open Dashboard: In the CodeProject.AI browser interface, go to the “Install Modules” tab.
  • Install Modules: You need two modules:
    1. Object Detection (YOLOv5 6.2): This detects the license plate in the image. Click “Install” next to it.
    2. License Plate Reader: This reads the plate number. Find it in the list and click “Install” (version 3.1.0 or later is recommended as of mid-2024 posts).
  • Configure: Once installed, go to the “Module Settings” tab. For License Plate Reader, check “Use GPU” if you have CUDA set up (faster than CPU). Leave other settings default for now (e.g., PLATE_CONFIDENCE = 0.7).
  • Verify: In the dashboard, ensure both modules show “Started” under the “Modules” tab.

Step 4: Configure Blue Iris AI Settings


  • Open Settings: In Blue Iris, click the gear icon (top left) to open Settings, then go to the “AI” tab.
  • Enable CodeProject.AI: Check “Enabled” under “CodeProject.AI Server.” Set the server address to (or your PC’s IP if running on another machine). Test connectivity—it should say “Connected.”
  • Enable ALPR: Check the “ALPR for Plates” box (bottom left). This tells Blue Iris to use the License Plate Reader module.
  • Custom Models: Uncheck “Default Object Detection” (we’re using custom models). In the “Custom Models” field, add: license-plate. This uses the YOLOv5 model to detect plates.

Step 5: Set Up Your Camera for ALPR


  • Camera Settings: Right-click your camera in Blue Iris, select “Camera Properties,” and go to the “Trigger” tab.
  • Motion Trigger: Enable “Motion Sensor” and configure zones to focus on where plates appear (e.g., driveway or gate). Adjust sensitivity to avoid false triggers.
  • AI Settings: Click the “AI” button in the Trigger tab:
    • To Confirm: Enter * (this ensures alerts trigger when a plate is detected and read).
    • To Cancel: Leave blank or use DoNotCancel (avoids canceling alerts unnecessarily).
    • Custom Models: Add license-plate here too (specific to this camera).
    • Burn Labels: Check “Burn label mark-up onto alert images” to see plate numbers on snapshots.
  • Alerts: Go to the “Alerts” tab, add “Hi-res JPEG files” to save plate images, and optionally set an action (e.g., email or push notification) with the &PLATE macro to include the plate number.

Step 6: Test and Troubleshoot


  • Test It: Drive a car past your camera or upload a plate image to CodeProject.AI’s “Explore” tab (drag and drop). Check the Blue Iris log (bottom right) for entries like “AI: Plate: ABC123 detected.”
  • Check Logs: In CodeProject.AI’s dashboard, go to “Logs” to see if plates are being processed (e.g., “Response: Plate: ABC123”). If it says “No plates found,” ensure your camera’s field of view is clear and the plate is legible (sharp focus, good lighting).
  • Common Fixes:
    • Slow Response: Switch to GPU if on CPU (CUDA 11.8 required). IPCamTalk users report sub-1-second reads with an NVIDIA card.
    • No Plate Numbers: Ensure the License Plate Reader module is running (not just detecting “DayPlate” or “NightPlate”). Reinstall it if needed.
    • AI Timeout: Restart Blue Iris and CodeProject.AI after a full PC reboot.

Step 7: View and Use Plate Data


  • Blue Iris Logs: Plate numbers appear in the log and alert list. Search for them in the Blue Iris UI (top search bar).
  • Advanced Storage: For a proper database, check GitHub for projects like ALPR-Database by algertc. It uses Docker and an API key to log plates from Blue Iris (requires some setup—see its README).
  • IPCamTalk Tip: Users suggest Node-RED or MQTT for custom logging if you’re tech-savvy, but Blue Iris’s built-in log works for basic needs.

Final Notes


  • Camera Tips: Use a high shutter speed (1/1000s) and zoom to capture clear plates, especially at night (IR helps). IPCamTalk folks swear by Loryta or Hikvision LPR cameras.
  • Legal Check: Confirm local laws allow ALPR on your property—some areas restrict it.
  • Updates: Both Blue Iris and CodeProject.AI get frequent updates. Check IPCamTalk’s “Blue Iris and CodeProject.AI ALPR” thread (50+ pages as of 2024) or GitHub for the latest tweaks.

That’s it! You should now have ALPR running locally with Blue Iris and CodeProject.AI. If something’s off, test each piece (camera, CodeProject, Blue Iris) separately to pinpoint the issue. Let me know how it goes!
 
  • Like
Reactions: mat200 and 33696933
If missing anything to make it work fully. Can you share any tips or steps that might help complete the process? Thanks!
 
  • Like
Reactions: mat200
Step 2: Install CodeProject.AI


  • Download: Go to the CodeProject.AI website or GitHub page and grab the latest installer for Windows (version 2.6.5 or higher as of early 2025 is ideal—check for updates).
  • Install: Run the installer. Choose the default settings unless you’re running it in Docker (advanced setup, not covered here). It’ll install to C:\Program Files\CodeProject\AI by default.
  • GPU Setup (Optional): If you have an NVIDIA GPU, ensure CUDA 11.8 is installed (not 12.x, as the ALPR module works best with 11.8 per IPCamTalk threads). Download CUDA 11.8 from NVIDIA’s site and install it, along with cuDNN for CUDA 11.x. This speeds up processing significantly.
  • Start the Server: Open the CodeProject.AI Server from the Start menu. It runs as a local service (default port 32168). Confirm it’s running by visiting in your browser—you’ll see the dashboard.
The third bullet point should be first, CUDA needs to be installed before CodeProject.AI
 
Please check what needs to change according to my attached screenshots.
 

Attachments

  • 46835c8d-a5c9-48bf-9c5a-eb2c1dc6b9b7.jpeg
    46835c8d-a5c9-48bf-9c5a-eb2c1dc6b9b7.jpeg
    175.8 KB · Views: 0
  • 804a434c-6d8b-46f2-a13e-72677faecb64.jpeg
    804a434c-6d8b-46f2-a13e-72677faecb64.jpeg
    259.2 KB · Views: 0
  • ac116c73-d372-4cc9-b847-76b29e670b57.jpeg
    ac116c73-d372-4cc9-b847-76b29e670b57.jpeg
    206 KB · Views: 0
  • a8ab0132-87cf-43d7-a9d5-4a63374dbff6.jpeg
    a8ab0132-87cf-43d7-a9d5-4a63374dbff6.jpeg
    212.7 KB · Views: 0
  • daeac148-52c3-40cb-925c-7e568c355c73.jpeg
    daeac148-52c3-40cb-925c-7e568c355c73.jpeg
    259.9 KB · Views: 0
I think I’m very close to getting this working. Motion detection etc also needs to be configured properly.
 
Try this:

View attachment 215404


More zoom and a better angle will certainly help as well.
Once I get back home from my work I’m going to download the latest version of BI and run it in trial mode. That way, I can at least match the settings to your working setup while I’m still waiting for my BI upgrade purchase issue to be resolved. There was an issue on the vendor’s side where the payment didn’t go through, so I’m waiting for the funds to be reverted back to my bank.
Once I have BI and CodeProject.AI set up correctly, I’ll see what I can do to optimize the camera setup to focus more on traffic-related issues. Since I’m using the full zoom of the camera (IPC-HFW71242H-Z-X, 2.7mm–12mm), I’ll adjust it accordingly.
 
Try this:

View attachment 215404


More zoom and a better angle will certainly help as well.
Ok, I have installed the latest version of BI. Could you please share the screenshots of all the related settings that can help me configure it properly?
 

Attachments

  • a4cc3871-2c82-4992-b407-034d4bad0554.jpeg
    a4cc3871-2c82-4992-b407-034d4bad0554.jpeg
    215.9 KB · Views: 0
  • 91f84cf0-5821-4515-ac7e-3d8a39543182.jpeg
    91f84cf0-5821-4515-ac7e-3d8a39543182.jpeg
    226 KB · Views: 0
  • 1924c1c3-7c88-4fc7-953f-fe6a5a23d364.jpeg
    1924c1c3-7c88-4fc7-953f-fe6a5a23d364.jpeg
    171.4 KB · Views: 0
  • 70baa518-39fa-41a7-b45c-5bb78a83e93c.jpeg
    70baa518-39fa-41a7-b45c-5bb78a83e93c.jpeg
    165.4 KB · Views: 0
  • e10ba738-9267-47d7-ac79-2cbe18ef5861.jpeg
    e10ba738-9267-47d7-ac79-2cbe18ef5861.jpeg
    114.7 KB · Views: 0
  • 72fb5acd-920b-42d1-83ee-2220a9154f52.jpeg
    72fb5acd-920b-42d1-83ee-2220a9154f52.jpeg
    302.7 KB · Views: 0
Personally I think it is a lost cause - that field of view is too wide and the angle is too sharp.

You need a different camera with more optical zoom or move that camera closer - 12mm is good for typically 20ish feet or so.

But things to try and see how many you can get include:

Make the camera 1/2000 shutter and gain 50 - that shutter looks too slow to be able to make out vehicles on a 12MP camera on the 1/1.8" shutter. The image will then be completely black except for plates and headlights/tailights.

Then in BI on this page you need to make object size a lot smaller since all you will see is the plate - it needs to be about the size of a plate in your field of view.

Min contrast make it the min.

Make time should be 0.1

Uncheck the object detection box.

1740416644203.png
 
  • Like
Reactions: Vettester
Another thing to do so you don't waste more time with a camera and angle that isn't suited for it.

Playback a video of a car going by and pause the image with the plate in the middle of the frame and take a snapshot.

Go to CodeProject and select the text in blue:

1740437012590.png


Then this screen pops up and choose file and select the one you just did a snapshot of. If it can't read the plate, then no sense bothering with anything else until you get more zoom and a better angle.

1740437082359.png
 
I cloned the camera and adjusted the AOI for license plates. Even though I’ve adjusted the AOI to focus on the license plate, the captured images are often of other parts of the vehicle rather than the plate being centered in the frame. The vehicles pass through the camera’s view, but the system does not reliably capture the plate when it is in the middle of the frame.
 

Attachments

  • b4d18764-68c2-4343-9c25-556320cfa973.jpeg
    b4d18764-68c2-4343-9c25-556320cfa973.jpeg
    216.5 KB · Views: 0
I'm trying to get the AI module running but each time I try an example plate image the module dies with the following error.

Code:
ALPR_adapter.py: RuntimeError: module compiled against ABI version 0x1000009 but this version of numpy is 0x2000000

CPAI v 2.6.2.
ALPR v 3.1.0
YOLOv5 6.2

I was running Coral 2.2.2

ok i found that @wattaj had the same issue here : Blue Iris and CodeProject.AI ALPR trying to see if there was a solution posted.
 
Last edited:
I'm trying to get the AI module running but each time I try an example plate image the module dies with the following error.

Code:
ALPR_adapter.py: RuntimeError: module compiled against ABI version 0x1000009 but this version of numpy is 0x2000000

CPAI v 2.6.2.
ALPR v 3.1.0
YOLOv5 6.2

I was running Coral 2.2.2

ok i found that @wattaj had the same issue here : Blue Iris and CodeProject.AI ALPR trying to see if there was a solution posted.
The version you posted are old, try update the the current version