{'fraction_non_alphanumeric': 0.021283034093201533, 'fraction_numerical': 0.0041355658664514825, 'mean_word_length': 4.919402985074627, '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}}
An improved Gaussian Mixture Model algorithm for background representation

Initializing a background frame for Gaussian Mixture Model requires no moving objects in the background scene. In this paper, in order to obtain an initial frame when there is a moving object in the background scene, filtering algorithm is used for background frame initialization. This paper proposes an improved method for updating Gaussian mixture models. In the initial stage of the GMM, the update rate of the mean and variance is taken as a larger value, so that the model mean and variance update speed becomes faster, and the model learning speed is accelerated; after training for a period of time with a large update rate, let The mean update rate is unchanged, and the variance update rate becomes smaller, so that the background model can be more stable.


Introduction
Gaussian mixture model is a background representation method based on statistical information of pixel samples. It uses the statistical information such as the probability density of a large number of sample values in a long time to represent the background, and then uses statistical difference to determine the target pixel, which can be used for complex dynamic background modelling [1]. Gaussian mixture model can be applied for the complex, dynamic background description (for example, the water there were waves shaking, shaking the leaves, etc.), its multi-modal nature so that the model can approximate the real situation of the scene. But there are still some issues we need to resolve when the traditional Gaussian mixture model is applied for the actual moving object detection applications [2], the main problems are the following: (1) In some complex situations, it is more difficult to obtain full background which does not include the moving object. For example, a large amount of vehicular traffic or road junctions. It will be unrealistic to apply the traditional method of Gaussian mixture model initialization.
(2) The updated coefficient of Gaussian mixture model is fixed [3]. If the coefficient which you choose to update model is too large, too quickly update model for testing the sensitivity will deteriorate; if the update coefficient chosen is too large, too slow to update, then the original image on a stationary target in the next frame of video image it will generate a long smear when motion occurs. Find a reasonable update coefficient can ensure sensitivity but also to eliminate smear is more difficult.  (3) In monitoring situations where high real-time performance is required, using Gaussian mixture model algorithm requires more computational complexity for target detection [4].
(4) For the sudden change of weather or the optical mutation caused by external disturbances, GMM is easy to generate holes, resulting in detection errors. This is also a problem that almost all systems which use background subtraction to detect moving targets need to face.
Taking into account the Gaussian mixture model for complex scene representation of ability [5], but it has some shortcomings and deficiencies mentioned above [6]. This paper proposes an improved method for the mixed Gaussian model to adapt to complex and variable scenarios.

The improvements on background frame initialization
The initialization of background frames is a key step in modeling Gaussian backgrounds. The consistency of the extracted background frame and the actual background will directly affect the moving target detection effect [7]. This is related to the reliability of subsequent analysis of video image information.
Generally, Gaussian mixture model extracts a frame of video image without motion as foreground, and taking the pixel value of the frame image as the mean of the initial Gaussian model, giving greater variance and less weight. Although this makes the algorithm simple and easy, it also affects the effect of the established background model. In some complex background scenes, when the model converges slowly, the estimated background deviates too much from the real background, which will cause the target detection to be wrong and the moving target will not be extracted.
We use the filtered image frame to initialize the first Gaussian model to minimize the effects of moving objects on background modeling. In this paper, two filtering algorithms, mean and median, are used to establish the initial frame. Figure 1 is the result of initializing a background frame based on two different methods. (a) is the first frame video image, (b) is the 100th frame video image, (c) is the mean filtering effect diagram, and (d) is the median filtering effect diagram. It can be seen from the figure that the background effect extracted by the median filtering method is better. This paper initializes the background frame using median filtering.

The improvement on background update rate
In the traditional Gaussian mixture model, for the two parameters of the mean and mean variance of the Gaussian mixture model, their update rate depends on the learning rate ρ. the traditional update method uses a uniform learning rate. According to the characteristics of the Gaussian distribution, we know that the mean μ of the Gaussian distribution determines the position of the axis of symmetry of the Gaussian curve, and the σ of Gaussian distribution determines the variation of the Gaussian distribution, they have different characteristics.
If a uniform learning rate is used for the mean and mean square error of the Gaussian mixture model, the mean and mean square error update speeds of the Gaussian mixture model are slower when using a smaller learning rate. Although the stability of the background model is guaranteed and the noise interference in the video image is suppressed, the convergence of the Gaussian model is relatively poor and the background establishment time is long. When the lighting conditions change, the Gaussian mixture model does not adapt quickly to this change in the background.
When the learning rate is large, the mean and mean square error of the Gaussian model are updated faster, which makes the mixed Gaussian background model have better convergence. When the lighting conditions change, it can be adapted quickly. However, the model may fluctuate frequently and the stability will become very poor.
It can be seen that it is unreasonable to adopt a uniform learning rate for the mean and mean square error of the Gaussian mixture model, which makes the stability and convergence of the single Gaussian model impossible.
In this paper, the improvement of the mean and mean variance of the Gaussian mixture model is improved: for the mean and mean variance of the Gaussian mixture model, different update rates   and 2   are given respectively, and the average value of the Gaussian mixture model is given a relatively large update rate. The single Gaussian model can be quickly adapted to the changes of illumination conditions, and the mean variance of the Gaussian mixture model is given a relatively small update rate, which makes the Gaussian mixture model have good stability.
The improved update method is expressed as: For the update rate   of the mean of the Gaussian mixture model, we can assign a larger value to it. Let 01 . 0 =   ,thus, the mean update speed of the Gaussian mixture model will be very fast, making the model adapt well to changes in illumination. For the update rate of the Gaussian mixture model

Improved Gaussian mixture model experiment
In this paper, the improved Gaussian mixture model algorithm is used to perform target detection experiments on different scenes, and a better detection result is obtained. The video image to be detected is in AVI format, the video frame rate is 15 frames/second, and the image size is 320x240 pixels. The Gaussian components in the Gaussian mixture model used in the experiment are K=3, and the learning rate of the parameter estimation is segmented, the initial variance is 36, the initial weight is 0.05, and the foreground detection threshold is T=0.25.  (4) and (5) are blown by the wind outdoors, and the branches in the background are shaken. It can be found from the experimental results that the Gaussian mixture model is effective in both simple background scenes and complex, large-flow scenes, and the background detection is as good as shown. For the case shown in Figure (3), there is always a moving target in the background scene, and it is impossible to extract directly to the background, but it is possible to get a better background model by learning. Experiments from three different scenarios show that the improved Gaussian mixture background model method can extract moving targets better than the previous interframe difference method; compared with the single Gaussian background model method, it can suppress the interference of the external environment. There are also better detection effects in the complex background scene. However, as shown in (4) and (5), while extracting the moving target, the motion shadow is also extracted, and the shadow elimination will be the content that needs to be completed in the post processing.

Conclusion
This paper analyzes the Gaussian mixture model and discusses the shortcomings of the GMM, and introduces an improved Gaussian Mixture Model algorithm for background representation. In the initial stage of the GMM, the update rate of the mean and variance is taken as a larger value, so that the model mean and variance update speed becomes faster, and the model learning speed is accelerated; after training for a period of time with a large update rate, let The mean update rate is unchanged, and the variance update rate becomes smaller, so that the background model can be more stable. By the experiment, we know that the improved GMM algorithm has obvious advantages in target detection when there is an external disturbance in the scene.