Video analytics upgrade from version 23.12 and older¶
To update video analytics from a version older than 23.12 to the current release, you will need to complete a special migration procedure. This procedure is different from a regular update because the module has been significantly redesigned.
Note
For the first installation, follow the instructions at Installing video analytics.
The system requirements for the old and new module are the same. Since the analytics module requires a lot of computing resources, we strongly recommend using it with NVIDIA video cards.
Update NVIDIA GPU drivers¶
The whole procedure of driver update will take 5 to 10 minutes. During this time, video analytics will not operate.
If there will be package conflicts on the server, or you decide to install the drivers in a way different from described below (i.e. not from the official NVIDIA or Ubuntu repository), the downtime may increase.
To update previous versions of drivers to the latest ones, run the following commands on the server you are updating:
apt update
apt install --no-install-recommends nvidia-driver-525
Reboot the server when the installation completes.
Install video analytics transition package¶
On the video analytics server you are updating, install the flussonic-vision
package. To do this, run the commands:
apt update
apt install flussonic-vision
During installation of the flussonic-vision
package, the module will be automatically configured based on the existing flussonic-vision
package configuration.
The Inference and Identification services will be installed. Inference is needed to "take images" from the stream, Identification is for identifying them.
Video analytics module services must be added to Watcher as streamers with inference
and identification
roles, even if they are located on the same server.
After installing the packages, go to the Watcher interface and configure the new analytics system as described below.
Configure video analytics components in Watcher¶
Add the streamer with Inference role¶
The Inference service detects faces and takes biometric "fingerprints" of them. This is a resource-intensive operation, so it is recommended to run the Inference service on a server with a powerful video card.
To add the streamer with Inference role:
- In Watcher UI, go to Streamers page.
- Find the streamer you are updating in the list.
- In the edit form for this streamer, remember or copy the values in the
API URL
andCluster key
fields. - Return to the streamer list page and click + to add a streamer.
- Enter the server name in the form. You can specify a real hostname or an arbitrary string. Specify
inference1
, this is suitable for the first installation. - Select Inference role. Save.
- On the page with the settings of the new streamer, specify
API_URL
as follows:http://CLUSTER_KEY@HOSTNAME:9030
. Instead of CLUSTER_KEY and HOSTNAME, substitute the values ofCluster key
andAPI URL
from step 3. Save your changes. -
In the
/etc/vision/vision-inference.conf
file specifyCONFIG_EXTERNAL=http://CENTRAL_KEY@watcher.lab/central/api/v3/streamers/inference1/streams
, where:CENTRAL_KEY
is the API key that can be found in/etc/central/central.conf
.watcher.lab
should be your real Watcher hostname.
Add the streamer with Identification role¶
The Identification service receives fingerprints from Inference and compares them with its database to identify the detected person. The identification process is not so resource intensive.
Please note that the server name is unique. If you installed two components, they will appear as separate streamers in Watcher.
To add the streamer with Identification role:
- In Watcher UI, go to Streamers page.
- Click + to add a streamer
- Enter the server name in the form. You can specify a real hostname or an arbitrary string. Specify
identification1
, this is suitable for the first installation. - Select Identification role. Save.
- On the page with the settings of the new streamer, specify
API_URL
as follows:http://CLUSTER_KEY@HOSTNAME:9050
. Instead of CLUSTER_KEY and HOSTNAME, substitute the values in the same way as when adding the Inference streamer. Save your changes. -
In the
/etc/vision/vision-identification.conf
file specifyCENTRAL_URL=http://CENTRAL_KEY@watcher.lab/central/api/v3
, where:CENTRAL_KEY
is the API key that can be found in/etc/central/central.conf
.watcher.lab
should be your real Watcher hostname.
Start and test¶
Note
When switching video analytics from the old module to the new one, there will be no more than a minute of downtime.
Disable legacy analytics module¶
To avoid competition for computing resources between the old and new modules running simultaneously, disable the module of the previous version:
- On the updated video analytics server, delete
vision
section from the configuration file/etc/flussonic/flussonic.conf
. - Reload the configuration for the changes to apply:
service flussonic reload
Launch new analytics module components¶
After this, you can run both components of the updated module:
service vision-inference start
service vision-identification start
If everything is configured correctly, the status indicators on the Streamers page in Watcher UI will turn green for the newly added streamers with the inference
and identification
roles.
Further updates¶
The procedures described on this page shall be performed once for each of your analytics servers. As a result, you may find multiple Inference and Identification services running in the cluster. We recommend that you allocate a separate server for Identification service to optimize the use of resources, since identification is much less resource-intensive than Inference.
For further updates:
- If a server performs both analytics roles, you can update
flussonic-vision
package. - If you have moved the Identification service to a separate server, then update
vision-identification
orvision-inference
package according to the server role.