And NVRacronym for Network Video Recorder, is a device or software designed to record, store and manage video from IP surveillance cameras. Unlike traditional DVRs (Digital Video Recorder), which handle analog cameras, NVRs deal with IP cameras that transmit data across the network.
Il video signal coming from the various cameras, compressed to save storage space, can possibly be subjected to some type of processing at the NVR level before being archived. Frigate is an open source NVR software capable of recognize people e objects in real time with the ability to send notifications and trigger specific actions in response to specific events.
Frigate is an NVR with real-time recognition of people and objects
Differently from other products, an NVR like Frigate It is proposed as an advanced solution designed specifically for Home Assistant. Working entirely in locale, Frigate respects users’ privacy and personal data, avoiding the need to upload video streams to cloud services. The “intelligence” of Frigate in fact resides on the systems of users who decide to install the software, without relying on third-party tools accessible only via the network.
Frigate’s defining feature is its ability to perform the real-time object detection via artificial intelligence, using libraries such as OpenCV and Tensorflow. This technology allows you to analyze video streams coming from IP cameras and identify objects and people precisely and promptly.
The Frigate demo installation, accessible via the Web, helps you realize what you can achieve with this NVR smart. As you can check by clicking on EventsFrigate recorded a series of events downstream of streaming video processing recognizing vehicles and people.
Frigate tracks objects in real time and can determine the exact moment a person approaches a highlighted area or when a car passes a gate. This allows you to fine-tune notifications based on precise locations.
Using OpenCV and TensorFlow
Frigate uses OpenCV and Tensorflow to perform real-time object detection. OpenCV is an open source library for computer vision and machine learning: the first version was released in 2000 and today it has become a standard in factalso offering an extensive set of tools for image and video manipulation.
Simplifying complex tasks computer vision Through a high-level library, OpenCV facilitates the creation of advanced applications to detect objects and people, identify them and track them in real time on a video sequence. It also provides algorithms and functions to perform a wide range of operations on images and videos, such as edge detection, segmentation, filtering, and more.
TensorFlow is the well-known open source framework for machine learning developed by Google. It is designed for creating andmodel training: Having pre-trained models for many common applications simplifies the development of new projects. The data is represented as tensorimultidimensional array-like structures, directly managed by the framework during the learning process.
Integration with Home Assistant and Frigate interface
The already mentioned Home Assistant is open source software that provides a centralized hub for managing home automation devices and services. The developer community contributes every day to constantly improve the platform, ensuring broad compatibility with a vast array of smart devices.
Frigate is designed to work closely with Home Assistant via a custom component. This means Home Assistant users can easily deploy Frigate into their existing system, creating a perfect synergy between surveillance features and smart home control.
In the image (source: Frigate) you can see an example of integration with Home Assistant. Highlighted are the video sequences acquired by the NVR in response to certain events (the entry of a person into the camera control area).
However, Frigate has its own interfaceaccessible from both desktop systems and mobile devices.
Using Google Coral Accelerator
The optional, but strongly recommended by Frigate developers, use of an accelerator Google Coral allows you to benefit from superior performance compared to the best CPUs while reducing false positives.
Google Coral Accelerator is a family of artificial intelligence co-processors developed by the Mountain View company for running inferences with machine learning models on edge devices. These are accelerators designed to significantly improve the performance of operations artificial intelligenceallowing resource-constrained devices to run complex models in real time.
The heart of the Google Coral Accelerator is the Tensor Processing Unit (TPU), a specialized processing unit for tensor operations. The main goal is to accelerate machine learning operations on edge devices. This means that models can run directly on devices very close to end users without the need for a connection to a cloud server.
In the case of the Frigate NVR, Google Coral Accelerator improves performance object detection based on TensorFlow, allowing the system to operate in real time and process over 100 frames per second with minimal impact on system resources. This processing power guarantees coverage of every single frame and reduces the risk of “missing” important events.
Additional Frigate Features
Frigate aims to present itself as a complete solution for video surveillance thanks to a series of additional features:
- Support communications via MQTT for easy integration with other systems. The MQTT protocol uses a lightweight messaging model publish/subscribewhere devices can publish (send) or subscribe (receive) to specific “topics” (topics). We have already seen, in detail, what MQTT is and why it has become a standard in the world ofInternet of Things (IoT).
- Video recording with settings retention based on the detected objects. Rather than continuously recording, Frigate can be configured to begin recording when a specific object (such as a person or vehicle) is detected and stop recording when the object is no longer present. The settings of retention determine how long videos associated with certain objects are retained.
- 24/7 recording for continuous coverage. Frigate also supports the continuous recording, regardless of the presence or absence of objects. In this way it is possible to ensure complete coverage of video activities for all cameras managed within the system.
- Re-streaming via RTSP to reduce the number of connections to cameras. Instead of connecting directly to each camera, Frigate can collect video streams and redistribute them through RTSP, simplifying connection management. RTSP (Real Time Streaming Protocol) is a protocol used for the transmission of audio and video data in real time.
- WebRTC and MSE support for one live view low latency. WebRTC (Web Real-Time Communication) e MSE (Media Source Extensions) are technologies that enable real-time video viewing with low latency directly within a web browser. Frigate’s support for WebRTC and MSE means users can view cameras in real-time with minimal delays, making completely immediate viewing experience.
Recommended hardware configuration to install and use Frigate
Frigate NVR is designed to support a wide array of hardware devices. The authors of the project, however, recommend cameras that produce streaming video H.264 con audio AAC. This way you can benefit from maximum compatibility with all the features of Frigate and Home Assistant. It’s also helpful that the camera supports multiple substream to allow the use of different resolutions for tracking, streaming and recording purposes without recoding.
Between recommended IP cameras there are those branded Dahua, Hikvision and Amcrest, in that order. Both Dahua and Hikvision products both have multiple streams with configurable resolutions and frame rates ensuring rock-solid streaming. Both manufacturers have in their catalogue…