## 3 Model Foundation  
The analysis of scientific and practical studies [20, 21, 24] showed that the development of a modular NNM for BA, capable of solving several different tasks related to identity recognition and spoofing attacks, is limited by the capabilities of existing approaches focused on the same type of processes.  
Based on the results of the conducted literature and data analysis [25, 26, 27], taking into account the possibility of pre-processing the video stream using classical technologies, it was determined that the main tasks of neural network BA tools for CIF personnel include the following:  
1. Selection of FI boundaries in the test frame of the input video stream.
2. Detection of spoofing attacks on the basis of visual artifacts, which are displayed due to changes in the texture or color of the image, the appearance of reflections within it, or breaks in the contours of the image.
3. Detection of spoofing attacks based on artifacts of the external environment, for example, the display of a face on the screen of a mobile device or the absence of objects in the video frame that are expected to be in the video registration area.
4. Identification of the problem areas characteristic of the expected video recording conditions.
5. Selection of IE boundaries.
6. Determination of sets of coordinates of control and key points used for the recognition of a person and their emotions.
7. Detection of spoofing attacks based on the dynamics of liveness detection parameters, which are used to recognize the correspondence of the image to the real face of a living person.
8. Recognition of basic emotions reflected on the face.
9. Detection of spoofing attacks based on recognized emotions.
10. Identification of the representative CIF personnel.  
The definition of the specified tasks was carried out taking into account proven solutions in the field of neural network analysis of FIs, including IEs, and in the field of BA. At the same time, from the point of view of implementing an analysis of homogeneous processes by neural network means, the task of detecting spoofing attacks based on spoofingartifacts was divided into two separate tasks: detecting spoofing attacks by visual artifacts (task 2) and detecting spoofing attacks by artifacts in the external environment (task 3).  
Using the results of [28; 29], it was established that traditional approaches to solving problems 1-9 involve the use of classification CNNs. To solve 10 tasks, in addition to the classification ones, CNNs adapted to the task of comparing input images are used. Classification CNNs are used in cases where the training period is associated with entering the data of a new personnel representative into the NNM, or with the deletion of such data, is not critical. CNNs intended for image comparison are used in the case when the specified term is critically important.  
Therefore, this task is divided into tasks 10.1 and 10.2. Task 10.1 is person recognition based on the neural network comparison of a controlled FI with the FI of legitimate CIF personnel representatives, and task 10.2 is person recognition based on the neural network classification of a controlled FI.  
The sequence of execution of the specified tasks, taking into account the peculiarities of solving 10 tasks, is illustrated with the help of Figure 1. It should be noted that in the basic version, each individual task is performed using a separate neural network module.