Face recognition for edge applications

Build a face recognition app with AI edge computing

People detection and tracking

Object tracking is a computer vision task used to follow the movement of objects across video frames, helping systems monitor and understand how things change over time. It is used in a wide range of real-world scenarios from estimating speed and direction of moving objects to counting objects in videos.

Systems integrated with object tracking can be configured to trigger real-time alerts when something unusual is detected, such as a person entering a restricted area or a delivery being left too long in one place.

deeplab face recognition

Lightweight face recognition

Detect and identify multiple faces directly from your browser or use the Abraia Vision SDK to develop your custom application. Simply take a picture and label the people you want to recognize and test the face recognition solution. Ready to deploy on your edge hardware using the onnxruntime.

Recognize faces directly on your hardware avoiding privacy concerns.

How to build a real-time face recognition tracking application

Object detection is a computer vision task that involves identifying and locating objects within an image or video. It has numerous applications, including surveillance, autonomous vehicles, and robotics.

In this tutorial, we'll show you how easy is identifying people on image or video with the Abraia Vision SDK. Just follow these simple steps:

1. Install the Abraia Python SDK

You can install the package on Windows, Mac, and Linux:

python -m pip install -U abraia

2. Load and run the face recognition model

Import the FaceRecognizer class from abraia inference. Then use "load_image" and run the model to detect every face in the image. Build the index with a portrait image of every person you want to identify in the image. Finally, identify people on the image using the previously generated search index, and use "render_results" to show the results on the image.

import os

from abraia.inference import FaceRecognizer
from abraia.utils import load_image, save_image, render_results

img = load_image('images/rolling-stones.jpg')
out = img.copy()

recognition = FaceRecognizer()
results = recognition.represent_faces(img)

index = []
for src in ['mick-jagger.jpg', 'keith-richards.jpg', 'ronnie-wood.jpg', 'charlie-watts.jpg']:
    img = load_image(f"images/{src}")
    rslt = recognition.represent_faces(img)[0]
    index.append({'name': os.path.splitext(src)[0], 'embeddings': rslt['embeddings']})

results = recognition.identify_faces(results, index)
render_results(out, results)
save_image(out, 'images/rolling-stones-identified.jpg')
rolling stones members identified

3. Run the face recognition model on video

Import the class "Video" to create a video object to iterate on the frames. Input the path for a video file or "Video(0)" to use your webcam. So, you can directly run the model directly on your camera stream, and show the results using the "show" method from video.

from abraia.utils import Video
from abraia.inference import Tracker

video = Video(0)
tracker = Tracker(frame_rate=video.frame_rate)
for frame in video:
    results = recognition.represent_faces(frame)
    results = recognition.identify_faces(results, index)
    results = tracker.update(results)
    frame = render_results(frame, results)
    video.show(frame)

Congratulations! You have successfully run the face recognition model on a video. This tutorial provides a basic overview, and you can further explore advanced features, optimize your model, and fine-tune parameters based on your specific use case.


Contact Us