Configuration¶
The service allowed two variant of configuration:
use the Configurator service
use the configuration file
The service reads settings from the configuration file by default.
You can specify the –luna-config option for pulling settings from the Configurator service, see configurator.
Auto reload configuration¶
The service supports an auto-reload of configurations. You can enable this feature by specifying a config-reload option in the command line. The service periodically checks new settings. If current settings and new pulled settings are the same the service will not perform any actions. You can specify the check period in the pulling-time command line argument (10 seconds by default).
If a configuration fetching has failed, the service will work without applying any changes to the existing configurations.
If check connections with the new configuration have failed, the service will retry pulling new configuration after pulling-time seconds. The service will shut down after 10 failed attempts.
Warning
Service can work incorrectly while the new settings are being applied. It is strongly recommended not to send requests to the service when you change important settings (database configuration, work plugins list, and others).
Configuration file for administrator¶
# LUNA Plugin Administrator configuration file
[LUNA_CONFIGURATOR]
#: [integer] load configs from LUNA Configurator
USE_CONFIGURATOR = 0
#: [string] LUNA Configurator protocol, IP address, and port
LUNA_CONFIGURATOR_ORIGIN = http://127.0.0.1:5070
#: [integer] API version of the LUNA Configurator
LUNA_CONFIGURATOR_API = 1
[LUNA_REMOTE_SDK_LOGGER]
#: [string] folder, where logs are saved (relative path begins in directory with application)
FOLDER_WITH_LOGS = ./
#: [string] level of debug print, by priority: "ERROR", "WARNING", "INFO", "DEBUG"
LOG_LEVEL = INFO
#: [string] time format used in log records: "LOCAL" or "UTC"
LOG_TIME = LOCAL
#: [integer] maximum log file size in megabytes before performing rotation (0 - without rotation)
MAX_LOG_FILE_SIZE = 1024
#: send log to stdout
LOG_TO_STDOUT = 1
#: send log to file
LOG_TO_FILE = 0
#: allow multiline stack trace in logs
MULTILINE_STACK_TRACE = 1
[INFLUX_MONITORING]
#: [integer] send data for monitoring to InfluxDB
SEND_DATA_FOR_MONITORING = 1
#: [string] InfluxDB 2.x workspace
ORGANIZATION = luna
#: [string] InfluxDB 2.x authentication token
TOKEN = kofqt4Pfqjn6o0RBtMDQqVoJLgHoxxDUmmhiAZ7JS6VmEnrqZXQhxDhad8AX9tmiJH6CjM7Y1U8p5eSEocGzIA==
#: [string] InfluxDB 2.x bucket name
BUCKET = luna_monitoring
#: [string] InfluxDB IP address
HOST = 127.0.0.1
#: [integer] InfluxDB port
PORT = 8086
#: [integer] use HTTPS to connect to InfluxDB
USE_SSL = 0
#: [integer] frequency of sending monitoring data to InfluxDB (in seconds)
FLUSHING_PERIOD = 1
[LUNA_LICENSES_ADDRESS]
#: LUNA Licenses protocol, IP address, and port
ORIGIN = http://127.0.0.1:5120
#: API version of the LUNA Licenses
API_VERSION = 1
[LUNA_IMAGE_STORE_FACES_SAMPLES_ADDRESS]
#: LUNA Image Store protocol, IP address, and port (for samples)
ORIGIN = http://127.0.0.1:5020
#: API version of the LUNA Image Store (for samples)
API_VERSION = 1
#: *bucket* name, where samples will be stored
BUCKET = visionlabs-samples
[LUNA_IMAGE_STORE_BODIES_SAMPLES_ADDRESS]
#: LUNA Image Store protocol, IP address, and port (for samples)
ORIGIN = http://127.0.0.1:5020
#: API version of the LUNA Image Store (for samples)
API_VERSION = 1
#: *bucket* name, where samples will be stored
BUCKET = visionlabs-bodies-samples
[LUNA_IMAGE_STORE_IMAGES_ADDRESS]
#: LUNA Image Store protocol, IP address, and port (for origin images)
ORIGIN = http://127.0.0.1:5020
#: API version of the LUNA Image Store (for origin images)
API_VERSION = 1
#: *bucket* name, where origin images will be stored
BUCKET = visionlabs-image-origin
[LUNA_IMAGE_STORE_FACES_SAMPLES_TIMEOUTS]
#: CONNECT TIMEOUT
CONNECT = 30
#: REQUEST TIMEOUT (total)
REQUEST = 60
[LUNA_IMAGE_STORE_BODIES_SAMPLES_TIMEOUTS]
#: CONNECT TIMEOUT
CONNECT = 30
#: REQUEST TIMEOUT (total)
REQUEST = 60
[LUNA_IMAGE_STORE_IMAGES_TIMEOUTS]
#: CONNECT TIMEOUT
CONNECT = 30
#: REQUEST TIMEOUT (total)
REQUEST = 60
[ADDITIONAL_SERVICES_USAGE]
#: [integer] send events to LUNA Events for storing
LUNA_EVENTS = 1
#: [integer] use LUNA Tasks
LUNA_TASKS = 1
#: [integer] send events to the LUNA Sender subscription service
LUNA_SENDER = 1
#: [integer] use LUNA Python Matcher Proxy instead of LUNA Python Matcher
LUNA_MATCHER_PROXY = 1
#: [integer] use Luna Image store for images/samples storages
LUNA_IMAGE_STORE = 1
[LUNA_REMOTE_SDK_RUNTIME_SETTINGS]
#: device type on which estimations is performed - "cpu" or "gpu"
GLOBAL_DEVICE_CLASS = cpu
#: number of worker threads
NUM_THREADS = 4
#: number of streams; this parameter increases performance, but works only with new versions of NVIDIA drivers
NUM_COMPUTE_STREAMS = 6
[LUNA_REMOTE_SDK_FACE_DETECTOR_SETTINGS.runtime_settings]
#: device type on which the face detection is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_FACE_DETECTOR_SETTINGS.estimator_settings]
#: min face size in pixels, max face size is min face size multiplied by 32
MIN_FACE_SIZE = 50
#: target face size for redetect
REDETECT_FACE_TARGET_SIZE = 64
#: target face size for redetect after preprocessing
REDETECT_TENSOR_SIZE = 80
#: redetect score threshold; redetection is considered failed if the score is lower than the specified value
REDETECT_SCORE_THRESHOLD = 0.357
#: score threshold; detection is considered failed if the score is lower than the specified value
SCORE_THRESHOLD = 0.42
[LUNA_REMOTE_SDK_GAZE_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which the face detection is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_QUALITY_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which the face detection is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_MOUTH_ATTRIBUTES_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_EMOTIONS_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_BASIC_ATTRIBUTES_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_EYES_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_HEAD_POSE_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_FACE_DESCRIPTOR_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_MASK_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_LIVENESS_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_LIVENESS_ESTIMATOR_SETTINGS.estimator_settings]
#: [float] liveness score threshold
REAL_THRESHOLD = 0.5
#: [float] default liveness quality threshold of "appropriate image" in the calculation of aggregate estimates
QUALITY_THRESHOLD = 0.5
[LUNA_REMOTE_SDK_GLASSES_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_FACE_WARP_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_FACE_LANDMARKS68_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_FACE_LANDMARKS5_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_IMAGE_COLOR_TYPE_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_HEADWEAR_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_FACE_NATURAL_LIGHT_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_FISHEYE_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_EYEBROW_EXPRESSION_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_RED_EYES_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_FACE_DETECTION_BACKGROUND_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_IMAGE_ORIENTATION_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_BODY_DETECTOR_SETTINGS.estimator_settings]
#: sets the maximum frame size after scaling to the largest side in pixels
IMAGE_SIZE = 640
#: redetect score threshold; redetection is considered failed if the score is lower than the specified value
REDETECT_SCORE_THRESHOLD = 0.12
#: score threshold; detection is considered failed if the score is lower than the specified value
SCORE_THRESHOLD = 0.5
#: landmarks17 score threshold: score threshold for body landmarks
LANDMARKS17_THRESHOLD = 0.25
[LUNA_REMOTE_SDK_BODY_DESCRIPTOR_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_BODY_WARP_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_BODY_LANDMARKS_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_BODY_ATTRIBUTES_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_HUMAN_DETECTOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[LUNA_REMOTE_SDK_PEOPLE_COUNT_ESTIMATOR_SETTINGS.runtime_settings]
#: device type on which estimation is performed - "cpu", "gpu" or "global"
DEVICE_CLASS = global
#: optimal batch size for stage
OPTIMAL_BATCH_SIZE = 10
#: worker count for estimation
WORKER_COUNT = 1
[FETCH_IMAGE_TIMEOUTS]
#: CONNECT TIMEOUT
CONNECT = 30
#: REQUEST TIMEOUT (total)
REQUEST = 60
[LUNA_REMOTE_SDK_LIMITS]
#: [integer] max number of images received in request
RECEIVED_IMAGES_LIMIT = 8
[EXTERNAL_LUNA_API_ADDRESS]
#: external luna-api origin
ORIGIN = http://127.0.0.1:5000
#: external luna-api origin
API_VERSION = 6
[OTHER]
#: list of active plugins
LUNA_REMOTE_SDK_ACTIVE_PLUGINS = []
#: face detector type
LUNA_REMOTE_SDK_DETECTOR_TYPE = FACE_DET_V3
#: default face descriptor version
DEFAULT_FACE_DESCRIPTOR_VERSION = 59
#: default human body descriptor version
DEFAULT_HUMAN_DESCRIPTOR_VERSION = 110
#: estimate image orientation and rotate the image to the correct angle
LUNA_REMOTE_SDK_USE_AUTO_ROTATION = 0
Extended administrator configuration¶
Extended configuration.