Skip to content

Architecture#

The CARS API architecture is shown in the figure below (Figure 1).

CARS API architecture
Figure 1. CARS API architecture

A detailed description of the architecture is provided in Table 2.

Table 2. Description of the CARS API architecture

Component Description
Request source Sources of requests for vehicle and LP attribute recognition:
- Manual user request (see API requests);
- External system. CARS Analytics or any other customer’s system may be used.
Load balancer A service for distributing requests and responses between multiple running instances of the CARS API and an external analytics and information collection system. CARS API supports only Nginx.
HTTP REST Server A service responsible for exchanging information with external systems and processing requests. It processes the received request: decodes the image into an internal format available for attribute recognition, then sequentially runs each classifier. After receiving the vehicle and LP attributes from the classifiers, it sends a response in JSON format back to the request source.
Vehicle Engine A library containing methods for processing vehicle and LP images (see configuration).

HTTP REST Server and Vehicle Engine interaction diagram#

The sequence diagram for the interaction between the HTTP REST Server and Vehicle Engine components for obtaining vehicle attributes is shown in the figure below (Figure 2).

Sequence diagram for recognition vehicle and LP attributes
Figure 2. Sequence diagram for recognition vehicle and LP attributes

A detailed description of the diagram is provided in Table 3.

Table 3. Description of the sequence diagram

Step Description
(1) A request is sent to the HTTP REST Server in JSON format containing information about Base64-encoded vehicle and LP images, an image processing method, and a list of classifiers.
(2) The function that checks for the presence of a classifier compares the list of provided classifiers with the list of available classifiers.
(3) The HTTP REST Server calls the image processing method for each classifier in the specified list. Processing is started sequentially for each classifier.
(4) The Vehicle Engine processes the images according to the called method.
(5) The Vehicle Engine returns data to the HTTP REST Server for each passed classifier in sequence.
(6) The HTTP REST Server generates the response and sends it in JSON format back to the request source.