Damage detection methods, electronic devices, storage media and computer program products

By combining a terahertz time-domain spectroscopy system with a pre-set residual network, the problems of signal attenuation and insufficient resolution in composite material damage detection are solved, achieving high-precision non-destructive testing with a wider range of applicable environments and no risk of ionizing radiation.

CN121431428BActive Publication Date: 2026-05-26SHENZHEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202512001898.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-05-26
Estimated Expiration
2045-12-29

AI Technical Summary

Technical Problem

Existing nondestructive testing technologies are ineffective in detecting damage to composite materials, and suffer from problems such as large signal attenuation, insufficient resolution, the need for coupling agents, and the risk of ionizing radiation.

Method used

The composite material is scanned by a terahertz time-domain spectroscopy system to obtain the original time-domain echo signal. After preprocessing, the target image data is generated. Damage features are extracted using a preset residual network, and the geometric offset is predicted to locate the damaged target.

Benefits of technology

It achieves high-precision non-destructive testing, avoids the use of coupling agents, improves resolution, has a wider range of applicable environments, and has no risk of ionizing radiation, enabling accurate identification of internal damage in composite materials.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121431428B_ABST
    Figure CN121431428B_ABST
Patent Text Reader

Abstract

This application discloses a damage detection method, electronic device, storage medium, and computer program product, relating to the field of nondestructive testing technology. The method includes: scanning a composite material to be tested using a terahertz time-domain spectroscopy system to obtain the original time-domain echo signal of the composite material, wherein the composite material to be tested is a glass fiber reinforced polymer composite material; preprocessing the original time-domain echo signal to obtain target image data; extracting features from the target image data to obtain damage features; predicting the geometric offset of the damage features; and locating the damage target in the composite material to be tested based on the geometric offset and the damage features. This application solves the technical problem of poor detection effect in existing nondestructive testing technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of nondestructive testing technology, and in particular to a damage detection method, electronic device, storage medium and computer program product. Background Technology

[0002] With the widespread application of composite materials in high-end equipment fields such as aerospace and transportation, higher requirements are being placed on their structural health monitoring and non-destructive testing technologies. Glass fiber reinforced polymer (GFRP) composites have become key structural materials due to their excellent properties, but their layered structure is prone to internal damage during production and use, threatening structural safety.

[0003] Existing nondestructive testing (NDT) techniques all have certain limitations. For example, ultrasonic testing requires a coupling agent and suffers from significant signal attenuation; infrared thermography is significantly affected by defect depth and surface condition; microwave testing has insufficient resolution; and X-ray methods pose a risk of ionizing radiation and are limited to laboratory environments. Therefore, existing NDT techniques suffer from poor testing results.

[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main objective of this application is to provide a damage detection method, electronic device, storage medium, and computer program product, which aims to solve the technical problem of poor detection effect in existing non-destructive testing technologies.

[0006] To achieve the above objectives, this application proposes a damage detection method, the damage detection method comprising:

[0007] The original time-domain echo signal of the composite material to be tested was obtained by scanning the composite material to be tested using a terahertz time-domain spectroscopy system, wherein the composite material to be tested is a glass fiber reinforced polymer composite material to be tested.

[0008] The original time-domain echo signal is preprocessed to obtain target image data;

[0009] Feature extraction is performed on the target image data to obtain damage features;

[0010] Predict the geometric offset of the damage feature, and locate the damage target in the composite material to be tested based on the geometric offset and the damage feature.

[0011] In one embodiment, the step of preprocessing the original time-domain echo signal to obtain target image data includes:

[0012] The average value of the original time-domain echo signal is calculated to obtain the denoised signal, and the denoised signal is transformed from the time domain to the frequency domain to obtain the signal spectrum;

[0013] The center frequency of the composite material to be tested is calculated based on the average thickness of the composite material to be tested, and the target frequency band of the signal spectrum is determined based on the center frequency;

[0014] Integrate the signal spectrum within the target frequency band to generate a two-dimensional image of the composite material to be detected;

[0015] Perform a contrast enhancement operation on the two-dimensional image, and adjust the enhanced two-dimensional image to a preset network input size to obtain target image data.

[0016] In one embodiment, the step of extracting features from the target image data to obtain damage features includes:

[0017] The target image data is processed by a preset residual network to generate multi-scale feature maps;

[0018] Obtain the context feature vector of the multi-scale feature map, and calculate the channel attention weight vector of the multi-scale feature map based on the context feature vector;

[0019] The channel attention weight vector is weighted and processed channel by channel to obtain the damage features.

[0020] In one embodiment, the step of processing the target image data through a preset residual network to generate multi-scale feature maps includes:

[0021] The target image data is input into a preset residual network, wherein the preset residual network includes residual blocks, and each residual block includes shallow residual blocks and deep residual blocks;

[0022] The target image data is abstracted layer by layer through each residual block to generate a multi-level feature map corresponding to each residual block. The multi-level feature map includes a shallow feature map and a deep feature map. The shallow feature map is generated by the corresponding shallow residual block, and the deep feature map is generated by the corresponding deep residual block.

[0023] Channel dimension compression and upsampling are performed on the deep feature map to make the size of the deep feature map similar to that of the shallow feature map. Figure 1 This yields a compressed deep feature map.

[0024] The compressed deep feature map is fused with the shallow feature map to generate a multi-scale feature map.

[0025] In one embodiment, the step of obtaining the context feature vector of the multi-scale feature map and calculating the channel attention weight vector of the multi-scale feature map based on the context feature vector includes:

[0026] For each scale of the multi-scale feature map, a global spatial pooling operation is performed on the feature map to compress the two-dimensional spatial features of the feature map into a one-dimensional context feature vector.

[0027] The context feature vector is input into a preset transformation network, which includes a first fully connected layer, a second fully connected layer, and a nonlinear activation function.

[0028] The first fully connected layer is used to perform dimensionality reduction mapping on the context feature vector to obtain the first dimension feature;

[0029] The first dimension feature is nonlinearly transformed based on the nonlinear activation function to obtain the second dimension feature;

[0030] The second fully connected layer restores the feature dimension of the second dimension feature to the original number of channels of the multi-scale feature map, thus obtaining the channel attention weight vector.

[0031] In one embodiment, the damage detection method further includes:

[0032] During the training process of the preset residual network, the network parameters in the preset residual network are optimized end-to-end using a composite loss function. The composite loss function includes a classification loss term and a regression loss term. The classification loss term includes a modulation factor, which is used to reduce the weight of the background region in the total loss corresponding to the composite loss function. The background region is a region in the training samples that does not contain damage. The regression loss term includes a smoothing loss function, which is used to calculate the coordinate regression error between the predicted bounding box and the preset standard bounding box. The predicted bounding box is the candidate bounding box predicted by the preset residual network. The smoothing loss function includes a squared term and a linear term. When the coordinate regression error is less than a preset error, the smoothing loss function uses the squared term for function calculation; when the coordinate regression error is not less than the preset error, the smoothing loss function uses the linear term for function calculation.

[0033] In one embodiment, the step of predicting the geometric offset of the damage feature and locating the damage target in the composite material to be tested based on the geometric offset and the damage feature includes:

[0034] The geometric offset vector of the target bounding box corresponding to the damage feature is calculated based on the preset regression prediction module;

[0035] Based on the geometric offset vector, the coordinate transformation is performed on the target bounding box corresponding to the damage feature to output the positioning coordinates of the damaged target in the composite material to be detected.

[0036] Furthermore, to achieve the above objectives, this application also proposes a damage detection system, the damage detection system comprising:

[0037] The signal extraction module is used to scan the composite material to be tested using a terahertz time-domain spectroscopy system to obtain the original time-domain echo signal of the composite material to be tested, wherein the composite material to be tested is a glass fiber reinforced polymer composite material to be tested.

[0038] The image processing module is used to preprocess the original time-domain echo signal to obtain target image data;

[0039] The feature extraction module is used to extract features from the target image data to obtain damage features;

[0040] The target localization module is used to predict the geometric offset of the damage feature and locate the damage target in the composite material to be tested based on the geometric offset and the damage feature.

[0041] In addition, to achieve the above objectives, this application also proposes an electronic device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the damage detection method as described above.

[0042] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the damage detection method described above.

[0043] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the damage detection method described above.

[0044] This application provides a damage detection method, which includes: scanning the composite material to be tested using a terahertz time-domain spectroscopy system to obtain the original time-domain echo signal of the composite material to be tested, wherein the composite material to be tested is a glass fiber reinforced polymer composite material to be tested; preprocessing the original time-domain echo signal to obtain target image data; extracting features from the target image data to obtain damage features; predicting the geometric offset of the damage features; and locating the damage target in the composite material to be tested based on the geometric offset and the damage features.

[0045] Due to the limitations of existing non-destructive testing (NDT) technologies, this application obtains the original time-domain echo signal by scanning the composite material to be tested, providing basic data for subsequent analysis. By preprocessing the signal to obtain target image data, the problem of high noise interference in the original signal is overcome, improving data quality. By extracting damage features and predicting geometric offsets, the technical challenges of damage feature quantification and localization are solved, achieving accurate damage identification. Based on the geometric offset, the damaged target is located, achieving high-precision NDT results. Compared with existing NDT technologies, this application eliminates the need for coupling agents (overcoming the limitations of ultrasonic testing), is unaffected by defect depth and surface condition (superior to infrared thermography), has higher resolution (surpassing microwave testing), eliminates the risk of ionizing radiation, and has a wider range of applicable environments (superior to X-ray methods). Through the combination of signal processing and feature analysis, it effectively solves the problem of poor detection results in existing technologies. Attached Figure Description

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

[0047] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 This is a flowchart illustrating an embodiment of the damage detection method of this application.

[0049] Figure 2 This is a schematic diagram of the interaction between incident terahertz waves and multilayer GFRP composite materials provided in Embodiment 1 of this application;

[0050] Figure 3 This is a flowchart illustrating Embodiment 2 of the damage detection method of this application;

[0051] Figure 4 This is a diagram of the enhanced feature pyramid network architecture provided in Embodiment 2 of this application;

[0052] Figure 5 The flowchart of the regression prediction module provided in Embodiment 2 of this application;

[0053] Figure 6 These are terahertz time-domain spectroscopy imaging scans under different contrast mechanisms provided in Embodiment 2 of this application;

[0054] Figure 7 This is a schematic diagram of the module structure of the damage detection system according to an embodiment of this application;

[0055] Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the damage detection method in the embodiments of this application.

[0056] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0057] It should be understood that the first embodiment described herein is merely used to explain the technical solution of this application and is not intended to limit this application.

[0058] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0059] The main solution of the first embodiment of this application is: scanning the composite material to be tested to obtain the original time-domain echo signal of the composite material to be tested; preprocessing the original time-domain echo signal to obtain target image data; extracting features from the target image data to obtain damage features; predicting the geometric offset of the damage features; and locating the damage target in the composite material to be tested based on the geometric offset and the damage features.

[0060] In the first embodiment, for ease of description, the following description uses a damage detection system as the implementing entity.

[0061] Glass fiber reinforced polymer (GFRP) composites, with their excellent thermal and electrical insulation properties, as well as high strength, flexibility, stiffness, corrosion resistance, and lightweight characteristics, have shown great potential to replace traditional polymer composites and steel in many high-tech fields such as automotive, aerospace, and construction. However, due to their complex layered structure, they are susceptible to interlaminar shear stress during production and use, resulting in internal damage. This poses a serious threat to structural integrity and increases the risk of catastrophic failure. Therefore, characterizing the internal damage of GFRP composites in a non-destructive, non-contact manner is of great significance. Currently, various non-destructive assessment methods are available for detecting hidden damage within GFRP composites, such as ultrasonic testing, infrared thermography, microwave testing, and X-ray radiography. However, these methods all have certain limitations: ultrasonic testing requires a coupling medium, and the ultrasonic waves required for high-resolution imaging are severely attenuated in thermoplastic materials; the imaging performance of infrared thermography is greatly affected by defect depth and sample surface roughness; microwave testing has low resolution, blurred damage morphology, and complex data analysis; and X-ray methods, due to their ionizing nature, are mainly limited to laboratory environments. In recent years, terahertz (THz) imaging technology has attracted widespread attention for the structural characterization of GFRP composite materials. Terahertz waves are electromagnetic waves with frequencies between 0.1 THz and 10 THz, and wavelengths ranging from 3 μm to 3 mm, falling within the electromagnetic spectrum region between photonics and electronics. They can penetrate many electrically insulating materials that are opaque in the visible and infrared bands, and do not cause thermal changes in biological tissues at low power, making them a non-ionizing, non-destructive assessment method. However, the diffraction phenomenon caused by the long wavelength of terahertz waves reduces the lateral resolution of terahertz images; simultaneously, most existing terahertz imaging systems use raster scanning mode, resulting in slow image acquisition rates and insufficient terahertz sampling datasets. Furthermore, existing damage extraction methods are mostly based on single damage types, and intelligent classification of different damage types still faces significant challenges. Therefore, there is an urgent need for a method that can effectively characterize damage of different sizes and types in GFRP composite materials.

[0062] This application provides a solution that acquires the original time-domain echo signal by scanning the composite material to be tested, providing basic data for subsequent analysis. Preprocessing the signal yields target image data, overcoming the problem of high noise interference in the original signal and improving data quality. By extracting damage features and predicting geometric offsets, the technical challenges of damage feature quantification and localization are solved, achieving accurate damage identification. Based on the geometric offset, the damaged target is located, achieving high-precision non-destructive testing. Compared with existing non-destructive testing technologies, this application eliminates the need for coupling agents (overcoming the limitations of ultrasonic testing), is unaffected by defect depth and surface condition (superior to infrared thermography), offers higher resolution (surpassing microwave testing), eliminates the risk of ionizing radiation, and has a wider range of applicable environments (superior to X-ray methods). Through the combination of signal processing and feature analysis, it effectively solves the problem of poor detection results in existing technologies.

[0063] It should be noted that the executing entity of the first embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, or other electronic device, or a system, application, or program capable of implementing the above functions. The first embodiment and the following embodiments will be described using a damage detection system as an example.

[0064] All actions involving the acquisition of signals, information, or data in this application are carried out in accordance with the relevant data protection laws and policies of the country where the application is located, and with the authorization of the owner of the relevant device.

[0065] Based on this, embodiments of this application provide a damage detection method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the damage detection method of this application.

[0066] In this embodiment, the damage detection method includes steps S01 to S04:

[0067] Step S01: Scan the composite material to be tested using a terahertz time-domain spectroscopy system to obtain the original time-domain echo signal of the composite material to be tested, wherein the composite material to be tested is a glass fiber reinforced polymer composite material to be tested.

[0068] It should be noted that the composite material to be tested refers to glass fiber reinforced polymer (GFRP) composite materials that require defect detection, exhibiting significant anisotropy and layered dielectric properties. The original time-domain echo signal is the time-domain signal reflected back after the terahertz pulse propagates in the GFRP material, containing damage information. Terahertz pulses are electromagnetic wave pulses with frequencies between 0.1 THz and 10 THz, with wavelengths ranging from 3 μm to 3 mm. They fall within the electromagnetic spectrum transition region between photonics (high frequency) and electronics (low frequency), allowing them to penetrate opaque electrically insulating materials in the visible and infrared bands, and without causing thermal changes to biological tissues at low power.

[0069] Furthermore, it's important to note that GFRP uses glass fiber as reinforcement and polymer (resin) as the matrix. This difference in reinforcement materials significantly distinguishes it from other composite materials such as carbon fiber reinforced polymer (CFRP), aramid fiber reinforced polymer (AFRP), and metal matrix composites (MMC). GFRP benefits from the synergistic effect of the glass fiber and polymer matrix—the glass fiber provides high strength and rigidity, while the polymer matrix acts as a bonder, protects the fibers, and transfers stress. This combination results in a comprehensive advantage of high strength, light weight, corrosion resistance, and ease of processing. From corrosion-resistant pipes in marine engineering to steel reinforcement replacements in construction and insulation components in the electrical industry, GFRP plays an irreplaceable role in numerous civilian and industrial sectors due to its unique properties, making it one of the most widely used and prevalent composite materials.

[0070] For example, a terahertz time-domain spectroscopic system is used to perform grating scanning on GFRP composite materials at a nearly perpendicular preset incident angle (approximately 3°). A terahertz time-domain spectroscopic system (THz-TDS) is a detection device based on ultrafast laser pulses exciting terahertz waves. Its core function is to obtain the dielectric properties, structural information, and internal defect distribution of the material by analyzing the time-domain echo signal after the interaction of the terahertz waves with the material. Raster scanning is an imaging method that acquires data point-by-point with a fixed step size and direction. Its core is to control the movement of the detection probe on a two-dimensional plane through a mechanical or electronic control platform to form a regular grid of sampling points.

[0071] Terahertz time-domain echo signals containing damage information were acquired by grating scanning, and a three-dimensional terahertz dataset was constructed, which includes spatial coordinates (x, y) and time-domain signals (t).

[0072] Furthermore, it should be noted that due to the characteristics of glass fiber materials, such as "weak polarity, multilayer structure, and diverse defect types," terahertz multispectral imaging technology, which is non-destructive, dielectrically sensitive, and capable of acquiring multidimensional information, can be used for defect identification. Terahertz multispectral imaging technology can penetrate the material surface to obtain internal information and accurately identify, locate, and quantify defects through signal differences across multiple spectral dimensions. It also involves no ionizing radiation, is easy to operate, and is suitable for various scenarios such as material preparation quality control, service monitoring, and mechanism research, making it one of the core technologies for characterizing internal defects in glass fiber materials.

[0073] For example, to aid in understanding the technical concept or principles of this application, please refer to Figure 2 , Figure 2 A schematic diagram illustrating the interaction between incident terahertz waves and multilayer GFRP composite materials is provided. When the terahertz waves propagate through the layered media, due to the discontinuity of material parameters, a series of time-delayed reflected echoes (labeled 1 to 9) are generated at the interfaces of different media (layers one to eight in the figure). Furthermore, two typical types of damage exist within the material: delamination defects appear in the fifth layer, and overlapping defects exist near the fourth layer. These damaged interfaces, like normal interlayer interfaces, generate reflected signals. By analyzing the characteristics of these reflected echoes, non-destructive testing and visualization of the material's internal structure and damage can be achieved.

[0074] The diagram also schematically illustrates potential damage such as "overlap" and "delamination" within the material.

[0075] Understandably, step S01 uses a terahertz time-domain spectroscopy system to perform grating scanning on the GFRP composite material at a near-vertical incident angle, directly acquiring the original time-domain echo signal containing damage information. This solves the technical problem that traditional detection techniques (such as ultrasonic testing) rely on coupling agents and suffer from severe high-frequency signal attenuation, achieving non-contact signal acquisition and avoiding errors introduced by coupling agents. At the same time, the low-power characteristics of terahertz waves ensure the non-destructive nature of the detection process.

[0076] Step S02: Preprocess the original time-domain echo signal to obtain the target image data;

[0077] It should be noted that preprocessing refers to operations such as noise reduction, frequency domain transformation, and contrast enhancement on the original signal to improve data quality. Target image data refers to the two-dimensional or three-dimensional image generated after preprocessing, used for subsequent feature extraction.

[0078] Understandably, step S02 solves the problems of high random noise and low damage contrast in the original signal through preprocessing, significantly improving the signal-to-noise ratio and the contrast between the damaged area and the background, while preserving the sharpness of the damage edges, thus avoiding the technical limitations of traditional infrared thermal imaging that are significantly affected by the depth of defects and surface conditions.

[0079] Step S03: Extract features from the target image data to obtain damage features;

[0080] It should be noted that feature extraction refers to capturing multi-scale features of damage, such as layering and fiber breakage, using deep learning models. Damage features refer to the damage-related features extracted by the model, such as shape, size, and location.

[0081] Additionally, it should be noted that after feature extraction from the target image data, a multi-head attention mechanism can be combined to suppress interference from irrelevant background information and improve feature extraction performance. Multi-head attention is a neural network structure that captures local and global dependencies in input data by computing multiple attention heads in parallel. It can be applied to the EnRetinaNet network (an improved object detection network incorporating multi-head attention). By segmenting the input features into multiple heads (such as Q, K, and V matrices), calculating the attention weights of each head separately, and then concatenating the output, the mathematical expression is:

[0082]

[0083] in, This indicates the integration of multiple attention streams. The query matrix contains the elements that need to be calculated and for which information needs to be retrieved. This is a key matrix containing the identifiers or indices of all elements in the sequence, used for matching with queries. This is a value matrix containing the actual information to be extracted from each element in the sequence. Once passed... and Once attention weights (i.e., which elements are more important) are calculated, these weights are used to... By performing a weighted summation, information can be aggregated. ( ) indicates that The outputs of each attention head are concatenated along the channel dimension. It is the final weight matrix, used to perform a linear transformation on the output of all the concatenated heads. , representing a single attention head, with a total of indivual, , , These are the weight matrices for linear transformation, used to apply weights to the original... , , Perform linear transformations; they are the first... Each attention head has unique parameters.

[0084]

[0085] in, It is the core attention function, which describes how a single attention head works. () indicates that each row of the score matrix (corresponding to a query) is subjected to softmax normalization, which is used to transform the scores into a probability distribution so that the sum of the weights of all keys for a certain query is 1. This result is the attention weight matrix, which explicitly indicates which parts of the input sequence should be focused on while generating the current output. Representing the query matrix Bond matrix The transpose of the vector is used for matrix multiplication to calculate the similarity (or matching score) between each query vector and all key vectors. The result is a score matrix, where a higher score indicates that the corresponding key is more relevant to the query. Scaling factor This is the dimension of the key vector. Since the result of the dot product increases with increasing dimension, this may cause the gradient to decrease after passing through the softmax function. Therefore, dividing by... This design can stabilize gradients, making the training process smoother, and can suppress irrelevant background interference.

[0086] It is understandable that step S03 obtains damage features through feature extraction, which solves the technical problems of insufficient resolution and blurred damage morphology in microwave detection. It can automatically capture the differential response of micro-fiber fractures (shallow features) and large-size layered defects (deep features), and significantly improves the ability to identify multi-scale damage features.

[0087] Step S04: Predict the geometric offset of the damage features, and locate the damage target in the composite material to be tested based on the geometric offset and the damage features.

[0088] It should be noted that the geometric offset is the deviation between the predicted damage location and the actual location, used to correct the localization results. The damage target refers to the actual damage in the composite material being tested.

[0089] Understandably, step S04 achieves precise damage localization through calibration, solving the problem of difficult intelligent damage localization in traditional detection technologies, and can complete automated analysis without the need for professional prior knowledge.

[0090] In one feasible implementation, step S02, which involves preprocessing the original time-domain echo signal to obtain the target image data, includes steps A01 to A04:

[0091] Step A01: Calculate the average value of the original time-domain echo signal to obtain the denoised signal, and transform the denoised signal from the time domain to the frequency domain to obtain the signal spectrum;

[0092] It should be noted that the denoised signal is a time-domain signal obtained by averaging multiple samples to suppress random noise. Its waveform is smoother, and the damage characteristics are more prominent. The time domain refers to the representation of a signal as a function of time, with time on the horizontal axis and signal amplitude on the vertical axis. The frequency domain refers to the representation of a signal as a function of frequency, with frequency on the horizontal axis and spectral amplitude on the vertical axis, reflecting the dispersion characteristics of the material. The signal spectrum is a frequency-amplitude distribution plot obtained through the Fast Fourier Transform (FFT), used to analyze frequency shifts or amplitude changes caused by damage. The Fast Fourier Transform is an efficient algorithm for calculating the Discrete Fourier Transform (DFT), whose core objective is to convert the time-domain signal into a frequency-domain representation, thereby revealing the frequency components and intensity distribution of the signal.

[0093] For example, for each pixel of the composite material being tested that is scanned, the original time-domain echo signal of each pixel is acquired multiple times (e.g., 10 times) and the arithmetic mean is calculated to suppress random noise, improve the signal-to-noise ratio, and generate a denoised time-domain signal. For example, if the 10 acquisition values ​​of a certain pixel are [0.8, 0.9, 0.7, ..., 1.0], the average value yields a denoised signal of 0.85. Subsequently, the denoised signal is converted from the time domain to the frequency domain using FFT to obtain the signal spectrum.

[0094] Step A02: Calculate the center frequency of the composite material to be tested based on the average thickness of the composite material to be tested, and determine the target frequency band of the signal spectrum based on the center frequency;

[0095] It should be noted that the average thickness refers to the average geometric thickness of the composite material under test, which affects the propagation path and reflection intensity of terahertz waves. Calculating the center frequency based on the average thickness allows the detection frequency band to be tuned to the spectral region that best reflects the intrinsic structural characteristics of the specific composite material. The center frequency is the optimal analysis frequency matched to the average thickness, at which point the damage scattering response is most significant. The target frequency band is a finite frequency range centered on the center frequency (e.g., 0.875-1.125 THz), used for integral imaging to highlight damage characteristics.

[0096] For example, based on the known average thickness and refractive index of the GFRP composite material to be tested, the center frequency is dynamically calculated using the following formula:

[0097]

[0098] in, For the center frequency, At the speed of light, The refractive index of the GFRP composite material to be tested is... The average thickness of the GFRP composite material to be tested is given.

[0099] Based on the calculated center frequency, select an optimal frequency band near the center frequency (e.g., Using the range of ±0.125 THz as the target frequency band overcomes the damage contrast degradation problem caused by traditional methods using fixed frequency bands (such as 0.7-1.2 THz), achieving adaptive optimization for samples of different thicknesses. By filtering out spectral components far from this center frequency, which may mainly originate from system noise, surface scattering, or other unrelated physical effects, interference from irrelevant background information is effectively suppressed, thereby improving the signal-to-noise ratio.

[0100] Step A03: Integrate the signal spectrum within the target frequency band to generate a two-dimensional image of the composite material to be detected;

[0101] It should be noted that a two-dimensional image is a grayscale or color image represented by a pixel array, with the horizontal and vertical axes representing spatial coordinates and the pixel value representing the integral intensity.

[0102] For example, integral imaging calculations are performed on the signal spectrum within the target frequency band to generate a two-dimensional integral image reflecting the damage distribution. Integral imaging is a technique for generating two-dimensional images by integrating frequency-domain signals. Its core lies in converting frequency-domain information into a spatially distributed intensity map based on the frequency-time domain correspondence of Fourier transform, thereby visually displaying internal defects or structural features of the material. For instance, the spectral amplitudes within a 0.25 THz bandwidth are accumulated to obtain the damage intensity value of each pixel, forming a 50 mm × 50 mm two-dimensional image.

[0103] Step A04: Perform a contrast enhancement operation on the two-dimensional image, and adjust the enhanced two-dimensional image to the preset network input size to obtain the target image data.

[0104] It should be noted that contrast enhancement refers to stretching the local grayscale range of an image through nonlinear transformations to make damaged areas more prominent, such as Contrast Limited Adaptive Histogram Equalization (CLAHE). The preset network input size is a fixed input resolution (e.g., 256×256) required by the deep learning model to ensure consistency in feature extraction.

[0105] For example, the CLAHE algorithm is used to enhance the contrast of a two-dimensional image. CLAHE is an algorithm for enhancing image contrast. Through adaptive block processing and contrast limiting, it effectively avoids the over-enhancement and noise amplification problems that may be caused by traditional histogram equalization. For example, CLAHE increases the contrast ratio between the damaged area and the background from 1:2 to 1:5, while limiting the local contrast enhancement to avoid overexposure. Subsequently, the image is upsampled to the standard size of the network input using Nearest Neighbor Interpolation. Nearest Neighbor Interpolation is a simple and intuitive image scaling (or geometric transformation) algorithm. Its core idea is to fill the scaled image space by copying the pixel value closest to the target pixel in the original image. This can preserve the sharpness of the damaged edges (such as the clarity of the edges of tiny fiber breaks) to the greatest extent and avoid the blurring effect introduced by bilinear interpolation.

[0106] In this embodiment, by repeatedly acquiring time-domain signals and calculating the average value, random noise is effectively suppressed, the signal-to-noise ratio is improved, and the problem of large noise interference in the original signal is solved. Based on the GFRP thickness, the center frequency is dynamically calculated and the target frequency band is selected, overcoming the defect of insufficient contrast in fixed frequency band imaging. The target frequency band is integrated to generate a two-dimensional image, avoiding information redundancy across the entire frequency band. The contrast is enhanced by CLAHE while preserving the sharpness of the damage edge, solving the problem that infrared thermal imaging is significantly affected by surface condition. The resulting high-quality target image data provides a reliable foundation for subsequent feature extraction and significantly improves the detection capability of minor damage.

[0107] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 In step S03, the step of extracting features from the target image data to obtain damage features includes steps S11 to S13:

[0108] Step S11: Process the target image data through a preset residual network to generate a multi-scale feature map;

[0109] It should be noted that the preset residual network is a deep convolutional neural network based on ResNet-50 as its backbone, upon which a Feature Pyramid Network (FPN) is built. ResNet-50 is a deep residual network that addresses the gradient vanishing and representation bottleneck problems in deep neural networks by introducing residual connections. The Feature Pyramid enhances the model's ability to detect targets of different sizes by constructing multi-scale feature representations. Multi-scale feature maps refer to feature representations of the same input image generated by different network layers in the preset residual network with different spatial resolutions and semantic levels.

[0110] Additionally, it should be noted that because GFRP composite materials have a multi-layered structure, the reflected signals of internal damage (such as deep layering and micropores) are weak and deeply buried in the complex background echo. Traditional shallow networks are difficult to effectively extract these deep and abstract features. Preset residual networks, by introducing residual connections, allow the network to be stably trained in extremely deep architectures (such as ResNet-50), avoiding the gradient vanishing or exploding problem.

[0111] Step S12: Obtain the context feature vector of the multi-scale feature map, and calculate the channel attention weight vector of the multi-scale feature map based on the context feature vector;

[0112] It should be noted that the context feature vector refers to the global distribution information of the features encoded at that scale after the feature map is compressed into a low-dimensional vector. The channel attention weight vector is a weight vector that quantifies the importance of each channel in the multi-scale feature map and is used to dynamically adjust the channel contribution.

[0113] Step S13: Perform a channel-by-channel weighted operation on the channel attention weight vector and the multi-scale feature map to obtain the damage features.

[0114] It should be noted that the calculated channel attention weight vector is multiplied channel-by-channel with the original multi-scale feature map, and the calculation formula is as follows:

[0115]

[0116] in, This is the weighted feature map. This is the original multi-scale feature map. This is the channel attention weight vector. The weighted feature map is upsampled to a uniform size (e.g., 256×256) using bilinear interpolation, and then fused into the final damage feature through a 1×1 convolution.

[0117] In this embodiment, a multi-scale feature map of the target image is extracted by a preset residual network, which solves the problem of missing small damage due to the reliance on single-scale features in traditional methods. The network can capture local details (such as fiber fracture) and global structure (such as hierarchical distribution) at the same time. Channel attention weights are generated by context feature vectors to solve the problem of uneven contribution of damage features in different frequency bands. The weights of key channels (such as high-frequency damage response) are dynamically enhanced. Multi-scale features are fused by channel-by-channel weighting to solve the problems of feature redundancy and noise interference, thereby improving the detection effect of multi-scale damage inside GFRP composite materials.

[0118] In one feasible implementation, step S11, which involves processing the target image data through a preset residual network to generate a multi-scale feature map, includes steps B01 to B04:

[0119] Step B01: Input the target image data into a preset residual network, wherein the preset residual network includes residual blocks, and each residual block includes shallow residual blocks and deep residual blocks.

[0120] It's important to note that a residual block is the basic unit of a residual network. Residual connections preserve information, preventing information loss during deep convolution. For example, a residual block might contain two convolutional layers and one skip connection. The input data bypasses the convolutional layers through the skip connection and is then added to the output of the convolutional layers. Shallow residual blocks are located at the front of the network and are responsible for extracting low-level features of the image, such as edges and textures. For instance, when processing an X-ray image of a metal part, a shallow residual block might capture the edges of tiny cracks on the surface of the part. Deep residual blocks are located at the back of the network and are responsible for extracting high-level semantic features of the image, such as the shape and category of objects. For example, in the same X-ray image, a deep residual block might identify the overall shape and location of cracks.

[0121] For example, target image data is input into a pre-defined residual network, which consists of multiple residual blocks connected in series. These residual blocks are categorized by depth into shallow residual blocks (such as the Basic Block in ResNet-18 / 34) and deep residual blocks (such as the Bottleneck Block in ResNet-50 / 101). Shallow residual blocks typically contain 2-3 convolutional layers, directly learning the residual mapping from input to output, suitable for extracting low-level features (such as edges and textures). Deep residual blocks employ a bottleneck structure, reducing computational cost through dimensionality reduction, suitable for extracting high-level semantic features (such as object parts and global structure). Taking ResNet-50 as an example, the input image first passes through an initial convolutional layer and a max-pooling layer, then enters four residual stages, each containing 3 / 4 / 6 / 3 bottleneck residual blocks.

[0122] Step B02: The target image data is abstracted layer by layer through each residual block to generate multi-level feature maps corresponding to each residual block. The multi-level feature maps include shallow feature maps and deep feature maps. The shallow feature maps are generated by the corresponding shallow residual blocks, and the deep feature maps are generated by the corresponding deep residual blocks.

[0123] It's important to note that layer-by-layer abstraction refers to the process where features are gradually abstracted from low-level (e.g., edges, colors) to high-level (e.g., object parts, overall shape) as data is passed through layers in the network. Multi-level feature maps are feature representations output by residual blocks at different levels, containing multi-scale information from low to high levels. Shallow feature maps are generated from shallow residual blocks, preserving detailed image information such as edges and textures. Deep feature maps are generated from deep residual blocks, containing semantic information about the image, such as object category and location.

[0124] For example, the target image data is sequentially passed through each residual block. Each residual block performs a nonlinear transformation and residual learning on the input features to generate a feature map of the corresponding level. The feature maps generated by each residual block are then aggregated to obtain a multi-level feature map. This multi-level feature map is divided into shallow feature maps (generated by shallow residual blocks) and deep feature maps (generated by deep residual blocks) based on depth. Shallow feature maps retain more spatial detail and have higher resolution (e.g., the output feature map size in stage 1 is 56×56), but have lower semantic abstraction. Deep feature maps reduce resolution through multiple downsampling operations (e.g., convolution or pooling with stride=2) (e.g., the output feature map size in stage 4 is 7×7), but have higher semantic abstraction and contain global context information. For example, in ResNet-50, the first-stage residual block outputs a shallow feature map (C=64, H=56, W=56), and the fourth stage outputs a deep feature map (C=2048, H=7, W=7), where C is the number of channels and H / W is the feature map height / width.

[0125] Step B03 involves performing channel dimension compression and upsampling operations on the deep feature map to make the size of the deep feature map similar to that of the shallow feature map. Figure 1 This yields a compressed deep feature map.

[0126] It's important to note that channel compression refers to reducing the number of channels in a feature map to decrease computational complexity. For example, a deep feature map might have 2048 channels, which can be reduced to 256 channels through compression. Upsampling, on the other hand, involves increasing the spatial size of a feature map using methods such as interpolation to match the size of a shallow feature map. For instance, a deep feature map with a size of 7x7 might be expanded to 14x14 through upsampling, matching the size of a shallow feature map.

[0127] For example, in order to fuse multi-scale information, the size of the deep feature map needs to be adjusted to match that of the shallow feature map. Figure 1 To address this, channel dimension compression is achieved by using 1×1 convolutional layers to reduce the number of channels in deep feature maps (e.g., from 2048 to 256), thereby reducing computational complexity and alleviating feature redundancy. This avoids the dimension mismatch problem when directly fusing shallow feature maps (with fewer channels) and deep feature maps (with more channels). Upsampling is then performed using bilinear interpolation or transposed convolution to enlarge the size of the compressed deep feature maps to match that of the shallow feature maps (e.g., upsampling from 7×7 to 14×14).

[0128] Step B04: Fuse the compressed deep feature map with the shallow feature map to generate a multi-scale feature map.

[0129] It should be noted that multi-scale feature maps are the result of fusing shallow and deep feature maps, containing information at multiple scales from low to high levels. For example, when detecting delamination defects in composite materials, a multi-scale feature map may simultaneously contain detailed information about fiber edges and semantic information about the delamination regions.

[0130] For example, the compressed and upsampled deep feature map is concatenated with the shallow feature map along the channel dimension or added element-wise to generate a feature map that integrates multi-scale information.

[0131] For example, to aid in understanding the technical concept or principles of this application, please refer to Figure 4 , Figure 4 An enhanced feature pyramid network architecture diagram is provided, in which the input image is processed by the backbone network to generate multi-level feature maps. , , , Feature Pyramid Network (FPN) performs feature fusion through top-down paths and lateral connections: deep feature maps Upsampling after 1×1 convolution compression of channels, compared with shallow feature maps Fusion generation This process is repeated to obtain , The final output is an enhanced multi-scale feature map. , , , This forms feature pyramids covering different resolutions, used to detect damaged targets of different sizes. Furthermore, It will also be generated through 2×2 max pooling kernels. Feature map.

[0132] In this embodiment, the target image is input into a preset network containing shallow and deep residual blocks. Residual connections are used to alleviate gradient vanishing, ensuring the trainability of the deep network and laying a structural foundation for multi-scale feature extraction. Through layer-by-layer abstraction of residual blocks, shallow residual blocks capture low-level features such as edges and textures to generate shallow feature maps, while deep residual blocks extract high-level features such as semantics and structure to generate deep feature maps. This achieves multi-level feature coverage from local to global. Channel compression and upsampling are performed on the deep feature maps to solve the spatial resolution loss problem caused by downsampling, making their size match that of the shallow feature maps. While preserving high-level semantic information, spatial details are restored. The compressed deep feature maps and shallow feature maps are fused, combining low-level details with high-level semantics to generate multi-scale feature maps that have both local accuracy and global semantics. Multi-level feature extraction can enhance feature richness, and cross-level fusion can improve detection sensitivity, significantly improving the accuracy of identifying small defects in non-destructive testing.

[0133] In one feasible implementation, step S12, which involves obtaining the context feature vector of the multi-scale feature map and calculating the channel attention weight vector of the multi-scale feature map based on the context feature vector, includes steps B11 to B15:

[0134] Step B11: For each scale of the feature map in the multi-scale feature map, perform a global spatial pooling operation on the feature map to compress the two-dimensional spatial features of the feature map into a one-dimensional context feature vector.

[0135] It's important to note that global spatial pooling is an operation that compresses the spatial dimensions (height and width) of a feature map into a single value. This can be either global average pooling (GAP) or global max pooling (GMP). For example, for a feature map of size H×W×C (H is height, W is width, and C is the number of channels), global average pooling calculates the average value of each channel in the spatial dimensions, generating a one-dimensional vector of length C. Two-dimensional spatial features refer to the information in the height and width dimensions of the feature map, containing local details and spatial distribution of the target. The context feature vector is a one-dimensional vector generated after global spatial pooling, containing global semantic information of the feature map.

[0136] For example, for each scale of the feature map in the multi-scale feature map, a global spatial pooling operation is performed to convert the two-dimensional feature map of each channel into a single scalar value by statistically analyzing the global information of the feature map in the spatial dimension (such as the average or maximum value).

[0137] Step B12: Input the context feature vector into a preset transformation network, which includes a first fully connected layer, a second fully connected layer, and a non-linear activation function.

[0138] It should be noted that the preset transformation network is a gated neural network module used to learn the dependencies between channels. It consists of a first fully connected layer, a second fully connected layer, and a nonlinear activation function. This module generates channel attention weight vectors through nonlinear transformations to enhance the expressive power of key features. The first fully connected layer is the first layer of the preset transformation network, responsible for mapping the input context feature vector to a low-dimensional space. The second fully connected layer is the last layer of the preset transformation network, responsible for mapping the low-dimensional features back to the original number of channels, generating the channel attention weight vectors. The nonlinear activation function is used to introduce nonlinear transformations to enhance the network's expressive power; it can be ReLU (Rectified Linear Unit), Sigmoid, or Tanh (hyperbolic tangent function), etc.

[0139] For example, the transformation network performs nonlinear transformation on the context feature vector through fully connected layers and nonlinear activation functions to learn the complex dependencies between channels. The fully connected layers can capture the global interaction between all channels, while the nonlinear activation functions introduce nonlinearity and enhance the expressive power of the model.

[0140] Step B13: The context feature vector is reduced in dimension by the first fully connected layer to obtain the first dimension feature.

[0141] It should be noted that dimensionality reduction mapping refers to the operation of mapping high-dimensional features to a low-dimensional space, used to reduce computational complexity and extract key features. The first-dimensional feature is the low-dimensional feature vector generated after dimensionality reduction mapping, containing the main information of the context features.

[0142] For example, dimensionality reduction mapping reduces computational complexity by decreasing the dimensionality of feature vectors while extracting the most critical feature information. For instance, it maps a context feature vector of length C to a space of length C / r (where r is the dimensionality reduction ratio, such as r=4).

[0143] Step B14: Perform a nonlinear transformation on the first-dimensional features based on a nonlinear activation function to obtain the second-dimensional features;

[0144] It should be noted that nonlinear transformation refers to transforming features through a nonlinear activation function, introducing nonlinear relationships, and enhancing the network's expressive power. The second-dimensional features are the feature vectors generated after the nonlinear transformation, containing more complex inter-channel relationships.

[0145] For example, nonlinear activation functions enable models to learn complex nonlinear relationships by introducing nonlinearity. For instance, the ReLU function sets negative values ​​to zero and retains positive values, enhancing the sparsity of features; the Sigmoid function maps features to the [0,1] interval, making it suitable for generating probabilities or weights.

[0146] Step B15: The feature dimension of the second dimension feature is restored to the original number of channels of the multi-scale feature map through the second fully connected layer to obtain the channel attention weight vector.

[0147] It's important to note that feature dimension refers to the length of the feature vector or the number of channels. The original number of channels refers to the number of multi-scale feature maps in the channel dimension, i.e., the number of channels before inputting into the network. The channel attention weight vector is a one-dimensional vector with a length equal to the original number of channels. Each element corresponds to the attention weight of a channel; the larger the weight value, the more important the feature of that channel.

[0148] For example, the second fully connected layer maps the low-dimensional features back to the original number of channels, generating attention weights for each channel. These weights represent the importance of each channel and are used to weight the original feature map.

[0149] In this embodiment, global spatial pooling is used to compress the two-dimensional spatial features at each scale of the multi-scale feature map into a one-dimensional context feature vector, which solves the problem of spatial information redundancy, extracts key semantic features, and uses a preset transformation network to reduce the dimensionality of the vector, perform nonlinear transformation and restore the dimensionality, and generate channel attention weight vectors. By dynamically adjusting the importance of channels, key features are strengthened and noise is suppressed, which solves the problem of missed detection and false detection caused by feature interference in existing nondestructive testing, and significantly improves the accuracy of defect localization and classification.

[0150] In one feasible implementation, the damage detection method further includes step B21:

[0151] Step B21: During the training of the preset residual network, the network parameters in the preset residual network are optimized end-to-end using a composite loss function. The composite loss function includes a classification loss term and a regression loss term. The classification loss term includes a modulation factor, which is used to reduce the weight of the background region in the total loss corresponding to the composite loss function. The background region is the region without damage in the training samples. The regression loss term includes a smoothing loss function, which is used to calculate the coordinate regression error between the predicted bounding box and the preset standard bounding box. The predicted bounding box is the candidate bounding box predicted by the preset residual network. The smoothing loss function includes a squared term and a linear term. When the coordinate regression error is less than the preset error, the smoothing loss function uses the squared term for function calculation. When the coordinate regression error is not less than the preset error, the smoothing loss function uses the linear term for function calculation.

[0152] It's important to note that the composite loss function, composed of a classification loss term and a regression loss term, measures the difference between the network output and the true label. Network parameters are learnable parameters in the pre-defined residual network used to adjust the network output, including the weights and biases of convolutional layers. End-to-end optimization refers to an optimization method where the network automatically adjusts parameters throughout the entire process from input data to output. The classification loss term measures the accuracy of the network in classifying damage. The modulation factor is a parameter in the classification loss term, used to reduce the weight of the background region in the total loss of the composite loss function. The background region is the area in the training samples that does not contain damage, such as areas without scratches or cracks. The total loss is the final loss value calculated by the composite loss function, a weighted sum of the classification and regression loss terms. The regression loss term measures the accuracy of the network in regressing the damage location. The smoothing loss function is a function form used in the regression loss term, employing different calculation methods (squared or linear terms) depending on the magnitude of the coordinate regression error. The predicted bounding box is the candidate bounding box predicted by the pre-defined residual network, representing areas that the network believes may contain damage. The preset standard bounding boxes are manually annotated ground truth bounding boxes containing damage, serving as a reference standard for network training. Coordinate regression error is the coordinate difference between the predicted bounding box and the preset standard bounding box. Candidate bounding boxes, or predicted bounding boxes, are regions in the image predicted by the network that may contain damage. The squared term is the calculation method used by the smoothing loss function when the coordinate regression error is less than the preset error; it is highly sensitive to error. The linear term is the calculation method used by the smoothing loss function when the coordinate regression error is not less than the preset error; it is relatively less sensitive to large errors, preventing a sharp increase in the loss value.

[0153] For example, an end-to-end optimization is performed using a composite loss function, which is a weighted sum of classification and regression loss terms. The composite loss function is as follows:

[0154]

[0155] in, For composite loss function, For the category loss item, For the regression loss term, These are the weighting coefficients corresponding to the classification loss term. These are the weighting coefficients corresponding to the regression loss term.

[0156] The classification loss term uses the Focal Loss function. Focal Loss is a loss function designed to solve the class imbalance problem, especially suitable for tasks such as object detection where the ratio of positive to negative samples is significantly different. Its core idea is to dynamically adjust the weights of the cross-entropy loss so that the model pays more attention to the hard-to-classify samples, thereby improving the ability to identify the minority class. Its mathematical expression is:

[0157]

[0158] in, For the category loss item, It is the probability predicted by the preset residual network model. It is a factor that balances class weights. This is the modulation factor (usually set to 2). By introducing the modulation factor, the weight of the background region (i.e., the region in the training samples that does not contain damage) in the total loss of the composite loss function can be reduced. This is because in actual damage detection scenarios, the background region usually occupies a large proportion. If it is not processed, the network may over-focus on the background region during training, resulting in insufficient feature learning of the damage region. By reducing the weight of the background region through the modulation factor, the network can focus more on the damage region and improve the accuracy of damage category recognition.

[0159] The regression loss term uses the Smooth L1 Loss function, which combines the advantages of L1 Loss (absolute error) and L2 Loss (squared error). It is commonly used in regression tasks (such as bounding box regression in object detection) to address the problems of L2 Loss's sensitivity to outliers and L1 Loss's gradient discontinuity at zero. Its mathematical expression is:

[0160]

[0161] in, That is, the coordinate regression error. When the coordinate regression error is less than the preset error (e.g., 1), that is... When the smoothing loss function uses the squared term, that is... When performing function calculations, the squared term is more sensitive to changes in error, especially when the error is small. This allows the network to fine-tune the predicted bounding box, further improving localization accuracy. For example, when the coordinate deviation between the predicted bounding box and the preset standard bounding box is small, using the squared term to calculate the loss allows the network to focus more on minute positional adjustments, thus making the predicted bounding box more accurately match the standard bounding box. When the coordinate regression error is not less than a preset error, i.e. When the smoothing loss function uses a linear term, that is... When performing function calculations, linear terms, unlike square terms, do not cause a sharp increase in the loss value when the error is large, thus avoiding the risk of gradient explosion and ensuring the stability of network training. For example, when the coordinate deviation between the predicted bounding box and the preset standard bounding box is large, using linear terms to calculate the loss can prevent the network from becoming unstable due to excessive loss when adjusting the predicted bounding box, and gradually bring the predicted bounding box closer to the standard bounding box.

[0162] Additionally, it should be noted that after network training, mean precision (AP) and mean average precision (mAP) can be used as evaluation metrics to verify the network's visualization effect on multi-scale damage in GFRP composites. Based on the comparison between the network's predictions for all samples in the test dataset and the actual annotations, the precision and recall for each type of damage are calculated. By adjusting the classification confidence threshold, a set of precision-recall data points is generated, and a precision-recall relationship curve is constructed based on these data points. The area enclosed by the relationship curve and the coordinate axes is calculated as the average precision evaluation metric for that type of damage. The calculation formula is as follows:

[0163]

[0164] in, , , For a real example, As a false positive example, This is a false negative.

[0165] The arithmetic mean of the average precision indices for all damage categories is used to obtain the mean average precision index (mAP), which comprehensively measures the overall performance of the model. The calculation formula is as follows:

[0166]

[0167] in, To test the number of damage categories in the dataset, For the first Average accuracy of damage class.

[0168] By measuring the values ​​of the average accuracy index and the mean of average accuracy index, the effectiveness of the network in locating and classifying multi-scale damage in composite materials can be quantitatively verified.

[0169] In this embodiment, the preset residual network parameters are optimized end-to-end using a composite loss function, which solves the problem that a single loss function in nondestructive testing cannot simultaneously achieve classification and localization accuracy. The modulation inducer reduces the weight of the background region, reduces interference from irrelevant information, and improves the classification accuracy of the damaged region. The smoothing loss function adaptively selects either the squared term or the linear term to calculate the coordinate regression error, which enhances gradient sensitivity when the error is small and avoids overfitting when the error is large, thus improving the localization accuracy of the bounding box. The synergistic effect of both effectively solves the problem of poor detection performance in existing nondestructive testing technologies and enhances the model's ability to identify and locate damage.

[0170] In one feasible implementation, step S04, predicting the geometric offset of the damage feature, and locating the damage target in the composite material to be tested based on the geometric offset and the damage feature, includes steps B31-B32:

[0171] Step B31: Calculate the geometric offset vector of the target bounding box corresponding to the damage feature based on the preset regression prediction module;

[0172] It should be noted that the preset regression prediction module is a pre-defined module with regression prediction capabilities, consisting of depthwise separable convolutional layers, group normalization layers, Swish activation function layers, and offset output layers. This module has been trained on a large amount of labeled composite material damage data and can learn the mapping relationship between damage features and the geometric offset vector of the target bounding box. The target bounding box is a rectangular region used to define the damage target. For example, when delamination damage is detected in a GFRP composite material, the bounding box will completely surround the delamination region, clearly defining its location and extent.

[0173] For example, in the regression prediction module, depthwise separable convolutional layers extract spatial features, decomposing standard convolution into depthwise convolution and pointwise convolution, which are used to extract spatial features and merge cross-channel features, respectively, improving computational efficiency; group normalization divides the input features into multiple groups for normalization to stabilize feature distribution; the Swish activation function introduces a nonlinear transformation, expressed as:

[0174]

[0175] in, It can be predefined or learned, providing the network with non-linear representation capabilities; the offset output layer generates accurate prediction bias, i.e., geometric offset vector, based on the data processed by the previous layer.

[0176] When calculating the geometric offset vector, the offset of each coordinate dimension is output for each target bounding box. The calculation formula is as follows:

[0177]

[0178] in,( , , , ) represents the coordinate parameters of the preset true bounding box. , , , ) represents the coordinate parameters of the target bounding box, , , , ) represents the offset between the target bounding box and the preset real bounding box in each coordinate dimension, i.e., the geometric offset vector.

[0179] Additionally, it should be noted that for each target bounding box, the content within the target bounding box can be identified by a preset classifier, and a classification confidence vector can be output. By viewing the confidence vector output by the classification module, the category with the highest confidence can be selected as the damage type of the target bounding box, such as cracks, pores, delamination, etc. Each type has unique characteristics and has different effects on material properties.

[0180] Step B32: Based on the geometric offset vector, perform coordinate transformation on the target bounding box corresponding to the damage feature, and output the positioning coordinates of the damaged target in the composite material to be detected.

[0181] It should be noted that coordinate transformation is the process of adjusting the target bounding box coordinates based on the geometric offset vector. The positioning coordinates are the precise location coordinates of the damaged target in the image after coordinate transformation.

[0182] For example, to aid in understanding the technical concept or principles of this application, please refer to Figure 5 , Figure 5 A flowchart of the regression prediction module is provided. A 256-channel input feature map passes through the following components in sequence: a first 3×3 depthwise separable convolutional layer, a first group normalization layer (32 groups), a first Swish activation function, a second 3×3 depthwise separable convolutional layer, a second group normalization layer (32 groups), and a second Swish activation function layer. Finally, a 1×1 convolutional layer outputs coordinate offset prediction, i.e., a geometric offset vector, which generates 4 geometric parameters for each detection box to accurately correct the positional deviation between the candidate box and the real damage area.

[0183] In this embodiment, based on the preset regression prediction module, the geometric offset vector of the target bounding box corresponding to the damage feature is accurately calculated, which solves the limitations of the existing technology in extracting multiple types of damage and improves the detection accuracy. The bounding box coordinates are transformed according to the offset vector, and the damage target positioning coordinates are output, which overcomes the shortcomings of the traditional method in positioning ambiguity and realizes the accurate positioning of multi-scale damage in GFRP composite materials. This effectively solves the problem of poor detection effect of existing non-destructive testing technology.

[0184] For example, to aid in understanding the technical concept or principles of this application, please refer to Figure 6 , Figure 6 Terahertz time-domain spectroscopy imaging scans under different contrast mechanisms are provided, fully presenting the damage characterization morphology under different imaging mechanisms. Figure 6 In the image, (a) is a terahertz scanning image based on peak-valley amplitude, (b) is a terahertz scanning image based on the integrated spectrum from 0.7 THz to 1.2 THz, (c) is a two-dimensional representation of damage classification obtained based on the method of this application, and (d) shows the three-dimensional visualization effect of GFRP composite material damage, in which the depth information characterizes the position information of the damage or structural features in the material thickness direction (Z-axis) carried by the terahertz wave when it propagates inside the GFRP composite material.

[0185] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the damage detection method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0186] This application also provides a damage detection system; please refer to [reference needed]. Figure 7 The damage detection system includes:

[0187] The signal extraction module 10 is used to scan the composite material to be detected by a terahertz time-domain spectroscopy system to obtain the original time-domain echo signal of the composite material to be detected, wherein the composite material to be detected is a glass fiber reinforced polymer composite material to be detected.

[0188] Image processing module 20 is used to preprocess the original time-domain echo signal to obtain target image data;

[0189] Feature extraction module 30 is used to extract features from target image data to obtain damage features;

[0190] The target localization module 40 is used to predict the geometric offset of the damage features and locate the damage target in the composite material to be tested based on the geometric offset and the damage features.

[0191] The damage detection system provided in this application, employing the damage detection method described in the above embodiments, can solve the technical problem of poor detection effect in existing non-destructive testing technologies. Compared with the prior art, the beneficial effects of the damage detection system provided in this application are the same as those of the damage detection method provided in the above embodiments, and other technical features of the damage detection system are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0192] This application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the damage detection method in Embodiment 1 above.

[0193] The following is for reference. Figure 8 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of this application. The electronic devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, and PADs (Portable Application Description: Tablet computers), as well as fixed terminals such as digital TVs and desktop computers. Figure 8 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0194] like Figure 8 As shown, the electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. The communication device 1009 allows the electronic device to communicate wirelessly or wiredly with other devices to exchange data. Although the diagrams show electronic devices with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented alternatively.

[0195] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0196] The electronic device provided in this application, employing the damage detection method described in the above embodiments, can solve the technical problem of poor detection effect in existing non-destructive testing technologies. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the damage detection method provided in the above embodiments, and other technical features of the electronic device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0197] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0198] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0199] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the damage detection method in the above embodiments.

[0200] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0201] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.

[0202] The aforementioned computer-readable storage medium carries one or more programs that, when executed by an electronic device, cause the damage detection device to: scan the composite material to be detected using a terahertz time-domain spectroscopy system to obtain the original time-domain echo signal of the composite material to be detected, wherein the composite material to be detected is a glass fiber reinforced polymer composite material to be detected; preprocess the original time-domain echo signal to obtain target image data; extract features from the target image data to obtain damage features; predict the geometric offset of the damage features; and locate the damage target in the composite material to be detected based on the geometric offset and the damage features.

[0203] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0204] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0205] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0206] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described damage detection method, which can solve the technical problem of poor detection effect in existing non-destructive testing technologies. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the damage detection method provided in the above embodiments, and will not be repeated here.

[0207] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the damage detection method described above.

[0208] The computer program product provided in this application can solve the technical problem of poor detection effect in existing nondestructive testing technologies. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the damage detection method provided in the above embodiments, and will not be repeated here.

[0209] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A damage detection method, characterized in that, The damage detection method includes: The original time-domain echo signal of the composite material to be tested was obtained by scanning the composite material to be tested using a terahertz time-domain spectroscopy system, wherein the composite material to be tested is a glass fiber reinforced polymer composite material to be tested. The average value of the original time-domain echo signal is calculated to obtain the denoised signal, and the denoised signal is transformed from the time domain to the frequency domain to obtain the signal spectrum; The center frequency of the composite material to be tested is calculated based on the average thickness of the composite material to be tested, and the target frequency band of the signal spectrum is determined based on the center frequency; Integrate the signal spectrum within the target frequency band to generate a two-dimensional image of the composite material to be detected; Perform a contrast enhancement operation on the two-dimensional image, and adjust the enhanced two-dimensional image to a preset network input size to obtain target image data; The target image data is processed by a preset residual network to generate multi-scale feature maps; Obtain the context feature vector of the multi-scale feature map, and calculate the channel attention weight vector of the multi-scale feature map based on the context feature vector; The channel attention weight vector is weighted and processed channel-by-channel by the multi-scale feature map to obtain the damage features; The geometric offset vector of the target bounding box corresponding to the damage feature is calculated based on the preset regression prediction module; Based on the geometric offset vector, the coordinate transformation is performed on the target bounding box corresponding to the damage feature to output the positioning coordinates of the damaged target in the composite material to be detected.

2. The damage detection method as described in claim 1, characterized in that, The step of processing the target image data through a preset residual network to generate multi-scale feature maps includes: The target image data is input into a preset residual network, wherein the preset residual network includes residual blocks, and each residual block includes shallow residual blocks and deep residual blocks; The target image data is abstracted layer by layer through each residual block to generate a multi-level feature map corresponding to each residual block. The multi-level feature map includes a shallow feature map and a deep feature map. The shallow feature map is generated by the corresponding shallow residual block, and the deep feature map is generated by the corresponding deep residual block. Channel dimension compression and upsampling are performed on the deep feature map to make the size of the deep feature map consistent with that of the shallow feature map, resulting in a compressed deep feature map; The compressed deep feature map is fused with the shallow feature map to generate a multi-scale feature map.

3. The damage detection method as described in claim 1, characterized in that, The steps of obtaining the context feature vector of the multi-scale feature map and calculating the channel attention weight vector of the multi-scale feature map based on the context feature vector include: For each scale of the multi-scale feature map, a global spatial pooling operation is performed on the feature map to compress the two-dimensional spatial features of the feature map into a one-dimensional context feature vector. The context feature vector is input into a preset transformation network, which includes a first fully connected layer, a second fully connected layer, and a nonlinear activation function. The first fully connected layer is used to perform dimensionality reduction mapping on the context feature vector to obtain the first dimension feature; The first dimension feature is nonlinearly transformed based on the nonlinear activation function to obtain the second dimension feature; The second fully connected layer restores the feature dimension of the second dimension feature to the original number of channels of the multi-scale feature map, thus obtaining the channel attention weight vector.

4. The damage detection method as described in claim 1, characterized in that, The damage detection method further includes: During the training process of the preset residual network, the network parameters in the preset residual network are optimized end-to-end using a composite loss function. The composite loss function includes a classification loss term and a regression loss term. The classification loss term includes a modulation factor, which is used to reduce the weight of the background region in the total loss corresponding to the composite loss function. The background region is a region in the training samples that does not contain damage. The regression loss term includes a smoothing loss function, which is used to calculate the coordinate regression error between the predicted bounding box and the preset standard bounding box. The predicted bounding box is the candidate bounding box predicted by the preset residual network. The smoothing loss function includes a squared term and a linear term. When the coordinate regression error is less than a preset error, the smoothing loss function uses the squared term for function calculation; when the coordinate regression error is not less than the preset error, the smoothing loss function uses the linear term for function calculation.

5. An electronic device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the damage detection method as described in any one of claims 1 to 4.

6. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the damage detection method as described in any one of claims 1 to 4.

7. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the damage detection method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Terahertz intelligent identification method and system for layered damage of composite material in multiple scenes

    CN118503850A

  • Terahertz reflection image-based fiber reinforced composite material non-damage degree discrimination method, identification device and storage medium

    CN121113924A