Skip to content

Architecture#

The CARS_Analytics architecture (Figure 1).

CARS_Analytics architecture
Figure 1. CARS_Analytics architecture

A detailed description of the architecture is given in Table 1.

Table 1. Description of architecture of the CARS_Analytics

Component Description
Source Video stream containing areas with objects in the frame
CARS_Stream Subsystem for detecting and tracking objects
ANPR Stream Subsystem for integrating ANPR cameras into CARS_Analytics
CARS_API Subsystem for detection and recognition attributes of objects
Load balancer A service for distributing requests and responses between several running copies of the CARS_API, CARS_Stream and CARS_Analytics backend. It is supported to work only with Nginx
CARS_Analytics frontend The client side of CARS_Analytics, including the user interface
CARS_Analytics UI CARS_Analytics user interface
CARS_Analytics backend The software part of CARS_Analytics, which includes the CARS_Analytics backend server, database plugins and load balancers for interacting with external systems
CARS_Analytics backend server The software part of CARS_Analytics responsible for the functioning of CARS_Analytics which takes a frame from CARS_Stream as input and sends it to the CARS_API for processing the frame using classifiers
PostgreSQL A database designed to store information about various types of recognition, internal system settings, registered events, and meta-information necessary for the correct operation of the software
CARS_Analytics plugins Plugin with a set of handlers

Sequence diagram of CARS_Analytics components interaction with LUNA CARS subsystems#

A diagram of the interaction of CARS_Analytics components with other LUNA CARS subsystems (Figure 2).

CARS_Analytics sequence diagram
Figure 2. CARS_Analytics sequence diagram

A detailed description of the diagram is given in Table 2.

Table 2. Description of the sequence diagram of interaction of CARS_Analytics components with LUNA CARS subsystems

Description
(1) The message containing best shot comes from CARS_Stream or ANPR Stream (depending on the selected source). The message is transmitted using the callback_matager.py function and includes the best frame of the object and information about the position of the object, as well as the information about the object type. See detailed description of CARS_Stream work in «CARS_Stream. Administration Manual»
(2) CARS_Analytics backend server processes the received message:
- Creates a background task for image processing;
- Places a task in the Celery queue;
- Refreshes the task queue list
(3) CARS_Analytics backend server sends a request to the CARS_API to recognize attributes of the vehicle and LP with a list of classifiers and the best shot
(4) The request is processed by the load balancer and sent to the CARS_API
(5) CARS_API processes the request according to the list of classifiers. For a detailed scheme of how the CARS_API works, see «CARS_API. Administration Manual»
(6) CARS_API returns vehicle and LP attributes to the load balancer
(7) The response is processed by the load balancer and sent to the CARS_Analytics backend server
(8) CARS_Analytics backend server generates a request to determine the position of objects in the vehicle plugin to determine what type of scenario (event or incident) they belong to by the type of object
(9) The Vehicle plugin processes the request
(10) The Vehicle plugin returns the scenario type information to the CARS_Analytics backend server
(11) CARS_Analytics backend server processes the received response, aggregates the received results and checks for compliance of the results with the applied filters (if any)
(12) CARS_Analytics backend server sends a request to the database to save the vehicle and LP attributes
(13) PostgreSQL returns a response about the result of saving the best frame and attributes of the vehicle and LP to the database
(14) CARS_Analytics backend server sends the best frame, recognized vehicle and LP attributes to CARS_Analytics UI