An aeronautical composite material skin infrared defect segmentation method and system

By constructing a CBD-U-Net network and combining convolutional block attention modules and multi-scale deep supervision strategies, the problem of inaccurate segmentation of small-sized, low-contrast defects in infrared thermal imaging was solved, and high-precision automated defect segmentation was achieved.

CN123181484APending Publication Date: 2026-11-27CIVIL AVIATION UNIV OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611423692.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-14
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing infrared thermal imaging detection methods struggle to accurately segment small-sized, low-contrast, and blurred-boundary defects in aerospace composite materials, leading to issues such as missed detections, boundary misalignment, and incomplete contours.

Method used

An improved U-Net segmentation network, CBD-U-Net, is constructed by integrating the convolutional block attention module (CBAM), boundary-aware loss, and multi-scale deep supervision-assisted training strategy. By introducing the CBAM module into the encoder and decoder, and combining region segmentation loss, boundary-aware loss, and deep supervision-assisted loss, the defect segmentation process is optimized.

Benefits of technology

It improves the accuracy and completeness of defect segmentation, and can automatically output defect segmentation masks and boundary contours, reducing the workload of manual annotation and improving the consistency and efficiency of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123181484A_ABST
    Figure CN123181484A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of aviation composite material nondestructive testing, infrared thermal imaging image processing and deep learning semantic segmentation, and discloses an aviation composite material skin infrared defect segmentation method and system. An infrared thermal image is acquired and a defect real mask is established; the infrared thermal image and the mask are preprocessed and a data set is divided; an improved U-Net network fusing CBAM is constructed, denoted as CBD-U-Net network; the network is trained by using a total loss function composed of a region segmentation loss, a boundary perception loss and a deep supervision auxiliary loss; the infrared thermal image to be tested is input into the trained network, a defect prediction probability map is output, and a defect segmentation mask and a boundary contour result are obtained accordingly. The present application enhances the feature expression capability of the network to the key defect region, improves the positioning accuracy and segmentation integrity of the defect contour boundary, and realizes the automatic and high-precision segmentation of the infrared thermal image of the internal defects of the aircraft composite material skin.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of non-destructive testing of aerospace composite materials, infrared thermal imaging image processing, and deep learning semantic segmentation. It relates to a method and system for segmenting infrared defects in aerospace composite material skin, and more particularly to a CBD-U-Net method and system for accurately segmenting small-sized, low-contrast, and blurred-boundary defects in infrared thermal images of aerospace composite material skin. Background Technology

[0002] Carbon fiber reinforced polymer composites possess high specific strength, high specific modulus, good fatigue resistance, and strong design flexibility, and have been widely used in aircraft wings, fuselage skins, and other aerospace load-bearing structures. During the manufacturing, assembly, and service of composite components, defects such as delamination, debonding, and porosity may form within the material due to factors such as layup deviations, curing process fluctuations, foreign object impacts, fatigue loads, and environmental corrosion. Since these defects are usually located inside the component, they are difficult to detect visually in the early stages. Failure to promptly and accurately determine the location and boundaries of the defects may lead to a decrease in the component's load-bearing capacity and structural integrity, and affect the continued airworthiness and safety of the aircraft.

[0003] Infrared thermal imaging detection utilizes the difference in thermal conductivity between defective and normal areas to identify internal anomalies by recording changes in the surface temperature field of a component over time. It offers advantages such as non-contact operation, high detection speed, large coverage area, and ease of automation. Existing infrared defect identification methods mainly include manual interpretation, defect extraction methods based on temperature thresholds or image processing, defect localization methods based on target detection networks, and pixel-level defect segmentation methods based on semantic segmentation networks. Among these, manual interpretation relies on the experience of the inspector, making the results susceptible to subjective influences. Traditional image processing methods based on fixed thresholds, edge detection, or region growing are sensitive to thresholds and preprocessing parameters, making it difficult to adapt to temperature field changes under different specimens, heating conditions, and defect depths. Target detection networks primarily output defect bounding boxes, failing to directly reflect the precise shape and boundaries of the defect. While ordinary semantic segmentation networks can output pixel-level defect regions, they are prone to missed segmentation, over-segmentation, and boundary misalignment under low contrast and blurred boundary conditions.

[0004] The aforementioned problems are primarily related to the physical imaging characteristics of infrared thermography. As heat propagates within and on the surface of composite materials, it undergoes lateral thermal diffusion, causing the surface temperature anomaly region corresponding to the actual defect to expand outwards. This results in a discrepancy between the thermal anomaly boundary shown in the infrared thermographic image and the actual defect boundary. As the defect burial depth increases or the defect size decreases, the surface temperature difference caused by the defect further weakens, reducing the grayscale or temperature contrast between the defect area and the normal background.

[0005] Existing methods based on object detection or ordinary segmentation networks can often only provide target boxes, rough regions, or overall outlines. They are insufficient in depicting the edges of defects in fine layers, boundary adhesion, and complex backgrounds, and still have problems such as missed detections, boundary burrs, and incomplete outlines.

[0006] Based on the above analysis, the problems and shortcomings of the existing technology are as follows:

[0007] (1) The defect response in infrared thermography is easily affected by lateral thermal diffusion, uneven heating, surface emissivity differences and imaging noise. The contrast between the defect area and the background area is low, and thermal response similar to that of real defects may occur.

[0008] (2) Ordinary segmentation networks are prone to losing the location and edge details of small defects during continuous downsampling, and lack effective screening of defect features and background redundancy features, resulting in the omission of segmentation of small-sized, low-contrast defects.

[0009] (3) Existing regional segmentation loss mainly constrains the overall overlap relationship between the predicted region and the real region, but lacks direct constraints on the location and contour structure of the defect boundary, which easily leads to boundary burrs, boundary offset, adhesion of adjacent defects and local over-segmentation.

[0010] (4) When supervision is applied only to the final output layer of the network, the optimization signal of the intermediate decoding layer is insufficient, which is not conducive to the stepwise recovery of multi-scale defect semantic information and spatial details, and affects the training stability of the network and the segmentation integrity of complex defects. Summary of the Invention

[0011] To overcome the shortcomings of existing infrared defect segmentation techniques for aerospace composite skins, such as insufficient extraction of small-sized, low-contrast defect features, inaccurate defect boundary localization, and incomplete contours, this invention provides a method and system for infrared defect segmentation of aerospace composite skins. This method constructs an improved U-Net segmentation network, denoted as CBD-U-Net, which integrates a convolutional block attention module (CBAM), boundary-aware loss, and a multi-scale deep supervised training strategy. The technical solution is as follows:

[0012] The core technical idea of ​​this invention is as follows: First, acquire infrared thermal imaging images of simulated aircraft composite skin or composite laminate specimens and establish corresponding realistic defect masks; second, preprocess and partition the infrared thermal images and masks; third, construct an improved U-Net segmentation network incorporating the CBAM attention mechanism, denoted as the CBD-U-Net network; then, train the network using a total loss function composed of region segmentation loss, boundary awareness loss, and deep supervision auxiliary loss; finally, input the infrared thermal image to be detected into the trained CBD-U-Net network, output a defect prediction probability map, and obtain the defect segmentation mask and boundary contour results based on the defect prediction probability map. This invention improves U-Net from three aspects: feature enhancement, boundary constraint, and training optimization. This includes introducing CBAM into the contraction path, expansion path, and bottleneck layer, improving the boundary awareness loss, and introducing a deep supervision strategy during the training phase.

[0013] This invention is implemented as follows: a method for infrared defect segmentation of aerospace composite material skin, comprising the following steps:

[0014] S1. Acquire an infrared thermal imaging image of the aerospace composite material skin and establish a defect reality mask corresponding to the infrared thermal imaging image;

[0015] S2. Perform size unification and normalization preprocessing on the infrared thermal imaging image and the defect real mask, and divide the preprocessed data into training set, validation set and test set.

[0016] S3. Construct an improved U-Net segmentation network that integrates the convolutional block attention module CBAM, denoted as CBD-U-Net network;

[0017] S4. The CBD-U-Net network is trained using a total loss function composed of region segmentation loss, boundary-aware loss, and deep supervision-assisted loss.

[0018] S5. Input the infrared thermal image of the aerospace composite skin to be detected into the trained CBD-U-Net network, output the defect prediction probability map, and obtain the defect segmentation mask and boundary contour results based on the defect prediction probability map.

[0019] In step S2, the infrared thermal imaging image and the defect reality mask are uniformly adjusted to a preset input size, the infrared thermal imaging image is uniformly converted into a three-channel input, and the pixel values ​​of the infrared thermal image are normalized; the defect area is marked as 1 and the background area is marked as 0 to form a binary mask; one or more enhancement operations are performed on the data, including random flipping, rotation, cropping, brightness perturbation, contrast adjustment, or noise perturbation.

[0020] In step S3, the CBD-U-Net network is based on the U-Net framework and includes an encoder, a bottleneck layer, a decoder, and a skip connection structure. The encoder is used to extract multi-level semantic features from infrared thermal images. The bottleneck layer is used to further extract and characterize the deep semantic features output by the encoder and provide deep feature input for feature recovery of the decoder. The decoder is used to recover spatial resolution step by step and output defect segmentation results. The skip connection is used to fuse shallow spatial details and deep semantic information.

[0021] Convolutional Block Attention (CBAM) modules are introduced after the shrinking path of the encoder, the expanding path of the decoder, and the dual convolutional blocks at each stage of the bottleneck layer.

[0022] The dual convolutional block adopts The structure is repeated twice: convolution-batch normalization-ReLU activation.

[0023] Furthermore, the Convolutional Block Attention (CBAM) module includes a channel attention branch and a spatial attention branch, which are used to filter and recalibrate features in the channel dimension and the spatial dimension.

[0024] The channel attention branch is used to filter and enhance feature channels related to defects, and suppress redundant channels related to background, noise and thermal diffusion pseudo-response.

[0025] The spatial attention branch is used to highlight the defect area and edge area in the spatial dimension;

[0026] The CBAM introduced in the shrinkage path is used to enhance the extraction capability of defect semantic features and weak texture features, so that the network retains information of small defects and low-contrast defects during downsampling.

[0027] The CBAM introduced in the expansion path is used to enhance the feature recovery capability in the decoding stage and compensate for defective edge details when restoring spatial resolution;

[0028] The CBAM introduced in the bottleneck layer is used to filter global high-level semantic features, retain global semantic information related to defects, and suppress irrelevant responses in the infrared thermal image background.

[0029] In step S4, the region segmentation loss is determined by the defect prediction probability map. Compared to real masks The BCE loss and Dice loss together constitute the total loss between them;

[0030] The defect prediction probability map Obtained through the following method: decoder output... Convolution mapping for prediction ,pass The function yields a probability map of defect prediction. The expression is:

[0031]

[0032] In the formula, It is the Sigmoid activation function. For decoder output logits after convolution mapping;

[0033] The region segmentation loss is expressed as:

[0034]

[0035] In the formula, This is the region segmentation loss, used to represent the overlap between the constrained predicted region and the real region. The binary cross-entropy loss is the difference between the defect prediction probability map and the actual mask. The Dice loss is the difference between the defect prediction probability map and the actual mask.

[0036] Furthermore, the boundary-aware loss is obtained by: analyzing the defect prediction probability map. and real mask By applying morphological gradient operators respectively, the predicted boundaries are obtained. and the true boundary The expression is:

[0037]

[0038]

[0039] In the formula, For morphological gradient operators;

[0040] Calculate the boundary-aware loss in the form of binary cross-entropy between the predicted boundary and the true boundary. :

[0041]

[0042] in, Used to enhance the learning of the boundary region of the defect profile.

[0043] Furthermore, the deep supervision auxiliary loss is obtained by connecting it to the output features of multiple levels of the decoder in the following manner: Convolution maps features at each level to segmentation predictions at the corresponding scale; it then upsamples the predictions at each scale to the input image resolution, and compares them with the ground truth mask. Calculate the auxiliary segmentation loss; sum the auxiliary losses from different levels according to preset weights to form a deep supervised auxiliary training term. The expression is:

[0044]

[0045] In the formula, To output the total number of levels for in-depth supervision, For the first The corresponding weights of each auxiliary loss, For the first The auxiliary loss of the deep supervision output.

[0046] Furthermore, the total loss function is expressed as:

[0047]

[0048] In the formula, For total training losses, The boundary-aware loss weights are preferably set between 0.1 and 1.0. The weighting coefficient for deep supervision auxiliary loss is preferably set between 0.1 and 0.5.

[0049] Training the CBD-U-Net network includes: taking the preprocessed infrared thermal imaging image as input, using the defect real mask as a supervision label, and performing end-to-end training on the CBD-U-Net network;

[0050] The end-to-end training includes: obtaining a defect prediction probability map and auxiliary prediction results at each scale through forward propagation; calculating region segmentation loss, boundary awareness loss, and deep supervision auxiliary loss based on the defect reality mask; and updating the parameters of the CBD-U-Net network through backpropagation.

[0051] In step S5, obtaining the defect segmentation mask and boundary contour results based on the defect prediction probability map includes: performing binarization processing on the defect prediction probability map according to a preset threshold to obtain the defect segmentation mask; and performing post-processing on the defect segmentation mask to obtain the boundary contour results.

[0052] The post-processing includes one or more of the following: connected component analysis, contour extraction, hole filling, small noise region removal, and boundary smoothing.

[0053] Another object of the present invention is to provide an infrared defect segmentation system for aerospace composite skin, the system being used to perform the aforementioned infrared defect segmentation method for aerospace composite skin, the system comprising:

[0054] The image acquisition module is used to acquire infrared thermal imaging images of aerospace composite material skin and establish a defect reality mask corresponding to the infrared thermal imaging images;

[0055] The preprocessing module is used to perform size unification and normalization preprocessing on the infrared thermal imaging image and the defect real mask, and divide the preprocessed data into training set, validation set and test set;

[0056] The network building module is used to build an improved U-Net segmentation network that incorporates the convolutional block attention module CBAM, denoted as CBD-U-Net network;

[0057] The network training module is used to train the CBD-U-Net network using a total loss function composed of region segmentation loss, boundary-aware loss, and deep supervision-assisted loss.

[0058] The inference output module is used to input the infrared thermal image of the aerospace composite skin to be detected into the trained CBD-U-Net network, output a defect prediction probability map, and obtain the defect segmentation mask and boundary contour results based on the defect prediction probability map.

[0059] Combining all the above technical solutions, the beneficial effects of this invention are as follows:

[0060] First, this invention suppresses redundant responses caused by infrared background noise and thermal diffusion through an attention mechanism, highlighting key defect areas. It improves defect contour integrity, edge fit, and training stability through boundary-aware loss and deep supervised training. This invention provides an intelligent method for infrared nondestructive testing of aerospace composite materials, automatically outputting defect segmentation masks and contour results, thus improving the segmentation accuracy of minute defects and blurred-boundary defects in infrared thermographic images of composite skin.

[0061] Secondly, this invention addresses the problems of small defect size, low contrast, blurred boundaries, significant thermal diffusion interference, and insufficient consistency in human interpretation in infrared thermal images of aircraft composite skin. Based on the U-Net semantic segmentation network framework, it enhances the network's ability to represent key defect regions by introducing convolutional block attention modules, boundary-aware loss functions, and multi-scale deep supervision-assisted training strategies. This improves the positioning accuracy and segmentation integrity of defect contour boundaries, thereby achieving automated and high-precision segmentation of infrared thermal images of internal defects in aircraft composite skin.

[0062] Third, CBAM can enhance the feature representation of key defect regions and suppress background redundancy responses. Experiments show that introducing CBAM into the basic U-Net improves Dice and IoU by approximately 2.4% and 2.5%, respectively. Boundary-aware loss can reduce boundary burrs and local oversegmentation, making the predicted contour smoother, more regular, and closer to the real mask geometry. CBD-U-Net achieves a Dice coefficient of 0.976 and an IoU of 0.970 on a unified dataset; in comparison with mainstream models, its boundary F1 score reaches 0.957, outperforming models such as U-Net++ and DeepLabV3+. In the self-made specimen verification experiment, this method maintains good generalization ability and contour extraction stability, making it suitable for automated defect segmentation in infrared nondestructive testing of aerospace composite materials.

[0063] Fourth, this invention can be deployed in infrared non-destructive testing workstations for aerospace composite materials, composite material production quality inspection systems, and aircraft maintenance and inspection auxiliary systems to automate and segment internal defects in infrared thermal imaging images at the pixel level. Compared to relying on inspectors to interpret frames one by one and manually outline defect contours, this invention can reduce the workload of manual annotation and repetitive interpretation, reduce the dependence of inspection results on personnel experience, and improve the efficiency of batch infrared thermal image processing and the consistency of results among different inspectors. Existing intelligent analysis methods for infrared defects in aerospace composite materials mostly focus on the determination of defect presence or absence, target box localization, or overall segmentation of defect areas. They lack collaborative design for feature selection, boundary constraints, and multi-scale training supervision of small-sized, low-contrast, and blurred-boundary defects under thermal diffusion conditions. This invention, targeting the imaging characteristics of infrared thermal images of aerospace composite materials, combines the convolutional block attention module (CBAM), region segmentation loss, boundary perception loss, and multi-scale deep supervision-assisted training strategy into a unified encoder-decoder segmentation network, forming a complete technology chain from defect feature enhancement and boundary structure constraint to intermediate decoding layer optimization. This technical solution not only outputs the area where the defect is located, but also further outputs pixel-level boundary contour results, which can provide a basis for subsequent calculation of defect geometric parameters and engineering interpretation. To a certain extent, it makes up for the problems of insufficient extraction of micro-defect features, inaccurate contour boundary characterization, and insufficient supervision of intermediate layers in existing infrared defect analysis methods.

[0064] Fifth, in infrared thermal imaging inspection of aerospace composite materials, due to the diffusion of heat within and on the surface of the material, internal defects in infrared thermal images typically exhibit characteristics such as gradual boundary changes, shape diffusion, and reduced contrast in temperature anomaly regions. As the defect size decreases or the burial depth increases, the surface thermal response of the defect further weakens and becomes susceptible to the effects of uneven heating, differences in surface emissivity, environmental reflection, and sensor noise. Therefore, achieving stable identification of small-sized defects and accurate restoration of the true contour under complex backgrounds is a long-standing and difficult-to-solve problem in the field of infrared nondestructive testing. Traditional threshold segmentation methods are difficult to adapt to different thermal excitation and imaging conditions, and ordinary segmentation networks are prone to losing small defect and edge information during continuous downsampling. To address these issues, this invention utilizes CBAM to filter defect-related features in the channel and spatial dimensions, reducing interference from background and pseudo-thermal responses; it uses boundary-aware loss to directly constrain the consistency between the predicted boundary and the true boundary; and it uses multi-scale deep supervision-assisted training to provide direct supervision signals to multiple decoding levels. The combined effect of these technical features enables the network to simultaneously identify defect regions and restore boundary contours, providing an feasible solution for the automated segmentation of small-sized, low-contrast, and blurred-boundary defects.

[0065] Sixth, existing semantic segmentation methods typically focus on improving overall segmentation accuracy by deepening the network, adding convolutional layers, or employing region overlap loss, often assuming that region supervision of the final output layer is sufficient to obtain a relatively complete defect segmentation result. However, for infrared thermography of aerospace composite materials, simply increasing the overall overlap between the predicted and real regions cannot adequately address the boundary offset, contour adhesion, and local oversegmentation problems caused by thermal diffusion; simply increasing network depth may further lose spatial information of small-sized defects. This invention does not simply increase network complexity, but instead sets up a post-processed CBAM after fully extracting convolutional features to filter defect-related channels and spatial locations; simultaneously, it treats boundary contours as independent training constraints and applies auxiliary supervision to multiple decoding levels. This approach breaks through the conventional approach of relying solely on the final output and region overlap loss for infrared defect segmentation, enabling region recognition, boundary preservation, and multi-scale feature recovery to be collaboratively optimized in a unified network, thereby improving the segmentation completeness and contour stability of small-sized and blurred-boundary defects. Attached Figure Description

[0066] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the disclosure of this invention and, together with the description, serve to explain the principles of the disclosure of this invention.

[0067] Figure 1 This is a flowchart of the infrared defect segmentation method for aerospace composite material skin provided in this embodiment of the invention;

[0068] Figure 2 This is a schematic diagram of the CBD-U-Net network structure for accessing the CBAM attention mechanism provided in an embodiment of the present invention;

[0069] Figure 3 This is a schematic diagram of the boundary-aware loss structure provided in an embodiment of the present invention;

[0070] Figure 4 This is a schematic diagram of the multi-scale deep supervision-assisted training strategy provided in an embodiment of the present invention. Detailed Implementation

[0071] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0072] This invention addresses the problems of weak response, low contrast, blurred boundaries, and insufficient supervision of intermediate layers in infrared thermal imaging of small-sized defects. It improves U-Net from three aspects: feature enhancement, boundary constraint, and training optimization. Its core innovations include:

[0073] (1) CBAM is set after the double convolutional block in the shrinking path of the encoder, the bottleneck layer and the expansion path of the decoder. This post-attention structure fully extracts local features in the convolutional layer and then filters defect-related information from the channel dimension and spatial dimension, thereby enhancing weak thermal response and edge features, and suppressing background noise, uneven heating and thermal diffusion pseudo-response.

[0074] (2) CBAMs at different locations play specific roles: CBAMs in the shrinking path are used to preserve information about small-sized and low-contrast defects; CBAMs in the bottleneck layer are used to filter global semantic features related to defects; and CBAMs in the expanding path are used to compensate for defect edge details during the spatial resolution recovery process.

[0075] (3) A joint constraint method combining region segmentation loss and boundary perception loss is adopted. Region segmentation loss is used to ensure the segmentation integrity of the main defect region, while boundary perception loss improves the positioning accuracy of defect contour by comparing the predicted boundary with the real boundary, and reduces boundary offset, burrs, adhesion and local over-segmentation.

[0076] (4) Set auxiliary outputs at multiple levels of the decoder and construct multi-scale deep supervision auxiliary loss so that the intermediate decoding layer can directly obtain supervision signals, alleviate insufficient gradient transfer, and improve the feature recovery capability of defects of different sizes, different burial depths and fuzzy boundaries.

[0077] The aforementioned multi-stage attention enhancement, region-boundary joint constraint, and multi-scale deep supervision-assisted training are co-optimized end-to-end within a unified CBD-U-Net network. This enables the network to balance the ability to identify small-sized, low-contrast defects with the accuracy of restoring blurred boundaries, ultimately outputting defect segmentation masks and boundary contour results.

[0078] Example 1, as Figure 1 As shown, the infrared defect segmentation method for aerospace composite skin provided in this embodiment of the invention specifically includes the following steps:

[0079] S1. Acquire an infrared thermal imaging image of the aerospace composite material skin and establish a defect reality mask corresponding to the infrared thermal imaging image;

[0080] Infrared thermal imaging data can be derived from publicly available CFRP laminate infrared thermal imaging defect detection datasets, or from self-made composite laminate simulation specimens or actual aircraft composite skin infrared detection experiments. Training samples include original infrared thermal images and their corresponding real defect masks. The real masks can be manually annotated by experts, generated by professional annotation software, or obtained after calibration in conjunction with the pre-embedded defect positions of the specimens.

[0081] In one specific implementation, a CFRP laminate infrared thermal imaging defect detection dataset is used as network training and comparative validation data. This dataset contains infrared thermal images with expert-annotated masks, and pre-defined internal defects of different sizes and depths within the specimens, supporting network training, performance comparison, and comparison with mainstream segmentation methods. The publicly available dataset used in this invention contains 1034 infrared thermal images, each with a manually annotated defect mask. Internal defects include square defects of different sizes such as 2mm×2mm, 3mm×3mm, and 4mm×4mm, positioned at different depths such as 0.13mm, 0.26mm, and 0.39mm.

[0082] In another specific embodiment, a self-made CFRP laminate is used to simulate delamination defects in aircraft composite skin. Delamination, debonding, and porosity defects can be simulated by pre-embedding polytetrafluoroethylene (PTFE) discs inside the laminate. The infrared thermal imaging acquisition platform may include an infrared thermal imager, an excitation heat source, a computer, infrared image analysis software, a specimen support, and a heat source support. In this invention, the self-made specimen is a 100mm × 100mm × 3.3mm CFRP laminate. The internal defects are composed of 16 PTFE discs with diameters of 9mm, 7.5mm, 6mm, and 4.5mm and a thickness of 0.3mm, with defect depths of 0.6mm, 1.2mm, 1.8mm, and 2.4mm from the top surface, respectively. The infrared detection platform consists of a Hikvision H36 infrared thermal imager, two sets of 1000W halogen lamps, and a computer equipped with HIKMICRO Analyzer software.

[0083] In the infrared detection experiment of the self-made specimen, a dual-halogen lamp continuous thermal excitation method was adopted. Two sets of 1000W rated power halogen lamps simultaneously heated the inspection surface of the CFRP laminate. During the experiment, the halogen lamps were first turned on to continuously heat the specimen for 13 minutes, and then the halogen lamps were turned off to allow the specimen to cool in the natural environment for 15 minutes. Infrared thermal images were acquired at fixed time intervals of 5 seconds from the start of heating, and the same sampling interval was maintained during the cooling phase. The total duration of infrared thermal image acquisition in a single experiment was 28 minutes. The relative positions of the infrared thermal imager, halogen lamps, and specimen remained unchanged during the acquisition process to reduce the impact of changes in imaging position and thermal excitation conditions on the infrared thermal image sequence. The acquired infrared thermal images from the heating and cooling phases together constitute the verification data of the self-made specimen, which is used to analyze the manifestation characteristics of defect areas under different thermal response stages and to verify the segmentation ability and generalization performance of the CBD-U-Net network for infrared defects in the self-made specimen.

[0084] Both the publicly available datasets and the self-made CFRP laminate infrared detection data can be used to implement the technical solution described in this invention. The publicly available datasets are primarily used for training the CBD-U-Net network, parameter optimization, ablation experiments, and comparative verification with other segmentation networks. The self-made CFRP laminate infrared detection data are mainly used to verify the generalization ability and engineering applicability of the trained network under different specimen structures, defect shapes, defect sizes, and acquisition conditions. Both data sources employ the same image preprocessing, network input, segmentation inference, and result output processes, jointly supporting the feasibility of the technical solution of this invention.

[0085] S2. Perform size unification and normalization preprocessing on the infrared thermal imaging image and the defect real mask, and divide the preprocessed data into training set, validation set and test set.

[0086] The acquired infrared thermal image and the actual mask are preprocessed, specifically including:

[0087] (1) Image size uniformity: The original infrared thermal image and its corresponding defect real mask are uniformly adjusted to 256×256 pixels. The infrared thermal image is adjusted by bilinear interpolation to maintain the continuity of temperature field or grayscale distribution; the defect real mask is adjusted by nearest neighbor interpolation to avoid the generation of unlabeled pixels between 0 and 1 during the interpolation process, and to ensure that the binary attributes of the defect area and the background area do not change.

[0088] (2) Channel processing: Infrared thermal images are uniformly converted into three-channel input. When the input is a single-channel grayscale infrared thermal image, the single-channel image is copied to the three channels respectively to form a three-channel image with the same pixel value in the three channels; when the input image is a grayscale infrared thermal image that has been stored in three-channel form, its three-channel form is directly retained; when the input is an RGB pseudo-color infrared thermal image, it is read in the order of red, green and blue channels and uniformly converted into RGB three-channel input.

[0089] (3) Pixel normalization: Normalize the pixel values ​​of infrared thermal images to a uniform range in order to reduce the numerical differences caused by different acquisition batches, different thermal excitation intensities and different imaging conditions;

[0090] (4) Mask binarization: The defect area is marked as 1 and the background area is marked as 0 to form a defect segmentation supervision label;

[0091] (5) Data partitioning: The data is divided into training set, validation set and test set, and randomly partitioned in a ratio of 7:2:1. The training set is used for network parameter updates, the validation set is used for network selection and hyperparameter tuning, and the test set is used for final performance evaluation.

[0092] (6) Data augmentation when necessary: ​​Random flipping, rotation, cropping, brightness perturbation, contrast adjustment, noise perturbation and other methods can be used to enhance the network’s adaptability to different infrared imaging conditions.

[0093] The above data preprocessing steps can ensure a pixel-level correspondence between the infrared thermal image and the defect mask, providing standardized input for subsequent CBD-U-Net network training.

[0094] S3. Construct an improved U-Net segmentation network that integrates the convolutional block attention module CBAM, denoted as CBD-U-Net network;

[0095] The CBD-U-Net network constructed in this invention is based on the U-Net framework and includes an encoder, a bottleneck layer, a decoder, and skip connections. The bottleneck layer extracts and characterizes the deep semantic features of the encoder output and provides deep feature input for the decoder's feature recovery. The encoder extracts multi-level semantic features from infrared thermal images. The decoder progressively recovers spatial resolution and outputs defect segmentation results. Skip connections fuse shallow spatial details and deep semantic information. The convolutional and transposed convolutional layers in the CBD-U-Net network are initialized with weights using the Kaiming initialization method to adapt to the ReLU activation function used in the network and reduce gradient vanishing or exploding problems during network deepening. Specifically, the bias terms of the convolutional and transposed convolutional layers are initialized to 0; the scaling parameter of the batch normalization layer is initialized to 1, and the bias parameter is initialized to 0. This initialization method ensures a relatively stable feature distribution in the early stages of training, improving the network's convergence speed and training stability.

[0096] In a preferred embodiment, the CBD-U-Net network has an input size of 256×256 pixels and 3 input channels. The encoder includes four feature extraction stages and four downsampling operations. The number of output channels of the dual convolutional blocks in each encoding stage are 64, 128, 256, and 512, respectively. After four downsampling operations, the signal enters the bottleneck layer, where the number of output channels of the dual convolutional blocks is 1024. The feature map spatial sizes of each stage of the encoder are 256×256, 128×128, 64×64, and 32×32, respectively, and the bottleneck layer feature map size is 16×16.

[0097] In the basic U-Net, each layer of the encoder typically extracts features step-by-step using double convolutional blocks and downsampling operations; each layer of the decoder recovers the image spatial scale through upsampling operations and concatenates it with the features of the corresponding layers in the encoder. However, infrared thermal imaging defects suffer from problems such as small targets, low contrast, and blurred thermal diffusion boundaries. The basic U-Net is prone to defects such as boundary diffusion, edge burrs, and local missed or oversegmentation. Therefore, this invention further introduces the CBAM attention mechanism, boundary-aware loss, and deep supervision-assisted training into the basic U-Net structure to form the CBD-U-Net network.

[0098] Convolutional Block Attention (CBAM) modules are introduced into the contraction path, expansion path, and bottleneck layer at the bottom of the CBD-U-Net network. Specifically, a CBAM module is placed after each double convolutional block, which adopts a structure of "3×3 convolution - batch normalization - ReLU activation" executed twice consecutively. The stride of each 3×3 convolutional layer is 1, and the padding size is 1 to keep the feature map space size unchanged before and after convolution. In each double convolutional block, the first 3×3 convolution maps the input features to the target number of output channels for the current network stage, and the second 3×3 convolution keeps the target number of output channels unchanged. The number of output channels of the double convolutional blocks in the four stages of the encoder are 64, 128, 256, and 512, respectively; the number of output channels of the double convolutional block in the bottleneck layer is 1024; and the number of output channels of the double convolutional blocks in the four stages of the decoder are 512, 256, 128, and 64, respectively.

[0099] This invention employs a post-convolutional attention enhancement strategy, whereby CBAM is applied to recalibrate the convolutional features in terms of channels and space after each dual-convolutional block has completed local feature extraction. Compared to a pre-convolutional strategy that applies attention weighting before convolutional feature extraction, the post-convolutional strategy first utilizes the dual-convolutional blocks to fully extract temperature anomalies, weak textures, and edge information of defects, and then filters them according to the importance of the extracted features. This reduces the loss of small-sized, low-contrast defect information caused by prematurely suppressing weak responses. Simultaneously, the post-convolutional CBAM can directly apply to the semantic features already formed in the current stage, ensuring that the attention weights correspond to the defect feature expressions of each network stage. This enhances the response of the defect region and suppresses background noise, uneven heating, and thermal diffusion responses.

[0100] The CBAM module includes a channel attention branch and a spatial attention branch. The channel attention branch is used to determine "which channel features are more important", enabling the network to enhance feature channels related to the defect region and suppress redundant channels related to background, noise, and thermal diffusion pseudo-response; the spatial attention branch is used to determine "which spatial locations are more important", enabling the network to pay more attention to the defect region and its surrounding area within the image space.

[0101] Introducing CBAM into the contraction path enhances the network's ability to extract semantic features and weak texture features of defects, allowing the network to retain information about small and low-contrast defects as much as possible during downsampling. Introducing CBAM into the expansion path enhances the feature recovery capability in the decoding stage, enabling the network to better compensate for defect edge details when restoring spatial resolution. Introducing CBAM into the bottleneck layer is equivalent to filtering global high-level semantic features, helping to retain global semantic information related to defects and suppress irrelevant responses in the thermal image background.

[0102] Specifically, for the input CBAM feature map, global average pooling and global max pooling are first performed along the spatial dimension to obtain two channel description vectors. These two channel description vectors are then input into a parameter-shared multilayer perceptron, and the corresponding outputs are summed element-wise. Channel attention weights are then generated using the sigmoid function. The multilayer perceptron includes two fully connected mapping layers, preferably employing a channel compression ratio of 16, i.e., first compressing the number of channels to 1 / 16 of the original number, and then restoring it to the original number of channels. The channel attention weights are then multiplied element-wise with the input feature map to obtain the channel-enhanced feature map.

[0103] Subsequently, the channel-enhanced feature maps are subjected to average pooling and max pooling along the channel dimension to obtain two single-channel spatial feature maps. These two spatial feature maps are then concatenated along the channel dimension, and spatial attention weights are generated using a convolutional layer with a kernel size of 7×7, a stride of 1, and a padding size of 3, along with a sigmoid function. The spatial attention weights are then multiplied element-wise with the channel-enhanced feature maps to obtain the final output features of the CBAM module. The channel attention branch and the spatial attention branch are executed sequentially, first channel, then spatial. Both levels of attention recalibrate the features through element-wise multiplication, rather than through addition.

[0104] like Figure 2 As shown, with the above structure, the CBD-U-Net network can simultaneously enhance the response of the defect region in the three stages of feature extraction, semantic representation and edge recovery, thereby improving the segmentation stability of infrared defects such as micro-layering, delamination and pores.

[0105] S4. The CBD-U-Net network is trained using a total loss function composed of region segmentation loss, boundary awareness loss, and deep supervision auxiliary loss.

[0106] The CBD-U-Net network is trained using a total loss function composed of region segmentation loss, boundary awareness loss, and deep supervision auxiliary loss.

[0107] Network decoding output Convolution mapping for prediction The defect prediction probability map is obtained through the Sigmoid function. The region segmentation loss is derived from the defect prediction probability map. Compared to real masks The BCE loss and Dice loss together constitute the total loss.

[0108] (1)

[0109] In the formula, It is the Sigmoid activation function. For decoder output logits after convolution mapping;

[0110] The region segmentation loss is expressed as:

[0111] (2)

[0112] In the formula, This is the region segmentation loss, used to represent the overlap between the constrained predicted region and the true region. The binary cross-entropy loss is the difference between the defect prediction probability map and the actual mask. The Dice loss is the difference between the defect prediction probability map and the actual mask.

[0113] To address the boundary ambiguity caused by thermal diffusion, a probability map for defect prediction is developed. and real mask Morphological gradient operators are applied separately to form the predicted and true boundaries, and a boundary-aware loss in the form of binary cross-entropy is computed. This loss shifts the optimization focus from region overlap to contour structure preservation.

[0114] (3)

[0115] In the formula, For morphological gradient operators;

[0116] Calculate the boundary-aware loss in the form of binary cross-entropy between the predicted boundary and the true boundary. :

[0117] (4)

[0118] in, Used to enhance the learning of the boundary region of the defect profile.

[0119] To further enhance the supervision capability of CBD-U-Net in the multi-scale feature recovery stage, this invention constructs deep-supervised auxiliary training strategies on the outputs of different levels of the decoder. Since the U-Net decoder recovers spatial resolution step by step, different levels contain semantic and spatial detail information at different scales. If supervision is only applied to the final output layer, shallow and mid-level decoded features may suffer from insufficient gradient propagation and inadequate detail recovery. Therefore, this invention sets auxiliary outputs at multiple decoding levels, allowing intermediate-scale features to directly participate in supervised learning.

[0120] like Figure 3As shown, auxiliary segmentation supervision is constructed on the output of different levels of the decoder. The prediction results at each scale are calculated with the real mask after 1×1 convolution and upsampling, and then weighted according to the weights to form deep supervision auxiliary training terms, so as to alleviate the insufficient gradient propagation and improve the multi-scale feature learning ability.

[0121] Specifically, such as Figure 4 As shown, 1×1 convolutions are applied after the output features of multiple levels of the decoder to map the features of each level to the segmentation prediction results at the corresponding scale. Then, the prediction results at each scale are uniformly upsampled to the input image resolution and used to calculate the auxiliary segmentation loss with the real mask Y. Finally, the auxiliary losses of different levels are weighted and summed according to preset weights to form a deep supervised auxiliary training term.

[0122] (5)

[0123] In the formula, For deep supervision-assisted training items, To output the total number of levels for in-depth supervision, For the first The corresponding weights of each auxiliary loss, For the first The auxiliary loss corresponds to the output of each decoding level. The decoder of the CBD-U-Net network includes four feature recovery stages, with the spatial dimensions of the output feature maps of each stage being 32×32, 64×64, 128×128, and 256×256 pixels, respectively. Among them, the final decoding layer of 256×256 pixels is used to generate the main segmentation output and is not included in the total number of deep supervised auxiliary output levels; auxiliary outputs are set in the first three decoding stages, so the total number of deep supervised auxiliary output levels S=3.

[0124] After combining the region segmentation loss, boundary awareness loss, and deep supervision-assisted loss, the total training loss can be expressed as:

[0125] (6)

[0126] In the formula, For total training losses, The boundary-aware loss weights are preferably set between 0.1 and 1.0. The weighting coefficients for the deep supervision auxiliary loss are preferably set between 0.1 and 0.5. These weighting coefficients are determined through comparative experiments on the validation set parameters, i.e., by varying the values ​​within a preset candidate range. and The optimal parameter combination for overall segmentation performance is selected by comprehensively comparing the Dice coefficient, IoU, boundary F1 score, and training convergence stability on the validation set.

[0127] This deep-supervised assisted training strategy can provide more direct optimization signals for shallow and mid-level decoded features during training, alleviate the problem of insufficient gradient propagation, enhance multi-scale feature learning ability, improve training stability, and improve the segmentation effect of small defects, multiple defects, and blurred boundary regions. This invention also points out that the DSATS strategy maps intermediate-scale features to segmentation prediction results at each scale through 1×1 convolution, uniformly upsamples them to the input resolution, calculates the segmentation loss with the real mask, and finally forms overall segmentation supervision by weighted average.

[0128] S5. Input the infrared thermal image of the aerospace composite skin to be detected into the trained CBD-U-Net network, output the defect prediction probability map, and obtain the defect segmentation mask and boundary contour results based on the defect prediction probability map.

[0129] During the training phase, preprocessed infrared thermal images are used as input, and real masks obtained from expert annotation or specimen defect location calibration are used as supervision labels to perform end-to-end training on the CBD-U-Net network. During training, the network obtains a defect prediction probability map and auxiliary prediction results at various scales through forward propagation; subsequently, region segmentation loss, boundary awareness loss, and deep supervision auxiliary loss are calculated based on the real masks; finally, network parameters are updated through backpropagation. The end-to-end training described in this invention refers to the joint optimization of the entire processing from the input infrared thermal image to the output defect prediction probability map within a unified network structure and computational graph. This processing includes multi-level feature extraction from the encoder, channel and spatial feature recalibration of the CBAM module, high-level semantic feature extraction from the bottleneck layer, spatial resolution restoration of the decoder, feature fusion of skip connections, and generation of auxiliary prediction results at each decoding level.

[0130] In a preferred embodiment, the training parameters can be set as follows: input image size is 256×256 pixels, input channels are 3, batch size is 16, maximum number of training epochs is 100, the optimizer is AdamW, and the initial learning rate is 1×10⁻⁶. -4 The weight decay coefficient is 1×10 -4 .

[0131] The training parameters mentioned above were determined through preliminary experiments and performance comparisons on the validation set. Specifically, while maintaining the dataset partitioning and network structure, parameters such as input image size, batch size, initial learning rate, and number of training epochs were compared. An input size of 256×256 pixels allows for the preservation of defect regions and edge information while controlling computational load; a batch size of 16 balances gradient stability and computational resource consumption during training; and an initial learning rate of 1×10⁻⁶ is optimal. -4At this point, the network loss decreases relatively steadily, and the Dice coefficient and IoU on the validation set are optimal. Setting the maximum number of training epochs to 100 allows the network to achieve stable convergence while avoiding excessively long training times. The above parameter combination was ultimately determined primarily based on the Dice coefficient, IoU, boundary F1 score, and loss convergence stability on the validation set. During training, the learning rate was maintained at 1×10⁻⁶. -4 No additional learning rate decay strategy is adopted.

[0132] All network training uses a unified training framework with an input size of 256×256 pixels, 3 input channels, a batch size of 16, a maximum training epochs of 100, and the AdamW optimizer's first-moment estimation exponential decay rate β1 set to 0.9, second-moment estimation exponential decay rate β2 set to 0.999, and numerical stability constant ε set to 1×10⁻⁶. -8 The initial learning rate and weight decay coefficient are both 1×10. -4 To evaluate the network training performance, metrics such as Dice coefficient, IoU, boundary F1 score, boundary IoU, and average precision (AP) can be used. Dice and IoU measure the degree of overlap between the predicted and ground truth masks; boundary F1 score and boundary IoU measure the degree of overlap between the predicted and ground truth boundaries; and AP comprehensively reflects the overall segmentation performance of the network.

[0133] After network training is complete, the infrared thermographic image of the aircraft composite skin to be inspected is input into the trained CBD-U-Net network. The network outputs a defect prediction probability map. The defect prediction probability map is binarized according to a preset threshold to obtain a defect segmentation mask. In a preferred embodiment, the preset threshold is 0.5, meaning that when the prediction probability of a pixel in the defect prediction probability map is greater than or equal to 0.5, the pixel is marked as a defect region and its pixel value is set to 1; when the prediction probability is less than 0.5, the pixel is marked as a background region and its pixel value is set to 0. In other embodiments, the optimal threshold can also be selected based on the Dice coefficient and IoU on the validation set.

[0134] Post-processing of the segmentation mask includes connected component analysis, contour extraction, hole filling, small noise region removal, and boundary smoothing. In a preferred embodiment, the defect segmentation mask is labeled with connected components using an 8-neighborhood connectivity method, and the pixel area of ​​each connected region is calculated. Independent connected regions with a pixel area less than 5 pixels are identified as noise regions and removed. For holes formed inside defective connected regions, holes with an area of ​​no more than 20 pixels are filled, while holes with an area greater than 20 pixels are retained to avoid incorrectly filling internal regions with actual geometric significance.

[0135] In this embodiment, the boundary contour result refers to the pixel-level boundary line between the defect region and the background region extracted from the defect segmentation mask.

[0136] Example 2: The infrared defect segmentation system for aerospace composite skin provided in this embodiment of the invention includes:

[0137] The image acquisition module is used to acquire infrared thermal imaging images of aerospace composite material skin and establish a defect reality mask corresponding to the infrared thermal imaging images.

[0138] The preprocessing module is used to perform size unification and normalization preprocessing on the infrared thermal imaging image and the defect real mask, and divide the preprocessed data into training set, validation set and test set;

[0139] The network building module is used to build an improved U-Net segmentation network that incorporates the convolutional block attention module CBAM, denoted as CBD-U-Net network;

[0140] The network training module is used to train the CBD-U-Net network using a total loss function composed of region segmentation loss, boundary awareness loss, and deep supervision auxiliary loss.

[0141] The inference output module is used to input the infrared thermal image of the aerospace composite skin to be detected into the trained CBD-U-Net network, output a defect prediction probability map, and obtain the defect segmentation mask and boundary contour results based on the defect prediction probability map.

[0142] 1. CBAM can enhance the feature representation of key defect regions and suppress background redundancy response. Experiments show that after introducing CBAM into the basic U-Net, Dice and IoU are improved by about 2.4% and 2.5%, respectively.

[0143] 2. CBD-U-Net achieves a Dice coefficient of 0.976 and an IoU of 0.970 on the unified dataset; in comparison with mainstream models, its boundary F1 score reaches 0.957, which is better than models such as U-Net++ and DeepLabV3+.

[0144] 3. In the self-made specimen verification experiment, the method can maintain good generalization ability and contour extraction stability, and is suitable for automated defect segmentation in infrared non-destructive testing of aerospace composite materials.

[0145] To verify the contributions of the convolutional block attention module, deep supervised training strategy, and boundary-aware loss to the network segmentation performance, ablation experiments were conducted with the basic U-Net network as the baseline, and different improved modules were gradually added. The results are shown in Table 1.

[0146] Table 1. Experimental Results of CBD-U-Net Network Structure Ablation

[0147]

[0148] Table 1 shows that the Dice coefficient and IoU of the basic U-Net network are 0.937 and 0.930, respectively. After adding CBAM to the basic U-Net, the Dice coefficient increases to 0.961 and the IoU increases to 0.955, representing improvements of 0.024 and 0.025, respectively, indicating that CBAM can enhance defect-related features and suppress background redundancy responses. Further, introducing deep supervised training further improves the Dice coefficient and IoU to 0.967 and 0.962, indicating that multi-level supervision can improve multi-scale feature recovery. With the addition of boundary-aware loss, the Dice coefficient and IoU of CBD-U-Net reach 0.976 and 0.970, respectively, improvements of 0.039 and 0.040 compared to the basic U-Net, demonstrating the synergistic effect of multi-stage attention enhancement, deep supervised training, and boundary constraints.

[0149] To verify the overall performance of CBD-U-Net compared with existing mainstream semantic segmentation networks, CBD-U-Net was compared with U-Net, U-Net++, and DeepLabV3+ under the same dataset, training parameters, and evaluation criteria. The results are shown in Table 2.

[0150] Table 2 Comparison of performance of different segmentation networks

[0151]

[0152] To verify the generalization ability of the CBD-U-Net under different defect shapes, sizes, depths, and infrared thermal imaging acquisition conditions, the trained network was used for defect segmentation of infrared thermal images of self-made CFRP laminates, and compared with U-Net and CBAM-U-Net. The results are shown in Table 3.

[0153]

[0154] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention and within the spirit and principles of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A method for infrared defect segmentation of aerospace composite material skin, characterized in that, The method includes the following steps: S1. Acquire an infrared thermal imaging image of the aerospace composite material skin and establish a defect reality mask corresponding to the infrared thermal imaging image; S2. Perform size unification and normalization preprocessing on the infrared thermal imaging image and the defect real mask, and divide the preprocessed data into training set, validation set and test set. S3. Construct an improved U-Net segmentation network that integrates the convolutional block attention module CBAM, denoted as CBD-U-Net network; S4. The CBD-U-Net network is trained using a total loss function composed of region segmentation loss, boundary-aware loss, and deep supervision-assisted loss. S5. Input the infrared thermal image of the aerospace composite skin to be detected into the trained CBD-U-Net network, output the defect prediction probability map, and obtain the defect segmentation mask and boundary contour results based on the defect prediction probability map.

2. The infrared defect segmentation method for aerospace composite material skin according to claim 1, characterized in that, In step S2, the infrared thermal imaging image and the defect real mask are uniformly adjusted to a preset input size, the infrared thermal imaging image is uniformly converted into a three-channel input, and the infrared thermal image pixel values ​​are normalized. The defective area is marked as 1 and the background area is marked as 0 to form a binary mask; one or more enhancement operations are performed on the data, including random flipping, rotation, cropping, brightness perturbation, contrast adjustment or noise perturbation.

3. The infrared defect segmentation method for aerospace composite material skin according to claim 1, characterized in that, In step S3, the CBD-U-Net network is based on the U-Net framework and includes an encoder, a bottleneck layer, a decoder, and a skip connection structure. The encoder is used to extract multi-level semantic features from infrared thermal images. The bottleneck layer is used to extract and characterize the deep semantic features output by the encoder and provide deep feature input for feature recovery of the decoder. The decoder is used to recover spatial resolution step by step and output defect segmentation results. The skip connection is used to fuse shallow spatial details and deep semantic information. Convolutional Block Attention (CBAM) modules are introduced after the shrinking path of the encoder, the expanding path of the decoder, and the dual convolutional blocks at each stage of the bottleneck layer. The dual convolutional block adopts The structure is repeated twice: convolution-batch normalization-ReLU activation.

4. The infrared defect segmentation method for aerospace composite skin according to claim 3, characterized in that, The Convolutional Block Attention (CBAM) module includes a channel attention branch and a spatial attention branch, which are used to filter and recalibrate features in the channel dimension and the spatial dimension. The channel attention branch is used to filter and enhance feature channels related to defects, and suppress redundant channels related to background, noise and thermal diffusion pseudo-response. The spatial attention branch is used to highlight the defect area and edge area in the spatial dimension; The CBAM introduced in the shrinkage path is used to enhance the extraction capability of defect semantic features and weak texture features, so that the network retains information of small defects and low-contrast defects during downsampling. The CBAM introduced in the expansion path is used to enhance the feature recovery capability in the decoding stage and compensate for defective edge details when restoring spatial resolution; The CBAM introduced in the bottleneck layer is used to filter global high-level semantic features, retain global semantic information related to defects, and suppress irrelevant responses in the infrared thermal image background.

5. The infrared defect segmentation method for aerospace composite skin according to claim 1, characterized in that, In step S4, the region segmentation loss is determined by the defect prediction probability map. Compared to real masks The BCE loss and Dice loss together constitute the total loss between them; The defect prediction probability map Obtained through the following method: decoder output... Convolution mapping for prediction ,pass The function yields a probability map of defect prediction. The expression is: ; In the formula, It is the Sigmoid activation function. For decoder output logits after convolution mapping; The region segmentation loss is expressed as: ; In the formula, This is the region segmentation loss, used to represent the overlap between the constrained predicted region and the true region. The binary cross-entropy loss is the difference between the defect prediction probability map and the actual mask. The Dice loss is the difference between the defect prediction probability map and the actual mask.

6. The infrared defect segmentation method for aerospace composite skin according to claim 5, characterized in that, The boundary-aware loss is obtained by analyzing a defect prediction probability map. and real mask By applying morphological gradient operators respectively, the predicted boundaries are obtained. and the true boundary The expression is: ; ; In the formula, For morphological gradient operators; Calculate the boundary-aware loss in the form of binary cross-entropy between the predicted boundary and the true boundary. : ; in, Used to enhance the learning of the boundary region of the defect profile.

7. The infrared defect segmentation method for aerospace composite material skin according to claim 6, characterized in that, The deep supervision auxiliary loss is obtained by connecting it to the output features of multiple levels of the decoder. Convolution maps features at each level to segmentation predictions at the corresponding scale; it then upsamples the predictions at each scale to the input image resolution, and compares them with the ground truth mask. Calculate the auxiliary segmentation loss; sum the auxiliary losses from different levels according to preset weights to form a deep supervised auxiliary training term. The expression is: ; In the formula, To determine the total number of levels for in-depth supervision output, For the first The corresponding weights of each auxiliary loss, For the first The auxiliary loss of the deep supervision output.

8. The infrared defect segmentation method for aerospace composite skin according to claim 7, characterized in that, The total loss function is expressed as: ; In the formula, For total training losses, The boundary-aware loss weights are preferably set between 0.1 and 1.

0. The weighting coefficient for deep supervision auxiliary loss is preferably set between 0.1 and 0.

5. Training the CBD-U-Net network includes: taking the preprocessed infrared thermal imaging image as input, using the defect real mask as a supervision label, and performing end-to-end training on the CBD-U-Net network; The end-to-end training includes: obtaining a defect prediction probability map and auxiliary prediction results at each scale through forward propagation; calculating region segmentation loss, boundary awareness loss, and deep supervision auxiliary loss based on the defect reality mask; and updating the parameters of the CBD-U-Net network through backpropagation.

9. The infrared defect segmentation method for aerospace composite material skin according to claim 1, characterized in that, In step S5, obtaining the defect segmentation mask and boundary contour results based on the defect prediction probability map includes: performing binarization processing on the defect prediction probability map according to a preset threshold to obtain the defect segmentation mask; and performing post-processing on the defect segmentation mask to obtain the boundary contour results. The post-processing includes one or more of the following: connected component analysis, contour extraction, hole filling, small noise region removal, and boundary smoothing.

10. An infrared defect segmentation system for aerospace composite skin, characterized in that, This system is used to perform the infrared defect segmentation method for aerospace composite skin as described in any one of claims 1-9, and the system comprises: The image acquisition module is used to acquire infrared thermal imaging images of aerospace composite material skin and establish a defect reality mask corresponding to the infrared thermal imaging images; The preprocessing module is used to perform size unification and normalization preprocessing on the infrared thermal imaging image and the defect real mask, and divide the preprocessed data into training set, validation set and test set; The network building module is used to build an improved U-Net segmentation network that incorporates the convolutional block attention module CBAM, denoted as CBD-U-Net network; The network training module is used to train the CBD-U-Net network using a total loss function composed of region segmentation loss, boundary-aware loss, and deep supervision-assisted loss. The inference output module is used to input the infrared thermal image of the aerospace composite skin to be detected into the trained CBD-U-Net network, output a defect prediction probability map, and obtain the defect segmentation mask and boundary contour results based on the defect prediction probability map.