Training methods, systems, and media for oil fume concentration detection models

By acquiring image frames in real time in the fume emission area and performing blur and distortion removal processing, using convolutional and deconvolutional networks for feature extraction, and combining adversarial training to optimize the model, the accuracy and stability issues of fume concentration detection are solved, and high-precision fume concentration monitoring is achieved.

CN120032222BActive Publication Date: 2025-10-28SHENZHEN FULIN KITCHEN EQUIP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies for detecting oil fume concentration are affected by environmental noise and data bias, resulting in unstable and inaccurate test results.

Method used

By deploying cameras in the fume emission area to acquire image frames in real time, performing blur and distortion removal processing, multi-scale feature extraction is performed using convolutional and deconvolutional networks, and the model is optimized by combining adversarial training mechanism to generate a fume concentration detection model.

Benefits of technology

It improves the accuracy and stability of oil fume concentration detection, maintains high accuracy in complex environments, adapts to oil fume images in different scenarios, reduces error accumulation, and provides real-time and accurate oil fume concentration monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120032222B_ABST
    Figure CN120032222B_ABST
Patent Text Reader

Abstract

This invention relates to the field of model training technology, and more particularly to a training method, system, and medium for a model for detecting oil fume concentration. The method includes the following steps: acquiring oil fume emission image frames in real time within a selected oil fume emission area and performing blur and distortion removal processing to obtain oil fume blurred and distorted image frames; constructing convolutional and deconvolutional network layers and performing multi-scale stepwise feature extraction to obtain an oil fume image feature set; inputting the oil fume image feature set into the deconvolutional network layer for concentration detection model training to generate an oil fume concentration detection model and outputting the oil fume concentration model detection result; quantifying and annotating the oil fume concentration of the corresponding blurred and distorted image frames based on the oil fume image feature set to obtain the actual oil fume concentration annotation result; and generating an optimized oil fume concentration detection model by introducing a discriminator and performing model adversarial optimization. This invention improves the detection accuracy and robustness of oil fume concentration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of model training technology, and in particular to a training method, system and medium for a model for detecting oil fume concentration. Background Technology

[0002] Cooking fumes not only affect air quality but also pose potential health hazards. Therefore, real-time monitoring and effective control of cooking fume concentration have become a key issue in environmental protection. Cooking fume concentration detection technology, as an important means of assessing air quality, is widely used in home kitchens, restaurant kitchens, and industrial kitchens. Accurate monitoring of cooking fume concentration allows for timely understanding of the degree of air pollution, enabling appropriate measures to be taken. In recent years, by utilizing sensor data, image data, or video data, combined with machine learning models, intelligent prediction and real-time monitoring of cooking fume concentration have become possible. However, existing cooking fume concentration detection technologies are mainly divided into two categories: physical detection methods and chemical detection methods. Physical detection methods, such as light scattering and lidar methods, estimate cooking fume concentration by measuring the optical properties of particulate matter in the air; while chemical detection methods determine cooking fume concentration by sampling and analyzing the chemical components in the air. Although these methods can monitor cooking fume concentration to a certain extent, they are often affected by environmental noise and data bias, resulting in unstable and inaccurate detection results. Summary of the Invention

[0003] Therefore, the present invention needs to provide a training method and system for a model for detecting oil fume concentration, in order to solve at least one of the above-mentioned technical problems.

[0004] To achieve the above objectives, a training method for a model for detecting oil fume concentration includes the following steps:

[0005] Step S1: By deploying cameras in the selected fume emission area to acquire fume emission image frames in real time, and performing blur and distortion removal processing on the fume emission image frames, we obtain fume blur and distortion removed image frames.

[0006] Step S2: Construct convolutional network layers and deconvolutional network layers, and use the convolutional network layers to perform multi-scale stepwise feature extraction on the image frames with blurred and distorted oil fume, so as to extract the corresponding fine particle texture features of oil fume at a small scale and the corresponding shape and area change features of oil fume at a large scale, to obtain the oil fume image feature set; input the oil fume image feature set into the deconvolutional network layer to train the concentration detection model, so as to generate the oil fume concentration detection model and output the oil fume concentration model detection result;

[0007] Step S3: Based on the feature set of the oil fume image, the oil fume concentration of the corresponding oil fume blurred and distorted image frame is quantified to obtain the actual oil fume concentration value of the oil fume image frame; based on the actual oil fume concentration value of the oil fume image frame, the corresponding oil fume blurred and distorted image frame is labeled frame by frame to obtain the actual oil fume concentration labeling result.

[0008] Step S4: Construct a discriminator by introducing an adversarial training mechanism, and use the discriminator to perform model adversarial optimization on the oil fume concentration detection model based on the actual labeled results of oil fume concentration and the detection results of the oil fume concentration model, so as to generate an optimized oil fume concentration detection model.

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

[0010] Step S11: By deploying cameras in the selected fume emission area and setting the corresponding shooting parameters such as frame rate, resolution and sensitivity, the fume emission image frames are acquired in real time at a shooting frequency interval of 30 seconds every 5 minutes.

[0011] Step S12: By performing fume image segmentation processing on the fume emission image frames at 5-second intervals, a fume image frame set is obtained;

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

[0013] Step S14: Perform local contrast calculation on each grayscale image of oil fume within the frame set of grayscale images of oil fume to divide each grayscale image of oil fume into multiple local regions, and calculate the contrast difference between the maximum and minimum grayscale values ​​for each local region to obtain the local contrast of the grayscale image of oil fume; use the Sobel operator to perform edge gradient calculation on each grayscale image of oil fume within the frame set of grayscale images of oil fume to obtain the edge gradient of the grayscale image of oil fume.

[0014] Step S15: Based on the local contrast and edge gradient of the grayscale image of the oil fume, perform blur and distortion removal processing on each grayscale image of the oil fume in the frame set of grayscale images of oil fume to obtain the image frame with oil fume blur and distortion removed.

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

[0016] Step S151: Perform discrete wavelet decomposition on each grayscale image of oil fume in the frame set of grayscale images of oil fume to transform the grayscale image of oil fume from the spatial domain to the frequency domain, and obtain the corresponding grayscale frequency components under different scale components to obtain the grayscale frequency of each image location region in the grayscale image of oil fume.

[0017] Step S152: Based on the local contrast and edge gradient of the grayscale image of the oil fume, the grayscale frequency of each image location region in the grayscale image of the oil fume is calculated using the oil fume image blur distortion rate calculation formula to obtain the grayscale blur distortion rate of each image location region in the grayscale image of the oil fume.

[0018] Step S153: Compare and judge the grayscale blur distortion rate of each image location region in the grayscale image of oil fume according to the preset sharpness threshold. If the grayscale blur distortion rate is less than the preset sharpness threshold, the corresponding image location region is determined to be a non-blurred distortion region; if the grayscale blur distortion rate is greater than or equal to the preset sharpness threshold, the corresponding image location region is determined to be a blurred distortion region.

[0019] Step S154: Using the dilation and erosion operations corresponding to edge morphology, perform fuzzy distortion adjacent connection on the areas determined to be fuzzy distortion in the grayscale image of oil fume, so as to remove isolated fuzzy distortion noise points and connect adjacent fuzzy distortion areas to obtain the image frame of the key area of ​​fuzzy distortion in grayscale oil fume.

[0020] Step S155: Perform blur and distortion removal processing on the key area image frame of the oil fume grayscale blur and distortion, so as to optimize and repair the pixel blur and distortion between the non-blurred and distorted areas and the blurred and distorted areas, considering the motion emission flow direction of the oil fume in the grayscale image of oil fume, and obtain the oil fume blur and distortion removed image frame.

[0021] Furthermore, the specific formula for calculating the blurring distortion rate of the oil fume image in step S152 is as follows:

[0022]

[0023] In the formula, D(x,y) is the grayscale blurring distortion rate at the image position (x,y) in the grayscale image of the oil fume, Ω is the range of the image position region, x is the horizontal coordinate of the image position, y is the vertical coordinate of the image position, ε(x,y) is the local contrast of the grayscale image of the oil fume at the image position (x,y), λ1 is the local contrast distortion weighting coefficient, and I(x,y) is the grayscale value of the image pixel at the image position (x,y). Let f(x,y) be the grayscale image edge gradient of the oil fume at image location (x,y), λ2 be the edge gradient distortion weighting coefficient, f(x,y) be the grayscale frequency of the oil fume at image location (x,y) in the grayscale image, N be the total number of pixels in the neighborhood, and φ be the grayscale value of the oil fume. xy I represents the local neighborhood region at image location (x,y). ij Let μ be the grayscale value of the image pixel at the neighborhood 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 for gray blur distortion rate.

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

[0025] Step S21: Obtain the scattering characteristics of oil fumes under different lighting conditions, and obtain the corresponding oil fume texture direction features by removing image frames through oil fume blurring and distortion removal;

[0026] Step S22: Based on the scattering characteristics of oil fumes under different lighting conditions and the texture direction features of oil fumes, design convolutional kernels corresponding to pixels from 3×3 to 11×11, and realize the high-frequency details of fine particles and the low-frequency contours of large oil fume shapes corresponding to oil fumes, thereby constructing a convolutional network layer; and construct a deconvolutional network layer by connecting it to the convolutional network layer to form a symmetrical structure.

[0027] Step S23: Use convolutional network layers to perform multi-scale stepwise feature extraction on the image frames with oil fume blur and distortion removal, in order to iterate from shallow to deep layers. In the shallow layer, small-scale convolutional kernels are used to extract the corresponding fine particle texture features of oil fume, and in the deep layer, large-size convolutional kernels are gradually introduced to integrate the oil fume surrounding contours corresponding to the image frames with oil fume blur and distortion removal to extract the corresponding oil fume shape and area change features, so as to obtain the oil fume image feature set.

[0028] Step S24: Input the feature set of the oil fume image into the deconvolution network layer to train the concentration detection model. According to the physical correspondence between the features of different scales in the oil fume image feature set and the oil fume concentration, incorporate the loss function to fit the relationship between the oil fume concentration and the features of different scales through multiple iterations of training, generate the oil fume concentration detection model, and output the oil fume concentration model detection result.

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

[0030] Step S31: Based on the texture features of fine oil fume particles in the oil fume image feature set, estimate the particle size distribution of oil fume particles in the corresponding oil fume blurred and distorted image frames to obtain the particle size distribution of fine oil fume particles.

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

[0032] Step S33: Based on the shape and area change features of oil fume in the oil fume image feature set, predict the area of ​​the oil fume region for the corresponding oil fume blur and distortion removal image frame to obtain the predicted area size of the oil fume image region.

[0033] Step S34: Based on the density of fine oil fume particles and the predicted area of ​​the oil fume image region, the corresponding oil fume blur and distortion removal image frame is subjected to oil fume concentration quantification to obtain the actual oil fume concentration value corresponding to the oil fume image frame.

[0034] Step S35: Based on the actual oil fume concentration value corresponding to the oil fume image frame, the corresponding oil fume blur and distortion removal image frame is labeled frame by frame to obtain the actual oil fume concentration labeling result.

[0035] Furthermore, the step S32, which involves statistically analyzing the particle size distribution of fine oil fume particles based on the oil fume light intensity distribution characteristics of the oil fume image at different frequency components, includes the following steps:

[0036] Based on the characteristics of the light intensity distribution of oil fume images at different frequency components, a gradient analysis of the light intensity distribution of oil fume images at different frequency components is performed to obtain the gradient of the change in the light intensity distribution of oil fume images at different frequency components.

[0037] Based on the gradient of the distribution change of oil fume light intensity under different frequency components of the oil fume image, the influence of oil fume particle light intensity on the corresponding oil fume blur and distortion removal image frames is evaluated to obtain the oil fume particle propagation light intensity influence factor, including the peak frequency of scattered light intensity and the light intensity attenuation slope.

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

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

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

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

[0042] Furthermore, the present invention also provides a training system for a fume concentration detection model, for executing the training method for the fume concentration detection model as described above, the training system for the fume concentration detection model comprising:

[0043] The oil fume image frame acquisition and processing module is used to acquire oil fume emission image frames in real time by deploying cameras in a selected oil fume emission area, and to perform blur and distortion removal processing on the oil fume emission image frames to obtain oil fume blur and distortion removed image frames.

[0044] The oil fume concentration detection model training module is used to construct convolutional network layers and deconvolutional network layers. The convolutional network layers are used to perform multi-scale stepwise feature extraction on the oil fume blur and distortion removal image frames. This is to extract the corresponding fine particle texture features of oil fume at a small scale and the corresponding shape and area change features of oil fume at a large scale, thus obtaining an oil fume image feature set. The oil fume image feature set is then input into the deconvolutional network layer for concentration detection model training to generate an oil fume concentration detection model and output the oil fume concentration model detection results.

[0045] The actual concentration of cooking fumes is labeled frame by frame. It is used to quantify the concentration of cooking fumes in the corresponding image frames after removing the blur and distortion of cooking fumes based on the feature set of the cooking fumes image to obtain the actual concentration value of cooking fumes in the image frames. Based on the actual concentration value of cooking fumes in the image frames, the corresponding image frames after removing the blur and distortion of cooking fumes are labeled frame by frame to obtain the actual concentration labeling result of cooking fumes.

[0046] The adversarial optimization module for the concentration detection model is used to build a discriminator by introducing an adversarial training mechanism. Based on the actual labeled results of the oil fume concentration and the detection results of the oil fume concentration model, the discriminator is used to optimize the oil fume concentration detection model to generate an optimized oil fume concentration detection model.

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

[0048] The beneficial effects of this invention are:

[0049] 1. The training method for the oil fume concentration detection model proposed in this invention, compared with the prior art, has the following advantages: it utilizes a camera to monitor the dynamic process of the oil fume emission area in real time, ensuring timely acquisition of image data related to oil fume concentration. Image frames are affected by factors such as illumination, motion blur, and inaccurate lens focus, leading to blurring and distortion of the oil fume image, which affects the accuracy and efficiency of subsequent analysis. By adopting advanced image processing techniques, such as deconvolution, noise reduction, and deblurring, blurring components in the image can be effectively eliminated, improving image quality and providing clear and accurate basic data 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, avoiding error accumulation caused by blurred images, and reducing judgment errors caused by image quality problems. Secondly, by utilizing 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 CNNs can extract multi-level information from oil fume images at different scales. For example, convolutional layers 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. At a large scale, the network can extract features such as the shape and area changes of oil fume, which are usually closely related to the diffusion process and overall concentration of oil fume. Through multi-scale feature extraction, detailed and macroscopic information in oil fume images can be comprehensively captured, thus providing comprehensive data support for subsequent concentration detection. The deconvolutional network layer helps to recover the high-dimensional spatial information of the image, transforming the data after feature extraction into a concentration detection model that is easier to interpret and understand. Through such a network structure, an accurate oil fume concentration detection model can be obtained, providing accurate prediction basis for subsequent concentration quantification and optimization. Then, by quantifying the oil fume concentration in the corresponding blurred and distorted image frames based on the oil fume image feature set, a quantitative assessment of oil fume concentration is achieved. The detection model is further optimized by comparing the results with the actual concentration annotations. The extracted oil fume image feature set allows for the quantification of oil fume concentration, ensuring that each frame corresponds to a specific concentration value. This quantification transforms oil fume concentration from a vague qualitative description into a measurable numerical value. Simultaneously, the frame-by-frame annotation process, combined with the actual oil fume concentration values, provides accurate annotation data for subsequent model training. This data will serve as crucial evidence for training and validating the oil fume concentration detection model, laying the foundation for further improving the model's accuracy and reliability. Furthermore, by using the concentration annotation results corresponding to the oil fume image frames, a high-precision and practical oil fume concentration monitoring model can be formed, helping to monitor real-time changes in oil fume emissions, promptly detect excessive emissions, and take corresponding measures.Finally, by introducing a discriminator, the robustness and accuracy of the oil fume concentration detection model can be effectively improved. The discriminator's role is to judge the output of the oil fume concentration detection model, evaluate its difference from the actual concentration labeling results, and continuously optimize the model parameters so that it can gradually approach the real oil fume concentration data. The adversarial training mechanism, through the game process between the two, can stimulate the model to produce more accurate detection results. This mechanism can not only help the model reduce bias, but also, through continuous optimization, enable the detection model to maintain high accuracy when facing oil fume images under different scenarios and conditions. In addition, in this way, the oil fume concentration detection model can better adapt to complex and dynamic environments, improve the system's generalization ability, avoid overfitting, and thus improve the stability and accuracy of the detection process in practical applications, 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 this invention consists 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 annotation module, and a concentration detection model adversarial optimization module. It can implement any training method for the oil fume concentration detection model described in this invention. It is used to combine the operations between the computer programs running on each module to implement the training method for the oil fume concentration detection model. The internal structure of the system cooperates with each other, which can greatly reduce repetitive work and manpower input, and can quickly and effectively provide a more accurate and efficient training process for the oil fume concentration detection model, thereby simplifying the operation process of the training system for the oil fume concentration detection model. Attached Figure Description

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

[0052] Figure 1 This is a schematic diagram of the steps in the training method of the oil fume concentration detection model of the present invention;

[0053] Figure 2 for Figure 1 A detailed flowchart of step S1;

[0054] Figure 3 for Figure 2 A detailed flowchart of step S15. Detailed Implementation

[0055] The technical method of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0056] Furthermore, the accompanying drawings are merely illustrative of the invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network 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 merely to distinguish one unit from another. For example, without departing from the scope of the exemplary embodiments, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0058] To achieve the above objectives, please refer to Figures 1 to 3 This invention provides a training method for a model for detecting oil fume concentration, the method comprising the following steps:

[0059] Step S1: By deploying cameras in the selected fume emission area to acquire fume emission image frames in real time, and performing blur and distortion removal processing on the fume emission image frames, we obtain fume blur and distortion removed image frames.

[0060] Step S2: Construct convolutional network layers and deconvolutional network layers, and use the convolutional network layers to perform multi-scale stepwise feature extraction on the image frames with blurred and distorted oil fume, so as to extract the corresponding fine particle texture features of oil fume at a small scale and the corresponding shape and area change features of oil fume at a large scale, to obtain the oil fume image feature set; input the oil fume image feature set into the deconvolutional network layer to train the concentration detection model, so as to generate the oil fume concentration detection model and output the oil fume concentration model detection result;

[0061] Step S3: Based on the feature set of the oil fume image, the oil fume concentration of the corresponding oil fume blurred and distorted image frame is quantified to obtain the actual oil fume concentration value of the oil fume image frame; based on the actual oil fume concentration value of the oil fume image frame, the corresponding oil fume blurred and distorted image frame is labeled frame by frame to obtain the actual oil fume concentration labeling result.

[0062] Step S4: Construct a discriminator by introducing an adversarial training mechanism, and use the discriminator to perform model adversarial optimization on the oil fume concentration detection model based on the actual labeled results of oil fume concentration and the detection results of the oil fume concentration model, so as to generate an optimized oil fume concentration detection model.

[0063] In the embodiments of this invention, please refer to Figure 1 The diagram shown illustrates the steps of the training method for the oil fume concentration detection model according to the present invention. In this example, the training method for the oil fume concentration detection model includes the following steps:

[0064] Step S1: By deploying cameras in the selected fume emission area to acquire fume emission image frames in real time, and performing blur and distortion removal processing on the fume emission image frames, we obtain fume blur and distortion removed image frames.

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

[0066] Step S2: Construct convolutional network layers and deconvolutional network layers, and use the convolutional network layers to perform multi-scale stepwise feature extraction on the image frames with blurred and distorted oil fume, so as to extract the corresponding fine particle texture features of oil fume at a small scale and the corresponding shape and area change features of oil fume at a large scale, to obtain the oil fume image feature set; input the oil fume image feature set into the deconvolutional network layer to train the concentration detection model, so as to generate the oil fume concentration detection model and output the oil fume concentration model detection result;

[0067] In this embodiment of the invention, in order to efficiently extract features from oil fume images, a deep convolutional neural network (CNN) structure is constructed. This CNN contains multiple convolutional layers. During the design, different convolutional kernel sizes (e.g., 3×3, 5×5, 7×7, etc.) are used to achieve multi-scale image feature extraction. The task of the convolutional layers is to extract the texture features of the oil fume image, including fine particle features and larger-scale oil fume shape features. At a smaller scale, the convolutional layers focus on extracting the microscopic texture of oil fume particles; while at a larger scale, the convolutional layers extract macroscopic features such as oil fume morphology and area. By extracting features at different scales layer by layer and combining these features into a feature set, the physical properties of oil fume can be represented more accurately. Next, the extracted image features are input into the deconvolutional network layer for further feature recovery and mapping. The role of the deconvolutional layer is to recover the concentration changes and distribution patterns of the oil fume based on the contextual information of the image features. By feeding these image features into the trained oil fume concentration detection model, the detection results of the oil fume concentration are output. The goal of this stage is to generate an oil fume concentration detection model with a certain generalization ability. Finally, the oil fume concentration detection model is generated and the detection results of the oil fume concentration model are output.

[0068] Step S3: Based on the feature set of the oil fume image, the oil fume concentration of the corresponding oil fume blurred and distorted image frame is quantified to obtain the actual oil fume concentration value of the oil fume image frame; based on the actual oil fume concentration value of the oil fume image frame, the corresponding oil fume blurred and distorted image frame is labeled frame by frame to obtain the actual oil fume concentration labeling result.

[0069] In this embodiment of the invention, after obtaining the feature set of the oil fume image, the actual concentration value of the oil fume image frame is obtained by quantifying the oil fume region in the image based on the feature output of the model. Specifically, firstly, based on the feature set of the oil fume image (including texture, shape, etc.) and a preset oil fume concentration reference standard, the extracted features are mapped to known concentration values ​​through regression analysis or other statistical modeling methods. During this process, methods such as Support Vector Regression (SVR) and Random Forest Regression can be selected to achieve concentration prediction. Then, based on the obtained oil fume concentration values, the image is labeled frame by frame. Each frame corresponds to a concentration value, which is verified by comparing with actual environmental data to ensure the accuracy of concentration prediction. The frame-by-frame labeling process adopts a combination of manual and automatic labeling. By manually correcting some errors in the automatic labeling, the actual labeled result of the oil fume concentration is finally obtained.

[0070] Step S4: Construct a discriminator by introducing an adversarial training mechanism, and use the discriminator to perform model adversarial optimization on the oil fume concentration detection model based on the actual labeled results of oil fume concentration and the detection results of the oil fume concentration model, so as to generate an optimized oil fume concentration detection model.

[0071] In this embodiment of the invention, to further improve the performance of the oil fume concentration detection model, an adversarial training mechanism is introduced for model optimization. In this step, a discriminator is first constructed. The discriminator's task is to judge the difference between the output of 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 method. Specifically, the discriminator and the oil fume concentration detection model are trained together. During this process, the discriminator will provide feedback on the output of the concentration model, prompting the model to adjust its parameters to reduce prediction error. In the optimization process, adversarial training makes the detection model more accurate in predicting oil fume concentration and improves the robustness of the model, enabling it to have stronger adaptability and higher accuracy, and to provide accurate oil fume concentration prediction in complex environments, ultimately generating an optimized oil fume concentration detection model.

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

[0073] Step S11: By deploying cameras in the selected fume emission area and setting the corresponding shooting parameters such as frame rate, resolution and sensitivity, the fume emission image frames are acquired in real time at a shooting frequency interval of 30 seconds every 5 minutes.

[0074] Step S12: By performing fume image segmentation processing on the fume emission image frames at 5-second intervals, a fume image frame set is obtained;

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

[0076] Step S14: Perform local contrast calculation on each grayscale image of oil fume within the frame set of grayscale images of oil fume to divide each grayscale image of oil fume into multiple local regions, and calculate the contrast difference between the maximum and minimum grayscale values ​​for each local region to obtain the local contrast of the grayscale image of oil fume; use the Sobel operator to perform edge gradient calculation on each grayscale image of oil fume within the frame set of grayscale images of oil fume to obtain the edge gradient of the grayscale image of oil fume.

[0077] Step S15: Based on the local contrast and edge gradient of the grayscale image of the oil fume, perform blur and distortion removal processing on each grayscale image of the oil fume in the frame set of grayscale images of oil fume to obtain the image frame with oil fume blur and distortion removed.

[0078] As an embodiment of the present invention, reference Figure 2 As shown, Figure 1A detailed flowchart of step S1 is shown below. In this embodiment, step S1 includes the following steps:

[0079] Step S11: By deploying cameras in the selected fume emission area and setting the corresponding shooting parameters such as frame rate, resolution and sensitivity, the fume emission image frames are acquired in real time at a shooting frequency interval of 30 seconds every 5 minutes.

[0080] In this embodiment of the invention, images are acquired by selecting a suitable area for oil fume emission. The deployment of the selected area should ensure that the camera can cover the entire oil fume emission source without obstruction within its field of view. An industrial-grade high-definition camera is installed in this area, and corresponding parameters are set to meet the real-time monitoring requirements. The camera's frame rate is set to 20 frames per second to ensure the capture of rapid changes in the oil fume, and the resolution is set to 1920×1080 pixels to ensure sufficiently clear image quality to identify minute changes in the oil fume. Simultaneously, the ISO sensitivity is adjusted to 800 to adapt to image acquisition under different lighting conditions. During system operation, 30 seconds of oil fume image data are automatically acquired every 5 minutes to ensure that enough image frames are periodically collected for subsequent analysis. This operation is jointly executed by the image acquisition system and the automated time control program to ensure the timeliness and completeness of image acquisition, ultimately yielding oil fume emission image frames.

[0081] Step S12: By performing fume image segmentation processing on the fume emission image frames at 5-second intervals, a fume image frame set is obtained;

[0082] In this embodiment of the invention, the video image frames of every 30 seconds are divided into several small image frame sets by programming logic at 5-second intervals. Each frame set contains several image frames, and the time interval between these image frames is 5 seconds. This operation is completed by computer vision algorithm. Individual image frames at specified time intervals are extracted from the original video based on timestamps. Six images are extracted from the 30-second image sequence each time, and each image represents a time point (5-second interval). These frame sets will become the input dataset for subsequent image analysis and processing. During the frame processing, video decoding algorithm is used to ensure the clarity and accuracy of the images and avoid data loss due to excessively long intervals or image loss. Finally, the oil fume image frame set is obtained.

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

[0084] In this embodiment of the invention, each image in the oil fume image frame set is converted to grayscale for subsequent feature extraction and analysis. Specifically, each color image is converted into a single-channel grayscale image using an image processing algorithm. This process is achieved by converting the RGB values ​​of each pixel into grayscale values ​​according to a weighted average formula: grayscale value = 0.2989*R + 0.5870*G + 0.1140*B. This formula effectively preserves the brightness information of the image and simplifies the calculation by removing color information. The resolution and size of the grayscale image remain unchanged, ensuring accurate contrast analysis and image feature extraction 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, ultimately generating an oil fume grayscale image frame set.

[0085] Step S14: Perform local contrast calculation on each grayscale image of oil fume within the frame set of grayscale images of oil fume to divide each grayscale image of oil fume into multiple local regions, and calculate the contrast difference between the maximum and minimum grayscale values ​​for each local region to obtain the local contrast of the grayscale image of oil fume; use the Sobel operator to perform edge gradient calculation on each grayscale image of oil fume within the frame set of grayscale images of oil fume to obtain the edge gradient of the grayscale image of oil fume.

[0086] In this embodiment of the invention, when performing local contrast calculation on each grayscale image of cooking fumes, the image is first divided into multiple small local regions. The size of each local region can be set according to specific detection requirements. For example, each image can be divided into 4×4 sub-regions. For each sub-region, the difference between the maximum and minimum grayscale values ​​within that region 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 cooking fumes in the spatial distribution. Simultaneously, 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 areas with drastic grayscale changes in the image, thereby detecting the edge features of cooking fumes. Specifically, the Sobel operator calculates the gradient values ​​in the horizontal and vertical directions respectively. By combining the gradient information in these two directions, the total gradient value of each pixel is generated. Areas with larger gradient values ​​correspond to areas with more drastic changes in the image, usually representing the edge areas of cooking fume emissions. By applying the Sobel operator to each grayscale image, the edge gradient map of the cooking fume image is obtained, and finally, the edge gradient of the grayscale image of cooking fumes is obtained.

[0087] Step S15: Based on the local contrast and edge gradient of the grayscale image of the oil fume, perform blur and distortion removal processing on each grayscale image of the oil fume in the frame set of grayscale images of oil fume to obtain the image frame with oil fume blur and distortion removed.

[0088] In this embodiment of the invention, after obtaining the local contrast and edge gradient information of each grayscale image of cooking fumes, the next task is to perform blur and distortion removal processing on the cooking fumes images. Blur and distortion usually manifest as unclear edges or loss of details in the image, which may be caused by insufficient light, poor camera quality, or image compression during image acquisition. By analyzing the local contrast and edge gradient of the image, blurred areas can be identified and targeted processing can be performed. Specifically, the blurred areas in the image are enhanced using the edge detection results, and the blurring phenomenon is eliminated by enhancing the edge details of the image. Furthermore, combined with the analysis results of local contrast, the grayscale values ​​of the blurred areas are adjusted to make the details of cooking fumes in the image clearer and avoid information loss. Blur and distortion removal processing usually adopts image deconvolution algorithms or edge-preserving filtering methods, such as bilateral filtering. Through this method, noise and blur in the image can be removed while preserving the image edges, thereby obtaining clearer cooking fumes image frames. These processed image frames will be used as input data for training the cooking fume concentration detection model to further improve the accuracy and robustness of the model, and finally obtain the cooking fumes blur and distortion removed image frames.

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

[0090] Step S151: Perform discrete wavelet decomposition on each grayscale image of oil fume in the frame set of grayscale images of oil fume to transform the grayscale image of oil fume from the spatial domain to the frequency domain, and obtain the corresponding grayscale frequency components under different scale components to obtain the grayscale frequency of each image location region in the grayscale image of oil fume.

[0091] Step S152: Based on the local contrast and edge gradient of the grayscale image of the oil fume, the grayscale frequency of each image location region in the grayscale image of the oil fume is calculated using the oil fume image blur distortion rate calculation formula to obtain the grayscale blur distortion rate of each image location region in the grayscale image of the oil fume.

[0092] Step S153: Compare and judge the grayscale blur distortion rate of each image location region in the grayscale image of oil fume according to the preset sharpness threshold. If the grayscale blur distortion rate is less than the preset sharpness threshold, the corresponding image location region is determined to be a non-blurred distortion region; if the grayscale blur distortion rate is greater than or equal to the preset sharpness threshold, the corresponding image location region is determined to be a blurred distortion region.

[0093] Step S154: Using the dilation and erosion operations corresponding to edge morphology, perform fuzzy distortion adjacent connection on the areas determined to be fuzzy distortion in the grayscale image of oil fume, so as to remove isolated fuzzy distortion noise points and connect adjacent fuzzy distortion areas to obtain the image frame of the key area of ​​fuzzy distortion in grayscale oil fume.

[0094] Step S155: Perform blur and distortion removal processing on the key area image frame of the oil fume grayscale blur and distortion, so as to optimize and repair the pixel blur and distortion between the non-blurred and distorted areas and the blurred and distorted areas, considering the motion emission flow direction of the oil fume in the grayscale image of oil fume, and obtain the oil fume blur and distortion removed image frame.

[0095] As an embodiment of the present invention, reference Figure 3 As shown, Figure 2 A detailed flowchart of step S15 is shown below. In this embodiment, step S15 includes the following steps:

[0096] Step S151: Perform discrete wavelet decomposition on each grayscale image of oil fume in the frame set of grayscale images of oil fume to transform the grayscale image of oil fume from the spatial domain to the frequency domain, and obtain the corresponding grayscale frequency components under different scale components to obtain the grayscale frequency of each image location region in the grayscale image of oil fume.

[0097] In this embodiment of the invention, by employing standard wavelet transform techniques and selecting appropriate wavelet basis functions to perform multi-scale analysis on the image, the image can be transformed from the spatial domain to the frequency domain. In this step, a two-dimensional discrete wavelet transform (DWT) is first applied to each grayscale image of oil fume, using wavelet functions such as Haar and Daubechies. Different scales are selected according to the decomposition level. Each level of decomposition produces four sub-images, namely low-frequency approximation (LL), horizontal detail (LH), vertical detail (HL), and diagonal detail (HH). These sub-images represent the frequency components of the image at different scales. During processing, the grayscale frequency characteristics of the image are obtained by extracting the low-frequency and high-frequency components from these sub-images, and are further used for subsequent blur distortion evaluation. In particular, when extracting these frequency components, special attention should be paid to the contribution of frequency components at different scales to the local details of the image, ensuring that the high-frequency components can effectively capture the details of the image, while the low-frequency components mainly reflect the overall characteristics of the image. Finally, the grayscale frequency of each image location region within the grayscale image of oil fume is obtained.

[0098] Step S152: Based on the local contrast and edge gradient of the grayscale image of the oil fume, the grayscale frequency of each image location region in the grayscale image of the oil fume is calculated using the oil fume image blur distortion rate calculation formula to obtain the grayscale blur distortion rate of each image location region in the grayscale image of the oil fume.

[0099] In this embodiment of the invention, a suitable formula for calculating the blur distortion rate of an oil fume image is constructed by combining the range of the image location region, the horizontal coordinate of the image location, the vertical coordinate of the image location, the local contrast of the oil fume grayscale image, the local contrast distortion weighting coefficient, the grayscale value of the image pixels, 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 range of the local neighborhood region, the grayscale value of the image pixels, the mean of the grayscale values ​​in the local neighborhood region, the grayscale frequency distortion weighting coefficient, and related parameters. The grayscale frequency of each image location region in the grayscale oil fume image is used to calculate the blur distortion rate, so as to quantify the blur distortion rate of each region. The blur distortion rate reflects the degree of detail loss in the image region. The higher the value, the stronger the image blur distortion in that region. The lower the value, the clearer the region. Finally, the grayscale blur distortion rate of each image location region in the grayscale oil fume image is obtained.

[0100] Step S153: Compare and judge the grayscale blur distortion rate of each image location region in the grayscale image of oil fume according to the preset sharpness threshold. If the grayscale blur distortion rate is less than the preset sharpness threshold, the corresponding image location region is determined to be a non-blurred distortion region; if the grayscale blur distortion rate is greater than or equal to the preset sharpness threshold, the corresponding image location region is determined to be a blurred distortion region.

[0101] In this embodiment of the invention, a preset sharpness threshold is used to compare and judge the blurring distortion rate of each image location region. When the blurring distortion rate of an image location region is less than the threshold, the region is marked as a non-blurring distortion region, indicating that the image in that region is relatively clear and is not affected by the concentration of oil fumes. If the blurring distortion rate is greater than or equal to the preset sharpness threshold, it indicates that the region has serious blurring distortion and needs further processing. Therefore, the threshold judgment method is used to determine whether each image region is affected by oil fumes and thus blurred. To ensure the accuracy of the judgment, the setting of the sharpness threshold depends on the overall sharpness characteristics of the image and the statistical analysis of blurring distortion. The threshold is usually set according to the actual characteristics of the grayscale image of oil fumes. This operation is performed on each pixel of the image, and the result is a binary image, in which the blurred distortion region is marked as "1" and the non-blurring distortion region is marked as "0".

[0102] Step S154: Using the dilation and erosion operations corresponding to edge morphology, perform fuzzy distortion adjacent connection on the areas determined to be fuzzy distortion in the grayscale image of oil fume, so as to remove isolated fuzzy distortion noise points and connect adjacent fuzzy distortion areas to obtain the image frame of the key area of ​​fuzzy distortion in grayscale oil fume.

[0103] In this embodiment of the invention, the aim is to remove isolated blurry distortion noise points and connect adjacent blurry distortion regions for subsequent image restoration. First, erosion operations in edge morphology are used to reduce isolated blurry distortion noise points in the image. This operation can shrink the distortion region and remove small noise in the image. Then, dilation operations are used to expand the blurry distortion region and connect adjacent blurry distortion regions into a continuous region. The combined use of erosion and dilation operations can effectively remove isolated noise points and integrate blurry distortion regions, making the blurry distortion regions more concentrated and coherent. The structural elements (such as circles or rectangles) used in the morphological operations are determined according to the characteristics of the actual oil fume image. The size of the structural elements determines the effect of dilation and erosion operations. Through this step, the blurry distortion regions in the grayscale oil fume image are processed into more obvious and coherent regions, and finally, the key region image frame of the grayscale blurry distortion of oil fume is obtained.

[0104] Step S155: Perform blur and distortion removal processing on the key area image frame of the oil fume grayscale blur and distortion, so as to optimize and repair the pixel blur and distortion between the non-blurred and distorted areas and the blurred and distorted areas, considering the motion emission flow direction of the oil fume in the grayscale image of oil fume, and obtain the oil fume blur and distortion removed image frame.

[0105] In this embodiment of the invention, blur distortion removal technology is applied to previously obtained image frames of key blurred and distorted regions for repair. Considering the direction and motion characteristics of the oil fume emission flow in the grayscale image, an optimized repair method based on the flow direction is adopted to repair pixel blur distortion between non-blurred and distorted regions. This process uses interpolation techniques to restore blurred areas of the image, typically employing bilinear interpolation or adaptive interpolation based on local features to fill in the blurred areas. Specifically, by analyzing the color, texture, and other features of the blurred and distorted regions and their neighboring regions, the repair algorithm generates a smooth transition image that conforms to the overall image characteristics, eliminating the visual impact of blur distortion. The emission direction of the oil fume image is estimated using optical flow or calculated based on the flow characteristics of the oil fume, thereby guiding the repair algorithm to correctly interpolate within the blurred areas. While ensuring the overall image clarity, the algorithm maximizes the recovery of details in the oil fume region, ultimately obtaining an image frame with oil fume blur distortion removed.

[0106] Furthermore, the specific formula for calculating the blurring distortion rate of the oil fume image in step S152 is as follows:

[0107]

[0108] In the formula, D(x,y) is the grayscale blurring distortion rate at the image position (x,y) in the grayscale image of the oil fume, Ω is the range of the image position region, x is the horizontal coordinate of the image position, y is the vertical coordinate of the image position, ε(x,y) is the local contrast of the grayscale image of the oil fume at the image position (x,y), λ1 is the local contrast distortion weighting coefficient, and I(x,y) is the grayscale value of the image pixel at the image position (x,y). Let f(x,y) be the grayscale image edge gradient of the oil fume at image location (x,y), λ2 be the edge gradient distortion weighting coefficient, f(x,y) be the grayscale frequency of the oil fume at image location (x,y) in the grayscale image, N be the total number of pixels in the neighborhood, and φ be the grayscale value of the oil fume. xy I represents the local neighborhood region at image location (x,y). ij Let μ be the grayscale value of the image pixel at the neighborhood 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 for gray blur distortion rate.

[0109] This invention, through the use of a specific mathematical model and verification, yields a formula for calculating the blurring distortion rate of oil fume images. This formula calculates the blurring distortion rate of each image location region within a grayscale image of oil fume. It integrates multiple factors such as local contrast, edge gradient, and grayscale frequency, accurately describing the degree of blurring distortion in oil fume images. Local contrast reflects image details, edge gradient reflects image sharpness, and grayscale frequency reveals high-frequency information (closely related to sharpness). Weighting coefficients can be used to adjust these factors, further improving the accuracy of the formula. In the formula, the region is integrated, meaning the calculation considers not only a single point but also the comprehensive characteristics of local image regions, effectively avoiding the influence of local noise or outliers. This local consideration allows the formula to adapt to different types of blurring distortion regions, while the global correction coefficient makes the final result smoother, reducing errors caused by over-calculation. The weighting coefficients of the formula allow for adjustments to the influence of different distortion sources based on the characteristics of the actual image. This flexibility enables the model to make accurate judgments and repairs for different blur and distortion conditions in oil fume images. In addition, the weighting coefficients of contrast, edge gradient, and frequency components can be optimized according to the degree of blur and noise characteristics of the image, allowing the algorithm to automatically adapt to the actual scene and obtain more reasonable distortion assessment results. Through the weighting of edge gradient, the formula can pay more attention to areas containing edge information when detecting image distortion, because these areas usually contain more image details, and areas with a high degree of blur will affect the overall clarity of the image. In summary, this formula fully considers the grayscale blurring distortion rate D(x,y) at the inherent image position (x,y) of the grayscale image of the oil fume, the range Ω of the image position region Ω, the horizontal coordinate x, the vertical coordinate y, the local contrast ε(x,y) of the grayscale image of the oil fume at image position (x,y), the local contrast distortion weighting coefficient λ1, the image pixel grayscale value I(x,y) at image position (x,y), and the edge gradient of the grayscale image of the oil fume at image position (x,y). Edge gradient distortion weighting coefficient λ2, grayscale frequency f(x,y) at intrinsic image location (x,y) in the grayscale image of oil fume, total number of pixels N in the neighborhood, and local neighborhood range φ at image location (x,y). xy The image pixel gray value I at the neighborhood position (i,j) ij The mean value μ of grayscale values ​​within a local area xy The grayscale frequency distortion weighting coefficient λ3 and the grayscale blur distortion rate correction coefficient η are used to construct the grayscale image edge gradient of the oil fume at image position (x,y) by combining the horizontal coordinate x, the vertical coordinate y, and the grayscale value I(x,y) of the image pixel at image position (x,y). Functional relationship Furthermore, by combining the image location's x-coordinate, y-coordinate, and the total number of pixels in the neighborhood N, the local neighborhood range φ at image location (x,y) is determined. xy The image pixel gray value I at the neighborhood position (i,j) ij And the mean value μ of grayscale values ​​within the local area. xy This constitutes a functional relationship between the grayscale frequency f(x,y) at the intrinsic image position (x,y) of the grayscale image of oil fume. A functional relationship is established based on the correlation between the grayscale blurring distortion rate D(x,y) at the intrinsic image position (x,y) of the grayscale image of cooking fumes and the above parameters. This formula can calculate the image blur distortion rate of the grayscale frequency of each image location region in the grayscale image of oil fume. At the same time, by introducing the correction coefficient η of grayscale blur distortion rate, it can be adjusted according to the error that occurs in the calculation process, thereby improving the accuracy and applicability of the formula for calculating the blur distortion rate of oil fume image.

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

[0111] Step S21: Obtain the scattering characteristics of oil fumes under different lighting conditions, and obtain the corresponding oil fume texture direction features by removing image frames through oil fume blurring and distortion removal;

[0112] In this embodiment of the invention, the scattering characteristics of oil fume under different lighting conditions are obtained from the acquired oil fume image data. By using a specially designed imaging device, such as a multispectral camera, oil fume images under different lighting intensities can be acquired. Based on the light scattering characteristics of the oil fume images, the influence of oil fume particles on the images under different lighting conditions is calculated through lighting models and back-calculation methods. These influences are mainly manifested in the fact that the scattering behavior of oil fume particles leads to image blurring and texture distortion. When deblurring the image, deblurring algorithms (such as Wiener filtering, blind deconvolution, etc.) can be used to remove the blurring distortion caused by oil fume scattering. After deblurring, texture direction is extracted. Gabor filters or directional gradient methods are used to analyze the texture direction features of oil fume particles in the image to determine the distribution and directionality information of oil fume in the image, and finally obtain the corresponding oil fume texture direction features.

[0113] Step S22: Based on the scattering characteristics of oil fumes under different lighting conditions and the texture direction features of oil fumes, design convolutional kernels corresponding to pixels from 3×3 to 11×11, and realize the high-frequency details of fine particles and the low-frequency contours of large oil fume shapes corresponding to oil fumes, thereby constructing a convolutional network layer; and construct a deconvolutional network layer by connecting it to the convolutional network layer to form a symmetrical structure.

[0114] In this embodiment of the invention, a series of convolutional kernels are designed based on the scattering characteristics of oil fumes under different lighting conditions and the extracted texture direction features of the oil fumes. The size of the convolutional kernels varies from 3×3 to 11×11 pixels and is used to extract oil fume detail features at different scales. Small-scale convolutional kernels (such as 3×3 or 5×5) are used to capture high-frequency details of small oil fume particles, while large-scale convolutional kernels (such as 9×9 or 11×11) are used to extract low-frequency contour features of large oil fume clumps. Through this multi-scale design, effective extraction of oil fume particles at different levels can be achieved to construct convolutional network layers. By stacking multiple convolutional layers, the feature extraction capability of oil fume details is enhanced. The convolutional network layers and deconvolutional network layers adopt a symmetrical structure, that is, based on the convolutional layers, the deconvolutional layers gradually restore the image resolution and enhance the extracted features. In the design of the deconvolutional network layer, the spatial information of the image is restored by using deconvolution operations to enhance the correlation between oil fume concentration and image details. Finally, the corresponding convolutional network layers and deconvolutional network layers are constructed.

[0115] Step S23: Use convolutional network layers to perform multi-scale stepwise feature extraction on the image frames with oil fume blur and distortion removal, in order to iterate from shallow to deep layers. In the shallow layer, small-scale convolutional kernels are used to extract the corresponding fine particle texture features of oil fume, and in the deep layer, large-size convolutional kernels are gradually introduced to integrate the oil fume surrounding contours corresponding to the image frames with oil fume blur and distortion removal to extract the corresponding oil fume shape and area change features, so as to obtain the oil fume image feature set.

[0116] In this embodiment of the invention, multi-scale stepwise feature extraction of oil fume image frames is performed using convolutional network layers. First, starting with the image frames where oil fume blurring and distortion have been removed, multi-scale convolutional feature extraction is performed. Shallow convolutional networks use small-scale convolutional kernels (such as 3×3 or 5×5) to extract the fine texture features of oil fume particles. These small-scale convolutional kernels can capture the tiny particles, details, and changes of oil fume. In deep convolutional networks, larger-scale convolutional kernels (such as 9×9 or 11×11) are introduced. At this time, the network will gradually integrate the detailed features extracted by the previous layer and extract large-scale shape features in the oil fume image, such as the contours and edge information of oil fume clumps. In addition, contour analysis of the background of the oil fume image is gradually added to the deep network to extract the shape information and area change features around the oil fume. Throughout the process, the size of the convolutional kernels and the depth of feature extraction are gradually optimized according to the characteristics of oil fume at different scales. Finally, an oil fume image feature set is obtained, which includes the corresponding fine texture features of oil fume particles, oil fume shape, and area change features.

[0117] Step S24: Input the feature set of the oil fume image into the deconvolution network layer to train the concentration detection model. According to the physical correspondence between the features of different scales in the oil fume image feature set and the oil fume concentration, incorporate the loss function to fit the relationship between the oil fume concentration and the features of different scales through multiple iterations of training, generate the oil fume concentration detection model, and output the oil fume concentration model detection result.

[0118] In this embodiment of the invention, the feature set of oil fume images extracted from the convolutional network layer is input into the deconvolutional network layer. The deconvolutional network layer is responsible for training the concentration detection model based on the image features. The training process adopts a supervised learning method and uses an image dataset 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 oil fume concentration and different scale features, the loss function needs to consider the influence of multiple scales, including the texture details, contour shape, and area changes of oil fume particles. Through the backpropagation algorithm, the network parameters are optimized iteratively 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 output is the oil fume concentration detection result based on the input image. Finally, the oil fume concentration detection model is generated and the oil fume concentration model detection result is output.

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

[0120] Step S31: Based on the texture features of fine oil fume particles in the oil fume image feature set, estimate the particle size distribution of oil fume particles in the corresponding oil fume blurred and distorted image frames to obtain the particle size distribution of fine oil fume particles.

[0121] In this embodiment of the invention, the texture features of fine oil fume particles within the feature set of the oil fume image are analyzed. Appropriate texture analysis methods, such as Gray-Level Co-occurrence Matrix (GLCM) or wavelet transform, are selected. These feature extraction techniques are used to extract the texture information of fine particles from the oil fume image. Next, the particle size distribution is estimated by combining the size, shape, distribution, and dispersion features of the particles in the image. This process uses particle analysis algorithms (such as particle size analysis based on edge detection or threshold segmentation) to process the image pixel by pixel, determining the boundaries and sizes of the oil fume particles. Through multi-scale processing of the image, the particle size distribution of fine oil fume particles can be accurately estimated, typically represented by a particle size distribution curve, showing the particle number density at different particle sizes. To improve estimation accuracy, machine learning algorithms can be used for model training, ultimately obtaining the particle size distribution of fine oil fume particles.

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

[0123] In this embodiment of the invention, the image frame with blurred and distorted oil fume is subjected to light intensity spectrum transformation. Typically, Fourier transform (FFT) is used to transform the image from the spatial domain to the frequency domain. The frequency-transformed oil fume image can reveal the light intensity distribution characteristics of oil fume particles under different frequency components. By analyzing the frequency domain image, the energy distribution of high-frequency and low-frequency components is extracted, and the density of oil fume particles is reflected by the frequency domain characteristics. By calculating the energy density of each frequency band based on the changes in the frequency components in the image, the density of oil fume particles can be obtained. 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 oil fume particles is uniform or whether there is an alternation of density. For different frequency components, statistical analysis methods, such as mean, variance, and peak value, are used to quantify the density of oil fume particles, and finally the density of fine oil fume particles is obtained.

[0124] Step S33: Based on the shape and area change features of oil fume in the oil fume image feature set, predict the area of ​​the oil fume region for the corresponding oil fume blur and distortion removal image frame to obtain the predicted area size of the oil fume image region.

[0125] In this embodiment of the invention, by analyzing the shape and area change characteristics of oil fume in the feature set of oil fume images, the oil fume region is predicted for the image frames where oil fume blurring and distortion are removed. First, the oil fume image is processed using an edge detection algorithm (such as Canny edge detection or Sobel operator) to identify the boundaries of the oil fume. Then, the oil fume region is corrected and optimized based on morphological operations (such as dilation and erosion operations) to ensure that the identified region is a complete oil fume region. Next, by calculating the pixel area of ​​the oil fume region and combining it with the image resolution and scale, the actual area size of the oil fume region is predicted. To improve the prediction accuracy, deep learning methods can be used. A model is trained using a convolutional neural network (CNN) to identify and predict the oil fume region in different oil fume image frames, thereby obtaining a more accurate oil fume region area. Finally, the predicted area size of the oil fume image region is obtained.

[0126] Step S34: Based on the density of fine oil fume particles and the predicted area of ​​the oil fume image region, the corresponding oil fume blur and distortion removal image frame is subjected to oil fume concentration quantification to obtain the actual oil fume concentration value corresponding to the oil fume image frame.

[0127] In this embodiment of the invention, the oil fume concentration is quantified in the image frame after removing the blur and distortion of oil fumes by combining the density of fine oil fume particles with the predicted area of ​​the oil fume region. First, the density of fine oil fume particles can be quantitatively represented by the obtained spectral distribution characteristics. Then, combined with the previously obtained predicted area of ​​the oil fume region, the distribution of oil fume particles per unit area is calculated. 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 the oil fume concentration value. In specific operation, a concentration prediction model can be trained through sample images, and the oil fume concentration of new image frames can be quantified using this model. The quantification result is usually expressed as a numerical value of oil fume concentration, such as "number of particles per unit volume" or "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: Based on the actual oil fume concentration value corresponding to the oil fume image frame, the corresponding oil fume blur and distortion removal image frame is labeled frame by frame to obtain the actual oil fume concentration labeling result.

[0129] In this embodiment of the invention, the corresponding oil fume blur and distortion removal image frames are labeled frame by frame based on the actual oil fume concentration value corresponding to the oil fume image frame. First, the oil fume concentration in each frame is determined according to the previously obtained oil fume concentration quantization value. Next, concentration labels are added to the image frames using manual or automated labeling tools in conjunction with image calibration tools. This process can be achieved by manually confirming the oil fume concentration range through image labeling interface settings, or by automatically labeling through training a deep learning model. The labeling results will form a database containing image frames and their corresponding oil fume concentrations. To improve the accuracy of labeling, it is recommended to use a standard oil fume concentration image set for calibration, and combine manual verification and machine learning algorithms for correction, finally obtaining the actual labeling results of oil fume concentration.

[0130] Furthermore, the step S32, which involves statistically analyzing the particle size distribution of fine oil fume particles based on the oil fume light intensity distribution characteristics of the oil fume image at different frequency components, includes the following steps:

[0131] Based on the characteristics of the light intensity distribution of oil fume images at different frequency components, a gradient analysis of the light intensity distribution of oil fume images at different frequency components is performed to obtain the gradient of the change in the light intensity distribution of oil fume images at different frequency components.

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

[0133] Preferably, the influence of oil fume particle light intensity on the corresponding oil fume blur and distortion removal image frames is evaluated based on the gradient of oil fume light intensity distribution change under different frequency components, so as to obtain the oil fume particle propagation light intensity influence factor, including the peak frequency of scattered light intensity and the light intensity attenuation slope.

[0134] In this embodiment of the invention, the image frames for removing oil fume blur distortion are processed by utilizing the previously obtained gradient of the oil fume light intensity distribution under the frequency components. In this process, the blurring effect caused by the scattering of oil fume particles can be removed by deconvolving the frequency components of the image. Specifically, common frequency domain filtering methods are used, combined with the enhancement of high-frequency components and the smoothing of low-frequency components, to restore the image clarity. On this basis, the influence of oil fume particles on the propagation of light intensity is further evaluated based on the gradient of the oil fume light intensity distribution. This evaluation is conducted by analyzing the scattering effect of oil fume particles on light waves of different frequencies to obtain the light intensity influence factor of oil fume particle propagation. This factor includes the peak frequency of scattered light intensity and the light intensity attenuation slope. The peak frequency of 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 light intensity by oil fume particles. These factors provide the necessary physical quantities for subsequent particle size distribution analysis, thereby enabling in-depth analysis of the optical characteristics of oil fume particles and finally obtaining the light intensity influence factor of oil fume particle propagation.

[0135] Preferably, the density of oil fume fine particles is statistically analyzed based on the light intensity influencing factor of oil fume particle propagation to obtain the density of oil fume fine particles.

[0136] In this embodiment of the invention, statistical analysis of the density of the corresponding fine oil fume particle size distribution is performed based on the previously obtained light intensity influence factor 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 scattering theory (such as Mie scattering theory), the average particle size and its distribution range can be calculated based on the peak frequency of the scattered light intensity and the light intensity attenuation slope of the oil fume particles. By analyzing multiple image frames, the particle size distribution is fitted using statistical methods (such as least squares method or maximum likelihood estimation) to obtain the density of oil fume particles in the image. The density of particles reflects the change in 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 obtain the density of fine oil fume particles.

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

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

[0139] In this embodiment of the invention, a discriminator is constructed by introducing an adversarial training mechanism. The purpose is to optimize the accuracy and robustness of the oil fume concentration detection model by detecting the difference between the actual labeled oil fume concentration of the oil fume images and the detection results of the oil fume concentration model. First, the collected oil fume images are input into the oil fume concentration detection model. This model is based on a convolutional neural network (CNN) architecture and, after training, 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 actual concentration value of the image (from the labeled dataset) are fed into the discriminator as a pair of inputs. The discriminator then employs an adversarial training method. The discriminator determines the difference between the predicted and actual concentration values ​​of cooking fumes, i.e., whether the predicted values ​​are true and reasonable. The output of the discriminator is a probability value, representing the probability that the predicted cooking fume concentration matches the actual concentration value. In practice, the discriminator can use a traditional binary classification model. Through comparison and training with the actual concentration labels, the discriminator can accurately distinguish the similarity between the prediction results of the cooking fume concentration detection model and the actual concentration labels. The output of the discriminator is a false result probability value. If the output of the detection model differs greatly from the actual concentration label, the output probability value of the discriminator is low, and vice versa. Finally, a false result judgment result for cooking fume concentration is generated.

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

[0141] In this embodiment of the invention, the prediction accuracy of the fume concentration detection model is further optimized by feeding back the probability judgment of false results to the fume concentration detection model. Specifically, firstly, based on the probability value output by the previously constructed discriminator, it is determined whether there is a deviation in the prediction result of the fume concentration detection model. If the probability value is low, it indicates that there is a large difference between the prediction result of the fume concentration detection model and the true concentration value. At this time, adversarial training is used to feed this difference back to the detection model for correction. The feedback process is implemented through the gradient backpropagation algorithm. Specifically, the gradient information output by the discriminator is passed to the fume concentration detection model, and the gradient of the loss function is calculated through backpropagation, thereby adjusting the network parameters in the detection model so that the model's prediction result is closer to the true concentration label value. During the optimization process, the training objective of the fume concentration detection model is... The process involves minimizing the loss function and updating the network parameters through backpropagation. Typically, the loss function design includes the mean squared error (MSE) between the model's predicted values ​​and the actual concentration values, or cross-entropy loss. It also incorporates the false result probability output by the discriminator to further weight and adjust the update step size during model training. Through multiple iterations of training, 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. Efficient matrix operations accelerate the training process, and backpropagation automatically calculates the derivative through the computational graph. In each iteration, the network parameters are updated through optimization algorithms (such as Adam or SGD) to continuously improve model performance, ultimately generating an optimized oil fume concentration detection model.

[0142] Furthermore, the present invention also provides a training system for a fume concentration detection model, for executing the training method for the fume concentration detection model as described above, the training system for the fume concentration detection model comprising:

[0143] The oil fume image frame acquisition and processing module is used to acquire oil fume emission image frames in real time by deploying cameras in a selected oil fume emission area, and to perform blur and distortion removal processing on the oil fume emission image frames to obtain oil fume blur and distortion removed image frames.

[0144] The oil fume concentration detection model training module is used to construct convolutional network layers and deconvolutional network layers. The convolutional network layers are used to perform multi-scale stepwise feature extraction on the oil fume blur and distortion removal image frames. This is to extract the corresponding fine particle texture features of oil fume at a small scale and the corresponding shape and area change features of oil fume at a large scale, thus obtaining an oil fume image feature set. The oil fume image feature set is then input into the deconvolutional network layer for concentration detection model training to generate an oil fume concentration detection model and output the oil fume concentration model detection results.

[0145] The actual concentration of cooking fumes is labeled frame by frame. It is used to quantify the concentration of cooking fumes in the corresponding image frames after removing the blur and distortion of cooking fumes based on the feature set of the cooking fumes image to obtain the actual concentration value of cooking fumes in the image frames. Based on the actual concentration value of cooking fumes in the image frames, the corresponding image frames after removing the blur and distortion of cooking fumes are labeled frame by frame to obtain the actual concentration labeling result of cooking fumes.

[0146] The adversarial optimization module for the concentration detection model is used to build a discriminator by introducing an adversarial training mechanism. Based on the actual labeled results of the oil fume concentration and the detection results of the oil fume concentration model, the discriminator is used to optimize the oil fume concentration detection model to generate an optimized oil fume concentration detection model.

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

[0148] Therefore, the embodiments should be considered as exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of the equivalents of the application are intended to be included within the invention.

[0149] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily 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 invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.

Claims

1. A training method for a model for detecting oil fume concentration, characterized in that, Includes the following steps: Step S1: By deploying cameras in the selected fume emission area to acquire fume emission image frames in real time, and performing blur and distortion removal processing on the fume emission image frames, we obtain fume blur and distortion removed image frames. Step S2: Construct convolutional and deconvolutional network layers, and use the convolutional network layers to perform multi-scale stepwise feature extraction on the image frames with blurred and distorted oil fume, so as to extract the corresponding fine particle texture features of oil fume at a small scale and the corresponding shape and area change features of oil fume at a large scale, to obtain the oil fume image feature set; input the oil fume image feature set into the deconvolutional network layer for concentration detection model training to generate an oil fume concentration detection model, and output the oil fume concentration model detection result. Step S2 includes the following steps: Step S21: Obtain the scattering characteristics of oil fumes under different lighting conditions, and obtain the corresponding oil fume texture direction features by removing image frames through oil fume blurring and distortion removal; Step S22: Based on the scattering characteristics of oil fumes under different lighting conditions and the texture direction features of oil fumes, design convolutional kernels corresponding to pixels from 3×3 to 11×11, and realize the high-frequency details of fine particles and the low-frequency contours of large oil fume shapes corresponding to oil fumes, thereby constructing a convolutional network layer; and construct a deconvolutional network layer by connecting it to the convolutional network layer to form a symmetrical structure. Step S23: Use convolutional network layers to perform multi-scale stepwise feature extraction on the image frames with oil fume blur and distortion removal, in order to iterate from shallow to deep layers. In the shallow layer, small-scale convolutional kernels are used to extract the corresponding fine particle texture features of oil fume, and in the deep layer, large-size convolutional kernels are gradually introduced to integrate the oil fume surrounding contours corresponding to the image frames with oil fume blur and distortion removal to extract the corresponding oil fume shape and area change features, so as to obtain the oil fume image feature set. Step S24: Input the oil fume image feature set into the deconvolution network layer to train the concentration detection model. According to the physical correspondence between the features at different scales in the oil fume image feature set and the oil fume concentration, incorporate the loss function to fit the relationship between the oil fume concentration and the features at different scales through multiple iterations of training, generate the oil fume concentration detection model, and output the oil fume concentration model detection result. Step S3: Based on the feature set of the oil fume image, quantify the oil fume concentration of the corresponding oil fume blurred and distorted image frames to obtain the actual oil fume concentration value corresponding to the oil fume image frame; based on the actual oil fume concentration value corresponding to the oil fume image frame, annotate the corresponding oil fume blurred and distorted image frames frame by frame to obtain the actual oil fume concentration annotation result. Step S3 includes the following steps: Step S31: Based on the texture features of fine oil fume particles in the oil fume image feature set, estimate the particle size distribution of oil fume particles in the corresponding oil fume blurred and distorted image frames to obtain the particle size distribution of fine oil fume particles. Step S32: Perform intensity spectrum transformation on the image frame after removing the blur and distortion of the oil fume to obtain the oil fume intensity distribution characteristics of the image at different frequency components; based on the oil fume intensity distribution characteristics of the image at different frequency components, perform statistical analysis on the particle size distribution of the oil fume particles to obtain the density of the oil fume particles. The statistical analysis on the particle size distribution of the oil fume particles based on the oil fume intensity distribution characteristics of the image at different frequency components in step S32 includes the following steps: Based on the characteristics of the light intensity distribution of oil fume images at different frequency components, a gradient analysis of the light intensity distribution of oil fume images at different frequency components is performed to obtain the gradient of the change in the light intensity distribution of oil fume images at different frequency components. Based on the gradient of the distribution change of oil fume light intensity under different frequency components of the oil fume image, the influence of oil fume particle light intensity on the corresponding oil fume blur and distortion removal image frames is evaluated to obtain the oil fume particle propagation light intensity influence factor, including the peak frequency of scattered light intensity and the light intensity attenuation slope. Based on the influence factor of light intensity on the propagation of oil fume particles, a statistical analysis of the density of fine oil fume particles was conducted to obtain the density of fine oil fume particles. Step S33: Based on the shape and area change features of the oil fume in the oil fume image feature set, predict the area of ​​the oil fume region for the corresponding oil fume blur and distortion removal image frame to obtain the predicted area size of the oil fume image region. Step S34: Based on the density of fine oil fume particles and the predicted area of ​​the oil fume image region, the corresponding oil fume blur and distortion removal image frame is quantified to obtain the actual oil fume concentration value corresponding to the oil fume image frame. Step S35: Based on the actual oil fume concentration value corresponding to the oil fume image frame, the corresponding oil fume blur and distortion removal image frame is labeled frame by frame to obtain the actual oil fume concentration labeling result; Step S4: Construct a discriminator by introducing an adversarial training mechanism, and use the discriminator to perform model adversarial optimization on the oil fume concentration detection model based on the actual labeled results of oil fume concentration and the detection results of the oil fume concentration model, so as to generate an optimized oil fume concentration detection model.

2. The training method for the oil fume concentration detection model according to claim 1, characterized in that, Step S1 includes the following steps: Step S11: By deploying cameras in the selected fume emission area and setting the corresponding shooting parameters such as frame rate, resolution and sensitivity, the fume emission image frames are acquired in real time at a shooting frequency interval of 30 seconds every 5 minutes. Step S12: By performing fume image segmentation processing on the fume emission image frames at 5-second intervals, a fume image frame set is obtained; Step S13: Perform image grayscale conversion on each oil fume emission image in the oil fume image frame set to generate an oil fume grayscale image frame set; Step S14: Perform local contrast calculation on each grayscale image of oil fume within the frame set of grayscale images of oil fume to divide each grayscale image of oil fume into multiple local regions, and calculate the contrast difference between the maximum and minimum grayscale values ​​for each local region to obtain the local contrast of the grayscale image of oil fume; use the Sobel operator to perform edge gradient calculation on each grayscale image of oil fume within the frame set of grayscale images of oil fume to obtain the edge gradient of the grayscale image of oil fume. Step S15: Based on the local contrast and edge gradient of the grayscale image of the oil fume, perform blur and distortion removal processing on each grayscale image of the oil fume in the frame set of grayscale images of oil fume to obtain the image frame with oil fume blur and distortion removed.

3. The training method for the oil fume concentration detection model according to claim 2, characterized in that, Step S15 includes the following steps: Step S151: Perform discrete wavelet decomposition on each grayscale image of oil fume in the frame set of grayscale images of oil fume to transform the grayscale image of oil fume from the spatial domain to the frequency domain, and obtain the corresponding grayscale frequency components under different scale components to obtain the grayscale frequency of each image location region in the grayscale image of oil fume. Step S152: Based on the local contrast and edge gradient of the grayscale image of the oil fume, the grayscale frequency of each image location region in the grayscale image of the oil fume is calculated using the oil fume image blur distortion rate calculation formula to obtain the grayscale blur distortion rate of each image location region in the grayscale image of the oil fume. Step S153: Compare and judge the grayscale blur distortion rate of each image location region in the grayscale image of oil fume according to the preset sharpness threshold. If the grayscale blur distortion rate is less than the preset sharpness threshold, the corresponding image location region is determined to be a non-blurred distortion region; if the grayscale blur distortion rate is greater than or equal to the preset sharpness threshold, the corresponding image location region is determined to be a blurred distortion region. Step S154: Using the dilation and erosion operations corresponding to edge morphology, perform fuzzy distortion adjacent connection on the areas determined to be fuzzy distortion in the grayscale image of oil fume, so as to remove isolated fuzzy distortion noise points and connect adjacent fuzzy distortion areas to obtain the image frame of the key area of ​​fuzzy distortion in grayscale oil fume. Step S155: Perform blur and distortion removal processing on the key area image frame of the oil fume grayscale blur and distortion, so as to optimize and repair the pixel blur and distortion between the non-blurred and distorted areas and the blurred and distorted areas, considering the motion emission flow direction of the oil fume in the grayscale image of oil fume, and obtain the oil fume blur and distortion removed image frame.

4. The training method for the oil fume concentration detection model according to claim 3, characterized in that, The specific formula for calculating the blur distortion rate of the oil fume image in step S152 is as follows: ; ; ; In the formula, The intrinsic image location of the grayscale image of cooking fumes Gray-scale blur distortion rate at that location This represents the location range of the oil fume image. The x-coordinate of the image position. The vertical coordinate of the image position. To the image location Local contrast of the grayscale image of the oil fume. These are the weighting coefficients for local contrast distortion. To the image location The grayscale value of the image pixels at that location. To the image location The edge gradient of the grayscale image of the oil fume at that location. These are the weighting coefficients for edge gradient distortion. The intrinsic image location of the grayscale image of cooking fumes grayscale frequency at that location This represents the total number of pixels in the neighborhood. To the image location The local area of ​​the location For the position in the field The grayscale value of the image pixels at that location. The mean of gray values ​​within a local area. This is the grayscale frequency distortion weighting coefficient. This is the correction coefficient for grayscale blur distortion rate.

5. The training method for the oil 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 labeled result of oil fume concentration corresponding to the oil fume image and the detection result of the oil fume concentration model into the discriminator for detection and judgment, so as to generate the probability judgment result of false result of oil fume concentration; Step S42: Feed back the false result probability judgment of oil fume concentration to the oil fume concentration detection model for model adversarial optimization, and use the gradient backpropagation algorithm to adjust the network parameters of the oil fume concentration detection model to generate an optimized oil fume concentration detection model.

6. A training system for a model for detecting oil fume concentration, characterized in that, For executing the training method for the oil fume concentration detection model as described in claim 1, the training system for the oil fume concentration detection model includes: The oil fume image frame acquisition and processing module is used to acquire oil fume emission image frames in real time by deploying cameras in a selected oil fume emission area, and to perform blur and distortion removal processing on the oil fume emission image frames to obtain oil fume blur and distortion removed image frames. The oil fume concentration detection model training module is used to construct convolutional network layers and deconvolutional network layers. The convolutional network layers are used to perform multi-scale stepwise feature extraction on the oil fume blur and distortion removal image frames. This is to extract the corresponding fine particle texture features of oil fume at a small scale and the corresponding shape and area change features of oil fume at a large scale, thus obtaining an oil fume image feature set. The oil fume image feature set is then input into the deconvolutional network layer for concentration detection model training to generate an oil fume concentration detection model and output the oil fume concentration model detection results. The actual concentration of cooking fumes is labeled frame by frame. It is used to quantify the concentration of cooking fumes in the corresponding image frames after removing the blur and distortion of cooking fumes based on the feature set of the cooking fumes image to obtain the actual concentration value of cooking fumes in the image frames. Based on the actual concentration value of cooking fumes in the image frames, the corresponding image frames after removing the blur and distortion of cooking fumes are labeled frame by frame to obtain the actual concentration labeling result of cooking fumes. The adversarial optimization module for the concentration detection model is used to build a discriminator by introducing an adversarial training mechanism. Based on the actual labeled results of the oil fume concentration and the detection results of the oil fume concentration model, the discriminator is used to optimize the oil fume concentration detection model to generate an optimized oil fume concentration detection model.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the training method for the oil fume concentration detection model as described in any one of claims 1-5.

Citation Information

Patent Citations

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

    US20240037950A1

  • Method for detecting noise in images of a surrounding area, and method for training a machine learning algorithm

    WO2024184080A1