Installation on NVidia Jetson devices
SmartFace Platform can be distributed in form of docker images specially built for NVidia Jetson embedded devices with ARM architecture.
Currently, we support Jetson Xavier NX and Jetson AGX Xavier. It is not possible to deploy SmartFace on other ARM devices like Raspberry Pi or similar. For successful installation it is required that you have an admin level experience with Linux OS and minimal basic knowledge of docker technology - understanding docker images, docker compose, docker container and docker registry. It is also required that you understand that Jetson processors have ARM architecture instead of regular x86 architecture.
The deployment on Jetson devices allows you to install distributed solution, where you do not need a central powerful machine for processing of all video streams, but rather multiple small and cheaper devices, which will process the video stream closer to the camera. This kind of deployment can be also used for simpler and smaller access control use cases, where seamlessness is not top priority. For example opening doors for your regular customers at gyms and fitness centers.
There are several requirements on hardware, operating system and other software that is needed for successful installation of SmartFace Platform on NVidia Jetson device.
Required Jetson device
Currently, SmartFace Platform can be distributed as docker images built for NVidia Jetson devices. We have tested the build on Jetson Xavier NX and Jetson AGX Xavier. It is possible that other embedded devices will work as well, but it is currently not supported.
It is required to have Ubuntu 18.04 distribution installed on your embedded device. It is required to have device drivers installed and JetPack SDK 4.5.1 installed on your device. JetPack SDK version can vary based on the manufacturer of the Jetson device. This guide describes the deployment on Jetson device distributed directly from NVidia. For more information see Jetson device manufacturers.
SmartFace Platform Jetson devices is distributed in form of docker images, therefore it is required to have Docker installed on your Jetson device. SmartFace Platform requires Docker version 20.10.0 and higher.
It is required to have latest version of NVidia Docker driver installed your Jetson device.
For deployment of SmartFace Platform on Jetson device is used Docker Compose. It is required that you have Docker Compose installed on your device. SmartFace Platform requires Docker Compose version 1.29.0 and higher.
Obtain the SmartFace license
To obtain your license please follow these steps:
Login to the container registry using credentials found in our Customer Portal (for the old CRM portal please visit the old CRM). Run command:
docker login registry.gitlab.comand when prompted, enter provided credentials
Identify hardware ID (HWID) for your machine with command:
docker run --privileged registry.gitlab.com/innovatrics/smartface/license-manager:3.2.7
This process work for native Linux. For WSL2 (e.g. Linux containers on Windows) you need a special license for which you need to contact our sales.
Obtain the license for your HWID from our Customer Portal (for the old CRM portal please visit the old CRM) for product SmartFace Embdded
- Download the license file
Before you start the deployment you need to manually perform following steps:
Open SmartFace GitHub repository and download a zip copy
Unzip downloaded files and copy content of
sf-docker/nvidia-jetsonfolder to the dedicated directory on your Jetson device, for example
iengine.liclicense file to the dedicated directory, for example
/srv/smartface/iengine.licso your directory should looks like:
[user@jetson1 smartface]$ ls -ld $PWD/* total 44K drwxrwxr-x. 4 root root 170 Nov 11 14:29 . drwxr-xr-x. 3 root root 23 Jun 30 11:25 .. -rw-rw-rw-. 1 user user 18K Nov 21 07:58 /srv/smartface/docker-compose.yml -rwxrwxrwx. 1 root root 1.9K Oct 26 14:39 /srv/smartface/.env -rw-rw-r--. 1 user user 1022 Nov 9 14:56 /srv/smartface/.env.fa -rw-rw-r--. 1 user user 2.1K Oct 19 13:25 /srv/smartface/.env.sfac -rw-r--r--. 1 user user 3.4K Oct 19 12:07 /srv/smartface/.env.sfstation -rw-rw-r--. 1 user user 196 Oct 11 14:40 /srv/smartface/iengine.lic -rwxrwxrwx. 1 root root 3.2K Sep 5 08:46 /srv/smartface/run.sh drwxrwxr-x. 3 user user 47 Oct 19 15:06 /srv/smartface/sf_dependencies
Login to the container registry using credentials found in our CRM portal. Run command:
docker login registry.gitlab.comand when prompted, enter provided credentials
Now you can run the
run.shscript deploying SmartFace Platform with a default configuration. Once the script is successfully finished all the services should be up and running.
Steps performed by the run.sh script
When you run the script on a machine with an empty docker engine (no previous images/containers), the script performs following steps:
Checks the presence of
iengile.licfile. If not present, the script ends.
Creates a docker network called
sf-network. This docker network is used by all other containers created by this script and enables containers to communicate with each other.
Sets up services from
sf_dependenciesthat SmartFace Platform needs to run properly. Docker will check the presence of these images on local docker host. In case the images are not present, images are pulled from the container registry. The download can take up to several minutes.
Docker spawns containers from prerequisites images, for example:
- PGSQL database
- Minio NoSQL database
Parses SmartFace Version and registry information from
Creates PostgreSQL database named “SmartFace”.
sf-adminimage to perform database migration - creates required table structure and seeding the database. The image is pulled from the container registry if it is not present on the machine. This step will fail if the docker login was not performed correctly and script ends.
Executes the SmartFace Platform Docker Compose file. This results in SmartFace Platform services to be up and running on the machine. The execution does the following
a) Pulls SmartFace Platform images from container registry. The download can take up to several minutes.
b) Builds new SmartFace Platform images that will contain the provided license file. This is done using the license.Dockerfile which just adds a new layer containing the license file to an arbitrary existing image. This step can be replaced by mounting the license file to the containers.
c) Spawns containers from images, for example:
- camera service
- detector service
- extractor service
d) Uses the values from .env file to properly configure SmartFace Platform containers so everything works properly. To use this file to configure SmartFace Platform for different deployment than described here see docker documentation..
When the script finishes, SmartFace will be available to use on the Jetson device with all services up and running.
Jetson deployment differences
SmartFace Platform works slightly different on Jetson devices than on regular x86 machines. There are less resources available than on server machines or some of the technology used is not working on ARM devices. Following chapters are describing differences in SmartFace Platform deployed on Jetson device.
SmartFace Platform deployed on Jetson devices is using NVidia hardware-based decoder for video streams decoding. This feature significantly unburdens CPU usage, which can be used for other processing like detection, extraction or matching. When you define the
video source string, you can configure HW decoding. For more information read below.
Body parts detection not available
OpenVINO framework is not running on Jetson devices. Body part detection and pose estimation is therefore not available within SmartFace Platform build for Jetson device.
Video source string definition
When setting up a camera in SmartFace Platform it is required to setup a source, from which the video/stream will be processed. In x86 architecture the video source is set as a string to the rtsp stream available on your network or file path to the location on your disk drive. Unfortunately, in ARM architecture it is necessary to define the whole GStreamer pipeline string as a definition of the video source. The string needs to contain several parameters like the definition of the codec, decoding type, etc. The definition of the string can be different from camera to camera and you need to understand how the pipeline works to concatenate the string. We provide several examples how the string (GStreamer pipeline) can look like:
Example of the string used as a video source for the video stream for SmartFace Platform deployed on x86 machine:
String for RTSP with HW decoding
Example of the string used as a video source for the video stream for SmartFace Platform deployed on ARM device (RTSP stream with HW decoding):
rtspsrc location=rtsp://user:firstname.lastname@example.org:554/onvif/H.264/media.smp ! rtph264depay ! h264parse ! nvv4l2decoder ! nvvidconv ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink
String for RTSP without HW decoding
Example of the string used as a video source for the video stream for SmartFace Platform deployed on ARM device (RTSP stream without HW decoding):
rtspsrc location=rtsp://user:email@example.com:554/onvif/H.264/media.smp ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! appsink
String for video file
Example of the string used as a video source for the video file stored locally for SmartFace Platform deployed on ARM device (video file with HW decoding):
filesrc location=/my video/my_video.mp4 ! qtdemux ! queue ! h264parse ! nvv4l2decoder ! nvvidconv ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink
String for video file online
Example of the string used as a video source for the video file stored online for SmartFace Platform deployed on ARM device (video file located online with HW decoding. This can be used for example for video files located in MinioDB:
souphttpsrc location=http://video.company.net/QAVideo/my_video.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! nvv4l2decoder ! nvvidconv ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink
There is no ARM build of MS SQL database for ARM architecture, therefore only Postgre SQL can be deployed on the Jetson device.