FSDK has been updated to version 5.12.0.
In this version, the Liveness FlyingFaces estimator has been updated.
Fixed errors
The error has been fixed where FaceStream could send an incorrect preview URL in the "preview > live > url" field of the LUNA Streams stream, which caused the following error and FaceStream continued to work:
Failed to validate input json' to occur in the FaceStream logs. Path: 'streams.0.preview.live.url', message: 'URL host invalid', description: Bad/incomplete input data.
This error could occur due to the fact that LUNA Streams was started after FaceStream (for example, the server was restarted, where both FaceStream and LUNA Streams are running), and in order to determine its IP address, the FaceStream application needs to either connect to the LUNA Streams service, or read the predefined IP address in the system environment variable "VL_FACE_HOST" (see section "Nuances of working with stream preview" of the administrator manual).
Now if the IP address of FaceStream is determined by connecting to LUNA Streams and the service starts after FaceStream, then FaceStream will terminate with the error "Failed to get local IP address. Reason ...".
If the IP address of FaceStream is determined using the correctly set "VL_FACE_HOST" environment variable, then such an error will not occur.
The error has been fixed where some detections with human body coordinates for the best shots were not sent to LUNA PLATFORM.
Accordingly, these detections were absent in events generated using the dynamic handler specified in the "detection_handler" parameter.
A mechanism for migrating LUNA Streams settings set in the LUNA Configurator service has been added.
LUNA Streams update
Previously, LUNA Streams settings were automatically migrated when migrating the LUNA Configurator service. Now LUNA Streams settings are migrated using a separate migration mechanism. See the upgrade manual for more details.
Launch LUNA Streams from scratch
Now the LUNA Streams settings are loaded into the Configurator service using the migrations mechanism. The FaceStream settings are still loaded into the LUNA Configurator using the "load_dump.py" script. See installation manual for more details.
Fixed errors
FaceStream crash has been fixed that occurred when an incorrect address was specified in the "lunastreams" > "origin" parameter of the FaceStream settings.
Now the FaceStream operation is finished correctly, and the corresponding error is written to the logs.
The error has been fixed where FaceStream would output a stack trace instead of an error if the port it was running on was busy.
Now the error Error occurred on initializing application. Description: bind: Address already in use is displayed in the FaceStream logs.
Fixed errors
The error was fixed that caused the stream error counter to be processed incorrectly.
If during the "period" the number of errors did not reach the value "max_error_count", then the error counter was not reset, but continued to increase.
Support for the new LUNA PLATFORM 5 authorization system was added.
New optional authorization field "event_handler > authorization" was supported in the stream creation settings, in which you need to specify "token" or "account_id". The "event_handler" > "authorization" > "account_id" parameter must match the "account_id" parameter set when creating the stream. If the new authorization field is not filled in, the "account_id" set when creating the stream will be used.
When upgrading to new version of LUNA Streams, the database will be automatically migrated to support the new field.
Starting from this version of the FaceStream build, it is required to use the LUNA PLATFORM version at least v.5.32.0.
The Python version was updated to 3.10 in the LUNA Streams and LUNA Configurator containers.
All commands related to using Python inside containers were updated in the documentation, namely, commands like "python3.9" were replaced with "python3".
Fixed errors
The error was fixed where the "jpeg_quality_level" setting was not working correctly on the GPU.
With the "request_type" = "jpeg" value, only the first source frame was compressed. The rest of the source frames were not compressed.
With the "request_type" = "json" value, the source frames were not compressed, but all warps were compressed, except for the first one.
FaceStream changes
DROI calculation mechanism was changed.
Previously, DROI represented coordinates relative to ROI, taking into account image rotation. DROI now represents coordinates relative to the original frame.
The FaceStream stream processing report regularly sent to LUNA Streams was expanded with new "last_frame" and "live" fields containing the URLs of the image's last frame and the live stream.
These URLs can be received using specific requests to the LUNA Streams service (see below).
LUNA Streams service changes
Migration was added to LUNA Streams, in which all existing streams will be updated in accordance with the new DROI calculation mechanism (see FaceStream changes above).
When updating FaceStream, it is necessary to update LUNA Streams.
A "include_luna_services" parameter was added to "get health" request.
The "include_luna_services" parameter allows you to enable or disable healthcheck for the LUNA PLATFORM services that the LUNA Streams service depends on. If this option is enabled, then additional requests are sent to the "/healthcheck" resources of these services.
Two new resources were added - "get last frame preview" and "get live preview" that allow you to get the values of the "last_frame" and "live" fields from the FaceStream stream processing report (see FaceStream changes above).
New parameters "preview" > "last_frame" and "preview" > "live" were added to the "get streams logs" request.
The automatic restart of the stream now has its own statuses (the "status" parameter).
The automatic restart statuses are listed below:
The status of the automatic restart can be obtained using the "get stream" request.
The DROI calculation mechanism was changed.
Previously, DROI represented coordinates relative to the ROI, taking into account the rotation of the image.
From now on, DROI represents coordinates relative to the full frame.
All existing streams will be updated according to the new DROI calculation mechanism.
The live and last_frame stream preview were added.
See last frame preview and
last frame preview for details.
The stream autorestart status was added. The stream autorestart mechanism was updated - the fatal error concept was added.
For more information see autorestart section of get stream response and
The script for uploading FaceStream and LUNA Streams dumps to the LUNA Configurator service can now be run on Python 2.x and Python 3.x versions.
To run the script on the Python 2.x version, you must use the "python" command. To run the script on Python 3.x, you must use the "python3" command.
Also, the script for loading dumps was added to Docker Compose. Now, to use the "start_facestream.sh" script, you only need to have running LUNA PLATFORM containers and an activated license.
FaceStream fixed errors
LUNA Streams service changes
The getStream and getStreams
requests have been accelerated in the presence of a large number of logs.
Now, for failed requests to LUNA PLATFORM services, the FaceStream logs will show the "Luna-Request-Id" value generated by FaceStream.
Based on the generated "Luna-Request-Id" value, you can find an error in the logs of LUNA PLATFORM 5 services.
A script "load_dump.py" was added to the "example-docker/luna_configurator/dumps/" directory of the distribution package, which enables you to upload FaceStream and LUNA Streams settings to LUNA Configurator.
Example of command to upload settings for LUNA Streams service: python -m load_dump --dump-file=streams_dump.json --luna-config=http://127.0.0.1:5070/1
This method is taken as the main one in the FaceStream installation manual (see the "Uploading settings to LUNA Configurator" section).
FaceStream fixed errors
LUNA Streams service changes
New parameters "duration" and "progress" were added to the "video_info" field of the response to a request to get information about stream ("get stream" request).
The "duration" parameter displays the total duration of the videofile in seconds, and the "progress" parameter displays the current videofile progress from 0 to 1, where 0 is the beginning of the videofile, 1 is the end of the videofile.
LUNA Streams service changes
Fixed bug which allowed to set very large values to stream data, stream policies and stream feedback.
See createStream and
postStreamsFeedback documentation for more info.
The ability to get the detection time (in seconds) of a face or body relative to the start of the video was added.
This time is stored in the "detect_ts" field of the LUNA PLATFORM event.
Getting face or body detection time is available only for the "videofile" source type.
FaceStream fixed errors
LUNA Streams service changes
New "endless" parameter was added to the "create stream" and "put stream" requests of the LUNA Streams service, which enables you to control the restart of the stream when a network error is received (the error is determined by the system as an eof (end-of-file) marker).
The parameter is available only for the "udp" and "tcp" source types.
If the endless parameter takes the value true, then in case of receiving eof and successful reconnection, the processing of the stream will continue. If all reconnection attempts failed (see the "healthcheck" section), then the stream will take the "failure" status. If the parameter takes the value false, then the processing of the stream will not continue and the status of the stream will take the "done" status.
When using a video file as a "tcp" or "udp" source, it is assumed to use the value false. This will avoid re-processing an already processed fragment of the video file when receiving eof. If, when using a video file, the value of the endless parameter is true, then after the processing is completed, the video file will be processed from the beginning.
LUNA Streams service fixed errors
Two new launching keys for FaceStream were added - "CONFIG_RELOAD" and "PULLING_TIME".
The "CONFIG_RELOAD" launching key enables checking for changes in the "FACE_STREAM_CONFIG" section of the LUNA Configurator service and takes the following values:
The "PULLING_TIME" launching key sets the period for receiving new parameters from the "FACE_STREAM_CONFIG" section of the LUNA Configurator service in the range [1…3600] sec. Used in conjunction with the "CONFIG-RELOAD" tag. The default value is "10".
Launching keys are also available in FaceSteam mode with configuration files.
New parameter "min_body_size_threshold" was added to the "filtering" section in the streams management settings.
The parameter sets the body detection size, less than which it will not be sent for processing. It is calculated as the square root of the product of the body detection height (in pixels) by its width (in pixels).
Example: min_body_size_threshold = sqrt (64*128) = 90.5
If the value is "0", then filtering of body detection by size will not be performed.
Fixed errors
The ability to group streams was added. Grouping is intended to combine streams with multiple cameras into logical groups. For example, you can group streams by territorial characteristic.
Any stream can belong to several groups, as well as none.
The group is created using the "create group" request. To create a group, you need to specify the required parameters "account_id" and "group_name". If necessary, you can specify a description of the group.
Stream can be linked to a group in two ways:
If the stream was linked to a group, then the "get stream" or "get streams" requests will show the group in the "groups field.
The parameter "preferred_program_stream_frame_width" parameter was added to the streams management settings, intended to work with protocols that imply the presence of several channels with different bitrates and resolutions (for example, HLS).
If the stream has several such channels, then this parameter will enable you to select from all the channels of the whole stream the channel whose frame width is closer to the value specified in this parameter.
For example, there are 4 channels whose frame widths are 100, 500, 1000 and 1400. If the parameter "preferred_program_stream_frame_width" is equal to "800", then a channel with a frame width of 1000 will be selected.
If the stream has only one channel, this parameter will be ignored.
This parameter is used only for "tcp" or "udp" types.
The principle of creating streams was changed. Previously, settings for streams were specified in the "input.json" configuration file or in the "FS_CONFIG" section of the Configurator. Now the settings for streams are set in the body of the JSON format and sent using an HTTP request to the LUNA Streams service (see the "create stream" request in the "StreamsReferenceManual.html" document of the distribution).
After sending an HTTP request with the given parameters to the LUNA Streams service, the parameters are added to the LUNA Streams database under the unique identifier "stream_id". Depending on the number of available streams in the license (this information comes from the LUNA Licenses service), the stream parameters enters the internal queue, where it is in the "pending" status until FaceStream takes them from the queue for further processing (see the detailed description of the service in the "Interaction of FaceStream with LUNA Streams" in the administrator manual).
Licensing changes:
The service can process a certain number of streams simultaneously. The number of such streams is set in the LUNA PLATFORM 5 license key parameter, which determines the streams number for LUNA Streams operation. Thus, starting from version 5.1.0, FaceStream is licensed using the LUNA PLATFORM 5 key.
To launch LUNA Streams and FaceStream, you need at least three additional LUNA PLATFORM components:
The InfluxDB OSS 2 container is also launched by default. Using the Influx database, LUNA PLATFORM services are monitored. If necessary, monitoring can be disabled.
If the LUNA PLATFORM components are not launched and the LUNA PLATFORM license is not activated, then the following steps should be performed before launching FaceStream:
If the LUNA PLATFORM components are launched and the LUNA PLATFORM license is activated, then the following steps should be performed before launching:
For a description of how to perform these steps, see the FaceStream installation manual.
The names and structure of streams management settings was reworked. All settings are now divided into logical blocks. The following settings was renamed:
The method of passing data to generate an event was reworked. Previously, to generate a LUNA PLATFORM event, the "output" > "url" parameter was used, in which, when working with faces, it was necessary to specify the address to the "/events" resource in the format http://<luna_address>:<port>/6/handlers/<handler_id>/events, where <handler_id> is the LP handler identifier. When working with bodies, separate parameters "luna_human_handler_id" and "luna_dynamic_human_handler_id" were used, and the "url" field was filled in the format http://<luna_address>:<port>/6/. Now the handler ID is set in the "event_handler" > "bestshot_handler"/"detection_handler" > "handler_id" group, where "bestshot_handler" is a static handler for a face or body, "detection_handler" is a dynamic "handler_id" LUNA PLATFORM for working with bodies (ex. "luna_dynamic_human_handler_id"). The LUNA API service address and API version are now set separately. Below is an example of passing data to generate an event when static and dynamic handlers are set for the body.
"event_handler": { "origin": "http://127.0.0.1:5000", "api_version": 6, "bestshot_handler": { "handler_id": "ee4c42b6-23ae-410e-a2aa-a4220e64ba4b" }, "detection_handler": { "handler_id": "426542d6-5509-4e5b-8a01-e2abd5c0a8c6" } }
If it is necessary to process a face, then "handler_id" should be set with parameters for processing a face in the "bestshot_handler" group, and the "detection_handler" group is optional.
See the FaceStream administrator manual for details on stream management settings.
Support for working with bodies was added. FaceStream searches for bodies in the stream and tracks them until they leave the frame or are overlapped.
There are additional settings for using FaceStream with bodies. Starting with FaceStream 5.0.6, all settings are divided into common and individual settings for faces and bodies in the documentation.
To enable body tracking, you need to change the "use-face-detector" parameter of the "trackengine.conf" configuration file to "use-body-detector" and also set individual settings for stream sources for bodies (see the relevant chapters).
The logic of creating events (sending bestshots and processing them by LUNA PLATFORM) for the body differs from the logic of creating an event for faces (see the administrator manual for details).