.
StoryThere are a few free Kria accelerated apps by Xilinx. Here I am going to the test run the Aupera's face recognition app. The app is not free, but you can request an evaluation trial. I requested a 60-days free trial and downloaded the app.
.
Setup and install the appI followed the instructions of Get Started Documentation to download the app image and and flashed the image to a microSD card. After inserting the microSD card into the slot on the KV260 carrier card and connecting to the KV260 Starter Kit, you can power up the SOM and boot to Linux.
With a terminal program, I login the platform and set a password.
.
Before you can run the Face Recognition app, you need to create an access key, in the form of a cred.json file, from the Xilinx Appstore.
.
Starting the Face Recognition appNext, copy the cred.json file to this directory: /D0/aup-pkgs/cred.json
. From the KV260 command prompt, run the following commands to load the face recognition app:
sudo xmutil listapps
sudo xmutil unloadapp
sudo xmutil loadapp aupera-kv260-fr
Now you can start the app with the following command:
sudo som-start.sh
.
Running the Aupera AI Client softwareDownload the Aupera AI Client from Aupera download page. Run the client after extracting the software package. Connect the client software to the KV260 Starter Kit using the IP of the KV260. The AI Client software will default to the "Camera Hub" view.
Here, you can configure to connect the Kria SOM to some RTSP/RTMP sources. For test purposes, configure a camera using the following link:
rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov
Click the "Play" button to confirm that the AI Client software can receive and decode the video stream.
.
Kria SOM RTSP/RTMP sourceNext, you are going to configure a test source for the face recognition app. Suitable sources include RTSP/RTMP streaming server, as well as IP cameras In this test run, I configured a RTMP server using nginx as the source. I followed this guide: How to set up your own private RTMP server using nginx
to setup the RTMP streaming server. I was using a Windows 10 PC, so I downloaded the Windows binary for nginx with the RTMP module already included from here: http://nginx-win.ecsds.eu/download/. Make sure you download the Gryphon version of the nginx. It is a zipped file. You need to unzip the file and configure the nginx server according to the guide above.
.
Next download and install the OBS Studio software from here: https://obsproject.com/download. You can stream your camera or a local video file. Setup a streaming source as explained in the Aupera's Face Recognition app Getting Started guide.
.
To use a local video file to stream, just add a media file source and select the local file. I used a video file downloaded from here: https://pixabay.com/videos/alley-people-walk-street-ukraine-39837/. Remember to enable the "loop" option after selecting the file. To start streaming, click the "Start Streaming" button.
.
.
Create a gallery for Face RecognitionBefore you can run the face recognition with the AI Client Software, you must create a gallery of faces. You need a gallery of minimum 10 faces.
You can download some faces from the following datasets:
In the test run, I use the CelebA dataset. I did a "batch new faces" import those faces.
.
Run the Face Recognition
With a face gallery, you can now run the face recognition to a incoming video stream. At the AI Client, select a video stream, select the gallery via the dropdown and then click the "Run Face Recognition" button. You then clieck the "View Live Result" button in order to view the similarity predictions. I wait for few minutes before the predictions appear.
.
.
Download linksAupera Face Recognition for Kria SOM
Aupera Face Recognition Client Software & User Guide
Aupera Facial Recognition Accelerated App - Getting Started Guide
.
.
.
Comments