Factory smoke detection method based on Gaussian smoke plume model and improved YOLOv4
By introducing the Gaussian smoke plume model and feature aggregation module into the YOLOv4 neural network model, the loss function is optimized, and the problems of insufficient real-time and low detection accuracy in factory smoke detection are solved, thereby achieving efficient and accurate smoke detection.
Patent Information
- Application Number
- CN202310628957.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-31
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2043-05-31
AI Technical Summary
The existing smoke detection methods are insufficient in real-time, have slow detection rate, low detection accuracy, and are easily disturbed by environmental factors, resulting in frequent missed and missed problems.
Using the Gaussian smoke plume model and improved YOLOv4 factory smoke detection method, the lightweight design and feature aggregation module of the YOLOv4 neural network model are used, and the loss function is optimized by combining the Gaussian smoke plume model to improve the real-time and accuracy of the detection model.
Real-time smoke detection in factory park scenarios is realized, the detection rate and accuracy are improved, the interference of environmental factors is reduced, and the occurrence of missed and missed detection is reduced.
Smart Images

Figure CN117037054B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image detection, and in particular relates to a factory smoke detection method based on a Gaussian smoke plume model and an improved YOLOv4. Background Art
[0002] According to statistics, 29,519 people died in various production safety accidents in my country in 2019, of which 5,828 people died from poisoning, explosions or fires caused by various gas leaks, accounting for 19.7% of the total number of deaths. In fact, for decades, early detection of hidden dangers of safety accidents has become an urgent need of our country and even the entire human society. Therefore, it is necessary to achieve all-round monitoring of gas leakage and fire hazards in the factory production process to achieve early detection and early resolution. In recent years, video-based smoke detection methods have received more and more attention due to their advantages such as non-contact detection, large coverage and low cost.
[0003] Compared with the classic and popular detection problems with vehicles, human bodies or faces as the main targets, the detection problem of outdoor smoke targets has higher requirements on the feature representation ability, response speed and robustness of the selected method. In the early research on smoke detection algorithms, static image data containing smoke was mainly used as training and detection objects. In order to improve the detection accuracy of the target data set, more research was conducted on traditional machine learning methods, namely the design of feature extractors. Although smoke detection technology based on traditional features has experienced a long period of development and has made encouraging progress, its limitations lie in the fact that the process of making identification features is very complicated, with high labor and time costs; and from the current perspective, it has serious overfitting problems and is extremely susceptible to various interferences and other problems. Therefore, researchers began to use deep learning as a smoke detection method based on video sequences. However, smoke detection methods based on deep learning still have major problems in practical applications, with frequent data omissions and false detections. If good detection accuracy is to be maintained, detection accuracy and detection speed will become a "fish and bear's paw" trade-off.
[0004] There are still the following deficiencies when using deep learning methods for factory park smoke detection:
[0005] (1) General target detection models are not real-time enough in specific scenarios. The computing power of existing equipment is limited. In factory park scenarios, the computing pressure brought by video stream detection will have a significant impact on the detection speed of the model.
[0006] (2) Environmental factors such as uncertain distance, light effects, light spot interference, and changes in target scale will cause the accuracy of smoke target detection to decrease, resulting in frequent missed detections and false detections.
[0007] Therefore, there is an urgent need for a factory smoke detection method with strong real-time performance, fast detection rate and high detection accuracy. Summary of the invention
[0008] In view of this, the purpose of the present invention is to provide a factory smoke detection method based on a Gaussian smoke plume model and an improved YOLOv4. The present invention aims to solve the problems of insufficient real-time performance, slow detection rate and low detection accuracy of existing smoke detection methods.
[0009] To achieve the above object, the present invention provides a factory smoke detection method based on a Gaussian smoke plume model and an improved YOLOv4, comprising the following steps:
[0010] S1. Obtain the current frame image in the surveillance video in the area to be detected;
[0011] S2. Perform smoke detection on the current frame image obtained, including:
[0012] (1) Use the improved YOLOv4 neural network model to extract candidate areas where smoke may exist in the image;
[0013] (2) Introduce the Gaussian smoke plume model based on the actual scene of the smoke area and optimize the loss function of the YOLOv4-Mini model;
[0014] (3) Train the YOLOv4-Mini model with the corrected loss function and then perform smoke detection.
[0015] Further, the improvements of the YOLOv4 neural network model include:
[0016] a. Based on the Model Scaling principle, the Backbone network part of the YOLOv4 neural network model is lightweight designed to obtain the YOLOv4-mini detection model;
[0017] b. Design a multi-scale feature aggregation module. After the design is completed, add it to the Neck structure of the YOLOv4-mini detection model.
[0018] Furthermore, the process of YOLOv4 lightweight design is as follows:
[0019] a1. Change the standard convolution of the backbone network CSPDarkNet53 to a depth-wise separable convolution;
[0020] The depth-wise separable convolution has two layers: the first layer is a depth-wise convolution, which applies a single convolution kernel to each input channel; the second layer is a 1×1 point convolution, which combines the output with the depth-wise convolution using a 1×1 convolution kernel;
[0021] a2. Based on the depth separation convolution, the connection mode of the convolution set is changed, and the original input and output of each convolution set are concatenated;
[0022] a3. Scale the depth of the network convolutional layers and the width of the network channels.
[0023] Furthermore, the RFB module is introduced during the design of the multi-scale feature aggregation module.
[0024] Furthermore, the multi-scale feature aggregation module has two paths: bottom-up and top-down.
[0025] Furthermore, in step S2, the optimization process of the YOLOv4-Mini model loss function is as follows:
[0026] I. Make assumptions about the diffusion process of continuous active diffusion smoke, the assumptions are as follows:
[0027] ①. The smoke diffusion source is stable and continuous over a period of time;
[0028] ②. Smoke spreads evenly and randomly in the atmosphere;
[0029] ③. The wind direction and wind speed remain unchanged during the diffusion process;
[0030] ④. During the diffusion process, the ground does not adsorb the smoke, and the sedimentation effect is not considered;
[0031] II. Based on the assumption, the Gaussian plume model is introduced to calculate the concentration C(x, y, z, t) of the smoke that continues to diffuse in the atmosphere at any point and at any time;
[0032]
[0033] Where C(x, y, z, t) is the smoke concentration at a distance of x meters downwind, y meters across wind, and z meters above the ground t seconds after the diffusion occurs, in mg·m -3 ; A(x) is the transition function; a, b, c are constant terms; piece is the height of the smoke source, in m; u is the ambient wind speed, in m / s; t i is the time when the i-th smoke source occurs, that is, the peak time of the main smoke target;
[0034] III. Variance formula in mathematical statistics of probability theory
[0035]
[0036] In the formula, σ x is the diffusion parameter in the x direction, i.e., downwind, in m; σ yis the diffusion parameter in the y direction, i.e., in the crosswind direction, in m; σ z is the diffusion parameter in the z direction, i.e., the direction perpendicular to the ground, in m;
[0037] IV. Based on assumption ①, we can get the diffusion source related formula
[0038]
[0039] Where, Q is the smoke source emission, unit is mg;
[0040] V. Without considering the influence of time, substituting equation (1) into equation (2), we can get the constant terms a, b, c;
[0041]
[0042] VI. Substitute equation (1) and equation (4) into equation (3) and solve for A(x);
[0043]
[0044] VII. Substituting equation (4) and equation (5) into equation (1), we can obtain
[0045]
[0046] VIII. Considering only the change of smoke diffusion process over time, simplifying equation (6), we can get the smoke concentration value C(t) that changes over time;
[0047]
[0048] IX. Substitute the smoke concentration value C(t) that changes with time as the correction value into the YOLOv4 confidence loss function to get the new obj_loss;
[0049]
[0050] In the formula, Indicates traversing all prediction boxes; the value of I is either 0 or 1, judging whether it is a negative sample; C i is the predicted value; is the sample value.
[0051] Furthermore, the correction value C(t) is between the interval [1, 2].
[0052] The beneficial effects of the present invention are:
[0053] The invention provides a factory smoke detection method based on a Gaussian smoke plume model and an improved YOLOv4. Based on the Model Scaling principle, a lightweight improvement is performed on a Backbone network part of a YOLOv4 neural network model, so that the detection speed is faster and the problem of insufficient real-time performance of the existing smoke detection method is solved. An RFB (Receptive Field Block) and an RFB-s structure are added to the Neck part of the YOLOv4 network to enhance the feature extraction capability of the detection model and make up for the decrease in feature capture capability caused by the reduction of the Backbone module. At the same time, the invention proposes a loss function optimization scheme based on a Gaussian smoke plume model, which can effectively reduce the interference of environmental factors and improve the smoke detection capability of the YOLOv4-Mini model.
[0054] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is a flow chart of the factory smoke detection method based on the Gaussian smoke plume model and improved YOLOv4 of the present invention;
[0056] Figure 2 This is the structural diagram of the YOLOv4-Mini detection model;
[0057] Figure 3 This is the structural diagram of the multi-scale feature aggregation module;
[0058] Figure 4 This is the structural diagram of the RFB module;
[0059] Figure 5a This is the detection effect of the original YOLOv4 detection model in the simulated smoke leakage video;
[0060] Figure 5b The detection effect of the YOLOv4-Mini detection model in the simulated smoke leakage video;
[0061] Figure 5c For the YOLOv4-Mini detection model Figure 5a Detection effect of the same frame;
[0062] Figure 5d This is the detection effect of the YOLOv4-Mini detection model on the frame containing small-scale smoke targets;
[0063] Figure 6a To improve the obj loss function of the front and back training parts;
[0064] Figure 6b To improve the obj loss function of the front and back verification parts;
[0065] Figure 6c To improve the PR curve of the test results before and after;
[0066] Figure 7a It is the detection result of the original YOLOv4 detection model in Example 2;
[0067] Figure 7b The improved YOLOv4-Mini detection model in Example 2 is Figure 7a Detection results of the same frame;
[0068] Figure 7c The detection result of the original YOLOv4 detection model in Example 2 for the frame containing the small-scale smoke target;
[0069] Figure 7d The improved YOLOv4-Mini detection model in Example 2 is Figure 7c Detection results for the same frame. DETAILED DESCRIPTION
[0070] In order to make the technical solutions, advantages and purposes of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the described embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of this application.
[0071] The structure of the YOLOv4 network is divided into three parts: Backbone, Neck and Head. The Backbone is mainly composed of CSPDarknet53, which is used to extract feature information of image data; the Neck is mainly composed of SPP (spatial pyramid pooling structure) and PANet. SPP is mainly used to increase the size of the receptive field, and PANet is used to convert the extracted feature information into coordinates, categories and other information; the Head is used to predict the output, compare it with the real label, and calculate the loss function to train the network parameters.
[0072] like Figure 1 As shown, the present invention provides a factory smoke detection method based on a Gaussian smoke plume model and an improved YOLOv4, comprising the following steps:
[0073] S1. Obtain the current frame image in the surveillance video in the area to be detected;
[0074] S2. Perform smoke detection on the current frame image obtained, including:
[0075] (1) Use the improved YOLOv4 neural network model to extract candidate areas where smoke may exist in the image;
[0076] (2) According to the actual scene of the smoke area, the Gaussian smoke plume model is introduced to optimize the loss function of the YOLOv4-Mini model;
[0077] (3) Train the YOLOv4-Mini model with the corrected loss function and then perform smoke detection.
[0078] Improvements to the YOLOv4 neural network model include:
[0079] a. Based on the Model Scaling principle, the Backbone network part of the YOLOv4 neural network model is lightweight designed to obtain the YOLOv4-mini detection model;
[0080] Model Scaling principle: Model Scaling is the process of expanding or reducing the complexity of a model by changing one or more dimensions (for example, the depth or width of the network).
[0081] b. Design a multi-scale feature aggregation module. After the design is completed, add it to the Neck structure of the YOLOv4-mini detection model.
[0082] The specific operations of lightweight YOLOv4 network model are:
[0083] The standard convolution of the backbone network CSPDarkNet53 is changed to a depthwise separable convolution. The depthwise separable convolution has two layers: the first layer is a depthwise convolution, which applies a single convolution kernel to each input channel; the second layer is a 1×1 point convolution, which combines the output with the depthwise convolution using a 1×1 convolution kernel. This form of convolution can significantly and effectively reduce the amount of model calculation and parameters, thereby improving the detection speed. At the same time, referring to the design idea of the residual network, based on the depthwise separable convolution, the connection method of the convolution set is changed, and the original input and output of each convolution set are spliced. The specific connection is as follows: Figure 2As shown. For an input feature, when performing deep convolution, the dimension is first reduced by a 1×1 convolution kernel, which will weaken the model's ability to express image features to a certain extent. However, the present invention concatenates the original input and output of each convolution set, so that each convolution set can retain the original larger-sized feature information. This improvement can enhance the model's ability to represent image depth features at the cost of a small amount of additional computation.
[0084] The present invention scales the depth (d) of the CSPDarknet53 network convolution layer by about 1 / 3 as a whole; the channel width (w) of the CSPDarknet53 network is finally scaled by about 1 / 2 according to the model scaling principle, and the dimension of the feature map sent to the Neck part is 13×13×512. In addition, except for the first and last layers of the network, the rest of the convolution sets are all improved versions of the deep convolution sets designed by the present invention. The improved CSPDarknet53-Mini network structure is shown in Table 1.
[0085] Table 1 CSPDarknet53-Mini network structure details
[0086]
[0087]
[0088] Design of multi-scale feature aggregation module:
[0089] The multi-scale feature aggregation module can use the RFB structure to aggregate the feature maps generated by CSPDarknet53-Mini into the feature pyramid. The details of the multi-scale feature aggregation module are as follows Figure 3 As shown in the figure, the multi-scale feature aggregation module has two paths: bottom-up and top-down. At the same time, the RFB module is introduced to increase the receptive field size of the model.
[0090] Construction method: Combine different sized kernels and different void ratios for construction. Multiple kernels are similar to pRFs (population receptive fields) of different sizes, and the dilated convolution layer assigns a separate eccentricity to each branch to simulate the ratio between the size and eccentricity of the pRF. Then, through cascading, all branches are processed with 1×1 convolution, and finally a receptive field pattern similar to that of the human visual system is simulated.
[0091] Compared with other modules commonly used in the Neck part (such as SPP, ASPP, etc.), RFB reduces the amount of calculation. The structure of RFB is as follows Figure 4 shown.
[0092] The optimization process of the YOLOv4-Mini model loss function is as follows:
[0093] I. Assumptions about the diffusion process of continuous active diffusion smoke:
[0094] ①. The smoke diffusion source is stable and continuous over a period of time;
[0095] ②. Smoke spreads evenly and randomly in the atmosphere;
[0096] ③. The wind direction and wind speed remain unchanged during the diffusion process;
[0097] ④. During the diffusion process, the ground does not adsorb the smoke and the sedimentation effect is not considered.
[0098] II. Based on the assumption, the Gaussian plume model is introduced to calculate the concentration C(x, y, z, t) of the smoke that continues to diffuse in the atmosphere at any point and at any time;
[0099]
[0100] Where C(x, y, z, t) is the smoke concentration at a distance of x meters downwind, y meters across wind, and z meters above the ground t seconds after the diffusion occurs, in mg·m -3 ; A(x) is the transition function; a, b, c are constant terms; piece is the height of the smoke source, in m; u is the ambient wind speed, in m / s; t i is the time when the i-th smoke source occurs, that is, the peak time of the main smoke target;
[0101] III. Variance formula in mathematical statistics of probability theory
[0102]
[0103] In the formula, σ x is the diffusion parameter in the x direction, i.e., downwind, in m; σ y is the diffusion parameter in the y direction, i.e., in the crosswind direction, in m; σ z is the diffusion parameter in the z direction, i.e., the direction perpendicular to the ground, in m;
[0104] IV. Based on assumption ①, we can get the diffusion source related formula
[0105]
[0106] Where, Q is the smoke source emission, unit is mg;
[0107] V. Without considering the influence of time, substituting equation (1) into equation (2), we can get the constant terms a, b, c;
[0108]
[0109] VI. Substitute equation (1) and equation (4) into equation (3) and solve for A(x);
[0110]
[0111] VII. Substituting equation (4) and equation (5) into equation (1), we can obtain
[0112]
[0113] VIII. Considering only the change of smoke diffusion process over time, simplifying equation (6), we can get the smoke concentration value C(t) that changes over time;
[0114]
[0115] According to the atmospheric stability classification proposed by Pasquier in 1961, let the source strength Q = 2 mg·m -1 , ambient wind speed u=2m·s -1 , main smoke target peak time t i =1.3s; at the same time, under the daytime natural light conditions with ambient wind speed 0<u≤2, the gas diffusion parameters are
[0116] The smoke diffusion process is modeled and the modeling results are used as correction values to optimize the original YOLOv4 loss function, making the detection model more sensitive to the "main smoke target" when it diffuses to 1s to 2s, and the prediction box has a higher confidence. In the smoke diffusion video collected in an ideal factory park scene, each time the smoke is generated instantly from the smoke source, in a stable environment, the "main smoke target" in the video will appear in a concentrated period of 1s to 2s, and at t i = 1.3s, the area in the picture reaches its peak, that is, the value of formula C(t) is the largest. Since some parameters in the formula have been formulated before, the Gaussian function C(t) finally obtains a correction value between the interval [1, 2]. This correction value will amplify the correction at the peak time t i The confidence results of the predicted boxes containing the targets detected in the attachment are shown. Through continuous iterative training, the detection model becomes more sensitive to the “main smoke targets”.
[0117] IX. Substitute the smoke concentration value C(t) that changes with time as the correction value into the YOLOv4 confidence loss function to get the new obj_loss;
[0118]
[0119] In the formula, Indicates traversing all prediction boxes; the value of I is either 0 or 1, judging whether it is a negative sample; Ci is the predicted value; is the sample value.
[0120] Embodiment 1
[0121] The YOLOv4-Mini network is trained using public smoke data (from the Fire Laboratory of USTC and Professor Yuan Feiniu's team) and data crawled, cleaned and labeled from the Internet. The trained model is then verified and analyzed using smoke videos from Professor Yuan Feiniu's team and factory environment smoke videos collected by the team.
[0122] Figure 5a-5d The comparison between the original YOLOv4 detection model and the lightweight YOLOv4-Mini detection model in the simulated smoke leak video is shown. Figure 5a It can be seen that the average speed of the original model is generally around 25FPS. Figure 5b It can be seen that the detection speed of the improved YOLOv4-Mini model of the present invention is about 40FPS.
[0123] Figure 5c Shows the optimized Figure 5a Detection effect of the same frame, Figure 5d The optimized detection effect on frames containing small-scale smoke targets is demonstrated. Compared with the original YOLOv4 model, the lightweight YOLOv4-Mini model has improved the detection effect of small targets, but the overall confidence and detection accuracy of smoke-themed targets are still reduced.
[0124] Figure 6a-6c The changes in the detection result parameters of the YOLOv4-Mini detection model before and after the loss function is corrected are shown.
[0125] Figure 6a The loss parameters of the YOLOv4-Mini detection model in the training phase before and after the loss function is improved. Figure 6b The loss parameters of the YOLOv4-Mini detection model in the verification phase before and after the loss function is improved. The left column uses the original loss function, and the right column uses the loss function modified based on smoke modeling. It can be seen from the observation that the loss function correction method provided by the present invention effectively reduces the value of obj_loss, and has a faster decline speed in the early stage of the verification phase. Figure 6cThe detection accuracy comparison results after 200 iterations of training when two loss functions (the original loss function and the loss function corrected based on smoke modeling) are used for the YOLOv4-Mini detection model. It can be seen that the detection accuracy using the original loss function is low, and the accuracy reaches 0.727 after 200 iterations, and the overall convergence speed is slow. The detection accuracy of the detection model using the improved loss function of the present invention is high, and the accuracy reaches the maximum after about 50 iterations, and finally stabilizes at 0.832. The method proposed in the present invention improves the detection accuracy by about 13% and accelerates the convergence of the model.
[0126] Comparative analysis of detection models
[0127] By comparison, the improved YOLOv4-Mini detection model can specifically improve the smoke target detection performance in the factory park scene. The test set is tested with common target detection models. The input image size is (416×416). The final detection results are shown in Table 2.
[0128] Table 2 Detection results of different versions of detection models on the factory park scene dataset
[0129] Detection Model mAP_0.5(%) FLOPs(B) FPS YoloV4 86.3% 60.1 22 YoloV5s 79.8% 16.5 37 YoloV4-Tiny 67.5% 6.9 63 YoloV4-mini 83.2% 14.3 47
[0130] The evaluation indicators used to compare four different detection models are mAP_0.5, FLOPs and FPS. It can be seen from Table 2 that the improved YoloV4-mini model has a detection speed improvement of 28FPS at the cost of 3.1% detection accuracy compared to the original YoloV4 model, indicating that the lightweight design of the backbone network has greatly reduced the complexity of the network. The detection speed of the YoloV4-Tiny model reached 63FPS, but its detection accuracy decreased by 15.7%. The improvement in detection accuracy is based on the loss function optimization scheme of the smoke diffusion model, which specifically enhances the detection model's ability to detect smoke targets. Compared with the YoloV5s with the same lightweight positioning, the method of the present invention is superior in detection accuracy and speed, with improvements of 4.4% and 10FPS respectively.
[0131] Example 2
[0132] Figure 7a-7d The comparison results of the original YOLOv4 detection model and the YOLOv4-Mini model trained with the smoke diffusion model optimized loss function are shown. In the 101st frame of the comparison video of scene 1, both the front and back detection models detected most of the smoke targets in the picture, but Figure 7a The detection speed is low and the detection accuracy changes suddenly. Figure 7bWhile maintaining high detection accuracy, the detection speed has been significantly improved compared to the original detection model. In the 172th frame of the comparison video of another scene 3, due to the small scale of smoke and strong light interference, the detection accuracy and detection speed of all detection models have decreased to varying degrees. Figure 7c There is a large fluctuation in detection accuracy. Figure 7d The less obvious smoke target at the top of the screen was not detected. Overall, the improved YOLOv4-Mini detection model maintained good detection performance.
[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the protection scope of the present invention.
Claims
1. A factory smoke detection method based on Gaussian smoke plume model and improved YOLOv4, characterized in that: The following steps are involved: S1. Obtain the current frame image in the surveillance video in the area to be detected; S2. Perform smoke detection on the current frame image obtained, including: (1) Use the improved YOLOv4 neural network model to extract candidate areas where smoke may exist in the image; (2) According to the actual scene of the smoke area, the Gaussian smoke plume model is introduced, and the smoke concentration value C(t) that changes with time is used as the correction value, which is substituted into the YOLOv4 confidence loss function to optimize the loss function of the YOLOv4-Mini model; (3) Train the YOLOv4-Mini model with the corrected loss function and then perform smoke detection; Among them, the improvements of the YOLOv4 neural network model include: a. Based on the Model Scaling principle, the Backbone network part of the YOLOv4 neural network model is lightweight designed to obtain the YOLOv4-mini detection model; b. Design a multi-scale feature aggregation module and add it to the Neck structure of the YOLOv4-mini detection model after the design is completed; In the design process of the multi-scale feature aggregation module, the RFB module is introduced; The multi-scale feature aggregation module has two paths: bottom-up and top-down; The process of YOLOv4 lightweight design is as follows: a1. Change the standard convolution of the backbone network CSPDarkNet53 to a depth-wise separable convolution; The depth-wise separable convolution has two layers: the first layer is a depth-wise convolution, which applies a single convolution kernel to each input channel; the second layer is a 1×1 point convolution, which combines the output with the depth-wise convolution using a 1×1 convolution kernel; a2. Based on the depth separation convolution, the connection mode of the convolution set is changed, and the original input and output of each convolution set are concatenated; a3. Scale the depth of the network convolutional layers and the width of the network channels.
2. The factory smoke detection method based on Gaussian smoke plume model and improved YOLOv4 according to claim 1, characterized in that: In step S2, the optimization process of the YOLOv4-Mini model loss function is as follows: Ⅰ. Assumptions on the diffusion process of continuous active diffusion smoke are as follows: ①. The smoke diffusion source is stable and continuous over a period of time; ②. Smoke spreads evenly and randomly in the atmosphere; ③. The wind direction and wind speed remain unchanged during the diffusion process; ④. During the diffusion process, the ground does not adsorb the smoke, and the sedimentation effect is not considered; Ⅱ. Based on the assumption, the Gaussian smoke plume model is introduced to calculate the concentration C(x,y,z,t) of the smoke that continues to diffuse in the atmosphere at any point and at any time; Where C(x,y,z,t) is the smoke concentration at a distance of x meters downwind, y meters across wind, and z meters above the ground t seconds after the diffusion occurs, in mg·m -3 ; A(x) is the transition function; a, b, c are constant terms; H is the height of the smoke source, in m; u is the ambient wind speed, in m / s; t i is the time when the i-th smoke source occurs, that is, the peak time of the main smoke target; III. Variance formula in mathematical statistics of probability theory In the formula, σ x is the diffusion parameter in the x direction, i.e., downwind, in m; σ y is the diffusion parameter in the y direction, i.e., in the crosswind direction, in m; σ z is the diffusion parameter in the z direction, i.e., the direction perpendicular to the ground, in m; IV. Based on assumption ①, we can get the diffusion source related formula Where, Q is the smoke source emission, unit is mg; V. Without considering the influence of time, substituting equation (1) into equation (2), we can get the constant terms a, b, c; VI. Substitute equation (1) and equation (4) into equation (3) and solve for A(x); VII. Substituting equation (4) and equation (5) into equation (1), we can obtain VIII. Considering only the change of smoke diffusion process over time, simplifying equation (6), we can get the smoke concentration value C(t) that changes over time; Ⅸ. Substitute the smoke concentration value C(t) that changes with time into the confidence loss function of YOLOv4 as the correction value to get the new obj_loss; In the formula, Indicates traversing all prediction boxes; the value of I is either 0 or 1, judging whether it is a negative sample; C i is the predicted value; is the sample value.
3. The factory smoke detection method based on Gaussian smoke plume model and improved YOLOv4 according to claim 2, characterized in that: The correction value C(t) is between the interval [1, 2].