Fire mask defect detection method based on image recognition

Through adaptive adjustment of the Gaussian surround scale SSR algorithm, combined with the defect possibility value of pixel categories, the problems of loss of details and excessive enhancement in the image enhancement of fire masks are solved, and the accuracy and efficiency of defect detection are improved.

CN119048518BActive Publication Date: 2024-12-31GUANGZHOU YOUAN FIRE PROTECTION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411547802.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2024-12-31
Estimated Expiration
2044-11-01

AI Technical Summary

Technical Problem

The prior art may lead to loss of details or excessive enhancement of defect detection when using the Retinex algorithm to enhance fire mask images, which may affect the accuracy of defect detection, especially in complex lighting environments.

Method used

By obtaining the pixel points to be analyzed in the grayscale image of the fire mask, clustering according to the regularity of the grayscale value distribution of the surrounding pixel points, the defect possibility value of the pixel category is calculated, and the Gaussian surround scale is adaptively adjusted to update the SSR The enhanced processing of the algorithm ensures that detailed information is retained in defective areas and reduces the impact of lighting.

Benefits of technology

It improves the enhancement effect of fire mask images, reduces the loss of details and excessive enhancement, and enhances the accuracy and efficiency of fire mask defect detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048518B_ABST
    Figure CN119048518B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of image data processing, and more specifically, to a method for detecting defects in a fire mask based on image recognition, the method comprising: obtaining a plurality of pixels to be analyzed in a grayscale image of a fire mask, clustering each pixel to be analyzed to obtain a plurality of pixel categories, calculating the possibility value of any pixel category being a defective area, using the possibility value of the defective area as the degree of defective performance of each pixel in the corresponding pixel category, updating the Gaussian surround scale when the grayscale image is enhanced using the SSR algorithm, the updated Gaussian surround scale is positively correlated with the extreme difference and minimum value of the Gaussian surround scale, and negatively correlated with the degree of defective performance of the corresponding pixel, so as to perform defect detection based on the enhanced grayscale image. The present invention can avoid the problem of detail loss or over-enhancement in the enhanced image, improve the enhancement effect of the image, and thus improve the accuracy of defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image data processing, and more specifically, to a method for detecting defects of firefighting masks based on image recognition. Background Art

[0002] With the promotion and popularization of fire safety knowledge, more and more units and families are equipped with fire-fighting equipment, among which fire masks are an important one. The flame-retardant cotton cloth in the fire mask can effectively prevent flames and high temperatures from damaging the user's face. Its surface is usually coated with a layer of aluminum foil. However, the aluminum foil may cause the fire mask image to be affected by light, resulting in the torn area being similar to the normal wrinkles in spatial characteristics. Therefore, when using image correlation technology to detect defects in fire masks, the image needs to be enhanced to reduce the impact of light changes.

[0003] In the related technology, for example, the patent application document with publication number CN115100084A discloses an intelligent image enhancement camera method for a complex lighting environment in a port, which includes: calculating the grayscale of the image; determining whether the grayscale value of the image is within the grayscale range; extracting the horizontal gradient value and the vertical gradient value, and analyzing the image clarity; if the image clarity is higher than the Ten threshold, the image is not processed and is directly output; otherwise, the Retinex algorithm is started to enhance the image.

[0004] However, in the process of using the Retinex algorithm to enhance the image, the above-mentioned solution uses the traditional Retinex algorithm, that is, a fixed Gaussian surround scale is used to enhance the original image, which may not be able to adapt to the influence of complex lighting, resulting in the enhanced image may have the problem of detail loss or over-enhancement, which may lead to the problem of poor image enhancement effect to a certain extent. Summary of the invention

[0005] In order to solve the problem that defects cannot be accurately detected based on enhanced images due to possible loss of details or over-enhancement in the enhanced images, the present invention proposes a fire mask defect detection method based on image recognition.

[0006] The present invention provides a fire mask defect detection method based on image recognition, comprising:

[0007] A plurality of pixels to be analyzed in the grayscale image of the fire mask are obtained, and the regularity value of the grayscale value distribution of the pixels around each pixel to be analyzed is smaller than that of the remaining pixels;

[0008] Cluster each pixel to be analyzed to obtain multiple pixel categories, and calculate the probability value of any pixel category being a defect area: , where For the The probability value of the pixel category being a defect area, For the The average gray value of the pixels in the pixel category, For the The average gray value of the neighboring pixels of the pixel in the pixel category is For the Pixels in the pixel category, For the The neighboring pixels of the pixel in the pixel category, , Respectively The number of pixels in the pixel class and the The number of pixels in the bounding rectangle of the pixel class, is the absolute value symbol, is a hyperbolic tangent function, and the neighboring pixels are outliers within the bounding rectangle of any pixel class;

[0009] The possibility value of the defect area is used as the defect manifestation degree of each pixel in the corresponding pixel category, and the Gaussian surround scale when the grayscale image is enhanced using the SSR algorithm is updated. The updated Gaussian surround scale is positively correlated with the range and minimum value of the Gaussian surround scale, and is negatively correlated with the defect manifestation degree of the corresponding pixel, so as to perform defect detection based on the enhanced grayscale image.

[0010] The present invention can adaptively adjust the Gaussian surround scale when enhancing the grayscale image, and for the area with a smaller degree of defect, adjust it to a larger Gaussian surround scale, which can greatly reduce the influence of light on the area, and for the area with a larger degree of defect, adjust it to a smaller Gaussian surround scale, which can avoid the loss of important details in the corresponding area, thereby improving the enhancement effect of the grayscale image of the fire mask, and then accurately detecting defects in the fire mask.

[0011] Preferably, the method for acquiring the pixel points to be analyzed includes:

[0012] Calculate the normality value of each pixel in the grayscale image, which reflects the regularity of the grayscale value distribution of the surrounding pixels of the corresponding pixel;

[0013] A preset normal threshold is obtained. When the normality value of any pixel point is less than the normal threshold, the pixel point is used as a pixel point to be analyzed, and then all the pixels points to be analyzed are determined.

[0014] The present invention selects the pixel points to be analyzed and then performs the analysis, which can reduce the amount of calculation.

[0015] Preferably, calculating the normality value of each pixel in the grayscale image includes:

[0016] Determine a preset window of any pixel point in the grayscale image, perform surface fitting on the pixel points in the window, and calculate the fitting error of each pixel point in the window. The fitting error is the difference between the actual value of the corresponding pixel point and the fitting value;

[0017] The average value of the fitting error of all pixels in the window is used to measure the regularity value of the grayscale value distribution of the pixels in the window. The regularity value is negatively correlated with the average value. The information entropy of the fitting error of all pixels in the window is used as the credibility value of the regularity.

[0018] The normality value of the pixel in the grayscale image is calculated. The normality value is positively correlated with the regularity value and the credibility value of the regularity value.

[0019] The present invention integrates the credibility value of the regularity value of the gray value change of the surrounding pixels of any pixel point, calculates the normality value of the corresponding pixel point, and can ensure the accuracy of the normality value of each pixel point.

[0020] Preferably, the regularity value of the gray value distribution of the pixels in the window satisfies the following relationship:

[0021] ;

[0022] In the formula, is the regularity value of the grayscale value distribution of any pixel in the preset window of the grayscale image; is the side length of the preset window; For the window Line The fitting error of the pixel points of the column; for the summation symbol; The natural constant An exponential function with base .

[0023] In an exemplary embodiment of the present invention, a method for obtaining a normality value includes:

[0024] The regularity value of the grayscale value distribution of any pixel in the preset window of the grayscale image and the corresponding credibility value of the regularity value are multiplied, and the operation result is normalized to obtain the normality value of the pixel in the grayscale image.

[0025] Preferably, the updated Gaussian surround scale satisfies the following relationship:

[0026] ;

[0027] In the formula, For grayscale images The Line The updated Gaussian surround scale corresponding to the pixel position of the column; is the minimum value of the Gaussian surround scale; is the maximum value of the Gaussian surround scale; is the degree of defect performance of the pixel; The natural constant An exponential function with base .

[0028] The present invention can adaptively update the Gaussian surround scale when enhancing the grayscale image of the fire mask, thereby avoiding detail loss or over-enhancement in the enhanced image, and improving the enhancement effect of the grayscale image of the fire mask.

[0029] Preferably, the method further comprises:

[0030] The defect levels of all pixels in the grayscale image except the pixels to be analyzed are set to zero.

[0031] The present invention can reduce the amount of calculation of the defect manifestation degree of each pixel in the grayscale image, thereby improving the efficiency of defect detection on fire masks to a certain extent.

[0032] Preferably, defect detection is performed based on the enhanced grayscale image, including:

[0033] The enhanced grayscale image is subjected to threshold segmentation to detect defects of the fire mask according to the result of threshold segmentation.

[0034] The present invention has the following effects:

[0035] The present invention screens out pixels that may be defective areas for analysis based on the regularity of the grayscale value distribution of pixels surrounding each pixel, thereby reducing the number of pixels to be analyzed and saving computing resources, thereby improving the efficiency of defect detection on fire masks to a certain extent; and based on the defect manifestation degree of each pixel, the Gaussian surround scale when the grayscale image is enhanced using the SSR algorithm can be adaptively adjusted. When the defect manifestation degree of any pixel is large, the corresponding Gaussian surround scale is small, thereby more detailed information of the location of the pixel can be retained. When the defect manifestation degree of any pixel is small, the corresponding Gaussian surround scale is large, thereby enabling a larger range of smoothing processing to be performed on the location of the pixel, thereby avoiding excessive enhancement of the image, thereby improving the enhancement effect of the grayscale image of the fire mask, and further accurately detecting defects in the fire mask. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0037] Figure 1 It is a schematic flow chart of the steps of a fire mask defect detection method based on image recognition in an embodiment of the present invention. DETAILED DESCRIPTION

[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0039] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0040] Reference Figure 1 The fire mask defect detection method based on image recognition includes steps S1 to S3, which are as follows:

[0041] S1: Acquire multiple pixels to be analyzed in the grayscale image of the fire mask, and the regularity value of the grayscale value distribution of the pixels around each pixel to be analyzed is smaller than that of the remaining pixels.

[0042] Specifically, a high-resolution camera can be used to capture images of fire masks, and the captured images can be grayscaled to obtain a grayscale image of the fire mask. It should be noted that the process of grayscale processing of images is a prior art and will not be described in detail in this embodiment.

[0043] The pixel points to be analyzed refer to the pixel points with poor regularity of grayscale value distribution of surrounding pixel points, which are used as the data basis for further analysis. It should be noted that due to the effect of aluminum foil film on the flame-retardant cotton cloth in the fire mask, the normal wrinkles and tearing defects in the image have similar characteristics. Therefore, in order to reduce the number of pixels to be analyzed and save computing resources, this embodiment uses the characteristics that the grayscale value distribution of the pixel points in the defective area is relatively chaotic and the grayscale changes are large, and selects the pixel points with larger probability values ​​of the defective area from the grayscale image for analysis, thereby improving the efficiency of defect detection to a certain extent.

[0044] In an exemplary embodiment of the present invention, the determination of the pixel to be analyzed can be achieved by the following steps:

[0045] Step 1: Calculate the normality value of each pixel in the grayscale image. The normality value reflects the regularity value of the grayscale value distribution of the surrounding pixels of the corresponding pixel;

[0046] The normality value refers to the data used to measure the possibility that the area where each pixel is located is a normal area, reflecting the regularity value of the grayscale value distribution of the pixels around each pixel. When the regularity value of the grayscale value distribution of the pixels around any pixel is large, it means that the grayscale values ​​of the pixels around the pixel are relatively consistent and have little variation, and the area where the pixel is located is more likely to be a normal area.

[0047] Optionally, a certain threshold may be set according to an empirical value to filter out pixels whose area has a smaller probability value of being a normal area, thereby obtaining a plurality of pixels to be analyzed.

[0048] In an exemplary embodiment of the present invention, the normality value of each pixel can be determined by the following steps:

[0049] (1) Determine a preset window for any pixel in the grayscale image, perform surface fitting on the pixels in the window, and calculate the fitting error of each pixel in the window. The fitting error is the difference between the actual value of the corresponding pixel and the fitted value.

[0050] It should be noted that when performing surface fitting on the pixels in the window, the more regular the grayscale value distribution of the pixels in the window is, the more conducive it is to fitting. Therefore, the regularity of the grayscale value distribution of the pixels in the window can be evaluated by calculating the fitting error of each pixel in the window.

[0051] The preset window can be centered at any pixel in the grayscale image and have a size of In this embodiment, The empirical value is 5. If there is a pixel point that cannot be included in a 5×5 window centered on the pixel point, the pixel point will not be processed.

[0052] Optionally, when performing surface fitting on a pixel point within a preset window of any pixel point, the position of the pixel point in the grayscale image can be used as axis, Axis, the gray value of the pixel is taken as The axis is fitted to obtain the fitting result of the pixel points in the window , the first Line The fitting error of the pixel points of the column ,in, For the window Line The fitted values ​​of the pixels in the column, For the window Line The actual value of the pixel in the column, It should be noted that the process of performing surface fitting on the pixels in the region is a prior art and will not be described in detail in this embodiment.

[0053] (2) The average value of the fitting error of all pixels in the window is used to measure the regularity value of the grayscale value distribution of the pixels in the window. The regularity value is negatively correlated with the average value. The information entropy of the fitting error of all pixels in the window is used as the credibility value of the regularity value.

[0054] It should be noted that due to the presence of some obvious and regular contours in the fire mask image, such as the junction of the eye mask and the mask, the entire mask contour, etc., the grayscale value may change suddenly, which is not conducive to surface fitting and causes excessive fitting error. Therefore, this embodiment uses the information entropy of the fitting error of all pixels within a preset window of any pixel point as the credibility value of the regularity value of the grayscale value distribution of the pixels in the window, which can accurately measure the regularity value of the grayscale value distribution of the surrounding pixels of each pixel point.

[0055] Optionally, when the information entropy of the fitting errors of all pixels within a preset window of any pixel point is large, it means that the distribution of the fitting errors of all pixels within the window is complex and the regularity is poor. The reason for the large fitting errors of all pixels within the window is that the area where the pixels within the window are located is likely to be a defective area. In this case, when the average value of the fitting errors of all pixels within the window is used to measure the regularity value of the grayscale value distribution of the pixels within the window, the credibility value of the regularity value obtained is relatively large.

[0056] Optionally, when the information entropy is small, it means that the distribution of fitting errors of all pixels in the window is relatively consistent and regular. The reason why the fitting errors of all pixels in the window are large is that the pixels in the window are at the normal contour of the fire mask. When the average value of the fitting errors of all pixels in the window is used to measure the regularity value of the grayscale value distribution of the pixels in the window, the credibility value of the obtained regularity value is small.

[0057] Specifically, the regularity value of the grayscale value distribution of any pixel within the preset window satisfies the following relationship:

[0058] ;

[0059] In the formula, is the regularity value of the grayscale value distribution of any pixel in the preset window of the grayscale image; is the side length of the preset window. =5; For the window Line The fitting error of the pixel points of the column; for the summation symbol; The natural constant An exponential function with base .

[0060] In another embodiment, the regularity value of the grayscale value distribution of any pixel within a preset window may be calculated by other calculation formulas, such as not calculating in the form of an exponential function but determining it by a calculation formula that directly takes the inverse.

[0061] (3) Calculate the normality value of the pixel in the grayscale image. The normality value is positively correlated with the regularity value and the credibility value of the regularity value.

[0062] In an exemplary embodiment of the present invention, the normality value of any pixel in the grayscale image can be determined by the following steps:

[0063] The regularity value of the grayscale value distribution of any pixel in the preset window of the grayscale image and the corresponding credibility value of the regularity value are multiplied, and the operation result is normalized to obtain the normality value of the pixel in the grayscale image.

[0064] Specifically, the normality value of any pixel in the grayscale image satisfies the following relationship:

[0065] ;

[0066] In the formula, is the normality value of any pixel in the grayscale image; is the regularity value of the grayscale value distribution of the pixel point within the preset window of the pixel point; is the information entropy of the fitting error of all pixels in the window; is a hyperbolic tangent function, which is used to normalize the product of the regularity value and the credibility value of the regularity value.

[0067] Alternatively, other normalization functions can be used, such as The function is normalized. This embodiment does not specifically limit the type of the selected normalization function.

[0068] In another embodiment, the normality value of the pixel in the grayscale image may also be determined by other calculation formulas, such as by a summation calculation formula instead of a product formula between the regularity value and the corresponding credibility value of the regularity value.

[0069] Step 2: Obtain a preset normal threshold. When the normality value of any pixel is less than the normal threshold, the pixel is used as a pixel to be analyzed, and then all the pixels to be analyzed are determined.

[0070] Optionally, the normal threshold may be set to 0.65 based on an empirical value. When the normality value of any pixel in the grayscale image is less than 0.65, the pixel is used as a pixel to be analyzed, thereby further determining all pixels to be analyzed in the grayscale image.

[0071] S2: Clustering the pixels to be analyzed to obtain multiple pixel categories, and calculating the probability value of any pixel category being a defect area.

[0072] Optionally, the DBSCAN clustering algorithm can be used to divide all pixels to be analyzed into multiple pixel categories according to pixel distance, and the clustering radius can be set to 2 according to empirical values, thereby obtaining multiple pixel categories. It should be noted that the process of clustering using the clustering algorithm is a prior art and is not described in detail in this embodiment.

[0073] Optionally, other clustering algorithms, such as K-means clustering algorithm, may be used for clustering. This embodiment does not impose any particular limitation on the selection of the clustering algorithm.

[0074] Furthermore, after determining multiple pixel categories, the possibility value of any pixel category being a defective area can be calculated. Specifically, the possibility value of any pixel category being a defective area satisfies the following relationship:

[0075] ;

[0076] In the formula, For the The probability value of the pixel category being a defect area; For the The average gray value of the pixels in the pixel category; For the The average grayscale value of the neighboring pixels of the pixel in the pixel category, where the neighboring pixels are outliers within the bounding rectangle of any pixel category; For the Pixels in the pixel category; For the Neighboring pixels of pixels in pixel categories; , Respectively The number of pixels in the pixel class and the The number of pixels in the bounding rectangle of a pixel class; is the absolute value symbol; is the hyperbolic tangent function.

[0077] It should be noted that the wrinkles of the flame-retardant cotton cloth of the fire mask are usually long and thin linear lines, and the tearing defects will generally cause larger gaps in the cotton cloth, that is, there are more pixels in the defective area, and the grayscale value of the gap area is obviously different from the surrounding grayscale value. Therefore, the calculation formula of the possibility value of the defective area provided by the present invention using this feature can ensure the accuracy of the possibility value of each pixel category determined as a defective area.

[0078] S3: The probability value of the defect area is used as the defect manifestation degree of each pixel in the corresponding pixel category, and the Gaussian surround scale when the grayscale image is enhanced using the SSR algorithm is updated. The updated Gaussian surround scale is positively correlated with the extreme value and minimum value of the Gaussian surround scale, and is negatively correlated with the defect manifestation degree of the corresponding pixel, so as to perform defect detection based on the enhanced grayscale image.

[0079] It should be noted that the Gaussian surround scale in the SSR (Single-Scale Retinex) algorithm determines the scope of action of the Gaussian filter in image processing. Since the flame-retardant cotton cloth of the fire mask is under the action of the aluminum foil film, the wrinkles and tearing defects are similar in spatial characteristics. If the SSR algorithm with a fixed Gaussian surround scale is used to enhance the grayscale image of the fire mask, it may not be able to adapt to the complex lighting effects of the fire mask image, resulting in loss of image details or excessive enhancement of the image, affecting the image enhancement effect, and thus affecting the defect recognition of the fire mask. Therefore, the present invention improves the determination of the Gaussian surround scale in the algorithm, and only improves the determination method of the Gaussian surround scale in the algorithm, and does not change the determination method of any other parameter in the algorithm.

[0080] In an exemplary embodiment of the present invention, the defect level of a pixel in a grayscale image may also be determined by the following steps:

[0081] The defect levels of all pixels in the grayscale image except the pixels to be analyzed are set to zero.

[0082] Among them, all pixels in the grayscale image except the pixel to be analyzed, that is, the area where the corresponding pixels in the grayscale image are located whose normality values ​​are greater than or equal to the preset normal threshold, are more likely to be normal areas. Therefore, the defect manifestation degree of the corresponding pixel points can be set to zero, thereby reducing the amount of calculation of the defect manifestation degree of each pixel point.

[0083] It should be noted that, in the SSR algorithm, setting a larger Gaussian surround scale can perform a wider range of smoothing on the image, and setting a smaller Gaussian surround scale can retain more image details and small texture features. The present invention utilizes the defect performance level of each pixel point to adaptively adjust the Gaussian surround scale when enhancing the grayscale image of the fire mask, which can better retain the detail information of the defect area and reduce the influence of light on the normal area, so that the grayscale image of the fire mask can be accurately enhanced, thereby improving the accuracy of defect detection on the fire mask.

[0084] Specifically, the updated Gaussian surround scale satisfies the following relationship:

[0085] ;

[0086] In the formula, For grayscale images The Line The updated Gaussian surround scale corresponding to the pixel position of the column; is the minimum value of the Gaussian surround scale; is the maximum value of the Gaussian surround scale; is the degree of defect performance of the pixel; The natural constant An exponential function with base .

[0087] Optionally, when the SSR algorithm is used to enhance the image, the value range of the Gaussian surround scale is generally set to 80-100. In this embodiment, the minimum value of the Gaussian surround scale is 80, and the maximum value of the Gaussian surround scale is 100.

[0088] In another embodiment, the updated Gaussian surround scale of the area where any pixel point is located may also be calculated by other formulas, such as not by a calculation formula combining summation and multiplication, but only by a calculation formula of summation.

[0089] In an exemplary embodiment of the present invention, defect detection of fire masks can be achieved by the following steps:

[0090] The enhanced grayscale image is subjected to threshold segmentation to detect defects of the fire mask according to the result of threshold segmentation.

[0091] Optionally, the enhanced grayscale image can be threshold segmented by using a basic global threshold processing method, or the enhanced grayscale image can be threshold segmented by using the Otsu threshold segmentation method, so as to detect the defects of the fire mask. The present embodiment does not specifically limit the selection of the threshold segmentation method. It should be noted that the process of performing threshold segmentation on an image to determine the defective area in the image is a prior art, and this embodiment will not be described in detail.

[0092] Furthermore, after the defective area is detected based on the enhanced grayscale image, the defective area can be marked and a corresponding detection report can be generated, thereby facilitating the staff to handle it in a timely manner.

[0093] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.

[0094] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

Claims

1. A fire mask defect detection method based on image recognition, characterized in that: include: Acquiring multiple pixels to be analyzed in the grayscale image of the fire mask includes: calculating the normality value of each pixel in the grayscale image; acquiring a preset normal threshold, and when the normality value of any pixel is less than the normal threshold, the pixel is used as the pixel to be analyzed, and then all the pixels to be analyzed are determined; The method for obtaining the normality value is as follows: determining a preset window of any pixel point in the grayscale image, performing surface fitting on the pixel points in the window, and calculating the fitting error of each pixel point in the window, wherein the fitting error is the difference between the actual value and the fitting value of the corresponding pixel point; and using the average value of the fitting errors of all the pixel points in the window to measure the regularity value of the grayscale value distribution of the pixel points in the window: , where is the regularity value of the grayscale value distribution of any pixel in the preset window of the grayscale image. is the side length of the preset window, For the window Line The fitting error of the pixel points of the column, For the summation symbol, The natural constant An exponential function with φ as the base; using the information entropy of the fitting errors of all pixels in the window as the credibility value of the regularity value; using the normalized value of the product of the regularity value and the credibility value as the normality value of the pixel in the grayscale image; Cluster the pixels to be analyzed to obtain multiple pixel categories, and calculate the probability value of any pixel category being a defect area: , where For the The probability value of the pixel category being a defect area, For the The average gray value of the pixels in the pixel category, For the The average gray value of the neighboring pixels of the pixel in the pixel category is For the Pixels in the pixel category, For the The neighboring pixels of the pixel in the pixel category, , Respectively The number of pixels in the pixel class and the The number of pixels in the bounding rectangle of the pixel class, is the absolute value symbol, is a hyperbolic tangent function, and the neighboring pixel points are outliers within the bounding rectangle of any pixel category; The probability value of the defect area is used as the defect performance degree of each pixel in the corresponding pixel category, and the Gaussian surround scale when the grayscale image is enhanced using the SSR algorithm is updated. The Gaussian surround scale is: , where For grayscale images The Line The updated Gaussian surround scale corresponding to the pixel position of the column, is the minimum value of the Gaussian surround scale, is the maximum value of the Gaussian surround scale, is the degree of defect performance of the pixel, The natural constant An exponential function with as the base; defect detection is performed based on the enhanced grayscale image.

2. The fire mask defect detection method based on image recognition according to claim 1 is characterized in that: The method further comprises: The defect manifestation levels of all pixels in the grayscale image except the pixel to be analyzed are set to zero.

3. The fire mask defect detection method based on image recognition according to claim 1 is characterized in that: The defect detection based on the enhanced grayscale image includes: Threshold segmentation is performed on the enhanced grayscale image to detect defects of the fire mask according to the result of the threshold segmentation.