{'fraction_non_alphanumeric': 0.024154160376520736, 'fraction_numerical': 0.003285676227688482, 'mean_word_length': 4.924250394529195, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Comparative analysis of background subtraction algorithms in the task of recognizing and identifying people in a video stream

The article is devoted to one of the most urgent tasks for today: preprocessing video material in the process of recognizing and identifying people in a video stream. The authors of this article conducted a study, which consists in comparing the results of several algorithms for subtracting the background on various input video materials (from the office and the minimum concentration of people, to the dining room in which there are up to ten or more people). The data obtained during the analysis of the algorithms is compared (such data are the number of frames processed per second, and the average load of the computer’s central processor). The most efficient algorithms that coped with the task most quickly, accurately and with the least expenditure of resources, were identified, as well as those that coped with the task the worst.


Introduction
Today, in the century of a rapid development of information technologies related to artificial intelligence [1], data analysis [2] and automation of technological processes [3], the task of identifying and tracking objects in a video stream is of particular relevance.
Machine vision technologies are widely used in security systems, production control, as well as in other areas where the use of human labor is economically unreasonable or leads to high-risk indicators [4]. However, with such an application of intelligent video processing algorithms, it is necessary to make high demands on their reliability, accuracy and efficiency. If these requirements are successfully fulfilled, the system becomes protected from the risks associated with the "human factor".
Thus, the task of detecting the movement of objects in the video stream is relevant in the construction of video surveillance systems [5,6].
One of the methods currently used to detect a person is to find his figure in a two-dimensional image using a predetermined model of the human body. This paper provides a comparative analysis of the algorithms for recognizing people in a video based on background subtraction. Among the considered algorithms, the most efficient one was selected, which most accurately, quickly and with less expenditure of resources coped with the task.

Literature review
The bulk of the research literature related to the identification and identification of people in images and videos contains a description and analysis of various algorithms for recognizing and classifying people by gender, age and race [7][8][9]. The tasks of identifying a person by silhouette and contour, by gait and specific patterns of behavior remain unresolved due to difficult factors (clothes and accessories that mask a person's silhouette, circumstances that visually change gait, for example, heavy objects. Several works describe various approaches to solving these problems (using neural networks, wearable sensors, tracking the trajectories of silhouette points, etc.), the advantages of these identification methods [10,11]. In the present work, binary silhouettes of people obtained as a result of the background subtraction process are demonstrated [12].

Background subtraction problem
The main stage of video processing for solving the problem of recognition, tracking and identification of people is the separation of moving foreground objects from the background. On how correctly this problem is solved, all subsequent stages of solving the task depend.
Background subtraction is a method used to segment moving areas in sequences of images taken from a static camera by comparing each new frame with a background model of the scene. The complexity of the implementation of this approach is due to the influence of a large number of various factors, such as the camera's own noise, uneven lighting and scene movement. In this regard, the task of choosing the most robust approach becomes relevant. In this paper, the following background subtraction algorithms were chosen for the study: The following metrics were chosen to compare the studied algorithms:  FPS (frame rate) of the algorithm -an estimate of the speed of the algorithm.  Average CPU utilization in percent.

Background subtraction algorithms
Fuzzy Sugeno Integral (with Adaptive-Selective Update) [6]. This method is based on using the fuzzy Sugeno integral to combine texture and color features to subtract the background. It is usually used to process scenes with slight movement of background objects. It does not require large computational costs.
Pixel-Based Adaptive Segmenter (PBAS) [13]. This approach is based on the paradigm of nonparametric modeling of the background. The background is modeled based on a history of recently observed pixel values. The definition of the foreground depends on the decision threshold. The background update is based on a learning option. Both of these parameters are expanded to dynamic variables describing the state of the pixel, and dynamic controllers are presented for each of them. In addition, both controllers are driven by background dynamics.
Gaussian Mixture Model [14]. The method simulates each pixel as a mixture of Gaussians and also uses real-time approximation to update the model. Gaussian distributions are evaluated to determine which ones are most likely as a background. Each pixel is classified based on whether the Gaussian distribution representing it is part of the background model. The classification is based on the constancy and dispersion of each of the mixture of Gaussians. Pixel values that do not match the background distribution are considered the foreground until a Gaussian is found that includes them. This algorithm works stably in real time when lighting changes, it also copes with repetitive movements and long-term scene changes.
Type-2 Fuzzy GMM-UV with MRF [5]. This algorithm is based on two other algorithms: Type-2 Fuzzy Gaussian Mixture Model (T2-FGMM) and Markov Random Field (MRF). T2-FGMM does not take into account space-time constraints, this leads to poor performance for dynamic scenes. MRF helps to cope with this problem. Type-2 Fuzzy Algorithm GMM-UV with MRF is a new background modeling technique for detecting motion in dynamic scenes. The key idea of the proposed approach is the successful introduction of space-time constraints in T2-FGMM using the Bayesian structure.
VuMeter. This method belongs to the class of nonparametric. The mathematical model is based on a discrete estimate of the probability distribution. The key aspects of this method are the probabilistic model and temporary updating. This is a probabilistic approach to determining the background image model.
Eigenbackground / SL-PCA [4]. In this method, moving objects are detected using adaptively adjusting their own space, modeling the background. This model of intrinsic space describes the range of changes in appearance (for example, changes in lighting during the day, weather changes, etc.) that have been noticed.

Description of computing experiment
We used the BGSLibrary library written in the C ++ programming language to study the algorithms considered in this work.
Video materials with various shooting conditions were found to compare the selected algorithms: changing lighting; shooting from various angles.
These conditions allow more full evaluation of the algorithms, because depending on the lighting and shooting angle, additional noises appear due to the shadow falling from objects and the quality of the room's illumination. The results of the algorithms are presented in figures 1-6.   Figure 1 shows the result of the Fuzzy Sugeno Integral algorithm. In the case of shooting in a poorly lit room on the frames obtained, the silhouette of a person is visually almost indistinguishable. This is due to the fact that the contrast of the background and the moving object in low light is very low. In frames with good lighting, the silhouette of a person is distinguishable, but in addition to the person, the algorithm highlights light flares on the glossy surface of the floor. Also, when processing frames where several people in dark clothes are on a dark background, the algorithm inaccurately distinguishes the silhouette of people. In low light conditions, the algorithm distinguishes a moving person; its silhouette is visually clearly distinguishable. Under normal lighting, in addition to a moving person, a shadow stands out, which falls from him. People silhouettes are visually recognizable. If a person remains motionless for some time, he becomes invisible to the algorithm.   Figure 3 shows the result of the Gaussian Mixture Model algorithm. For the case of shooting with poor lighting from the above frames, we can conclude that the silhouette of a person in motion is quite clearly distinguishable. But in addition to the moving person, the algorithm highlights its shadow. In well-lit rooms, the algorithm also highlights the distinguishable silhouette of a moving person and the shadow falling from it. At the same time, the algorithm does not see people who are not moving. In the bottom set of screenshots, we can see that the algorithm emits a highlight on the floor surface. Frames that reflect the result of the Type-2 Fuzzy GMM-UV with MRF algorithm are shown in figure 4. This algorithm does not provide an exact selection of a moving object. In poor lighting, the silhouette of a moving person is not always distinguished, in some cases; the algorithm almost does not see a moving object. In the case of normal lighting, the silhouettes of people stand out inaccurately. It is almost impossible to understand that a person is highlighted in the frame. In some cases, moving people remain completely invisible to the algorithm.  For the Eigenbackground / SL-PCA algorithm, the result of the work is shown in Figure 6. In the case when the lighting is poor in the room, the silhouette of a person highlighted by this algorithm is easily distinguishable. But at the moment of lighting change, the algorithm stops working correctly. He highlights almost a whole room as a moving object. This is a drawback, since a change in lighting will greatly affect the quality of this algorithm. For shooting under normal lighting, in addition to a moving subject, this algorithm emits shadows that fall from objects in the room, as well as glare of light on the floor.
An analysis of the results allows concluding that the Pixel-Based Adaptive Segmenter algorithm works most efficiently.
The following is a comparison of the algorithms for the selected metrics. The obtained metric values are presented in figure 6.

Conclusion
The PBAS algorithm, which is more efficient in unstable shooting, is the most resource-intensive. The algorithms of the Gaussian Mixture Model and Type-2 Fuzzy GMM-UV with MRF in terms of resource consumption differ quite strongly (more than two times in terms of FPS and almost twice in terms of CPU load), but both of them have average indicators in comparison with other algorithms. That is, these algorithms are more suitable than others for use in security systems, since with average efficiency in terms of resource cost they give the best result in terms of accuracy.