Introduction
There’s a growing demand for IP cameras to be able to do more than capture video. G.M. Insights anticipates that by 2025, the global market for IP cameras will reach $16.9 billion and 75.4 million units, largely driven by the desire for AI video analytics. This article will explore the operation of video analytics in surveillance systems, the hardware that enables AI video analytics, and where the technology is deployed.
What Is AI Video Analytics in IP Cameras?
In AI video analytics, the trained neural network analyzes the frame of the video and understands objects, actions, and events. An AI IP camera analyzes or makes inferences on the camera itself, as opposed to a remote server.
How AI video analytics differ from traditional video surveillance
In traditional surveillance, the interpretation of pixels is up to a human operator or a rule-based motion detector. A rule-based motion detector is responsible for the interpretation of frame differences and may cause false alarms. For instance, the swaying of a tree in a field compared to the presence of an intruder in that field may result in an identical alarm signal. On the other hand, AI video analytics will interpret what moved, where it moved, and whether the movement is related to a particular event. The result of that process is a shift from video to structured data.
Role of AI in intelligent IP cameras
A transition has happened from cloud computing to Edge AI Cameras. In the case of cloud computing, it is necessary for the full-resolution video to get transmitted to the data center, where high bandwidth uplink is needed, along with extra time taken by the round-trip delay that could even be up to 200 ms. Edge AI Cameras have the capacity to carry out the inference process locally and reduce latency to 1/10 s. AI IP cameras provide the added benefit of privacy compliance, since raw data is not transmitted and is kept on the device. Furthermore, since the network may not always be available, the Edge AI camera continues to work and stores the data on the device.
Common applications of AI video analytics
Retailers measure queue length and footfall. Warehouses detect forklifts approaching pedestrians. Cities count vehicles and flag stopped cars on highways. Factories check workers’ helmet use near machinery. Each AI video analytics deployment sets its own latency budget and model size and determines the ideal spot to mount the device. Hence, one AI video analytics model seldom meets all the requirements.
Build AI-Powered IP Cameras
How Do AI Video Analytics Work Inside an IP Camera?
Video analytics in IP cameras follow a fixed pipeline from photons to alerts. Each stage has its own compute cost and its own failure mode.
Image capture and video preprocessing
An image sensor generates raw Bayer data, which is then processed by an ISP to perform demosaicing and various other functions, including noise reduction and white balance. It performs other functions such as tone mapping and color correction. A scaler produces a smaller frame, usually 640 by 640 pixels or less. The required color format of the model is also converted by the scaler.
A camera generally runs two parallel streams: a full-resolution stream for encoding, and a low-resolution stream for inference. Preprocessing sets the accuracy of ceiling for a computer vision model, because the image signal processor can only pass certain levels of detail to the model.
AI models and object detection
Objects are detected and located by various YOLO and SSD-based architectures that output bounding boxes and class labels with confidence scores. By using quantization, neural processing units can process networks with minimal loss of accuracy. With the right optimizations to an architecture, it is possible to process up to 30 inferences per second on the low-resolution stream on a modern camera in an SoC. This performance is sufficient to satisfy most surveillance use cases.
Real-time event detection and classification
Detection determines what is in the frame. Event logic determines what happened. A tracker assigns a stable identity to an object across frames, and a rules engine determines if a track is within a zone or a line, and how long it dwells in that zone. For example, if a staff member stays within a restricted polygon for 10 seconds, an event is created. A secondary classifier can be used to distinguish staff from visitors. Another classifier can be used to identify if a vehicle is a van or a truck.
Generating alerts and metadata
The camera can publish events through ONVIF Profile M metadata, MQTT, or HTTP webhooks. Events include snapshots or short video clips. Events are relatively small, typically a few hundred bytes, and can be processed by thousands of cameras by a single video management system. Operators can search events based on object type and time, rather than having to view hundreds of hours of video. Essentially, archived video can be converted to a searchable database using AI video analytics.
What Types of AI Video Analytics Can IP Cameras Perform?
The functions a camera supports depend on its model set and its compute headroom. Most AI IP camera products ship with a core group of analytics and add others through firmware updates.
Person and vehicle detection
Class filtering eliminates all the false detections arising from animals, shadows, rain, and vegetation motion. This camera is able to distinguish between various classes, such as humans, cars, trucks, buses, and two-wheelers. Classifications by themselves reduce the number of false alerts to a very significant extent, and this is where most installations end their process.
Object tracking and intrusion detection
To detect intrusions, tracks link detections and construct trajectories by employing motion and appearance models. Afterwards, each trajectory is compared against a virtual perimeter to determine if an intrusion has occurred. The same trajectories and links allow the detection of speed and direction to help identify people who are entering restricted areas or who are loitering near the area, as well as to help detect persons moving the wrong way in parking lots.
License plate recognition
There are three key stages to plate recognition: identifying a vehicle, locating the plate, and deciphering the characters on the plate. It places demands on the optics. A plate should measure roughly 100 pixels or more in width. The shutter speed must be fast enough to freeze the motion of a vehicle. At night, infrared illumination must be used, so glare from reflections is avoided.
People counting and line crossing
One way to count people is to determine if a tracked individual crosses a virtual line and in what direction. It has been found that tracker quality is as important as detector quality because the loss of an identity of a track results in a double count. Overhead mounting of the camera results in a reduction of occlusion at entrances. Thus, it improves the accuracy of people counting.
What Hardware and Software Enable AI Video Analytics?
AI video analytics depend on a matched stack of sensor, silicon, and firmware. A weakness in any layer limits the whole camera. In practice, the development of AI surveillance cameras depends on aligning local inference, metadata generation, and actionable event handling with the camera’s hardware and firmware capabilities.
ISP processing
The choice of sensors depends on requirements for pixel size, dynamic range, and low-light sensitivity. Larger pixels yield more photons, and HDR modes help with backlit scenes. ISP tuning for analysis vs. viewing is typically very different. Aggressive noise filtering gives a smeared, blurry output, which results in detection of unwanted artifacts. For inference, engineers use a dedicated ISP profile.
For inference, engineers use a dedicated ISP profile. Achieving this balance is a core part of camera design, where sensor selection, optics, and image processing must be optimized together.
SoCs, GPUs, and neural processing units
Camera SoCs with integrated NPU/GPUs from Ambarella, Qualcomm, NXP, Rockchip, and NVIDIA range from ~1 TOPS on low-end models to 30+ TOPS on high-end models. NPUs win performance per watt on fixed convolution workloads, while GPUs are more suitable for flexibility for variable workloads and odd operators. The TOPS figure doesn’t tell the full story. Ultimately, performance depends on operators, memory bandwidth and interconnect, and other aspects that differ by SoC architecture, and engineering teams will need to measure their network on candidate SoCs.
Camera firmware and AI model integration
Firmware is what makes everything work together. This firmware operates the Linux operating system, vendor SDK, the model runtime, and the analytics application. Model training occurs using PyTorch before exporting it in ONNX format. They are then compiled using the vendor toolchain into a format executable by the NPU. The firmware scheduler must make sure that the SoC shares bandwidth between the ISP, encoder, and NPU so that the video stream does not get blocked.
Memory, bandwidth, and power requirements
For the ISP, encoder, and NPU, they all compete for DRAM bandwidth, so memory rather than computation can be the bottleneck. There is another important aspect – power limitations. IEEE 802.3af PoE power source provides only 12.95 W of power and many AI-based IP cameras with infrared LED illumination, window heater, and busy NPU require more power than that.
Launch Your Own AI Camera Product
What Challenges Affect AI Video Analytics Performance?
Lab accuracy rarely survives the first week in the field. Lighting, scene geometry, and compute limits pull video analytics in IP cameras away from benchmark numbers.
Low-light conditions and image quality
At night, the sensor gain increases noise, and detector confidence drops. Increased exposure times cause motion blurring of the subjects. The images taken in infrared mode are black and white and can be handled poorly by models trained on color images unless the training database contains infrared images. Larger sensors, motion-adjusted exposure, and night-time databases are the answer to those problems. These imaging trade-offs directly affect the real-world performance of IP cameras, especially in low-light and high-contrast environments.
False alarms and detection accuracy
False positives arise due to reflections, headlights, insects attracted to IR lights, and spider webs on the camera lens. One should evaluate precision and recall in videos recorded from the actual location rather than only mAP on the publicly available video dataset. Confidence of thresholds should also change based on the zones. A good threshold for the car park might be overwhelming in a street-facing window.
Processing latency and resource limitations
Applications that require quick alerts in a case of safety, like a machine exclusion zone, will need alerts to occur just a few hundred milliseconds after the trigger. Multiple models run together to decrease the frame rate and increase latency. There is a further constraint where a closed casing at high ambient temperatures will force the SoC to lower the clock rate.
Model optimization for different environments
Pruning, quantization-aware training, and knowledge distillation help reduce the size of models for deployment on edge devices. The environment impacts the training dataset too. A model trained on highways where there is not much traffic might find it difficult to work in environments where there is mixed traffic of two-wheelers, auto-rickshaws, and pedestrians riding in the same lane.
How Can OEMs Develop IP Cameras With AI Video Analytics?
OEMs succeed when they treat the camera as one system instead of a sensor plus a chip. Hardware, firmware, and models need to be designed against the same targets.
Selecting the right camera hardware and AI platform
Requirements include target object classes, frame rate, resolution, power consumption, and temperature range. Compare SoCs in terms of coverage by NPU operators, ISP performance, software support life cycle, and availability in the supply chain. Test the actual implementation on a development board first. A camera line typically lives on the sales shelf for seven years or more; the SDK life cycle is as important as performance in an AI IP camera project.
Integrating AI models with camera firmware
Ensure that there is a proper interface defined between the inference engine and the application layer, and publish the events using ONVIF so that they can be consumed by video management systems. The plan for an update strategy must be defined early on. Signed model packages are important because connected cameras are always prone to attacks. Model versions should not be tied to the firmware version.
Optimizing image quality and inference performance
ISP tuning for the encoder side and the inference side should be done separately. Profiling of the NPU should be done layer-wise, and operator fusion should be performed if possible, in the compiler. Zero copy should be done between the ISP and NPU to minimize DRAM bandwidth usage. End-to-end latency measurements should be done between exposure and alert rather than just model time.
Validating analytics in real-world conditions
Perform field testing through seasons, lighting levels, and heights of installation. Create a test set from the data in the field and record the accuracy, precision, recall, and alerts for each camera per day. Introduce a thermal soak test and a regression test suite that runs after each change to the code. Such validation is the hallmark of a demo vs. a real product.
Conclusion
The video analytics powered by artificial intelligence turn the IP camera from a recording device into a sensor that informs about the events happening. The success will depend on proper matching of optics, silicon, firmware, and models, followed by validation of all at actual locations. Silicon Signals is a camera manufacturer focused specifically on designing cameras.