Defect detection method for aero-engine fan blade preform

By applying the YOLOv9 network and multi-scale defect attention mechanism on the prefabricated production line of aero engine fan blades, the problem that the existing technology cannot detect defects in three-dimensional woven production lines in real time, automation and high-precision is solved, efficient and accurate defect detection is achieved, and the quality control capability of the production line is improved.

CN120070436AActive Publication Date: 2025-05-30NANJING UNIV OF AERONAUTICS & ASTRONAUTICS

Patent Information

Application Number
CN202510541631.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-05-30
Estimated Expiration
2045-04-28

AI Technical Summary

Technical Problem

The prior art cannot detect defects of carbon fiber yarns and woven prefabricated bodies in three-dimensional woven production lines in real time, automation and high precision, affecting the mechanical performance and safety of aircraft engine fan blades.

Method used

The YOLOv9 network combined with the multi-scale defect attention mechanism is used to extract the images of carbon fiber yarns and woven prefabricated bodies. The defect detection task is two subtasks: position modeling and size estimation. The candidate boxes are optimized through the significance center of gravity offset elimination mechanism to achieve high-precision detection of defect location, size and category.

Benefits of technology

Real-time, high-precision and automated detection of defects in carbon fiber yarns and woven prefabricated bodies has been achieved, and the quality control capability of the prefabricated body production line of aero engine fan blades has been significantly improved, and the strict production standards of the aviation industry have been met.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070436A_ABST
    Figure CN120070436A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of three-dimensional woven composite material detection, solves the technical problem that defects of carbon fiber yarns and woven preforms cannot be detected in real time in a three-dimensional weaving production line in a traditional method, and particularly relates to a defect detection method for an aero-engine fan blade preform. Comprising the steps of collecting an original image in real time and preprocessing the original image; performing feature extraction on the preprocessed image to obtain a multi-scale feature map containing global features and local features; and constructing a defect perception decoupling detection module for decomposing a defect detection task into two sub-tasks of position modeling and size estimation, and optimizing the initial candidate box to obtain a defect result set. According to the invention, real-time, high-precision and automatic detection of defects of carbon fiber yarns and woven preforms can be realized, the quality control capability of an aero-engine fan blade preform production line is remarkably improved, and the strict production standard of the aviation industry is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of three-dimensional braided composite material detection, and particularly to a method for detecting defects in a preform of an aero-engine fan blade. Background Art

[0002] In recent years, with the rapid development of the aerospace industry, the demand for high-strength, high-stiffness, and lightweight structural materials has become increasingly urgent. Carbon fiber composite materials are widely used in the manufacturing process of key components such as aero-engine fan blades, aircraft wings, rocket fairings, and satellite structural parts due to their excellent specific strength, specific stiffness, and fatigue resistance. Three-dimensional weaving technology has become one of the important methods for manufacturing fan blade preforms due to its good mechanical properties and structural controllability, and is widely used in the manufacturing of complex three-dimensional structural parts such as aero-engine fan blades, aero-engine casings, and composite skins. However, the interlaced structure of yarns in three-dimensional weaving technology is complex and the number of yarns is large, which easily causes defects during the conveying process such as fuzz, lint, and looseness, as well as defects during the weaving process such as knotting, broken yarns, and floating yarns. These defects seriously affect the mechanical properties and safety of components.

[0003] Currently, manual visual inspection of defects is widely used in industrial production lines. This method has low detection efficiency, and the results are greatly affected by the subjective judgment of operators, making it difficult to meet the strict requirements of the aerospace industry for high efficiency, high precision, and automated production. Therefore, it is of great practical significance and urgency to develop a real-time, automated, and high-precision defect detection technology applicable to three-dimensional weaving production lines. Summary of the Invention

[0004] Aiming at the deficiencies of the prior art, the present invention provides a method for detecting defects in a preform of an aero-engine fan blade, which solves the technical problem that traditional methods cannot perform real-time detection of carbon fiber yarns and defects in woven preforms in a three-dimensional weaving production line.

[0005] To solve the above technical problems, the present invention provides the following technical solution: A method for detecting defects in a preform of an aero-engine fan blade, the method comprising the following steps: Real-time collect the original images of the carbon fiber yarn conveying and the surface of the woven preform, and preprocess the original images to obtain clear and low-noise preprocessed images; Based on the YOLOv9 network and combined with a multi-scale defect attention mechanism, extract features from the preprocessed images to obtain a multi-scale feature map containing global features and local features; Construct a defect-aware decoupled detection module for decomposing the defect detection task into two subtasks of position modeling and size estimation, and obtain initial candidate boxes based on the multi-scale feature map ; Adopt a significant centroid offset elimination mechanism for the initial candidate bounding boxes to optimize and obtain a set of defect results , including defect position coordinates, size parameters, and class information.

[0006] Furthermore, the preprocessing of the original image includes:[[]]END]] Convert the original image into a single-channel grayscale image with a grayscale value range of 0 to 255; According to the average grayscale of the local area where the current pixel is located and the global average grayscale of the grayscale image to dynamically adjust the grayscale value of the current pixel to generate an enhanced pixel grayscale value to obtain an enhanced image ; Perform median filtering on the enhanced image to perform noise reduction processing to obtain a preprocessed image.

[0007] Furthermore, the dynamic adjustment of the grayscale value of the current pixel , the expression is: ; wherein, is the maximum grayscale value within the local window; is a positive enhancement adjustment factor used to control the enhancement intensity; , that is, when the local area brightness is lower than the overall, the brightness of the dark area is enhanced through the logarithmic function, making the defects hidden in the low-grayscale background more prominent; , that is, when the local and overall brightness is the same, the grayscale value remains unchanged; , that is, when the local area brightness is higher than the overall, the grayscale range of the highlighted pixels is compressed to make the light-colored defects more easily recognizable.

[0008] Furthermore, the multi-scale defect attention mechanism is: The channel attention part first performs a global average pooling operation on the spatial region of each channel to extract the channel-level response intensity, and the calculation formula is as follows: ; wherein, represents the response value of the th channel at the pixel position ; respectively represent the height and width of the feature map ; represents the The global average response value of each channel, which serves as the basis for the channel attention weight; Then, the calculated global average response value of each channel is input into an attention generation network composed of two fully connected layers. The network structure sequentially includes: A dimensionality reduction fully connected layer with a size of , and the ReLU activation function is used. is the dimensionality reduction ratio, is the number of channels of the fully connected layer; An upsampling fully connected layer with a size of , and the channel attention weight vector is generated through activation by the Sigmoid function, that is: ; Among them, and are the weights of the dimensionality reduction and upsampling fully connected layers respectively; and are the corresponding biases; is the ReLU activation function; is the Sigmoid activation function; Finally, the generated channel attention weight vector is used to perform per-channel feature recalibration on each channel in the network feature map , that is: ; Among them, is the multi-scale feature map enhanced by the channel attention mechanism; is the feature map of the th channel.

[0009] Furthermore, the defect perception decoupling detection module outputs the initial candidate box , including: The position prediction subtask, which builds a center probability heat map representing the confidence of each pixel as the center of the defect based on the multi-scale feature map, and uses the Sigmoid cross-entropy loss function with positive and negative sample balance factors during the training phase to obtain the predicted defect center point and the predicted size ; The size estimation subtask constructs a size regression network separately for the predicted defect center position. The network outputs the width and height of each predicted defect center point, and uses the loss function to optimize the regression error of the predicted size . The expression of the loss function is: ; Among them, and are the width and height of the th real defect respectively; and are the width and height predicted by the center probability heat map ; is the regression loss of the size estimation subtask; is the total number of valid candidate defect center points; During the network inference stage, perform a local maximum extraction operation on the center probability heat map to obtain the set of predicted defect center points; For the position of each predicted defect center point, read its predicted width and height in the corresponding center probability heat map to form the initial candidate bounding box .

[0010] Furthermore, the expression of the loss function is: ; Among them, is the true label of the pixel ; is the heat map response value of the pixel , representing the defect center confidence; is the Sigmoid function; is the foreground balance coefficient; is the total number of pixels participating in supervision.

[0011] Furthermore, the optimization of the initial candidate bounding box includes: Confidence focusing weight calculation, introducing the confidence focusing weight for extracting the center heat map peak in the center probability heat map to evaluate the significance and confidence strength of the initial candidate bounding box. The expression is: ; Among them, is the heat map response value of the pixel , representing the defect center confidence; is the size response value corresponding to the pixel , enhancing the weight of significant center points; is the size enhancement factor, a positive real number, controlling the significance amplification; Calculation of geometric distance penalty term. Based on the traditional non-maximum suppression algorithm, a geometric distance penalty term is introduced to avoid duplicate pseudo-boxes caused by the deviation of the centroid. , and the expression is: ; Among them, and are the center point positions of the initial candidate boxes and ; is the Euclidean distance between the center point positions and ; is the intersection over union (IoU) between the initial candidate boxes and ; is the geometric penalty distance, which is used to dynamically adjust the retention order of overlapping boxes in the non-maximum suppression algorithm; Optimization and screening of candidate boxes. All candidate boxes are initially sorted according to the confidence focus weight , and then the geometric distance penalty term is used to dynamically adjust the sorting order of the candidate boxes; Generation of the defect result set , which includes the center position coordinates of each defect, the predicted size of each defect, as well as the corresponding defect category information and comprehensive confidence score .

[0012] Furthermore, in the optimization and screening of the candidate boxes, it includes: First, retain the candidate box with the highest confidence focus weight ; Gradually check the geometric distance penalty term between the candidate box with the second-highest weight and the retained boxes. If there is a relatively high penalty value and the intersection over union is higher than the threshold, then discard this candidate box; Loop through the above steps until all candidate boxes are evaluated, and obtain the finally optimized defect result set .

[0013] By means of the above technical solutions, the present invention provides a method for detecting defects in an aero-engine fan blade preform, which has at least the following beneficial effects: 1. The present invention can achieve real-time, high-precision, and automated detection of defects in carbon fiber yarns and woven preforms, significantly improving the quality control ability of the aero-engine fan blade preform production line and meeting the strict production standards of the aviation industry.

[0014] 2. Through precise image acquisition, efficient image preprocessing, and the precise design and optimization of deep learning algorithms, the present invention realizes automated, real-time, and high-precision defect detection, significantly improving the detection efficiency and quality assurance of the carbon fiber woven blade preform production line. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The drawings described herein are used to provide a further understanding of the present application, form a part of the present application, and the illustrative embodiments and descriptions thereof are used to explain the present application without unduly limiting the present application. In the drawings: Figure 1 is a flowchart of the defect detection method in the present invention; Figure 2 is a schematic diagram of the erection positions of the yarn defect real-time detection device and the preform defect real-time detection device in the present invention; Figure 3 is a network structure diagram of the preform defect detection model with multi-scale feature fusion in the present invention; Figure 4 is a network structure diagram of the multi-scale defect attention mechanism in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0016] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the drawings and specific embodiments. Thereby, a full understanding of how the present application uses technical means to solve technical problems and achieve technical effects can be obtained and implemented accordingly.

[0017] This embodiment proposes a defect detection method for an aeroengine fan blade preform, which uses a defect detection algorithm for real-time identification. Among them, a multi-scale defect attention mechanism is integrated to improve the identification performance of small-scale defects, and a feature reconstruction detection head and loss function dedicated to yarn and preform defect detection are designed to further improve the defect localization and classification accuracy. High-precision, high-real-time, and automated defect detection is achieved, meeting the requirements of the aviation industrial production line. As Figure 1 shown, the method includes the following steps: S1. Design and erect a high-precision image acquisition device to collect the original images of the carbon fiber yarn conveying and the surface of the woven preform in real time, and preprocess the original images to obtain clear and low-noise preprocessed images. In this embodiment, a high-precision image acquisition device is erected at the designated detection positions of the carbon fiber yarn conveying device and the weaving equipment, as Figure 2 shown. It includes an industrial camera, a high-resolution lens, a multi-light source lighting device, and a multi-degree-of-freedom adjustment bracket, which are used to obtain high-resolution surface images generated during the carbon fiber yarn conveying and preform weaving processes in real time. The specific process of preprocessing the original images includes the following steps: S11. Convert the original image into a single-channel grayscale image with a grayscale value range of 0 to 255. There are several common grayscale conversion methods, such as the average method, weighted average method, or using existing library functions.

[0018] S12. To enhance the contrast between the defect area and the background and strengthen the image detail information, the adopted image enhancement method is based on an adaptive contrast enhancement model of local and global grayscale differences. Its core idea is: according to the average grayscale of the local area where the current pixel is located and the global average grayscale of the grayscale image to dynamically adjust the grayscale value of the current pixel to generate the enhanced pixel grayscale value to obtain the enhanced image . This method has the advantages of strong adaptability, significant non-linear enhancement effect, and strong ability to adapt to light changes, and is particularly suitable for enhancing the saliency of tiny defect features in yarn and woven preform images. The specific form of its enhancement function is as follows: ; where, is the maximum grayscale value within the local window; is a positive enhancement adjustment factor used to control the enhancement intensity. According to different grayscale distribution relationships, the enhancement strategies are as follows: , that is, when the local area brightness is lower than the overall, enhance the brightness of the dark area through the logarithmic function to make the defects hidden in the low-grayscale background more prominent; , that is, when the local and overall brightness are the same, keep the grayscale value unchanged; , that is, when the local area brightness is higher than the overall, compress the grayscale range of the highlighted pixels to make light-colored defects (such as floating yarns, broken yarns) more easily identifiable.

[0019] S13. Perform noise reduction processing on the enhanced image using median filtering to obtain the preprocessed image. In this embodiment, an adaptive local grayscale contrast enhancement and noise reduction method is used to preprocess the original image to obtain a clear and low-noise preprocessed image, which can further reduce noise interference and ensure that the defect features are prominent and clear.

[0020] S2. Based on the YOLOv9 network and combined with a multi-scale defect attention mechanism, extract features from the preprocessed image to obtain a multi-scale feature map containing global and local features. The network structure is shown in Figure 3(a), Figure 3The solid line represents the feature transfer direction, and the dashed line represents the cross-scale feature fusion path. Specifically, the YOLOv9 network structure adopted in this embodiment includes a backbone network, a feature pyramid network, and three feature output layers at different scales. The backbone network consists of multiple convolutional layers and C2f feature extraction modules, which are responsible for gradually extracting high-level features from the original image and generating three feature maps denoted as , , ( For small defects such as yarn breakage or preform breakage, For larger defects such as yarn fluff or preform knotting), their spatial resolutions correspond to 1 / 8, 1 / 16, and 1 / 32 of the original image respectively. These multi-scale feature maps are used for subsequent defect feature analysis.

[0021] In this embodiment, the YOLOv9 network structure is used as the basic architecture, and a multi-scale defect attention mechanism is combined to improve the feature extraction efficiency and sensitivity to small-scale defects. The integrated multi-scale defect attention mechanism, and the multi-scale defect attention mechanism specifically includes a channel attention module. The network structure is shown in Figure 4. Its purpose is to highlight the channel information sensitive to defects in the feature map and suppress the interference of unimportant background features. Specifically as follows: Extract global features and local features on the network feature map , and perform a weighting operation on each channel in the feature map to enhance the feature expression related to defects. The channel attention part first performs a global average pooling operation on the spatial region of each channel to extract the channel-level response intensity. The calculation formula is as follows: ; Among them, represents the response value of the th channel at the pixel position ; respectively represent the height and width of the feature map ; represents the global average response value of the th channel, which is used as the basis for the channel attention weight. This mechanism calculates the global average response value of each channel, dynamically measures the sensitivity of different channels to defect features, and assigns higher weights to high-response channels in subsequent feature fusion, so as to highlight defect features, suppress redundant background information, and improve the recognition accuracy and robustness of small-scale defects.

[0022] Then, the calculated global average response value of each channel is input into the attention generation network composed of two fully connected layers. The network structure includes in turn: A size of The dimensionality reduction fully connected layer (where is the dimensionality reduction ratio, is the number of channels of the fully connected layer, and in this embodiment, is taken), and the ReLU activation function is used.

[0023] A dimensionality increase fully connected layer with a size of is used, and the channel attention weight vector is generated through activation by the Sigmoid function, that is: ; Among them, and are the weights of the dimensionality reduction and dimensionality increase fully connected layers respectively; and are the corresponding biases; is the ReLU activation function; is the Sigmoid activation function; Finally, the generated channel attention weight vector is used to perform per-channel feature recalibration on each channel in the network feature map , that is: ; Among them, is the multi-scale feature map enhanced by the channel attention mechanism; is the feature map of the th channel.

[0024] The specific implementation details of the above multi-scale defect attention mechanism are as shown in Figure 4 , including a feature division module, a 1×1 branch and a 3×3 branch module, and a cross-space learning module. Specific dimensional information and operation processes are marked for each part in the figure.

[0025] S3. A defect-aware decoupled detection module for decomposing the defect detection task into two subtasks of position modeling and size estimation is constructed, and the network structure is as shown in (b) in Figure 3 . And the initial candidate boxes , and then a multi-scale guidance mechanism is adopted to fuse features, improving the accuracy of defect localization and classification. To further improve the defect detection accuracy, the present invention introduces a defect-aware decoupled detection module based on the traditional YOLOv9 network, decomposes the localization and classification tasks into two subtasks of center point prediction and size estimation, and then adopts a multi-scale guidance mechanism to fuse features, effectively avoiding the mutual interference between the two, and significantly improving the defect localization and classification accuracy. Therefore, based on the multi-scale feature maps extracted by the YOLOv9 network, the present invention designs a defect-aware decoupled detection module, whose structure includes a position prediction branch, a size estimation branch, and an attention feature fusion unit. The attention feature fusion unit integrates local spatial and context information through a residual attention structure, avoids task interference, and improves the convergence efficiency of size prediction.

[0026] S31. Position prediction subtask: Based on the multi-scale feature maps, a central probability heat map representing the confidence of each pixel as the center of the defect is established , and a Sigmoid cross-entropy loss function with positive and negative sample balance factors is adopted in the training stage to obtain the predicted defect center points and the predicted sizes . The expression of the loss function is: ; where is the true label of pixel ; is the pixel 's heat map response value, representing the confidence of the defect center; is the Sigmoid function; is the foreground balance coefficient; is the total number of pixels participating in supervision; S32. Size estimation subtask: A size regression network is separately constructed for the predicted defect center positions, and the network outputs the width and height of each predicted defect center point. The loss function is used to optimize the regression error of the predicted size . The expression of the loss function is: ; where , are respectively the width and height of the th true defect; , are the width and height predicted by the central probability heat map ; is the regression loss of the size estimation subtask; is the total number of valid candidate defect center points; S33. During the network inference stage, for the center probability heat map perform a local maximum extraction operation to obtain a set of predicted defect center points ; S34. For the position of each predicted defect center point, read its predicted width and height in the corresponding center probability heat map to form an initial candidate bounding box for subsequent post - processing procedures.

[0027] S4. Use a saliency center - of - gravity offset elimination mechanism to optimize the initial candidate bounding box to obtain a set of defect results . The network structure is shown in (c) of Figure 3, including defect position coordinates, size parameters, and class information. Use a saliency center - of - gravity offset elimination mechanism combined with a distance - guided non - maximum suppression algorithm to optimize the initial candidate bounding box to effectively eliminate overlapping candidate bounding boxes and false detection bounding boxes. The specific steps are as follows: S41. Confidence focus weight calculation. Introduce a confidence focus weight for extracting the peak of the center heat map in the center probability heat map to evaluate the saliency and confidence strength of the initial candidate bounding box. The expression is: ; where, is the heat map response value of pixel , representing the defect center confidence; is the size response value corresponding to pixel to enhance the weight of the significant center point; is the size enhancement factor, a positive real number, controlling the saliency amplification; Through this step, the weight of the defect center with a larger size or more obvious is significantly increased, and the background noise interference is reduced; S42. Geometric distance penalty term calculation. To avoid the repetition of pseudo - bounding boxes caused by the deviation of the predicted center, based on the traditional non - maximum suppression algorithm, introduce a geometric distance penalty term to avoid the repetition of pseudo - bounding boxes caused by the deviation of the center of gravity. The expression is: ; where, , are the center point positions of the initial candidate bounding box and ; is the center point position , the Euclidean distance between; ​is the initial candidate box and the intersection over union ratio; is the geometric penalty distance, which is used to dynamically adjust the retention order of overlapping boxes in the non-maximum suppression algorithm; S43. Optimization and screening of candidate boxes. All candidate boxes are initially sorted according to the confidence focus weight and then the geometric distance penalty term is used to dynamically adjust the sorting order of candidate boxes. The specific process is as follows: First, retain the candidate box with the highest confidence focus weight ; Gradually check the geometric distance penalty term between the candidate box with the second-highest weight and the retained boxes. If there is a relatively high penalty value and the intersection over union ratio is higher than the threshold, discard the candidate box; Repeat the above steps until all candidate boxes are evaluated to obtain the final optimized set of defect results ; S44. Generation of the set of defect results. After the above optimization steps, the final set of defect results is output, which specifically includes the central position coordinates of each defect , the predicted size of each defect , and the corresponding defect category information and comprehensive confidence score . The set is defined as follows: ; where is the total number of defects detected after optimization.

[0028] S5. The detection module finally outputs the optimized set of defect results , which specifically includes the following structured information to ensure the clarity and traceability of the quality inspection results: (1) Defect location coordinates , which are defined as the significant response peak positions corresponding to the defects in the central probability heat map , indicating the specific center point positions of the defects in the image.

[0029] (2) Defect size estimation information , which is the predicted width and height directly output by the feature regression network in the size estimation subtask, used to clearly identify the spatial range of each defect.

[0030] (3) Defect category information , the type of each defect is identified through a pre-trained classification network, and the specific categories include, but are not limited to, common defect types in the production of woven preforms for aero-engine fan blades, such as hairiness, lint balls, looseness, knotting, broken yarns, floating yarns, etc.

[0031] (4) Confidence score : Comprehensive index Combines the central probability heatmap response value and the size estimation significance response value , and is used to objectively evaluate the reliability and significance of each defect prediction result. Its calculation formula is as follows: ; Wherein, is the weight coefficient, which is used to adjust the contribution ratio of the central response value and the size response value, and the range is from 0 to 1; represents the maximum value of all size response values in the current detection batch to ensure the unity of the scale.

[0032] (5) Automatically archived structured detection log: The detection log automatically records all structured data of this detection task, including: total number of defect statistics, defect spatial distribution heatmap, maximum and minimum defect size statistics, prediction error statistics, category distribution statistics, and supports historical data query and production process optimization feedback.

[0033] The present invention can realize real-time, high-precision, and automated detection of carbon fiber yarn and woven preform defects, significantly improving the quality control ability of the aero-engine fan blade preform production line and meeting the strict production standards of the aviation industry.

[0034] Those of ordinary skill in the art can understand that all or part of the steps in implementing the above embodiment methods can be completed by instructing relevant hardware through a program. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0035] The above embodiments have introduced the present invention in detail. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A defect detection method for an aircraft engine fan blade preform, characterized in that: The method comprises the following steps: The original images of carbon fiber yarn delivery and woven preform surface are collected in real time, and the original images are preprocessed to obtain clear and low-noise preprocessed images; Based on the YOLOv9 network and combined with the multi-scale defect attention mechanism, feature extraction is performed on the preprocessed image to obtain a multi-scale feature map containing global features and local features; Construct a defect-aware decoupled detection module to decompose the defect detection task into two subtasks: position modeling and size estimation, and obtain the initial candidate box based on the multi-scale feature map ; The initial candidate box is resized using a saliency center offset elimination mechanism. Optimize to obtain defect result set , including defect location coordinates, size parameters and category information.

2. The defect detection method according to claim 1, characterized in that: The preprocessing of the original image comprises: Convert the original image to a single-channel grayscale image with a grayscale value range of 0 to 255; According to the average grayscale of the local area where the current pixel is located The global average grayscale of the grayscale image The relationship between the current pixel and the gray value is dynamically adjusted. , generate enhanced pixel gray value Get enhanced image ; To enhance the image The median filter is used to perform noise reduction to obtain the preprocessed image.

3. The defect detection method according to claim 2, characterized in that: The dynamic adjustment of the gray value of the current pixel , the expression is: ; in, is the maximum gray value in the local window; is a positive enhancement adjustment factor used to control the enhancement intensity; , that is, when the brightness of the local area is lower than the overall brightness, the brightness of the dark area is enhanced through the logarithmic function, making the defects hidden in the low gray background more prominent; , that is, when the local brightness is consistent with the overall brightness, the gray value remains unchanged; That is, when the brightness of a local area is higher than the overall brightness, light-colored defects are easier to identify by compressing the grayscale range of highlighted pixels.

4. The defect detection method according to claim 1, characterized in that: The multi-scale defect attention mechanism is: The channel attention part first performs a global average pooling operation on the spatial region of each channel to extract the channel-level response strength. The calculation formula is as follows: ; in, Indicates Channels at pixel locations The response value at Represents the feature maps height and width; Indicates The global average response value of the channels is used as the basis for the channel attention weights; Then, the global average response value of each channel is calculated Input is fed into an attention generation network consisting of two fully connected layers, which in turn includes: A size of The dimension reduction fully connected layer uses the ReLU activation function. is the dimensionality reduction ratio, is the channel of the fully connected layer; A size of The dimension-upgrading fully connected layer is activated by the Sigmoid function to generate the channel attention weight vector ,Right now: ; in, and are the weights of the dimension reduction and dimension increase fully connected layers respectively; and is the corresponding bias; is the ReLU activation function; is the Sigmoid activation function; Finally, using the generated channel attention weight vector Network feature graph Each channel in the is recalibrated channel by channel, that is: ; in, It is a multi-scale feature map enhanced by the channel attention mechanism; For the The feature map of each channel.

5. The defect detection method according to claim 1, characterized in that: The defect-aware decoupling detection module outputs the initial candidate box ,include: The location prediction subtask is to build a center probability heat map based on the multi-scale feature map to represent the confidence level of each pixel as the defect center. , and the Sigmoid cross entropy loss function with positive and negative sample balance factor is used in the training stage , to obtain the predicted defect center point and predicted size ; For the size estimation subtask, a size regression network is constructed for the predicted defect center position. The network outputs the width and height of each predicted defect center point, using the loss function Forecast size Perform regression error optimization, loss function The expression is: ; in, , Respectively The width and height of a real defect; , Center probability heat map Predicted width and height; Regression loss for the size estimation subtask; is the total number of valid candidate defect center points; In the network inference stage, the center probability heat map Perform local maximum extraction operations to obtain the predicted defect center point set ; For each predicted defect center point, in the corresponding center probability heat map Read its predicted width in and height Constructing the initial candidate box .

6. The defect detection method according to claim 5, characterized in that: The loss function The expression is: ; in, Pixel The true label of Pixel The heat map response value of represents the confidence of the defect center; is the Sigmoid function; is the prospect balance coefficient; is the total number of pixels involved in supervision.

7. The defect detection method according to claim 1, characterized in that: The initial candidate box Optimizations include: Confidence focus weight calculation, in the center probability heat map The confidence focus weight for extracting the center heatmap peak is introduced in , used to evaluate the saliency and confidence of the initial candidate box, the expression is: ; in, Pixel The heat map response value of represents the confidence of the defect center; Pixel The corresponding size response value increases the weight of significant center points; is the size enhancement factor, a positive real number, which controls the significance amplification; Geometric distance penalty term calculation: Based on the traditional non-maximum suppression algorithm, a geometric distance penalty term is introduced to avoid the center of gravity deviation and pseudo-frame duplication. , the expression is: ; in, , is the initial candidate box and The center point position; Center point position , The Euclidean distance between is the initial candidate box and The intersection-and-union ratio between them; It is the geometric penalty distance, which is used to dynamically adjust the retention order of overlapping boxes in the non-maximum suppression algorithm; Candidate box optimization and screening, all candidate boxes are focused according to the confidence weight Perform a preliminary sort and then use the geometric distance penalty Dynamically adjust the sorting order of candidate boxes; Defect Result Collection The generation of the center position coordinates of each defect , the predicted size of each defect , and the corresponding defect category information and comprehensive confidence score .

8. The defect detection method according to claim 7, characterized in that: The candidate box optimization and screening includes: First, keep the confidence focus right The candidate box with the highest weight; Step by step, check the geometric distance penalty between the second highest weighted candidate box and the retained box. , if there is a high penalty value and the intersection-union ratio is higher than the threshold, the candidate box is discarded; The above steps are repeated until all candidate boxes are evaluated and the final optimized defect result set is obtained. .

Citation Information

Patent Citations

  • Ship small target detection method based on remote sensing image pixel-by-pixel processing

    CN116758411A

  • Textile fabric product defect detection method and system

    CN119290896A

  • Improved sewer internal defect detection method and system based on YOLOv11

    CN119540725A

  • Defect detection method for high-power LED module packaging and related equipment

    CN119831996A

  • Method for detecting infrared ship target based on improved yolov7

    US20250078541A1

Cited By

  • Anode carbon block cleaning method and system based on image recognition

    CN120612312A

  • OLED module terminal injection molding packaging defect detection method, system, medium and equipment

    CN121391738A