Training method and system for lampblack concentration detection model and medium

By deploying a camera in the oil fume emission area to obtain oil fume image frames, performing fume distortion elimination and convolutional neural network feature extraction, combined with the adversarial training mechanism, a fume concentration detection model is built, which solves the problems of unstable and inaccurate oil fume concentration detection in the existing technology, and achieves more efficient and accurate oil fume concentration detection.

CN120032222AActive Publication Date: 2025-05-23SHENZHEN FULIN KITCHEN EQUIP CO LTD

Patent Information

Application Number
CN202510023195.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-05-23
Estimated Expiration
2045-01-07

AI Technical Summary

Technical Problem

The existing oil fume concentration detection technology is affected by environmental noise and data deviation, resulting in unstable and inaccurate detection results.

Method used

By deploying a camera in the oil fume emission area to acquire the oil fume image frames in real-time, perform fume distortion elimination processing, and use convolutional neural network to perform multi-scale feature extraction to build an oil fume concentration detection model. An adversarial training mechanism optimization model is introduced to generate an optimization model for oil smoke concentration detection.

Benefits of technology

It improves the accuracy and robustness of oil smoke concentration detection, reduces errors caused by image quality problems, and enhances the adaptability and generalization ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120032222A_ABST
    Figure CN120032222A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of model training, in particular to a training method and system for an oil smoke concentration detection model and a medium. The method comprises the following steps: acquiring an oil fume discharge image frame in real time in a selected oil fume discharge area, and performing fuzzy distortion elimination processing to obtain an oil fume fuzzy distortion removed image frame; constructing a convolutional network layer and a deconvolutional network layer, and performing multi-scale step-by-step feature extraction to obtain a lampblack image feature set; inputting the oil smoke image feature set into a deconvolution network layer to carry out concentration detection model training so as to generate an oil smoke concentration detection model, and outputting an oil smoke concentration model detection result; performing oil smoke concentration quantification and frame-by-frame labeling on the corresponding oil smoke fuzzy distortion removed image frames based on the oil smoke image feature set to obtain an actual oil smoke concentration labeling result; and introducing a discriminator and carrying out model confrontation optimization to generate an oil smoke concentration detection optimization model. According to the invention, the detection precision and robustness of the oil smoke concentration can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of model training, and in particular to a training method, system and medium for a fume concentration detection model. Background Art

[0002] Oil fume not only affects air quality, but also poses potential hazards to human health. Therefore, real-time monitoring and effective control of oil fume concentration have become one of the key issues in the field of environmental protection. As an important means of evaluating air quality, oil fume concentration detection technology is widely used in home kitchens, catering kitchens, industrial kitchens and other places. Through accurate oil fume concentration monitoring, the degree of pollution in the air can be understood in a timely manner, so that corresponding measures can be taken to deal with it. In recent years, by using information such as sensor data, image data or video data, combined with machine learning models, intelligent prediction and real-time monitoring of oil fume concentration can be achieved. However, the existing oil fume concentration detection technology is mainly divided into two categories: physical detection method and chemical detection method. Physical detection methods such as light scattering method and laser radar method calculate oil fume concentration by measuring the optical properties of particles in the air; while chemical detection methods judge oil fume concentration by sampling and analyzing the chemical composition in the air. Although these methods can monitor oil fume concentration to a certain extent, they are often affected by environmental noise and data deviation factors, resulting in unstable and inaccurate detection results. Summary of the invention

[0003] Based on this, it is necessary for the present invention to provide a training method and system for an oil fume concentration detection model to solve at least one of the above technical problems.

[0004] To achieve the above purpose, a training method for a fume concentration detection model includes the following steps:

[0005] Step S1: a camera is deployed in the selected fume emission area to acquire a fume emission image frame in real time, and a blur and distortion removal process is performed on the fume emission image frame to obtain an image frame with fume blur and distortion removed;

[0006] Step S2: construct a convolutional network layer and a deconvolutional network layer, and use the convolutional network layer to perform multi-scale step-by-step feature extraction on the oil smoke blur and distortion removal image frame, so as to extract the corresponding oil smoke fine particle texture features at a small scale, and extract the corresponding oil smoke shape and area change features at a large scale, and obtain an oil smoke image feature set; input the oil smoke image feature set into the deconvolutional network layer for concentration detection model training, so as to generate an oil smoke concentration detection model, and output the oil smoke concentration model detection result;

[0007] Step S3: quantifying the oil smoke concentration of the corresponding oil smoke blur and distortion removal image frame based on the oil smoke image feature set to obtain the actual oil smoke concentration value corresponding to the oil smoke image frame; annotating the corresponding oil smoke blur and distortion removal image frame frame by frame based on the actual oil smoke concentration value corresponding to the oil smoke image frame to obtain the actual annotation result of the oil smoke concentration;

[0008] Step S4: A discriminator is constructed by introducing an adversarial training mechanism, and the discriminator is used to perform model adversarial optimization on the oil fume concentration detection model based on the actual annotation results of the oil fume concentration and the oil fume concentration model detection results to generate an oil fume concentration detection optimization model.

[0009] Further, step S1 includes the following steps:

[0010] Step S11: by deploying a camera in the selected fume emission area and setting the shooting parameters corresponding to the frame rate, resolution and sensitivity, the fume emission image frame is acquired in real time at a shooting frequency interval of 30 seconds every 5 minutes;

[0011] Step S12: performing oil fume image segmentation processing on the oil fume emission image frame at intervals of 5 seconds to obtain an oil fume image segmentation set;

[0012] Step S13: performing image grayscale conversion on each oil smoke emission image in the oil smoke image frame set to generate an oil smoke grayscale image frame set;

[0013] Step S14: performing local contrast calculation on each oil fume grayscale image in the oil fume grayscale image frame set, so as to divide each oil fume grayscale image into a plurality of local regions, and calculating the contrast difference between the maximum grayscale value and the minimum grayscale value for each local region, so as to obtain the local contrast of the oil fume grayscale image; performing edge gradient calculation on each oil fume grayscale image in the oil fume grayscale image frame set using the Sobel operator, so as to obtain the edge gradient of the oil fume grayscale image;

[0014] Step S15: performing blurring and distortion removal processing on each of the oil fume grayscale images in the oil fume grayscale image frame set based on the local contrast of the oil fume grayscale image and the edge gradient of the oil fume grayscale image to obtain an oil fume blur and distortion removed image frame.

[0015] Further, step S15 includes the following steps:

[0016] Step S151: performing discrete wavelet decomposition on each of the oil fume grayscale images in the oil fume grayscale image frame set to convert the oil fume grayscale image from the spatial domain to the frequency domain, and obtaining the grayscale frequency components corresponding to different scale components to obtain the grayscale frequency of each image position area in the oil fume grayscale image;

[0017] Step S152: performing image blur distortion rate calculation on the grayscale frequency of each image position area in the oil fume grayscale image based on the local contrast of the oil fume grayscale image and the edge gradient of the oil fume grayscale image using the oil fume image blur distortion rate calculation formula to obtain the grayscale blur distortion rate of each image position area in the oil fume grayscale image;

[0018] Step S153: comparing and judging the grayscale blur distortion rate of each image position area in the oil smoke grayscale image according to the preset clarity threshold, if the grayscale blur distortion rate is less than the preset clarity threshold, the corresponding image position area is determined as a non-blurred distortion area; if the grayscale blur distortion rate is greater than or equal to the preset clarity threshold, the corresponding image position area is determined as a blurred distortion area;

[0019] Step S154: using dilation and erosion operations corresponding to edge morphology to perform fuzzy distortion adjacent connections on the fuzzy distortion areas in the oil smoke grayscale image, so as to remove isolated fuzzy distortion noise points, and connect adjacent fuzzy distortion areas to obtain an oil smoke grayscale fuzzy distortion key area image frame;

[0020] Step S155: performing a blurring and distortion elimination process on the image frame of the key area of ​​the oil smoke grayscale blurring and distortion, so as to optimize and repair the pixel blurring and distortion between the non-blurred and distorted area and the blurred and distorted area by considering the movement and emission flow direction corresponding to the oil smoke in the oil smoke grayscale image, and obtain an image frame with the oil smoke blurring and distortion removed.

[0021] Furthermore, the calculation formula of the fume image blur distortion rate in step S152 is specifically:

[0022]

[0023] Where D(x,y) is the grayscale blur distortion rate of the oil smoke grayscale image at the image position (x,y), Ω is the oil smoke image position area range, x is the image position abscissa, y is the image position ordinate, ε(x,y) is the local contrast of the oil smoke grayscale image at the image position (x,y), and λ is 1 is the local contrast distortion weighting coefficient, I(x,y) is the image pixel grayscale value at the image position (x,y), is the edge gradient of the oil smoke grayscale image at the image position (x, y), λ 2 is the edge gradient distortion weighting coefficient, f(x,y) is the grayscale frequency at the image position (x,y) in the smoke grayscale image, N is the total number of pixels in the neighborhood, φ xy is the local area range at the image position (x, y), I ij is the grayscale value of the image pixel at the domain position (i, j), μ xyis the mean gray value in the local area, λ 3 is the gray frequency distortion weighting coefficient, and η is the correction coefficient of the gray blur distortion rate.

[0024] Further, step S2 includes the following steps:

[0025] Step S21: obtaining the scattering characteristics of the oil smoke under different lighting conditions, and obtaining the corresponding oil smoke texture direction characteristics by removing the oil smoke blur and distortion image frame;

[0026] Step S22: According to the scattering characteristics of oil smoke under different lighting conditions and the directional characteristics of oil smoke texture, convolution kernels corresponding to 3×3 to 11×11 pixels are designed, and the high-frequency details of fine particles corresponding to oil smoke and the low-frequency contours of large oil smoke shapes are realized, thereby constructing a convolution network layer; and the deconvolution network layer is constructed by connecting it with the convolution network layer into a symmetrical structure;

[0027] Step S23: using the convolutional network layer to perform multi-scale step-by-step feature extraction on the oil smoke blur and distortion removal image frame, so as to iteratively extract from the shallow layer to the deep layer, using a small-scale convolution kernel on the shallow layer to extract the corresponding oil smoke fine particle texture features, and gradually introducing a large-size convolution kernel on the deep layer to integrate the oil smoke blur and distortion removal image frame The corresponding oil smoke surrounding contour extracts the corresponding oil smoke shape and area change features, and obtains the oil smoke image feature set;

[0028] Step S24: Input the oil fume image feature set into the deconvolution network layer for concentration detection model training, and integrate the loss function according to the physical correspondence between different scale features in the oil fume image feature set and the oil fume concentration, so as to fit the relationship between the oil fume concentration and different scale features through multiple iterative training, generate an oil fume concentration detection model, and output the oil fume concentration model detection result.

[0029] Further, step S3 includes the following steps:

[0030] Step S31: based on the texture features of the oil smoke fine particles in the oil smoke image feature set, the oil smoke blur and distortion removal image frame is estimated to obtain the oil smoke fine particle size distribution;

[0031] Step S32: performing light intensity spectrum transformation on the image frame with oil smoke blur and distortion removed to obtain oil smoke light intensity distribution characteristics of the oil smoke image at different frequency components; performing oil smoke density statistical analysis on the particle size distribution of oil smoke fine particles based on the oil smoke light intensity distribution characteristics of the oil smoke image at different frequency components to obtain the density of oil smoke fine particles;

[0032] Step S33: predicting the area of ​​the corresponding image frame after the oil smoke blur and distortion is removed based on the oil smoke shape and area change characteristics in the oil smoke image feature set, and obtaining the predicted area size of the oil smoke image region;

[0033] Step S34: quantifying the oil fume concentration of the corresponding oil fume blur and distortion removed image frame based on the density of oil fume fine particles and the predicted area size of the oil fume image region, so as to obtain the actual oil fume concentration value corresponding to the oil fume image frame;

[0034] Step S35: annotating the corresponding image frames after the oil fume blurring and distortion is removed frame by frame based on the actual oil fume concentration values ​​corresponding to the oil fume image frames, and obtaining actual annotation results of the oil fume concentration.

[0035] Furthermore, the oil smoke density statistical analysis of the oil smoke fine particle size distribution based on the oil smoke light intensity distribution characteristics of the oil smoke image at different frequency components in step S32 includes the following steps:

[0036] According to the oil smoke light intensity distribution characteristics of the oil smoke image at different frequency components, the light intensity distribution gradient analysis is performed to obtain the oil smoke light intensity distribution change gradient of the oil smoke image at different frequency components;

[0037] Based on the gradient of the distribution of oil smoke intensity at different frequency components of the oil smoke image, the corresponding image frame with oil smoke blur and distortion removed is evaluated to obtain the influence factor of the propagation intensity of oil smoke particles, including the peak frequency of the scattered light intensity and the slope of the light intensity attenuation;

[0038] Based on the influence factor of the propagation light intensity of oil fume particles, a statistical analysis of the particle size distribution of oil fume fine particles was conducted to obtain the density of oil fume fine particles.

[0039] Further, step S4 includes the following steps:

[0040] Step S41: construct a discriminator by introducing an adversarial training mechanism, and input the actual annotation result of the oil smoke concentration corresponding to the oil smoke image and the oil smoke concentration model detection result into the discriminator in pairs for detection and judgment, so as to generate a probability judgment result of a false result of the oil smoke concentration;

[0041] Step S42: Feedback the false probability judgment result of the oil fume concentration to the oil fume concentration detection model for model adversarial optimization, and use the gradient back propagation algorithm to adjust the oil fume concentration detection model's own network parameters to generate an oil fume concentration detection optimization model.

[0042] Furthermore, the present invention also provides a training system for an oil fume concentration detection model, which is used to execute the training method for an oil fume concentration detection model as described above. The training system for an oil fume concentration detection model comprises:

[0043] The oil fume image frame acquisition and processing module is used to acquire the oil fume emission image frame in real time by deploying a camera in the selected oil fume emission area, and perform blur and distortion removal processing on the oil fume emission image frame, so as to obtain an oil fume blur and distortion removal image frame;

[0044] The oil fume concentration detection model training module is used to construct a convolutional network layer and a deconvolutional network layer, and use the convolutional network layer to perform multi-scale step-by-step feature extraction on the oil fume blur and distortion removal image frame, so as to extract the corresponding oil fume fine particle texture features at a small scale, and extract the corresponding oil fume shape and area change features at a large scale, and obtain the oil fume image feature set; the oil fume image feature set is input into the deconvolutional network layer for concentration detection model training, so as to generate an oil fume concentration detection model, and output the oil fume concentration model detection result;

[0045] The actual fume concentration frame-by-frame annotation module is used to quantify the fume concentration of the corresponding fume blur and distortion removal image frame based on the fume image feature set to obtain the actual fume concentration value corresponding to the fume image frame; based on the actual fume concentration value corresponding to the fume image frame, the corresponding fume blur and distortion removal image frame is annotated frame by frame to obtain the actual fume concentration annotation result;

[0046] The concentration detection model adversarial optimization module is used to build a discriminator by introducing an adversarial training mechanism, and use the discriminator to perform model adversarial optimization on the fume concentration detection model based on the actual fume concentration labeling results and the fume concentration model detection results to generate an optimized fume concentration detection model.

[0047] Furthermore, the present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed, the training method for the oil fume concentration detection model as described above is implemented.

[0048] Beneficial effects of the present invention:

[0049] 1. Compared with the prior art, the training method for the oil fume concentration detection model proposed in the present invention has the beneficial effect of using a camera to monitor the dynamic process of the oil fume emission area in real time, ensuring that image data related to the oil fume concentration can be obtained in a timely manner. The image frame will be affected by factors such as lighting, motion blur, and inaccurate lens focal length, resulting in blurring and distortion of the oil fume image, thereby affecting the accuracy and efficiency of subsequent analysis. By adopting advanced image processing technologies such as deconvolution, denoising, and deblurring, the blurry components in the image can be effectively eliminated, the image quality can be improved, and clear and accurate basic data can be provided for subsequent image analysis and concentration detection. This processing can restore the true form of the oil fume, thereby enabling subsequent feature extraction, concentration detection and other steps to more accurately reflect the actual oil fume emission situation, avoid the error accumulation caused by blurred images, and reduce judgment errors caused by image quality problems. Secondly, by using convolutional neural networks (CNNs) for image feature extraction, the accuracy of oil fume concentration detection can be significantly improved. The multi-scale feature extraction capability of convolutional networks can extract multi-level information of oil fume images at different scales. For example, the convolutional layer can capture the fine particle texture features of oil fume at a small scale, which are related to the concentration and composition of oil fume; on a large scale, the network can extract features such as the shape and area change of oil fume, which are usually closely related to the diffusion process and overall concentration of oil fume. Through multi-scale feature extraction, the details and macro information in the oil fume image can be fully captured, thereby providing all-round data support for subsequent concentration detection. The deconvolution network layer helps to restore the high-dimensional spatial information of the image and converts the feature-extracted data into a concentration detection model that is easier to explain and understand. Through such a network structure, an accurate oil fume concentration detection model can be obtained, which provides an accurate prediction basis for subsequent concentration quantification and optimization. Then, the fume concentration is quantified based on the fume image feature set for the corresponding fume blur and distortion removal image frame to achieve quantitative evaluation of fume concentration, and the detection model is further optimized by comparing with the actual concentration annotation results. The fume concentration can be quantified through the extracted fume image feature set, so that each frame of fume image can correspond to a specific concentration value. This quantification method makes the fume concentration no longer a vague qualitative description, but a measurable value. At the same time, the frame-by-frame annotation process, combined with the actual fume concentration value, can provide accurate annotation data for subsequent model training. These data will become an important basis for training and verifying the fume concentration detection model, laying the foundation for further improving the accuracy and reliability of the model. Based on the concentration annotation results corresponding to the fume image frame, a high-precision and practical fume concentration monitoring model can be formed to help monitor the real-time changes of fume emissions, timely detect excessive emissions and take corresponding measures.Finally, by introducing the discriminator, the robustness and accuracy of the oil fume concentration detection model can be effectively improved. The role of the discriminator is to judge the output results of the oil fume concentration detection model, evaluate the difference between it and the actual concentration annotation results, and continuously optimize the model parameters so that it can gradually approach the real oil fume concentration data. The adversarial training mechanism can stimulate the model to produce more accurate detection results through the game process between the two. This mechanism can not only help the model reduce deviations, but also through a continuous optimization process, the detection model can still maintain a high accuracy when facing oil fume images in different scenes and conditions. In addition, in this way, the oil fume concentration detection model can better adapt to complex and dynamic environments, improve the generalization ability of the system, avoid overfitting, thereby improving the stability and accuracy of the detection process in practical applications, and ensuring that oil fume monitoring can be carried out more effectively.

[0050] 2. The training system for the oil fume concentration detection model proposed in the present invention is generally composed of an oil fume image frame acquisition and processing module, an oil fume concentration detection model training module, an oil fume actual concentration frame-by-frame labeling module, and a concentration detection model adversarial optimization module. It can implement any training method for the oil fume concentration detection model described in the present invention, and is used to combine the operations between computer programs running on various modules to implement the training method for the oil fume concentration detection model. The internal structures of the system cooperate with each other, which can greatly reduce duplication of work and manpower investment, and can quickly and effectively provide a more accurate and efficient training process for the oil fume concentration detection model, thereby simplifying the operating procedures of the training system for the oil fume concentration detection model. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments thereof made with reference to the following drawings:

[0052] Figure 1 It is a schematic diagram of the steps of the training method for the oil smoke concentration detection model of the present invention;

[0053] Figure 2 for Figure 1 Detailed step flow diagram of step S1;

[0054] Figure 3 for Figure 2 Detailed step flow chart of step S15 in FIG. DETAILED DESCRIPTION

[0055] The technical method of the present invention is described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.

[0056] In addition, the accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. The functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor methods and / or microcontroller methods.

[0057] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.

[0058] To achieve this, please refer to Figures 1 to 3 The present invention provides a training method for a fume concentration detection model, the method comprising the following steps:

[0059] Step S1: a camera is deployed in the selected fume emission area to acquire a fume emission image frame in real time, and a blur and distortion removal process is performed on the fume emission image frame to obtain an image frame with fume blur and distortion removed;

[0060] Step S2: construct a convolutional network layer and a deconvolutional network layer, and use the convolutional network layer to perform multi-scale step-by-step feature extraction on the oil smoke blur and distortion removal image frame, so as to extract the corresponding oil smoke fine particle texture features at a small scale, and extract the corresponding oil smoke shape and area change features at a large scale, and obtain an oil smoke image feature set; input the oil smoke image feature set into the deconvolutional network layer for concentration detection model training, so as to generate an oil smoke concentration detection model, and output the oil smoke concentration model detection result;

[0061] Step S3: quantifying the oil smoke concentration of the corresponding oil smoke blur and distortion removal image frame based on the oil smoke image feature set to obtain the actual oil smoke concentration value corresponding to the oil smoke image frame; annotating the corresponding oil smoke blur and distortion removal image frame frame by frame based on the actual oil smoke concentration value corresponding to the oil smoke image frame to obtain the actual annotation result of the oil smoke concentration;

[0062] Step S4: A discriminator is constructed by introducing an adversarial training mechanism, and the discriminator is used to perform model adversarial optimization on the oil fume concentration detection model based on the actual annotation results of the oil fume concentration and the oil fume concentration model detection results to generate an oil fume concentration detection optimization model.

[0063] In the embodiment of the present invention, please refer to Figure 1 FIG. 1 is a flow chart of the steps of the method for training a fume concentration detection model according to the present invention. In this example, the method for training a fume concentration detection model comprises the following steps:

[0064] Step S1: a camera is deployed in the selected fume emission area to acquire a fume emission image frame in real time, and a blur and distortion removal process is performed on the fume emission image frame to obtain an image frame with fume blur and distortion removed;

[0065] In an embodiment of the present invention, a high-resolution industrial camera is installed in the oil fume emission area to perform real-time image acquisition. The camera should have a high frame rate and strong low-light adaptability to capture clear oil fume images. During the image acquisition process, the dynamic characteristics of the oil fume and environmental factors (such as light, airflow, etc.) will cause the image to be blurred and distorted. Therefore, an image deblurring algorithm is first used, such as a convolutional neural network (CNN) based on deep learning for deblurring. Commonly used deblurring methods include a deconvolutional neural network or a long short-term memory (LSTM) network combined with image reconstruction technology. By gradually reducing image noise and distortion, the details of the oil fume image are restored. After this process, a clear image frame with the influence of blur and distortion removed is obtained, and finally an image frame with oil fume blur and distortion removed is obtained.

[0066] Step S2: construct a convolutional network layer and a deconvolutional network layer, and use the convolutional network layer to perform multi-scale step-by-step feature extraction on the oil smoke blur and distortion removal image frame, so as to extract the corresponding oil smoke fine particle texture features at a small scale, and extract the corresponding oil smoke shape and area change features at a large scale, and obtain an oil smoke image feature set; input the oil smoke image feature set into the deconvolutional network layer for concentration detection model training, so as to generate an oil smoke concentration detection model, and output the oil smoke concentration model detection result;

[0067] In an embodiment of the present invention, in order to efficiently extract features from oil fume images, a deep convolutional neural network (CNN) structure is constructed. The convolutional network includes multiple convolutional layers. Different convolution kernel sizes (for example, 3×3, 5×5, 7×7, etc.) are used in the design to achieve multi-scale image feature extraction. The task of the convolutional layer is to extract the texture features of the oil fume image, including subtle particle features and larger-scale oil fume shape features. At a smaller scale, the convolutional layer focuses on extracting the microscopic texture of the oil fume particles; at a larger scale, the convolutional layer extracts macroscopic features such as the shape and area of ​​the oil fume. By extracting features of different scales layer by layer and combining these features into a feature set, the physical properties of the oil fume can be more accurately represented. Next, these extracted image features are input into the deconvolution network layer for further feature recovery and mapping. The function of the deconvolution layer is to restore the concentration changes and distribution patterns of oil smoke according to the contextual information of the image features. By sending these image features into the trained oil smoke concentration detection model, the detection results of oil smoke concentration are output. The goal of this stage is to generate an oil smoke concentration detection model with a certain generalization ability, and finally generate an oil smoke concentration detection model and output the oil smoke concentration model detection results.

[0068] Step S3: quantifying the oil smoke concentration of the corresponding oil smoke blur and distortion removal image frame based on the oil smoke image feature set to obtain the actual oil smoke concentration value corresponding to the oil smoke image frame; annotating the corresponding oil smoke blur and distortion removal image frame frame by frame based on the actual oil smoke concentration value corresponding to the oil smoke image frame to obtain the actual annotation result of the oil smoke concentration;

[0069] In an embodiment of the present invention, after obtaining the feature set of the oil fume image, based on the feature output of the model, the actual concentration value of the oil fume image frame is obtained by quantizing the oil fume area in the image. In specific implementation, firstly, based on the feature set of the oil fume image (including texture, shape, etc.) and the preset oil fume concentration reference standard, the extracted features are mapped with the known concentration values ​​through regression analysis or other statistical modeling methods. In this process, support vector regression (SVR), random forest regression and other methods can be selected to achieve concentration prediction. Then, based on the obtained oil fume concentration value, the image is annotated frame by frame. Each frame of the image will correspond to a concentration value. The concentration value is verified by comparing with the actual environmental data to ensure the accuracy of the concentration prediction. The frame-by-frame annotation process adopts a combination of manual annotation and automatic annotation. Some errors in automatic annotation are manually corrected to finally obtain the actual annotation result of the oil fume concentration.

[0070] Step S4: A discriminator is constructed by introducing an adversarial training mechanism, and the discriminator is used to perform model adversarial optimization on the oil fume concentration detection model based on the actual annotation results of the oil fume concentration and the oil fume concentration model detection results to generate an oil fume concentration detection optimization model.

[0071] In an embodiment of the present invention, in order to further improve the performance of the oil fume concentration detection model, an adversarial training mechanism is introduced to optimize the model. In this step, a discriminator is first constructed. The task of the discriminator is to judge the difference between the result output by the oil fume concentration detection model and the actual labeled result. The discriminator identifies the prediction deviation of the detection model by comparing the detection result of the oil fume concentration model with the actual labeled oil fume concentration value. The discriminator is optimized using a generative adversarial network (GAN) or other adversarial training methods. Specifically, the discriminator is trained together with the oil fume concentration detection model. During this process, the discriminator will provide feedback on the output of the concentration model to prompt the model to adjust its parameters to reduce the prediction error. During the optimization process, the detection model is continuously improved in predicting the oil fume concentration through adversarial training, and the robustness of the model is improved, so that it can have stronger adaptability and higher accuracy, and can provide accurate oil fume concentration prediction in complex environments, and finally generate an optimized oil fume concentration detection model.

[0072] Further, step S1 includes the following steps:

[0073] Step S11: by deploying a camera in the selected fume emission area and setting the shooting parameters corresponding to the frame rate, resolution and sensitivity, the fume emission image frame is acquired in real time at a shooting frequency interval of 30 seconds every 5 minutes;

[0074] Step S12: performing oil fume image segmentation processing on the oil fume emission image frame at intervals of 5 seconds to obtain an oil fume image segmentation set;

[0075] Step S13: performing image grayscale conversion on each oil smoke emission image in the oil smoke image frame set to generate an oil smoke grayscale image frame set;

[0076] Step S14: performing local contrast calculation on each oil fume grayscale image in the oil fume grayscale image frame set, so as to divide each oil fume grayscale image into a plurality of local regions, and calculating the contrast difference between the maximum grayscale value and the minimum grayscale value for each local region, so as to obtain the local contrast of the oil fume grayscale image; performing edge gradient calculation on each oil fume grayscale image in the oil fume grayscale image frame set using the Sobel operator, so as to obtain the edge gradient of the oil fume grayscale image;

[0077] Step S15: performing blurring and distortion removal processing on each of the oil fume grayscale images in the oil fume grayscale image frame set based on the local contrast of the oil fume grayscale image and the edge gradient of the oil fume grayscale image to obtain an oil fume blur and distortion removed image frame.

[0078] As an embodiment of the present invention, refer to Figure 2 As shown, Figure 1Detailed step flow diagram of step S1 in FIG. 1 , in this embodiment, step S1 includes the following steps:

[0079] Step S11: by deploying a camera in the selected fume emission area and setting the shooting parameters corresponding to the frame rate, resolution and sensitivity, the fume emission image frame is acquired in real time at a shooting frequency interval of 30 seconds every 5 minutes;

[0080] In the embodiment of the present invention, by selecting a suitable oil fume emission area for image acquisition, the deployment of the selected area should ensure that the camera can cover the entire oil fume emission source and the field of view is not blocked. By installing an industrial-grade high-definition camera in the area, the corresponding parameters are set to meet the real-time monitoring requirements. The frame rate of the camera is set to 20 frames per second to ensure that the rapid changes of oil fume are captured, and the resolution is set to 1920×1080 pixels to ensure a clear enough image quality to identify the slight changes of oil fume. At the same time, the sensitivity is adjusted to ISO 800 to adapt to image acquisition under different lighting conditions. When the system is running, 30 seconds of oil fume image data is automatically collected every 5 minutes to ensure that enough image frames are periodically collected for subsequent analysis. This operation is performed by the image acquisition system and the automatic time control program to ensure the timeliness and integrity of image acquisition, and finally obtain the oil fume emission image frame.

[0081] Step S12: performing oil fume image segmentation processing on the oil fume emission image frame at intervals of 5 seconds to obtain an oil fume image segmentation set;

[0082] In an embodiment of the present invention, every 30 seconds of video image frames are segmented into 5-second intervals through programming logic to obtain several small image frame sets, each of which contains several image frames, and the time interval between these image frames is 5 seconds. This operation is completed through a computer vision algorithm, and individual image frames of a specified time interval are extracted from the original video based on the timestamp. Six images are captured from the 30-second image sequence each time, and each image represents a time point (5-second interval). These frame sets will become input data sets for subsequent image analysis and processing. During the frame processing, a video decoding algorithm is used to ensure the clarity and accuracy of the image to avoid data loss due to too long an interval or image loss, and finally a smoke image frame set is obtained.

[0083] Step S13: performing image grayscale conversion on each oil smoke emission image in the oil smoke image frame set to generate an oil smoke grayscale image frame set;

[0084] In an embodiment of the present invention, each image in the oil fume image frame set is grayscaled for subsequent feature extraction and analysis. The specific operation is to convert each color image into a single-channel grayscale image through an image processing algorithm. This process is achieved by converting the RGB value of each pixel into a grayscale value according to a weighted average formula, namely: grayscale value = 0.2989*R+0.5870*G+0.1140*B. This formula can effectively retain the brightness information of the image and simplify the calculation by removing the color information. The resolution and size of the grayscale image remain unchanged, ensuring that contrast analysis and image feature extraction can be accurately performed in subsequent processing steps. The generated grayscale image set will be used for subsequent local contrast calculation and edge detection to further identify changes in oil fume concentration, and finally generate an oil fume grayscale image frame set.

[0085] Step S14: performing local contrast calculation on each oil fume grayscale image in the oil fume grayscale image frame set, so as to divide each oil fume grayscale image into a plurality of local regions, and calculating the contrast difference between the maximum grayscale value and the minimum grayscale value for each local region, so as to obtain the local contrast of the oil fume grayscale image; performing edge gradient calculation on each oil fume grayscale image in the oil fume grayscale image frame set using the Sobel operator, so as to obtain the edge gradient of the oil fume grayscale image;

[0086] In an embodiment of the present invention, when performing local contrast calculation on each oil fume grayscale image, the image is first divided into multiple small local areas. The size of each local area can be set according to specific detection requirements. For example, each image is divided into 4×4 sub-areas. For each sub-area, the difference between the maximum grayscale value and the minimum grayscale value in the area is calculated to obtain the local contrast value. In this way, the grayscale contrast change in the image can be obtained, reflecting the concentration difference of oil fume in the spatial distribution. At the same time, the Sobel operator is used to calculate the edge gradient of each grayscale image. The Sobel operator is a commonly used image edge detection operator. By applying convolution operations to the image, it can highlight the areas with drastic grayscale changes in the image, and then detect the edge features of the smoke. Specifically, the Sobel operator calculates the gradient values ​​in the horizontal and vertical directions respectively, and generates the total gradient value of each pixel by combining the gradient information in these two directions. The area with a larger gradient value corresponds to the place where the change is more drastic in the image, which usually represents the edge area of ​​the smoke emission. By applying the Sobel operator to each grayscale image, the edge gradient map of the smoke image is obtained, and finally the edge gradient of the smoke grayscale image is obtained.

[0087] Step S15: performing blurring and distortion removal processing on each of the oil fume grayscale images in the oil fume grayscale image frame set based on the local contrast of the oil fume grayscale image and the edge gradient of the oil fume grayscale image to obtain an oil fume blur and distortion removed image frame.

[0088] In the embodiment of the present invention, after obtaining the local contrast and edge gradient information of each oil fume grayscale image, the next task is to perform blurring and distortion elimination processing on the oil fume image. Blurring and distortion are usually manifested as unclear edges or loss of details in the image, which may be caused by factors such as insufficient light during image acquisition, poor camera quality or image compression. By analyzing the local contrast and edge gradient of the image, the blurred area can be identified and targeted processing can be performed. Specifically, the blurred area in the image is enhanced using the edge detection result, and the blur phenomenon is eliminated by enhancing the edge details of the image. Further, combined with the analysis result of the local contrast, the grayscale value of the blurred area is adjusted to make the details of the oil fume in the image clearer and avoid information loss. The blurring and distortion elimination processing usually adopts an image deconvolution algorithm or an edge-preserving filtering method, such as bilateral filtering (Bilateral Filtering) and other technologies. Through this method, the noise and blur in the image can be removed while retaining the image edge, thereby obtaining a clearer oil fume image frame. These processed image frames will be used as input data for the oil fume concentration detection model training, further improving the accuracy and robustness of the model, and finally obtaining an oil fume blur and distortion removed image frame.

[0089] Further, step S15 includes the following steps:

[0090] Step S151: performing discrete wavelet decomposition on each of the oil fume grayscale images in the oil fume grayscale image frame set to convert the oil fume grayscale image from the spatial domain to the frequency domain, and obtaining the grayscale frequency components corresponding to different scale components to obtain the grayscale frequency of each image position area in the oil fume grayscale image;

[0091] Step S152: performing image blur distortion rate calculation on the grayscale frequency of each image position area in the oil fume grayscale image based on the local contrast of the oil fume grayscale image and the edge gradient of the oil fume grayscale image using the oil fume image blur distortion rate calculation formula to obtain the grayscale blur distortion rate of each image position area in the oil fume grayscale image;

[0092] Step S153: comparing and judging the grayscale blur distortion rate of each image position area in the oil smoke grayscale image according to the preset clarity threshold, if the grayscale blur distortion rate is less than the preset clarity threshold, the corresponding image position area is determined as a non-blurred distortion area; if the grayscale blur distortion rate is greater than or equal to the preset clarity threshold, the corresponding image position area is determined as a blurred distortion area;

[0093] Step S154: using dilation and erosion operations corresponding to edge morphology to perform fuzzy distortion adjacent connections on the fuzzy distortion areas in the oil smoke grayscale image, so as to remove isolated fuzzy distortion noise points, and connect adjacent fuzzy distortion areas to obtain an oil smoke grayscale fuzzy distortion key area image frame;

[0094] Step S155: performing a blurring and distortion elimination process on the image frame of the key area of ​​the oil smoke grayscale blurring and distortion, so as to optimize and repair the pixel blurring and distortion between the non-blurred and distorted area and the blurred and distorted area by considering the movement and emission flow direction corresponding to the oil smoke in the oil smoke grayscale image, and obtain an image frame with the oil smoke blurring and distortion removed.

[0095] As an embodiment of the present invention, refer to Figure 3 As shown, Figure 2 Detailed step flow diagram of step S15 in FIG. 1 , in this embodiment, step S15 includes the following steps:

[0096] Step S151: performing discrete wavelet decomposition on each of the oil fume grayscale images in the oil fume grayscale image frame set to convert the oil fume grayscale image from the spatial domain to the frequency domain, and obtaining the grayscale frequency components corresponding to different scale components to obtain the grayscale frequency of each image position area in the oil fume grayscale image;

[0097] In the embodiment of the present invention, by adopting the standard wavelet transform technology and selecting the appropriate wavelet basis function to perform multi-scale analysis on the image, the image can be converted from the spatial domain to the frequency domain. In this step, firstly, a two-dimensional discrete wavelet transform (DWT) is applied to each oil fume grayscale image, using wavelet functions such as Haar, Daubechies, etc., and different scales are selected according to the decomposition level. Each level of decomposition will produce four sub-images, namely low-frequency approximation (LL), horizontal details (LH), vertical details (HL) and diagonal details (HH). These sub-images represent the frequency components of the image at different scales. In the processing process, the grayscale frequency characteristics of the image are obtained by extracting the low-frequency and high-frequency components in these sub-images, and further used for the subsequent fuzzy distortion evaluation. In particular, when extracting these frequency components, special attention should be paid to the contribution of frequency components of different scales to the local details of the image, ensuring that the high-frequency components can effectively capture the details of the image, and the low-frequency components mainly reflect the overall characteristics of the image, and finally the grayscale frequency of each image position area in the oil fume grayscale image is obtained.

[0098] Step S152: performing image blur distortion rate calculation on the grayscale frequency of each image position area in the oil fume grayscale image based on the local contrast of the oil fume grayscale image and the edge gradient of the oil fume grayscale image using the oil fume image blur distortion rate calculation formula to obtain the grayscale blur distortion rate of each image position area in the oil fume grayscale image;

[0099] In an embodiment of the present invention, a suitable calculation formula for the blur distortion rate of the fume image is formed by combining the range of the oil fume image position area, the horizontal coordinate of the image position, the vertical coordinate of the image position, the local contrast of the oil fume grayscale image, the local contrast distortion weighting coefficient, the image pixel grayscale value, the edge gradient of the oil fume grayscale image, the edge gradient distortion weighting coefficient, the grayscale frequency, the total number of pixels in the neighborhood, the local domain area range, the image pixel grayscale value, the average of the grayscale values ​​in the local domain area, the grayscale frequency distortion weighting coefficient and related parameters. The image blur distortion rate is calculated for the grayscale frequency of each image position area in the oil fume grayscale image to quantify the blur distortion rate of each area. The blur distortion rate reflects the degree of detail loss in the image area. The higher the value, the stronger the degree of image blur distortion in the area, and the lower the value, the clearer the area. Finally, the grayscale blur distortion rate of each image position area in the oil fume grayscale image is obtained.

[0100] Step S153: comparing and judging the grayscale blur distortion rate of each image position area in the oil smoke grayscale image according to the preset clarity threshold, if the grayscale blur distortion rate is less than the preset clarity threshold, the corresponding image position area is determined as a non-blurred distortion area; if the grayscale blur distortion rate is greater than or equal to the preset clarity threshold, the corresponding image position area is determined as a blurred distortion area;

[0101] In an embodiment of the present invention, the blur distortion rate of each image position area is compared and judged through a preset clarity threshold. When the blur distortion rate of the image position area is less than the threshold, the area is marked as a non-blurred and distorted area, indicating that the image in the area is relatively clear and is not affected by the smoke concentration; if the blur distortion rate is greater than or equal to the preset clarity threshold, it indicates that the area has a more serious blur distortion and needs further processing. Therefore, through the threshold judgment method, it is clear whether each image area is blurred and distorted due to the influence of smoke. In order to ensure the accuracy of the judgment, the setting of the clarity threshold depends on the overall clarity characteristics of the image and the statistical analysis of the blur distortion. The threshold is usually set according to the actual characteristics of the smoke grayscale image. This operation is performed on each pixel of the image. The result is a binary image, in which the blurred and distorted area is marked as "1" and the non-blurred and distorted area is marked as "0".

[0102] Step S154: using dilation and erosion operations corresponding to edge morphology to perform fuzzy distortion adjacent connections on the fuzzy distortion areas in the oil smoke grayscale image, so as to remove isolated fuzzy distortion noise points, and connect adjacent fuzzy distortion areas to obtain an oil smoke grayscale fuzzy distortion key area image frame;

[0103] In an embodiment of the present invention, it is intended to remove isolated blurred and distorted noise points and connect adjacent blurred and distorted areas for subsequent image restoration. First, the isolated blurred and distorted noise points in the image are reduced by the corrosion operation in edge morphology. This operation can reduce the distorted area and remove small noise in the image. Then, the blurred and distorted area is expanded by the dilation operation, and the adjacent blurred and distorted areas are connected into a continuous area. The corrosion and dilation operations are used in combination to effectively remove isolated noise points and integrate the blurred and distorted areas, making the blurred and distorted areas more concentrated and coherent. The structural elements (such as circles or rectangles) used in the morphological operation are determined according to the characteristics of the actual oil fume image. The size of the structural elements determines the effects of the dilation and corrosion operations. Through this step, the blurred and distorted areas in the oil fume grayscale image are processed into more obvious and coherent areas, and finally the oil fume grayscale blurred and distorted key area image frame is obtained.

[0104] Step S155: performing a blurring and distortion elimination process on the image frame of the key area of ​​the oil smoke grayscale blurring and distortion, so as to optimize and repair the pixel blurring and distortion between the non-blurred and distorted area and the blurred and distorted area by considering the movement and emission flow direction corresponding to the oil smoke in the oil smoke grayscale image, and obtain an image frame with the oil smoke blurring and distortion removed.

[0105] In the embodiment of the present invention, the image frame of the key area of ​​blur and distortion obtained previously is repaired by applying blur and distortion elimination technology. At this time, the direction and motion characteristics of the oil smoke emission flow in the oil smoke grayscale image are taken into consideration, and the optimization repair method of the flow direction is adopted to repair the pixel blur and distortion between the non-blurred distortion area and the blur and distortion area. The process uses interpolation technology to restore the image blur area, and usually adopts bilinear interpolation or adaptive interpolation method based on local features to fill the blur area. Specifically, by analyzing the color, texture and other characteristics of the blur and distortion area and the adjacent area, the repair algorithm will generate a smooth transition image that meets the overall image characteristics to eliminate the visual impact caused by blur and distortion. The motion emission direction of the oil smoke image is estimated by optical flow or inferred based on the flow characteristics of the oil smoke, thereby guiding the repair algorithm to correctly interpolate in the blur area, and while ensuring the overall clarity of the image, the details of the oil smoke area are restored to the maximum extent, and finally the oil smoke blur and distortion removal image frame is obtained.

[0106] Furthermore, the calculation formula of the fume image blur distortion rate in step S152 is specifically:

[0107]

[0108] Where D(x,y) is the grayscale blur distortion rate of the oil smoke grayscale image at the image position (x,y), Ω is the oil smoke image position area range, x is the image position abscissa, y is the image position ordinate, ε(x,y) is the local contrast of the oil smoke grayscale image at the image position (x,y), and λ is 1 is the local contrast distortion weighting coefficient, I(x,y) is the image pixel grayscale value at the image position (x,y), is the edge gradient of the oil smoke grayscale image at the image position (x, y), λ 2 is the edge gradient distortion weighting coefficient, f(x,y) is the grayscale frequency at the image position (x,y) in the smoke grayscale image, N is the total number of pixels in the neighborhood, φ xy is the local area range at the image position (x, y), I ij is the grayscale value of the image pixel at the domain position (i, j), μ xy is the mean gray value in the local area, λ 3 is the gray frequency distortion weighting coefficient, and η is the correction coefficient of the gray blur distortion rate.

[0109] The present invention obtains a calculation formula for the fumes image blur distortion rate by using a specific mathematical model and after verification, which is used to calculate the image blur distortion rate of the gray frequency of each image position area in the fumes gray image. The calculation formula for the fumes image blur distortion rate combines multiple factors such as local contrast, edge gradient and gray frequency, and can accurately describe the degree of blur distortion of the fumes image. The local contrast can reflect the details of the image, the edge gradient reflects the image clarity, and the gray frequency reveals the high-frequency information of the image (closely related to the clarity). These factors can be adjusted by weighting coefficients to further improve the accuracy of the formula. In the formula, the regional range is integrated, which means that the calculation is not just for a single point, but takes into account the comprehensive characteristics of the local area of ​​the image, which can effectively avoid the influence of local noise or abnormal points. The local consideration makes the formula adaptable to different types of fuzzy distortion areas, and the global correction coefficient makes the final result smoother, reducing the error caused by over-calculation. The weighted coefficients of the formula allow the influence of different distortion sources to be adjusted according to the characteristics of the actual image. This flexibility enables the model to make accurate judgments and repairs for different oil smoke image blur and distortion conditions. In addition, the weighted coefficients of contrast, edge gradient and frequency components can be optimized according to the blur degree, noise characteristics, etc. of the image, so that the algorithm can automatically adapt to the actual scene and obtain more reasonable distortion evaluation results. Through the weighted edge gradient, the formula can pay more attention to those areas containing edge information when detecting image distortion, because these areas usually contain more image details, and areas with a higher degree of blur will affect the overall clarity of the image. In summary, the formula fully considers the grayscale blur distortion rate D(x,y) at the intrinsic image position (x,y) of the oil smoke grayscale image, the oil smoke image position area range Ω, the image position horizontal coordinate x, the image position vertical coordinate y, the local contrast ε(x,y) of the oil smoke grayscale image at the image position (x,y), and the local contrast distortion weighting coefficient λ 1 , the image pixel gray value I(x,y) at the image position (x,y), the smoke gray image edge gradient at the image position (x,y) Edge gradient distortion weighting coefficient λ 2 , the grayscale frequency f(x,y) at the image position (x,y) in the oil smoke grayscale image, the total number of pixels in the neighborhood N, the local area range φ at the image position (x,y) xy , the gray value I of the image pixel at the field position (i, j) ij , the mean value of the gray value in the local area μ xy , gray frequency distortion weighting coefficient λ 3, the correction coefficient η of the grayscale blur distortion rate, where the grayscale image edge gradient of the oil smoke at the image position (x, y) is formed by combining the image position abscissa x, the image position ordinate y and the image pixel grayscale value I(x, y) at the image position (x, y). Functional relationship By combining the image position horizontal coordinate x, the image position vertical coordinate y, the total number of pixels in the neighborhood N, the local area range φ at the image position (x, y) xy , the gray value I of the image pixel at the field position (i, j) ij And the mean value of the gray value in the local area μ xy It constitutes a functional relationship of the grayscale frequency f(x,y) at the intrinsic image position (x,y) of the oil smoke grayscale image. According to the correlation between the grayscale fuzzy distortion rate D(x,y) at the intrinsic image position (x,y) of the oil smoke grayscale image and the above parameters, a functional relationship is formed: This formula can realize the image blur distortion rate calculation process of the grayscale frequency of each image position area in the oil fume grayscale image. At the same time, by introducing the correction coefficient η of the grayscale blur distortion rate, it can be adjusted according to the error situation occurring in the calculation process, thereby improving the accuracy and applicability of the oil fume image blur distortion rate calculation formula.

[0110] Further, step S2 includes the following steps:

[0111] Step S21: obtaining the scattering characteristics of the oil smoke under different lighting conditions, and obtaining the corresponding oil smoke texture direction characteristics by removing the oil smoke blur and distortion image frame;

[0112] In an embodiment of the present invention, by obtaining the scattering characteristics of oil smoke under different lighting conditions from the collected oil smoke image data, and by using a specially designed imaging device, such as a multispectral camera, it is possible to obtain oil smoke images under different light intensities. According to the light scattering characteristics of the oil smoke image, the influence of oil smoke particles on the image under different lighting conditions is calculated through an illumination model and a reverse calculation method. These influences are mainly manifested in that the scattering behavior of oil smoke particles will cause blurring and texture distortion of the image. When deblurring the image, a deblurring algorithm (such as Wiener filtering, blind deconvolution, etc.) can be used to remove the blurring distortion caused by oil smoke scattering. After deblurring is completed, texture direction extraction is performed, and a Gabor filter or a directional gradient method is used to analyze the texture direction characteristics of the oil smoke particles in the image to calibrate the distribution and directional information of the oil smoke in the image, and finally obtain the corresponding oil smoke texture direction characteristics.

[0113] Step S22: According to the scattering characteristics of oil smoke under different lighting conditions and the directional characteristics of oil smoke texture, convolution kernels corresponding to 3×3 to 11×11 pixels are designed, and the high-frequency details of fine particles corresponding to oil smoke and the low-frequency contours of large oil smoke shapes are realized, thereby constructing a convolution network layer; and the deconvolution network layer is constructed by connecting it with the convolution network layer into a symmetrical structure;

[0114] In an embodiment of the present invention, a series of convolution kernels are designed according to the scattering characteristics of oil smoke under different lighting conditions and the extracted oil smoke texture directional characteristics. The sizes of the convolution kernels range from 3×3 to 11×11 pixels, which are used to extract oil smoke detail features at different scales. Small-scale convolution kernels (such as 3×3 or 5×5) are used to capture the high-frequency details of fine oil smoke particles, while large-scale convolution kernels (such as 9×9 or 11×11) are used to extract low-frequency contour features of large clusters of oil smoke. Through this multi-scale design, effective extraction of different particle levels of oil smoke can be achieved to construct a convolution network layer, and the feature extraction capability of oil smoke details is enhanced by stacking multiple convolution layers. The convolution network layer and the deconvolution network layer adopt a symmetrical structure, that is, on the basis of the convolution layer, the deconvolution layer gradually restores the image resolution and strengthens the extracted features. In the design of the deconvolution network layer, the spatial information of the image is restored by using a deconvolution operation to enhance the correlation between the oil smoke concentration and the image details, and finally the corresponding convolution network layer and deconvolution network layer are constructed.

[0115] Step S23: using the convolutional network layer to perform multi-scale step-by-step feature extraction on the oil smoke blur and distortion removal image frame, so as to iteratively extract from the shallow layer to the deep layer, using a small-scale convolution kernel on the shallow layer to extract the corresponding oil smoke fine particle texture features, and gradually introducing a large-size convolution kernel on the deep layer to integrate the oil smoke blur and distortion removal image frame The corresponding oil smoke surrounding contour extracts the corresponding oil smoke shape and area change features, and obtains the oil smoke image feature set;

[0116] In an embodiment of the present invention, a multi-scale step-by-step feature extraction is performed on the oil fume image frame by using a convolutional network layer. First, starting from the image frame with oil fume blur and distortion removed, multi-scale convolution feature extraction is performed. The shallow convolutional network uses a small-scale convolution kernel (such as 3×3 or 5×5) to extract the subtle texture features of the oil fume particles. These small-scale convolution kernels can capture the tiny particles, details and changes of the oil fume. In the deep convolutional network, a larger-scale convolution kernel (such as 9×9 or 11×11) is introduced. At this time, the network will gradually integrate the detail features extracted by the previous layer and extract the large-scale shape features in the oil fume image, such as the contour of the oil fume mass and its edge information. In addition, in the deep network, the contour analysis of the oil fume image background is gradually added to extract the shape information and area change characteristics around the oil fume. In the whole process, the size of the convolution kernel and the depth level of feature extraction are gradually optimized according to the characteristics of the oil fume at different scales, and finally a set of oil fume image features is obtained, which includes the corresponding oil fume fine particle texture features, oil fume shape and area change characteristics.

[0117] Step S24: Input the oil fume image feature set into the deconvolution network layer for concentration detection model training, and integrate the loss function according to the physical correspondence between different scale features in the oil fume image feature set and the oil fume concentration, so as to fit the relationship between the oil fume concentration and different scale features through multiple iterative training, generate an oil fume concentration detection model, and output the oil fume concentration model detection result.

[0118] In an embodiment of the present invention, the oil fume image feature set extracted from the convolutional network layer is input into the deconvolutional network layer, and the deconvolutional network layer is responsible for training the concentration detection model according to the features of the image. The training process adopts a supervised learning method and uses an image data set containing known oil fume concentration labels for training. The design of the loss function needs to incorporate the physical relationship between different scale features in the oil fume image feature set and the actual oil fume concentration. In order to accurately fit the relationship between the oil fume concentration and different scale features, the loss function needs to consider the influence of multiple scales, including the texture details of the oil fume particles, the contour shape, and the area change of the oil fume area. Through the back propagation algorithm, the network parameters are iteratively optimized for multiple times to gradually reduce the error between the predicted value and the actual concentration value. After multiple rounds of iterative training, the deconvolutional network can generate an accurate oil fume concentration detection model. The model outputs the oil fume concentration detection result based on the input image, and finally generates the oil fume concentration detection model and outputs the oil fume concentration model detection result.

[0119] Further, step S3 includes the following steps:

[0120] Step S31: based on the texture features of the oil smoke fine particles in the oil smoke image feature set, the oil smoke blur and distortion removal image frame is estimated to obtain the oil smoke fine particle size distribution;

[0121] In an embodiment of the present invention, the texture features of oil fume fine particles in the oil fume image feature set are analyzed, and an appropriate texture analysis method is selected, such as gray level co-occurrence matrix (GLCM) or wavelet transform, etc., and the texture information of fine particles is extracted from the oil fume image through these feature extraction techniques. Next, the particle size distribution is estimated by combining the size, shape, distribution and dispersion characteristics of the particles in the image. This process processes the image pixel by pixel using a particle analysis algorithm (such as particle size analysis based on edge detection or threshold segmentation) to determine the boundaries and sizes of the oil fume particles. Through multi-scale processing of the image, the particle size distribution of the oil fume fine particles can be accurately estimated, which is usually represented by a particle size distribution curve, showing the particle number density at different particle sizes. In order to improve the estimation accuracy, a machine learning algorithm can be used for model training to finally obtain the particle size distribution of the oil fume fine particles.

[0122] Step S32: performing light intensity spectrum transformation on the image frame with oil smoke blur and distortion removed to obtain oil smoke light intensity distribution characteristics of the oil smoke image at different frequency components; performing oil smoke density statistical analysis on the particle size distribution of oil smoke fine particles based on the oil smoke light intensity distribution characteristics of the oil smoke image at different frequency components to obtain the density of oil smoke fine particles;

[0123] In an embodiment of the present invention, by performing light intensity spectrum transformation on the image frame with oil fume blur and distortion removed, Fourier transform (FFT) is usually used to convert the image from the spatial domain to the frequency domain. The oil fume image after frequency transformation can reveal the light intensity distribution characteristics of the oil fume particles under different frequency components. By analyzing the frequency domain image, the energy distribution of the high-frequency and low-frequency components is extracted, and the density in the oil fume image is reflected through the frequency domain characteristics. The energy density in each frequency band is calculated according to the change of the frequency components in the image, so as to obtain the density of the oil fume particles. Specifically, the ratio of the high-frequency part to the low-frequency part in the spectrum can be calculated to determine whether the distribution of the oil fume particles is uniform or whether it presents an alternating density. For different frequency components, statistical analysis methods such as mean, variance, peak value, etc. are used to quantify the density of the oil fume particles, and finally the density of the oil fume fine particles is obtained.

[0124] Step S33: predicting the area of ​​the corresponding image frame after the oil smoke blur and distortion is removed based on the oil smoke shape and area change characteristics in the oil smoke image feature set, and obtaining the predicted area size of the oil smoke image region;

[0125] In an embodiment of the present invention, by analyzing the shape of the oil fume and its area change characteristics in the feature set of the oil fume image, the oil fume area is predicted for the image frame with the oil fume blur and distortion removed. First, the oil fume image is processed using an edge detection algorithm (such as Canny edge detection or Sobel operator) to identify the boundary of the oil fume. Then, the oil fume area is corrected and optimized based on morphological operations (such as dilation and corrosion operations) to ensure that the identified area is a complete oil fume area. Next, the pixel area of ​​the oil fume area is calculated, combined with the resolution and scale of the image, to predict the actual area size of the oil fume area. In order to improve the prediction accuracy, a deep learning method can be used to train a model through a convolutional neural network (CNN) to identify and predict the oil fume areas of different oil fume image frames, thereby obtaining a more accurate oil fume area area, and finally obtaining the predicted area size of the oil fume image area.

[0126] Step S34: quantifying the oil fume concentration of the corresponding oil fume blur and distortion removed image frame based on the density of oil fume fine particles and the predicted area size of the oil fume image region, so as to obtain the actual oil fume concentration value corresponding to the oil fume image frame;

[0127] In an embodiment of the present invention, the density of oil fume fine particles is combined with the predicted area of ​​the oil fume region to quantify the oil fume concentration of the image frame with oil fume blur and distortion removed. First, the density of oil fume fine particles can be quantitatively represented by the obtained spectral distribution characteristics. Then, the distribution of oil fume particles per unit area is calculated in combination with the previously obtained predicted area of ​​the oil fume region. By setting a standard concentration model for oil fume particles, linear regression or other regression algorithms are used to map the density and area size to oil fume concentration values. In specific operations, a concentration prediction model can be trained using sample images, and the model can be used to quantify the oil fume concentration of new image frames. The quantification result is usually expressed as a numerical value of the oil fume concentration, such as "the number of particles per unit volume" or "the oil fume concentration index". This process can be finally confirmed by analyzing the overall brightness and particle density of the oil fume image, and finally the actual oil fume concentration value corresponding to the oil fume image frame is obtained.

[0128] Step S35: annotating the corresponding image frames after the oil fume blurring and distortion is removed frame by frame based on the actual oil fume concentration values ​​corresponding to the oil fume image frames, and obtaining actual annotation results of the oil fume concentration.

[0129] In an embodiment of the present invention, the corresponding image frames with oil fume blur and distortion removed are annotated frame by frame based on the actual oil fume concentration values ​​corresponding to the oil fume image frames. First, the oil fume concentration in each frame of the image is determined according to the previously obtained oil fume concentration quantification value. Next, in combination with the image calibration tool, a manual or automatic annotation tool is used to add concentration labels to the image frames. This process can be achieved by setting an annotation interface for the image, manually confirming the oil fume concentration range, or automatically annotating by training a deep learning model. The annotation results will form a database containing image frames and their corresponding oil fume concentrations. In order to improve the accuracy of the annotation, it is recommended to use a standard oil fume concentration image set for calibration, and combine manual verification and machine learning algorithms for correction, and finally obtain the actual annotation results of the oil fume concentration.

[0130] Furthermore, the oil smoke density statistical analysis of the oil smoke fine particle size distribution based on the oil smoke light intensity distribution characteristics of the oil smoke image at different frequency components in step S32 includes the following steps:

[0131] According to the oil smoke light intensity distribution characteristics of the oil smoke image at different frequency components, the light intensity distribution gradient analysis is performed to obtain the oil smoke light intensity distribution change gradient of the oil smoke image at different frequency components;

[0132] In an embodiment of the present invention, a discrete Fourier transform (DFT) is applied to convert the oil fume image from the spatial domain to the frequency domain to obtain different frequency components. Next, a gradient calculation is performed on the oil fume intensity distribution under these frequency components. Specifically, an image gradient algorithm (such as a Sobel operator or a Prewitt operator) can be used to perform a first-order difference on the intensity value in the frequency domain to obtain the intensity change gradient of the oil fume image under each frequency component. The gradient describes the local change of the oil fume in the image and can reflect the distribution characteristics of the oil fume particles and their change trends under different frequency components. By calculating the gradient amplitude and direction, the size, shape and distribution density of the oil fume particles can be determined. This step further reveals the intensity change law of the oil fume through the gradient analysis of the frequency components, and finally obtains the oil fume intensity distribution change gradient of the oil fume image under different frequency components.

[0133] Preferably, based on the gradient of the distribution of the light intensity of the oil smoke at different frequency components of the oil smoke image, the corresponding image frame with the oil smoke blur and distortion removed is evaluated for the light intensity influence of the oil smoke particles, so as to obtain the light intensity influence factor of the oil smoke particles propagation, including the peak frequency of the scattered light intensity and the light intensity attenuation slope;

[0134] In the embodiments of the present invention, by using the gradient of the change in the oil fume light intensity distribution under the previously obtained frequency components to process the oil fume blurred and distorted removed image frames, in this process, by performing a deconvolution operation on the frequency components of the image, the blurred effect caused by the scattering of oil fume particles can be removed. Specifically, when implementing, a common frequency domain filtering method is adopted, combined with the enhancement of high-frequency components and the smoothing of low-frequency components to restore the clarity of the image. On this basis, according to the gradient of the change in the oil fume light intensity distribution, the influence of oil fume particles on the propagation of light intensity is further evaluated. This evaluation is obtained by analyzing the scattering effect of oil fume particles on light waves of different frequencies, and the light intensity influence factor of the propagation of oil fume particles is obtained. This factor includes the peak frequency of the scattered light intensity and the light intensity attenuation slope. Among them, the peak frequency of the scattered light intensity reflects the scattering characteristics of oil fume particles in the frequency domain, while the light intensity attenuation slope indicates the attenuation rate of oil fume particles to the light intensity. These factors provide the necessary physical quantities for the subsequent analysis of the particle size distribution, so as to be able to deeply analyze the optical characteristics of oil fume particles, and finally obtain the light intensity influence factor of the propagation of oil fume particles.

[0135] Preferably, based on the light intensity influence factor of the propagation of oil fume particles, a statistical analysis of the density of oil fume fine particles is carried out on the particle size distribution of oil fume fine particles to obtain the density of oil fume fine particles.

[0136] In the embodiments of the present invention, through a statistical analysis of the density of the corresponding oil fume fine particle size distribution based on the previously obtained light intensity influence factor of the propagation of oil fume particles, the core of this step is to infer the particle size distribution of oil fume particles by analyzing the changes in the light intensity influence factor. Specifically, combined with the scattering theory (such as Mie scattering theory), according to the peak frequency of the scattered light intensity and the light intensity attenuation slope of oil fume particles, the average particle size and its distribution range of the particles can be calculated. By analyzing multiple image frames and using statistical methods (such as the least squares method or maximum likelihood estimation) to fit the particle size distribution of the particles, the density of oil fume particles in the image is obtained. The density of the particles reflects the change in the oil fume concentration, that is, the distribution density of fine particles in the oil fume. In this process, quantitative analysis tools, such as particle size distribution curves, are used to further refine the spatial distribution characteristics of oil fume particles, and finally the density of oil fume fine particles is obtained.

[0137] Further, step S4 includes the following steps:

[0138] Step S41: Construct a discriminator by introducing an adversarial training mechanism, and input the actual annotation result of the oil fume concentration corresponding to the oil fume image and the detection result of the oil fume concentration model into the discriminator in pairs for detection and judgment to generate a probability judgment result of the false result of the oil fume concentration;

[0139] In the embodiment of the present invention, the discriminator is constructed by introducing an adversarial training mechanism, the purpose of which is to optimize the accuracy and robustness of the oil fume concentration detection model by detecting the difference between the actual annotation result of the oil fume concentration corresponding to the oil fume image and the detection result of the oil fume concentration model. First, the collected oil fume images are input into the oil fume concentration detection model. The model is based on a convolutional neural network (CNN) architecture. After training, it can generate a concentration prediction value corresponding to each oil fume image. For each oil fume image, the concentration prediction value output by the model and the true concentration value of the image (from the annotation data set) are sent to the discriminator as a pair of inputs. The discriminator adopts an adversarial training method. , judge the gap between the predicted value of oil fume concentration and the actual concentration label, that is, judge whether the predicted value is true and reasonable. The output of the discriminator is a probability value, which indicates the probability of whether the predicted result of oil fume concentration is consistent with the actual concentration value. In the specific implementation, the discriminator can adopt the traditional two-classification model. Through comparative training with the actual concentration label, the discriminator can accurately distinguish the similarity between the predicted result of the oil fume concentration detection model and the actual concentration label. The output of the discriminator is a false result probability value. If the output of the detection model is significantly different from the actual concentration label, the output probability value of the discriminator is lower, otherwise it is higher, and finally the probability judgment result of the false result of oil fume concentration is generated.

[0140] Step S42: Feedback the false probability judgment result of the oil fume concentration to the oil fume concentration detection model for model adversarial optimization, and use the gradient back propagation algorithm to adjust the oil fume concentration detection model's own network parameters to generate an oil fume concentration detection optimization model.

[0141] In the embodiments of the present invention, by feeding back the probability of false results of the oil fume concentration to the oil fume concentration detection model, the prediction accuracy of the model is further optimized. Specifically, first, according to the probability value output by the previously constructed discriminator, it is judged whether there is a deviation in the prediction result of the oil fume concentration detection model. If the probability value is low, it indicates that there is a large difference between the prediction result of the oil fume concentration detection model and the true concentration value. At this time, this difference is fed back to the detection model for correction through adversarial training. The feedback process is realized through the gradient backpropagation algorithm. Specifically, the gradient information output by the discriminator is passed to the oil fume concentration detection model, and the gradient of the loss function is calculated through backpropagation, so as to adjust the network parameters in the detection model, making the prediction result of the model closer to the true concentration annotation value. During the optimization process, the training objective of the oil fume concentration detection model is to minimize the loss function, and its network parameters are updated through backpropagation. Usually, the design of the loss function includes the mean square error (MSE) or cross-entropy loss between the model prediction value and the actual concentration value, and further weights and adjusts the update step size in the model training process in combination with the probability of false results output by the discriminator. Through multiple iterative trainings, the model gradually learns more robust feature representations, thereby improving the accuracy of oil fume concentration detection. In implementation, deep learning frameworks such as TensorFlow or PyTorch are usually used for model training and parameter optimization, and the training process is accelerated through efficient matrix operations. The backpropagation automatically calculates the derivative through the computational graph, and the network parameters are updated through optimization algorithms (such as Adam or SGD) in each iteration to continuously improve the model performance, and finally an optimized model for oil fume concentration detection is generated.

[0142] Furthermore, the present invention also provides a training system for an oil fume concentration detection model, which is used to execute the training method for an oil fume concentration detection model as described above. The training system for an oil fume concentration detection model includes:

[0143] An oil fume image frame acquisition and processing module, which is used to deploy a camera inside the selected oil fume emission area to obtain oil fume emission image frames in real time, and perform blurring and distortion elimination processing on the oil fume emission image frames, so as to obtain oil fume blurring and distortion removal image frames;

[0144] An oil fume concentration detection model training module, which is used to construct a convolutional network layer and a deconvolutional network layer, and use the convolutional network layer to perform multi-scale step-by-step feature extraction on the oil fume blurring and distortion removal image frames, so as to extract corresponding fine oil fume particle texture features on a small scale, and extract corresponding oil fume shape and area change features on a large scale, to obtain an oil fume image feature set; input the oil fume image feature set into the deconvolutional network layer for concentration detection model training, so as to generate an oil fume concentration detection model, and output the oil fume concentration model detection result;

[0145] The actual fume concentration frame-by-frame annotation module is used to quantify the fume concentration of the corresponding fume blur and distortion removal image frame based on the fume image feature set to obtain the actual fume concentration value corresponding to the fume image frame; based on the actual fume concentration value corresponding to the fume image frame, the corresponding fume blur and distortion removal image frame is annotated frame by frame to obtain the actual fume concentration annotation result;

[0146] The concentration detection model adversarial optimization module is used to build a discriminator by introducing an adversarial training mechanism, and use the discriminator to perform model adversarial optimization on the fume concentration detection model based on the actual fume concentration labeling results and the fume concentration model detection results to generate an optimized fume concentration detection model.

[0147] Furthermore, the present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed, the training method for the oil fume concentration detection model as described above is implemented.

[0148] Therefore, the embodiments should be regarded as illustrative and non-restrictive from all points, and the scope of the present invention is limited by the appended claims rather than the above description, and it is therefore intended that all changes falling within the meaning and range of equivalent elements of the application documents are included in the present invention.

[0149] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.

Claims

1. A training method for a fume concentration detection model, characterized in that: The following steps are involved: Step S1: a camera is deployed in the selected fume emission area to acquire a fume emission image frame in real time, and a blur and distortion removal process is performed on the fume emission image frame to obtain an image frame with fume blur and distortion removed; Step S2: construct a convolutional network layer and a deconvolutional network layer, and use the convolutional network layer to perform multi-scale step-by-step feature extraction on the oil smoke blur and distortion removal image frame, so as to extract the corresponding oil smoke fine particle texture features at a small scale, and extract the corresponding oil smoke shape and area change features at a large scale, and obtain an oil smoke image feature set; input the oil smoke image feature set into the deconvolutional network layer for concentration detection model training, so as to generate an oil smoke concentration detection model, and output the oil smoke concentration model detection result; Step S3: quantifying the oil fume concentration of the corresponding oil fume blur and distortion removal image frame based on the oil fume image feature set to obtain the actual oil fume concentration value corresponding to the oil fume image frame; Based on the actual oil smoke concentration value corresponding to the oil smoke image frame, the corresponding oil smoke blur and distortion removal image frame is annotated frame by frame to obtain the actual oil smoke concentration annotation result; Step S4: A discriminator is constructed by introducing an adversarial training mechanism, and the discriminator is used to perform model adversarial optimization on the oil fume concentration detection model based on the actual annotation results of the oil fume concentration and the oil fume concentration model detection results to generate an oil fume concentration detection optimization model.

2. The training method for the oil smoke concentration detection model according to claim 1 is characterized in that: Step S1 includes the following steps: Step S11: by deploying a camera in the selected fume emission area and setting the shooting parameters corresponding to the frame rate, resolution and sensitivity, the fume emission image frame is acquired in real time at a shooting frequency interval of 30 seconds every 5 minutes; Step S12: performing oil fume image segmentation processing on the oil fume emission image frame at intervals of 5 seconds to obtain an oil fume image segmentation set; Step S13: performing image grayscale conversion on each oil smoke emission image in the oil smoke image frame set to generate an oil smoke grayscale image frame set; Step S14: performing local contrast calculation on each oil fume grayscale image in the oil fume grayscale image frame set, so as to divide each oil fume grayscale image into a plurality of local regions, and calculating the contrast difference between the maximum grayscale value and the minimum grayscale value for each local region, so as to obtain the local contrast of the oil fume grayscale image; performing edge gradient calculation on each oil fume grayscale image in the oil fume grayscale image frame set using the Sobel operator, so as to obtain the edge gradient of the oil fume grayscale image; Step S15: performing blurring and distortion removal processing on each of the oil fume grayscale images in the oil fume grayscale image frame set based on the local contrast of the oil fume grayscale image and the edge gradient of the oil fume grayscale image to obtain an oil fume blur and distortion removed image frame.

3. The training method for the oil smoke concentration detection model according to claim 2 is characterized in that: Step S15 includes the following steps: Step S151: performing discrete wavelet decomposition on each of the oil fume grayscale images in the oil fume grayscale image frame set to convert the oil fume grayscale image from the spatial domain to the frequency domain, and obtaining the grayscale frequency components corresponding to different scale components to obtain the grayscale frequency of each image position area in the oil fume grayscale image; Step S152: performing image blur distortion rate calculation on the grayscale frequency of each image position area in the oil fume grayscale image based on the local contrast of the oil fume grayscale image and the edge gradient of the oil fume grayscale image using the oil fume image blur distortion rate calculation formula to obtain the grayscale blur distortion rate of each image position area in the oil fume grayscale image; Step S153: comparing and judging the grayscale blur distortion rate of each image position area in the oil smoke grayscale image according to the preset clarity threshold, if the grayscale blur distortion rate is less than the preset clarity threshold, the corresponding image position area is determined as a non-blurred distortion area; if the grayscale blur distortion rate is greater than or equal to the preset clarity threshold, the corresponding image position area is determined as a blurred distortion area; Step S154: using dilation and erosion operations corresponding to edge morphology to perform fuzzy distortion adjacent connections on the fuzzy distortion areas in the oil smoke grayscale image, so as to remove isolated fuzzy distortion noise points, and connect adjacent fuzzy distortion areas to obtain an oil smoke grayscale fuzzy distortion key area image frame; Step S155: performing a blurring and distortion elimination process on the image frame of the key area of ​​the oil smoke grayscale blurring and distortion, so as to optimize and repair the pixel blurring and distortion between the non-blurred and distorted area and the blurred and distorted area by considering the movement and emission flow direction corresponding to the oil smoke in the oil smoke grayscale image, and obtain an image frame with the oil smoke blurring and distortion removed.

4. The training method for the oil smoke concentration detection model according to claim 3 is characterized in that: The specific calculation formula of the fume image blur distortion rate in step S152 is: Where D(x, y) is the grayscale fuzzy distortion rate of the oil smoke grayscale image at the image position (x, y), Ω is the oil smoke image position area range, x is the image position abscissa, y is the image position ordinate, ε(x, y) is the local contrast of the oil smoke grayscale image at the image position (x, y), λ1 is the local contrast distortion weighting coefficient, I(x, y) is the image pixel grayscale value at the image position (x, y), is the edge gradient of the oil smoke grayscale image at the image position (x, y), λ2 is the edge gradient distortion weighting coefficient, f(x, y) is the grayscale frequency of the oil smoke grayscale image at the image position (x, y), N is the total number of pixels in the neighborhood, φ xy is the local area range at the image position (x, y), I ij is the grayscale value of the image pixel at the domain position (i, j), μ xy is the mean gray value in the local area, λ3 is the gray frequency distortion weighting coefficient, and η is the correction coefficient of the gray blur distortion rate.

5. The training method for the oil smoke concentration detection model according to claim 1, characterized in that: Step S2 includes the following steps: Step S21: obtaining the scattering characteristics of the oil smoke under different lighting conditions, and obtaining the corresponding oil smoke texture direction characteristics by removing the oil smoke blur and distortion image frame; Step S22: According to the scattering characteristics of oil smoke under different lighting conditions and the directional characteristics of oil smoke texture, convolution kernels corresponding to 3×3 to 11×11 pixels are designed, and the high-frequency details of fine particles corresponding to oil smoke and the low-frequency contours of large oil smoke shapes are realized, thereby constructing a convolution network layer; and the deconvolution network layer is constructed by connecting it with the convolution network layer into a symmetrical structure; Step S23: using the convolutional network layer to perform multi-scale step-by-step feature extraction on the oil smoke blur and distortion removal image frame, so as to iteratively extract from the shallow layer to the deep layer, using a small-scale convolution kernel on the shallow layer to extract the corresponding oil smoke fine particle texture features, and gradually introducing a large-size convolution kernel on the deep layer to integrate the oil smoke blur and distortion removal image frame The corresponding oil smoke surrounding contour extracts the corresponding oil smoke shape and area change features, and obtains the oil smoke image feature set; Step S24: Input the oil fume image feature set into the deconvolution network layer for concentration detection model training, and integrate the loss function according to the physical correspondence between different scale features in the oil fume image feature set and the oil fume concentration, so as to fit the relationship between the oil fume concentration and different scale features through multiple iterative training, generate an oil fume concentration detection model, and output the oil fume concentration model detection result.

6. The training method for the oil smoke concentration detection model according to claim 1, characterized in that: Step S3 includes the following steps: Step S31: based on the texture features of the oil smoke fine particles in the oil smoke image feature set, the oil smoke blur and distortion removal image frame is estimated to obtain the oil smoke fine particle size distribution; Step S32: performing light intensity spectrum transformation on the image frame with oil smoke blur and distortion removed to obtain oil smoke light intensity distribution characteristics of the oil smoke image at different frequency components; performing oil smoke density statistical analysis on the particle size distribution of oil smoke fine particles based on the oil smoke light intensity distribution characteristics of the oil smoke image at different frequency components to obtain the density of oil smoke fine particles; Step S33: predicting the area of ​​the corresponding image frame after the oil smoke blur and distortion is removed based on the oil smoke shape and area change characteristics in the oil smoke image feature set, and obtaining the predicted area size of the oil smoke image region; Step S34: quantifying the oil fume concentration of the corresponding oil fume blur and distortion removed image frame based on the density of oil fume fine particles and the predicted area size of the oil fume image region, so as to obtain the actual oil fume concentration value corresponding to the oil fume image frame; Step S35: annotating the corresponding image frames after the oil fume blurring and distortion is removed frame by frame based on the actual oil fume concentration values ​​corresponding to the oil fume image frames, and obtaining actual annotation results of the oil fume concentration.

7. The training method for a fume concentration detection model according to claim 1, characterized in that: The step S32 of performing oil smoke density statistical analysis on the particle size distribution of oil smoke fine particles based on the oil smoke light intensity distribution characteristics of the oil smoke image at different frequency components includes the following steps: According to the oil smoke light intensity distribution characteristics of the oil smoke image at different frequency components, the light intensity distribution gradient analysis is performed to obtain the oil smoke light intensity distribution change gradient of the oil smoke image at different frequency components; Based on the gradient of the distribution of oil smoke intensity at different frequency components of the oil smoke image, the corresponding image frame with oil smoke blur and distortion removed is evaluated to obtain the influence factor of the propagation intensity of oil smoke particles, including the peak frequency of the scattered light intensity and the slope of the light intensity attenuation; Based on the influence factor of the propagation light intensity of oil fume particles, a statistical analysis of the particle size distribution of oil fume fine particles was conducted to obtain the density of oil fume fine particles.

8. The method for training a fume concentration detection model according to claim 1, characterized in that: Step S4 includes the following steps: Step S41: construct a discriminator by introducing an adversarial training mechanism, and input the actual annotation result of the oil smoke concentration corresponding to the oil smoke image and the oil smoke concentration model detection result into the discriminator in pairs for detection and judgment, so as to generate a probability judgment result of a false result of the oil smoke concentration; Step S42: Feedback the false probability judgment result of the oil fume concentration to the oil fume concentration detection model for model adversarial optimization, and use the gradient back propagation algorithm to adjust the oil fume concentration detection model's own network parameters to generate an oil fume concentration detection optimization model.

9. A training system for a fume concentration detection model, characterized in that: The method for training a fume concentration detection model according to claim 1 is used to execute the training method for the fume concentration detection model, and the training system for the fume concentration detection model comprises: The oil fume image frame acquisition and processing module is used to acquire the oil fume emission image frame in real time by deploying a camera in the selected oil fume emission area, and perform blur and distortion removal processing on the oil fume emission image frame, so as to obtain an oil fume blur and distortion removal image frame; The oil fume concentration detection model training module is used to construct a convolutional network layer and a deconvolutional network layer, and use the convolutional network layer to perform multi-scale step-by-step feature extraction on the oil fume blur and distortion removal image frame, so as to extract the corresponding oil fume fine particle texture features at a small scale, and extract the corresponding oil fume shape and area change features at a large scale, and obtain the oil fume image feature set; the oil fume image feature set is input into the deconvolutional network layer for concentration detection model training, so as to generate an oil fume concentration detection model, and output the oil fume concentration model detection result; The actual fume concentration frame-by-frame annotation module is used to quantify the fume concentration of the corresponding fume blur and distortion removal image frame based on the fume image feature set to obtain the actual fume concentration value corresponding to the fume image frame; based on the actual fume concentration value corresponding to the fume image frame, the corresponding fume blur and distortion removal image frame is annotated frame by frame to obtain the actual fume concentration annotation result; The concentration detection model adversarial optimization module is used to build a discriminator by introducing an adversarial training mechanism, and use the discriminator to perform model adversarial optimization on the fume concentration detection model based on the actual fume concentration labeling results and the fume concentration model detection results to generate an optimized fume concentration detection model.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the training method for the oil smoke concentration detection model as described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • A video smoke recognition method based on a multi-task depth convolutional neural network

    CN108985192A

  • A method for detecting the concentration of kitchen cooking fume based on image processing

    CN109190624A

  • Atmospheric pollution intelligent accurate tracing method, system and equipment and storage medium

    CN112444605A

  • Method and device for removing motion blur of image based on generative adversarial network

    CN117876260A

  • Smoke detection method based on deep learning, device and storage medium

    US20240037950A1

Cited By

  • Image restoration method based on restoration neural network model

    CN120355624A

  • An image restoration method based on restoration neural network model

    CN120355624B

  • Variable-granularity self-adaptive coding method for smoke and dust disaster environment

    CN120751131A

  • Intelligent dust identification method and system based on machine vision

    CN120766223A