Listen to this Post

Introduction:
For years, the security industry has pushed a narrative that intelligent video surveillance requires expensive “smart” cameras and recurring cloud subscription fees. This is a costly misconception. By decoupling video analytics from the camera hardware and centralizing processing on the recording server using open-source AI, businesses can achieve superior threat detection while slashing both capital and operational expenses. This approach not only democratizes high-end security but also gives organizations complete control over their data and infrastructure.
Learning Objectives:
- Understand the architecture of a decentralized AI surveillance system using Blue Iris and CodeProject.AI.
- Learn how to configure local AI processing to offload analytics from expensive cameras to a central server.
- Master the implementation of hardware acceleration using Google Coral TPUs and NVIDIA GPUs for optimal performance.
- Acquire the skills to reduce false alarms and automate security workflows through scripting and API integration.
1. Why Centralized AI Processing Trumps “Smart” Cameras
The fundamental flaw in the “smart camera” model is the assumption that intelligence must reside at the edge. For a business with dozens of cameras, the cost of AI-enabled units can range from \$700 to over \$2,200 each, representing a massive upfront investment. Furthermore, these cameras often tie you into proprietary ecosystems with ongoing cloud storage and analysis fees.
A properly designed Blue Iris system inverts this model. By using affordable, high-quality IP cameras (often under \$200) that simply stream video, all the heavy lifting is moved to the recording server. This server runs CodeProject.AI, a free and open-source AI service that performs computer vision tasks like object detection, facial recognition, and license plate reading. This architecture provides several key advantages:
- Lower Hardware Costs: You are not paying a premium for embedded AI chips in every camera.
- Zero Cloud Reliance: All video and analysis data remains on-premises, enhancing privacy and security.
- Flexibility: You can choose the best camera for each location based on image quality, not AI capabilities.
- Upgradeability: As AI models improve, you simply update the server software without replacing physical cameras.
- Setting Up Your Local AI Engine: CodeProject.AI and Blue Iris
The core of this system is the integration between Blue Iris and CodeProject.AI. Here is a step-by-step guide to get them communicating.
Step 1: Install CodeProject.AI Server
Navigate to the official CodeProject.AI website and download the installer for your operating system (Windows is the most common for Blue Iris). Run the installer, which will set up the server as a service. While it can run on the same machine as Blue Iris, it can also be containerized via Docker and run on a separate powerful machine for resource isolation.
Step 2: Configure Blue Iris to Use the AI Server
Open the Blue Iris settings menu and navigate to the AI tab. Check the box labeled “Use AI server on IP/port”. By default, CodeProject.AI listens on port 32168. Ensure this is set correctly. You should be able to leave most settings as default, but you can adjust the object detection sensitivity (e.g., to “High” for better accuracy).
Step 3: Enable AI per Camera
For each camera you want AI to analyze, go to its properties and select the Trigger tab. Ensure “Motion Sensor” is enabled, then navigate to the Artificial Intelligence subsection. Select “CodeProject.AI” as the server. Here, you can define which objects to detect (e.g., “person, car, truck, bicycle”). This ensures the AI only flags events relevant to your security policy.
- Supercharging Performance with Hardware Acceleration (Coral TPU & NVIDIA GPU)
While a powerful CPU can run AI models, dedicated hardware accelerators provide a massive performance boost, allowing for real-time analysis of multiple streams with minimal latency.
Leveraging the Google Coral TPU
The Google Coral Edge TPU is a specialized ASIC designed to run lightweight AI models like YOLOv5 and MobileNet at high speed and low power. It is the most cost-effective way to accelerate inference. The M.2 version is generally recommended over USB variants, which have been documented as less stable.
Installation: Install the Coral TPU in a compatible M.2 slot (using a PCIe adapter if necessary). Install the Edge TPU runtime on your system. For Linux systems, this involves adding the Coral Debian package repository and running sudo apt-get install libedgetpu1-std. On Windows, the drivers are typically installed alongside the CodeProject.AI Coral module.
Configuration: In the CodeProject.AI dashboard, ensure the “Object Detection (Coral)” module is installed. In the Blue Iris AI settings, you can specify the model size (e.g., “Small” or “Medium”) to balance speed and accuracy. Users have reported detection times between 100-200ms using the medium model with a Coral TPU.
Troubleshooting: If you encounter errors, ensure “Custom Models” is unchecked in the Blue Iris AI settings, as the Coral module may not support certain custom models. Also, disabling “Static Object Analysis” can prevent flooding the TPU with unnecessary requests.
Harnessing the Power of NVIDIA GPUs
NVIDIA RTX GPUs with CUDA cores are excellent for AI processing and video rendering. In a Blue Iris setup, the NVIDIA GPU handles all video decoding and rendering, freeing up the server CPU for other critical tasks.
Configuration: In Blue Iris Settings -> Cameras, set “Hardware Accelerated Decode” to your NVIDIA GPU. This offloads video decoding.
AI Acceleration: Blue Iris v6 exposes the GPU through multiple execution providers like DirectML (Microsoft’s universal GPU AI layer). In the AI settings, you may see multiple entries for your GPU. To identify the best one, trigger an AI detection and monitor Task Manager. The option that shows a “Compute” or “CUDA” usage spike is the correct one.
Web Server Streaming: For remote viewing, you can also use the GPU for encoding. In Blue Iris Settings > Web Server > Advanced, you can configure NVENC for each streaming profile to reduce CPU load.
- Reducing False Alarms: The Art of AI Tuning
The primary goal of AI in surveillance is to filter out the noise. Here are key strategies to minimize false positives.
- Motion Sensor Tuning: The AI is triggered by motion events. Therefore, reducing the number of unnecessary motion triggers is the first line of defense. Adjust the minimum object size, minimum contrast, and duration in the Trigger tab to ignore small animals, shadows, and leaves.
- AI Confirmation and Confidence Levels: Ensure that alerts are only triggered after AI confirmation. You can set different confidence levels for different object types (e.g., a higher confidence threshold for “car” than for “person”). The “Cancel duplicates” and “Alert cooldown” settings also help suppress a flurry of alerts from the same event.
- Zones and Areas of Interest (AOI): Define specific zones within a camera’s view where motion detection and AI analysis should be active. This prevents alerts from irrelevant areas like a busy street or rustling trees.
5. Automating Security with PowerShell and the API
Beyond detection, you can automate responses. Blue Iris can execute programs or scripts in response to alerts.
- PowerShell Integration: In a Blue Iris “Action Set,” you can use the ‘Run a program’ action to launch a PowerShell script. This allows for complex automations, such as sending formatted alerts to a ticketing system, controlling smart home devices (e.g., turning on lights), or logging events to a database.
- RESTful API Control: CodeProject.AI Server exposes its capabilities through a RESTful HTTP API. You can use this API to query the server’s status, manage modules, or even perform ad-hoc analysis on images. This is particularly useful for integrating the surveillance system with other enterprise IT applications.
- Service Management: Administrators can manage the Blue Iris service via the command line. For example, to stop the service from an elevated command prompt:
net stop "Blue Iris". To start it:net start "Blue Iris".
6. Hardening the Infrastructure: VLANs and API Security
A surveillance system is a critical asset and must be secured.
- Network Segmentation: Place all IP cameras on an isolated Virtual Local Area Network (VLAN) with no internet access. The Blue Iris server should have a dual NIC setup: one interface for the management network (with internet access) and another for the camera VLAN. This prevents a compromised camera from being used as a pivot point into your corporate network.
- API Security: By default, the CodeProject.AI Server REST API has no authentication. In a production environment, this is a significant risk. You should implement a reverse proxy to add an authentication layer (e.g., OAuth 2.0) in front of the API. Ensure that all communication between Blue Iris and the AI server is over HTTPS to prevent eavesdropping. Secrets and API keys should never be hardcoded in scripts or configuration files; use a secrets management solution instead.
What Undercode Say:
- Key Takeaway 1: The cost-saving potential of a centralized AI system is immense. By shifting intelligence from cameras to the server, businesses can save thousands of dollars on hardware and avoid perpetual cloud subscription fees.
- Key Takeaway 2: The combination of Blue Iris with open-source AI (CodeProject.AI) and affordable hardware accelerators (Coral TPU) is a winning formula that outperforms many commercial, closed-source solutions. It provides a high-performance, flexible, and secure surveillance backbone.
Analysis: The approach advocated by Akzium is a masterclass in modern IT cost optimization. It challenges the vendor lock-in strategy prevalent in the security industry. By leveraging open-source software and commodity hardware, small and mid-sized businesses can achieve enterprise-grade security capabilities. The key to success lies not in purchasing the most expensive equipment but in the intelligent design of the system architecture and the proper tuning of its components. This model is highly replicable and represents a significant shift towards DIY, on-premises AI solutions that prioritize data sovereignty and total cost of ownership.
Prediction:
- +1 The trend of local AI processing will accelerate, driven by growing privacy concerns and the desire to eliminate recurring costs. More businesses will adopt on-premises AI for video surveillance, viewing it as a strategic asset rather than an operational expense.
- +1 The democratization of AI through open-source projects like CodeProject.AI will continue to disrupt the security market. We will see a proliferation of custom-trained models for specific use cases (e.g., package delivery, loitering detection), further enhancing the utility of these systems.
- -1 The complexity of setting up and properly securing these systems will be a barrier for some. This creates a niche for specialized integrators like Akzium, but also a risk of misconfiguration leading to security vulnerabilities.
- -1 As hardware acceleration becomes more common, the supply chain for TPUs and GPUs could become a bottleneck, leading to price hikes and availability issues, similar to the cryptocurrency boom.
▶️ Related Video (66% Match):
🎯Let’s Practice For Free:
🎓 Live Courses & Certifications:
Join Undercode Academy for Verified Certifications
🚀 Request a Custom Project:
Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands
IT/Security Reporter URL:
Reported By: Charlescrampton A – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅


