Config Settings

You can fine-tune the FindFace Lite making changes in the configuration file located in the FFlite -> api_config.yml.

Configuration file includes blocks with information about:

  • app — API configuration;

  • eapi — eapi address;

  • eapi_license_plate – license plate eapi address;

  • vm — vm address and credentials;

  • db — db address and credentials.

How to work with config settings

Open the file located in the FFlite -> api_config.yml using any text editor (nano, vim, etc.) and make changes in necessary settings.

In sections below you will find the full information about each block and possible settings values.

Warning

Please, read the description of the settings below to be sure in the result.

Apply new settings by restarting the api service with the following command:

docker compose restart api

App configuration

Settings possible values

Settings

Possible values

host

0.0.0.0 – default value.

port

8000 – default value.

debug

false (default) – debug mode is disabled;

true – debug mode is enabled.

router_base_url

http://nginx – default value.

media_root

/uploads – default value.

fullframe_root

/fullframe – default value.

normalized_root

/normalized – default value.

save_fullframe

false – fullframe images will not be saved on the disk.

true (default) — fullframe images will be saved on the disk.

save_normalized

false (default) – normalized images will not be saved on the disk.

true — normalized images will be saved on the disk.

secret_key

change_me – default value.

max_event_age_days

20 – default value.

face_confidence_threshold

0.714 – default value.

car_confidence_threshold

0.65 – default value.

webhook_workers_num

10 – default value.

exit_on_availability_check_fail

false – API service will retry to reach necessary resources until success with exponential timeouts;

true (default) – API service will exit if any of necessary resources are not available.

event_creation_token

change_me – default value.

event_creation_response_type

serialized (default) – the response will contain full information about a created Event, including matched Card, path to the fullframe image, etc.

id – the response will contain only ID of a created Event.

serialized_verbose – the response will contain full information about a created Event (including a matched Card, path to the fullframe image etc) and full information about the Card.

face_features

headpose – position of a head;

medmask – detection of a medmask;

liveness – liveness detection.

car_features

orientation – recognition a car position while recognition.

special_types – recognition of a car type.

license_plate_visibility – recognition of license plate.

liveness_source

eapi – liveness detection from image. This value is required to be set if you want to create Events via POST /{object_type}/add

vw – liveness detection from videostream.

auth_enabled

false – authorization is disabled;

true (default) – authorization is enabled.

access_token_expire_minutes

43200 – default value.

dedup_enabled

false – deduplication of Events is disabled;

true (default) – deduplication of Event is enabled.

save_dedup_events

false (default) – Events duplicates will be saved.

true – Events duplicates will not be saved.

face_dedup_interval

5 – default value.

face_dedup_confidence

0.9 – default value.

car_dedup_interval

5 – default value.

car_dedup_confidence

0.9 – default value.

Settings description

Settings

Description

host

Host information

port

Port information

debug

Debug mode. Currently manage only debug logs.

router_base_url

Router base URL for VM. Please, change only if you are sure.

media_root

Root directory for media files, which stores the Objects images.

fullframe_root

Root directory for fullframe files, which stores frame images from VideoWorker (vw).

normalized_root

Root directory for normalized files, which stores files used for migrations between models in database.

save_fullframe

Saving settings of fullframe images.

save_normalized

Saving settings of normalized images.

secret_key

A secret key, needed for security operations.

max_event_age_days

Maximum time, which Event is stored. After the expiration of the set time period, the Event is deleted.

face_confidence_threshold

Value of confidence threshold, according to which an Event matches or not with a Card during the face matching. If matching score is more than set value, Event is matched with a Card.

car_confidence_threshold

Value of confidence threshold, according to which an Event matches or not with a Card during the car matching. If matching score is more than set value, Event is matched with a Card.

webhook_workers_num

Number of concurrent webhook workers sending requests to webhook targets.

exit_on_availability_check_fail

Behaviour of API service in case of unavailability of necessary resources.

event_creation_token

A token using for external detector authentication for Event creation (/{object_type}/add). JWT token doesn’t apply in this request.

event_creation_response_type

Response verbosity of Event creation (/{object_type}/add) request.

face_features

Features of FindFace Lite for face recognition. A feature is activated if it is listed in the value. After feature activation freshly created events will be populated with corresponding feature.

car_features

Features of FindFace Lite for car recognition. A feature is activated if it is listed in the value. After feature activation freshly created events will be populated with corresponding feature.

liveness_source

Source of liveness detection.

auth_enabled

Authorization managing. Note, that all API calls (with some exceptions) will require Authorization header with JWT <token>.

access_token_expire_minutes

Time of access token expiration interval.

dedup_enabled

Events deduplication managing.

save_dedup_event

Events duplicates saving settings.

face_dedup_interval

A time interval in seconds during which Events with the same person will be considered as duplicates.

face_dedup_confidence

Confidence of matching between 2 Events to be considered duplicates.

car_dedup_interval

Time interval in seconds during which Events with the same car will be considered as duplicates.

car_dedup_confidence

Confidence of matching between 2 Events to be considered duplicates.

EAPI configuration

Settings

Possible values

Description

host

eapi – default value.

Host information

port

18666 – default value.

Port information

License plate EAPI configuration

Settings

Possible values

Description

host

eapi-license-plate – default value.

Host information

port

18667 – default value.

Port information

VM configuration

Settings

Possible values

Description

host

vm – default value.

Host information

port

18810 – default value.

Port information

token

GOOD_TOKEN – default value.

Token for processes connected with vm. Should be the same as token in vm.conf file.

DB configuration

Settings

Possible values

Description

host

postgres – default value.

Host information

port

5432 – default value.

Port information

user

fflite – default value.

Credentials to access database with the name from database setting.

password

fflite – default value.

database

fflite – default value.

Database name.