- 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)
Step 2: Install CodeProject.AI
Step 3: Add ALPR Module to CodeProject.AI
Step 4: Configure Blue Iris AI Settings
Step 5: Set Up Your Camera for ALPR
Step 6: Test and Troubleshoot
Step 7: View and Use Plate Data
Final Notes
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!
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:
- Object Detection (YOLOv5 6.2): This detects the license plate in the image. Click “Install” next to it.
- 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!