Skip to content

Appendix 1. Settings of «.env» file#

Parameters forbidden to be changed#

Parameter Description Values
Forbidden
API_HOSTNAME Address of the server with CARS_API installed - api-nginx – if CARS_API is installed locally
- IP_address – address of the server with CARS_API installed
ANALYTICS_HOSTNAME Address of the server with CARS_Analytics frontend installed - front – if CARS_Analytics is installed locally
- IP_address – address of the server with CARS_Analytics frontend installed
ANALYTICS_BACKEND_HOSTNAME Address of the server with CARS_Analytics backend installed - back – if CARS_Analytics is installed locally
- IP_address – address of the server with CARS_Analytics backend installed
ANALYTICS_BACKEND_ASYNC_HOSTNAME Address of the server with the asynchronous part of CARS_Analytics backend installed - backback-async – if a separate server is used for asynchronous data processing
- IP_address – address of the server with the asynchronous part of CARS_Analytics backend installed
DOCKER_REGISTRY Sets the address of the VisionLabs server from which Docker images will be downloaded. The address is provided by the VisionLabs manager - IP_address – address of the registry (dockerhub. visionlabs.ru/cars by default)
API_VERSION Sets the version of the CARS_API distribution. By default, the current version is set Available CARS_API versions
STREAM_VERSION Sets the version of the CARS_Stream distribution. By default, the current version is set Available CARS_Stream versions
STREAM_ANPR_VERSION Sets the version of the CARS_Stream ANPR distribution. By default, the current version is set Available CARS_Stream ANPR versions
STREAMREADER_VERSION Sets the version of the CARS_StreamReader distribution. By default, the current version is set Available CARS_StreamReader versions
ANALYTICS_BACKEND_VERSION Sets the version of the CARS_Analytics backend distribution. By default, the current version is set Available CARS_Analytics backend versions
ANALYTICS_FRONTEND_VERSION Sets the version of the CARS_Analytics frontend distribution. By default, the current version is set Available CARS_Analytics frontend versions
ENABLE_BODY_DETECTOR Sets the flag to enable or disable the human detector - 0 – disabled
- 1 – enabled
ENABLE_ANIMAL_DETECTOR Sets the flag to enable or disable the animal detector - 0 – disabled
- 1 – enabled
STREAM_NUM_THREADS The number of CPU cores used for neural networks 1…n
STREAM_REID_DIST_THRESHOLD_VALUE1 Internal configuration for the coroutineReID strategy -
STREAM_REID_DIST_THRESHOLD_VALUE2 Internal configuration for the coroutineReID strategy -
STREAM_REID_CENTER_DIST_THRESHOLD Internal configuration for the coroutineReID strategy -
STREAM_REID_MIN_TRACK_LENGTH_MERGING Internal configuration for the coroutineReID strategy -
STREAM_REID_GRAYSCALE_THRESHOLD Internal configuration for the coroutineReID strategy -
STREAM_ANPR_COUNT Sets the number of Stream-ANPR instances 1-2
STREAM_ANPR_STUB Used for internal testing - True – enabled;
- False – disabled
STREAMREADER_COUNT Sets the number of StreamReader instances 1-2
API_PORT Sets the port number for the additional CARS_API instance. Make sure that each instance has a unique port and corresponds to the number of the additional instance Port number (8100 by default)
ANALYTICS_BACKEND_PORT Sets the port for connecting to the CARS_Analytics backend component Port number (8000 by default)
ANALYTICS_RECORD_CACHE_BASIC_EX_TIME Сaching time (in seconds) for intermediate data -(900 by default)
ANALYTICS_DB_CONN_MAX_AGE Database connection lifetime from CARS_Analytics 0…3600 (60 by default)
ANALYTICS_TRACK_END_INTERVAL_PROCESSING Processing interval (in seconds) for trackEnds by the aggregator 2…n
ANALYTICS_PLATE_MATCH_PERCENTAGE The percentage of license plate matches during aggregation 0…100
FRONTEND_URL the URL for connecting to the frontend component of CARS_Analytics -(carsanalytics2.frontend.vlabs by default)
POSTGRES_PORT Sets the port number for connecting to the database Available ports (5432 by default)
POSTGRES_HOSTNAME The hostname of the server where the database is located Database hostname
REDIS_HOST The hostname of the server where Redis is located Redis server IP address
REDIS_PORT The port number for connecting to Redis Available ports (6379 by default)
BLACKBOX_TARGETS The check of the external server status through Blackbox Exporter -(http://back:8000/api/v1-cars/health by default)
JSON_EXPORTER_TARGET Specify the data source for JSON Exporter -(http://back:8000/api/v1-cars/health by default)
Parameter Description Values
Not recommended
INSTALLER_AUTO_CONFIG Enable automatic configuration generation for API and Stream in Nginx and Compose - True – enabled;
- False – disabled
CORS_SITE Define the ability to use a part of the LUNA CARS web interface within another website. To enable this functionality, you must specify the hostname of the site where the web interface will be used -
STREAMS_LIST List of devices for running CARS_Stream instances. For example, cpu for processing on the central processor, gpu{N} for running the service on a GPU with index N (GPU numbering starts from 0) cpu, gpu{N} (GPU support is available only for NVIDIA graphics cards with installed drivers and the NVIDIA Container Toolkit. NVIDIA GPU cards below the Turing architecture are not supported)
APIS_LIST List of devices for running CARS_API instances. For example, cpu for processing on the central processor, gpu{N} for running the service on a GPU with index N (GPU numbering starts from 0) cpu, gpu{N} (GPU support is available only for NVIDIA graphics cards with installed drivers and the NVIDIA Container Toolkit. NVIDIA GPU cards below the Turing architecture are not supported)
STREAM_PORT_START The starting port number for the CARS_Stream instance. This port will increase based on the number of instances. Each instance must have a unique port that does not overlap with the ports of other subsystems (e.g., CARS_API). As the number of instances increases, the port number will increment by 1, starting from the specified value Port number(34569 by default)
STREAM_HASP_PORT_START The starting port number for connecting to the HASP server. This port must correspond to the additional CARS_Stream instance number and should not overlap with the ports of other subsystems (e.g., CARS_API). The port increases by 1 for each new instance HASP port number (1948 by default)
HEALTH_CHECK_MAX_ERROR_COUNT Error limit for reading frames from the source within a defined period. If the limit is exceeded, CARS_Stream closes the source and stops receiving frames 1…1000 (200 by default)
STREAM_VIDEO_DIR Directory for storing video files for later processing and adding to CARS_Analytics as a source Directory path (/tmp/stream/video/ by default)
STREAM_VEHICLE_STRATEGY Strategy for processing vehicles coroutineV2, coroutineReID
STREAM_FP_VEHICLE_TRACK_ALGO algorithm for filtering false positive vehicle detections (for example, when a person is detected as a vehicle) fullFrame,vehicleCrop
STREAM_FP_VEHICLE_TRACK_DETECTION Sets the flag to enable or disable false positive vehicle track detection - 0 – disabled
- 1 – enabled
STREAM_FP_VEHICLE_TRACK_THRESHOLD Threshold for false positive vehicle track detection 0…1
STREAM_FP_VEHICLE_TRACK_HUMAN_IMG_SIZE The image size for human tracks in case of false positive detections Recommended: 640 for STREAM_FP_VEHICLE_TRACK_ALGO =fullFrame, 320 for STREAM_FP_VEHICLE_TRACK_ALGO=vehicleCrop
STREAM_ANPR1_PORT Sets the port number for connecting to the first Stream-ANPR instance Available ports (34575 by default)
STREAM_ANPR2_PORT Sets the port number for connecting to the second Stream-ANPR instance Available ports (34576 by default)
STREAMREADER1_PORT Sets the port number for connecting to the first StreamReader instance Available ports (34575 by default)
STREAMREADER2_PORT Sets the port number for connecting to the second StreamReader instance Available ports (34576 by default)
API_HASP_PORT_START The starting port number for connecting to the HASP server. This port must correspond to the additional CARS_API instance number and should not overlap with the ports of other subsystems (e.g., CARS_Stream). The port increases by 1 for each new instance HASP port number (2948 by default)
API_WHEEL_RECOGNITION_NMS_THRESHOLD The NMS threshold for the wheel detection algorithm -
API_SYMBOL_THRESHOLD_* The recognition accuracy threshold for license plate symbols. Symbols below the set threshold are not displayed in the UI. 0…1 (default threshold depends on region)
*Available regions for API_SYMBOL_THRESHOLD: RUS, EU_CIS, UK_ASIA, CHN, THAI, MNG, UAE, PERSIAN, AMERICA
API_FEATURE_THRESHOLD_* The recognition threshold for license plate Symbols 0…1 (default threshold depends on region)
*Available regions for API_FEATURE_THRESHOLD: CHN, UAE, RUS
API_REGION_FEATURE_THRESHOLD_THAI The threshold for recognizing Thai license plate symbols 0…1
API_TYPE_FEATURE_THRESHOLD_THAI the threshold for recognizing Thai license plate attributes 0…1
API_CPU_COUNT The number of threads that one instance listens to by a single CARS_API instance 1…n
API_CPU_NT Sets the number of CPU cores used for neural networks 1…n (number of CPU cores)
VEHICLE_DETECTION_TO_FRAME_RATIO_THRESHOLD the threshold for the ratio of the detected vehicle area to the frame area. This is used to filter detections and re-detections Recommended: 0.04
ANALYTICS_FRONTEND_PORT Sets the port for connecting to the CARS_Analytics frontend component via HTTP Port number (8080 by default)
ANALYTICS_FRONTEND_SSL_PORT Sets the encrypted port for connecting to the CARS_Analytics frontend component via HTTPS Port number (443 by default)
ANALYTICS_BACKEND_CONCURRENCY Distributing the workload of the backend CARS_Analytics component across multiple threads 1…n (depends on CPU cores)
ANALYTICS_BACKEND_HANDLER_CONCURRENCY Distributing the workload of the backend CARS_Analytics handlers across multiple threads 1…n (depends on CPU cores)
ANALYTICS_MEDIA_ROOT_FOLDER Directory where all images received from CARS_Stream will be stored. Images are organized by event date. The path must be the same for all running copies in the same environment Directory path (the default path is specified)
ANALYTICS_PSQL_FOLDER Directory where the database information will be stored. The path must be the same for all running copies in the same environment Directory path (the default path is specified)
AGGREGATOR_COUNT The number of service instances used to aggregate recognition and detection results. It is recommended to increase this value if data processing delays occur 1…n
ANALYTICS_SYNC_FULLFRAME_WITH_PLATE Defines whether the full frame should be synchronized with the license plate crop - True – synchronize;
- False – do not synchronize
ANALYTICS_SYNC_VCROP_WITH_PLATE Defines whether the bestshot and vehicle crop should be synchronized with the license plate when it is updated - True – synchronize;
- False – do not synchronize
ANALYTICS_STRICT_AGGREGATION Strict aggregation of license plates. Strict aggregation fixes the number of plates in a track based on the first frame: only the initially detected plates are saved; any later detections are discarded. If disabled, all detected plates are stored in the database - True – use;
- False – do not use
ANALYTICS_BACKEND_HANDLER_COUNT The number of containers for the CARS_Analytics backend 1…n
ANALYTICS_LOGGING_HANDLERS Defines the logging mode - console (log to console only);
- file_error (error logs saved to file);
- file_warning (warning logs saved to file);
- file_info (info logs saved to file)
ANALYTICS_CAMERA_CHECK_INTERVAL The camera status checking interval (in seconds) 1…n

Parameters allowed to be changed#

Parameter Description Values
Allowed
DB_BACKUP Automatic database backup when the version changes - True – Enabled: When the database version changes, a backup is created, followed by the execution of migrations;
- False – Disabled: No backup is performed as the database may take up a significant amount of memory
LICENSE_TYPE Sets the type of license to be used - hasp-ldk – HASP;
- guardant – Guardant
HASP_LICENCE_SERVER Specify the IP address address of the server from which the installer retrieves the network license for CARS_API and CARS_Stream - IP_address – address of the server with HASP utility installed
- hostname – the hostname of the server where the HASP utility is installed
HASP_WAIT_TIME Sets the waiting time for a response from the licensing server in seconds 10…N
HASP_LICENSE_FILE Specify the path to the license file used by the installer. Recommended when using a trial license Path to the license file (./empty by default)
GUARDANT_LICENSE_SERVER Sets the address of the server from which the installer retrieves the network license - IP_address – address of the server with Guardant Control Center installed
- hostname – the hostname of the server where the Guardant Control Center service is installed
DOWNLOAD_USER Sets the user's login for downloading distributions. To obtain the login, please contact the VisionLabs manager Username
DOWNLOAD_PASSWORD Sets the user's password for downloading distributions. To obtain the password, please contact the VisionLabs manager Users password
STREAM_LOGGING_LEVEL Define the logging level for CARS_Stream and StreamReader - ERROR (log errors);
- INFO (log informational messages);
- DEBUG_LVL_1 (log extra debug messages)
STREAM_LOG Defines the logging mode - l2c – log to console only;
- l2f log to file;
- l2b log to both console and file
STREAM_PROFILING Sets the flag to enable or disable profiling for CARS_Stream 0 - disabled, 1 - enabled
STREAM_LP_DETECTION_TO_FRAME_RATIO_THRESHOLD Threshold ratio of the license plate detection area to the frame area, used for filtering incorrect detections 0.0…1 (recommended:0.003)
STREAM_WHEEL_RECOGNITION_IMAGE_SIZE The image size used for wheel recognition -
STREAM_WHEEL_RECOGNITION_SCORE_THRESHOLD The recognition threshold for wheels -
STREAM_WHEEL_RECOGNITION_NMS_THRESHOLD The NMS threshold for the wheel detection algorithm -
STREAM_DETECTOR_TYPES_FOR_BESTSHOTS Setting that defines the source from which bestshots are sent - all (fullDetect и redetect);
- onlyFullDetect (only fullDetect detections)
API_PLATE_ESTIMATOR_TYPE The type of aggregated estimator. The difference between the versions is to improve the quality of work and expand the list of recognized countries V5…
API_WHEEL_RECOGNITION_IMAGE_SIZE The image size used for wheel recognition -
API_WHEEL_RECOGNITION_SCORE_THRESHOLD The recognition threshold for wheels -
API_AGGREGATED_LP_SCORE_CALC_POLICY Parameter to choose the method of aggregated plate score calculation - Multiplication (multiply symbols scores);
- Average (sum symbols scores divided by the number of symbols);
- Median (median value)
API_NON_ZEROING_LP_DATA_SCORE_THRESHOLD Parameter to allow zeroing out data when the plate recognition score is low 0…1
API_COMPLEXED_LP_SCORE_CALC_POLICY Parameter that allows to calculate aggregated license plate score based on averaging the plate recognition score and the plate’s country recognition score None, AveragingWithLPCountryScore
API_USE_LATIN_CHARACTERS The use of Latin symbols for license plate display. If there is no equivalent in Latin, Cyrillic will be used - True – use latin;
- False – use cyrillic
API_LOG_LEVEL Define the logging level for the CARS_API - 0 – INFO (log informational messages);
- 1 – WARNING (log warning messages);
- 2 – ERROR (log errors);
- 3 – FATAL (log critical errors)
VEHICLE_DETECTOR_DEFAULT_TYPE The type of vehicle detector VehicleDetectorV4, VehicleDetectorV5, VehicleDetectorV6
ANALYTICS_CLASSIFIER_ROUND_BASE The number of decimal places for values from CARS_API; this affects the precision of results 1…n
ANALYTICS_MAX_PLATES_DISPLAY Maximum number of license plates to display 1…n
ANALYTICS_ENABLED_CLASSIFIERS_FILTERING Allows not to classify already recognized vehicle and LP attributes - True – not to classify;
- False – classify
ENABLED_UNICODE_INPUT The use of Unicode symbols (Cyrillic, Latin, special characters) when searching for license plates by symbols in CARS_Analytics - True – use;
- False – do not use
UPDATE_UI_WITH_WEB_SOCKET When this parameter is enabled, a message is sent to the WebSocket for every bestshot from CARS_Stream — even if the new results are worse than the current ones in the database. When disabled, messages are sent only if the results improve - True – send messages;
- False – do not send messages
ANALYTICS_LOGGING_LEVEL Define the logging level for the CARS_Analytics services - ERROR (log errors);
- WARNING (log warning messages);
- INFO (log information messages)
CELERY_WORKER_PREFETCH_MULTIPLIER - 1
LANGUAGE_CODE CARS_Analytics interface language - en-us – english;
- ru-ru – russian
EMAIL_USE_SSL Secure Sockets Layer (SSL) data protection protocol. The security protocol depends on the selected SMTP server. You must use one of the connection protocols (SSL or TLS) - True – use SSL;
- False – do not use SSL
EMAIL_USE_TLS Specifies whether to use TLS (transport layer security) connection with the SMTP server. Used for explicit TLS connection - True – use TLS;
- False – do not use TLS
EMAIL_PORT Specifies the port to use when connecting to the SMTP server The values of connection parameters to the STMP server are taken from open sources (2525 by default)
EMAIL_HOST Specifies the name of the SMTP server used to send emails The values of connection parameters to the STMP server are taken from open sources
EMAIL_HOST_USER Specifies the username used when connecting to the SMTP server specified in EMAIL_HOST Email address created in the domain of the selected SMTP server
SERVER_EMAIL Specifies the email address used as the sender's address Email address created in the domain of the selected SMTP server
DEFAULT_FROM_EMAIL Sets the Email address used when sending various automatic mailings Email address created in the domain of the selected SMTP server
EMAIL_HOST_PASSWORD Sets the password for connecting to the SMTP server specified in EMAIL_HOST. This setting is used in conjunction with EMAIL_HOST_USER for authorization when connecting to an SMTP server Password created in the domain of the selected SMTP server
EVENT_LIFETIME The lifetime of a registered event (in days). After the set value expires, the event is automatically deleted. If the value is set to 0, the event is stored indefinitely 0…n
INCIDENT_LIFETIME The lifetime of a recorded incident (in days). After the set value expires, the incident is automatically deleted. If the value is set to 0, the incident is stored indefinitely 0…n
FULL_FRAME_LIFETIME The lifetime of a full frame (in hours). Once the value is exceeded, the full frame is automatically deleted. Values are not limited, however high values are not recommended to avoid exhausting server disk space 1…n
ANALYTICS_DISK_FREE_SPACE_THRESHOLD The free disk space threshold (in %). When free disk space falls below this threshold, the system takes measures to prevent overflow 1…100
ANALYTICS_CELERY_CLEAR_EVENTS_TASK_TIME The interval (in hours) for running the event cleanup task in Celery 1…n
ENABLED_VEHICLE_CLASSIFIERS The available vehicle classifiers See the list of available classifiers in the CARS_API Administrator Guide
SEND_TRACKEND_UPDATE Sending messages at the end of a track. This is used for event types involving a boom gate. In cases where the track end message arrives late (for example, when the vehicle remains in the frame or the track is transferred to another object), disabling this parameter helps avoid reopening the barrier - True – send messages;
- False – do not send messages
MAX_SYMBOLS_BELOW_THRESHOLD The maximum number of errors when searching for license plates (in symbols). That is, how many symbols are allowed as a permissible System error when searching for license plates (for example, when comparing with the list of numbers) 1…10
TIME_ZONE Sets the time zone value for containers. Adjusting the time zone ensures that all containers operate in the same time zone. The LUNA CARS time zone must correspond to the physical location of the LUNA CARS servers The value of this parameter can be set to any of the values available in the database. Information about time zones can be found here «time zone»
POSTGRES_DB Sets the name of the database Database name
POSTGRES_PASSWORD Sets the password for accessing the database Database password
POSTGRES_USER Sets the username for accessing the database Database user login
POSTGRES_MAX_CONNECTIONS The maximum number of connections to the database 150…1000
ANALYTICS_UI_MAX_BESTSHOT_COUNT_LIMIT Sets the maximum value for the parameter «Maximum number of bestshots» in Analytics UI 1…n
MONITOR_ENABLE Defines whether to enable or disable monitoring autostart - True – enable;
- False - disable
GRAFANA_PORT The port number for connecting to Grafana UI Use http://${IP}:${GRAFANA_PORT} (3000 by default)
GRAFANA_PASSWORD The password for accessing Grafana UI Use admin/${GRAFANA_PASSWORD}
PROMETHEUS_RETENTION_TIME Sets the data retention period in Prometheus 1…n (units: y, w, d, h, m, s, ms)
PROMETHEUS_RETENTION_SIZE The maximum storage size in Prometheus (in GB) 1…n
GRAFANA_TG_BOT_TOKEN The token for the Grafana Telegram bot null - values must not be empty
GRAFANA_TG_CHAT_ID The chat ID for sending notifications to Telegram null - values must not be empty