Infrared nondestructive detection lamp shadow processing method based on target guidance

By using a target-guided infrared nondestructive testing method, high-precision lamp shadow mask images are generated by tensor feature processing and Fourier convolutional networks, which solves the problem of lamp shadow artifact interference in infrared detection and achieves efficient defect identification and quantitative assessment.

CN121504766BActive Publication Date: 2026-08-25CHINA AIRPLANT STRENGTH RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510861728.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2026-08-25
Estimated Expiration
2045-06-25

AI Technical Summary

Technical Problem

In infrared nondestructive testing, the interference of light shadow artifacts caused by highly reflective objects or complex geometric structures is serious, affecting defect identification and quantitative assessment. Existing methods are difficult to effectively distinguish between real defects and artifacts.

Method used

A target-guided infrared non-destructive testing method is adopted. Through tensor feature processing, lamp shadow region localization and Fourier convolution feature extraction network, a high-precision lamp shadow mask image is generated and repaired, and finally non-destructive defect detection is performed.

Benefits of technology

It achieves high-precision repair of the light shadow area, improves the quality of infrared images and defect recognition capabilities, is suitable for the detection of complex structures, has strong adaptability, and offers fast detection speed and high accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121504766B_ABST
    Figure CN121504766B_ABST
Patent Text Reader

Abstract

The application discloses an infrared nondestructive detection lamp shadow processing method based on target guidance, which is used for repairing and defect detection of artifacts or highlight areas caused by high reflection or direct light in collected infrared image data, and comprises the following steps: S1, collecting infrared images and performing tensor feature processing; S2, based on spatial position information guidance, performing lamp shadow area target positioning on the infrared images after the tensor feature processing is completed, and generating a lamp shadow mask image; S3, inputting the lamp shadow mask image and the infrared image into a Fourier convolution feature extraction lamp shadow repair network based on a target guidance mechanism to obtain a lamp shadow repair image; and S4, inputting the lamp shadow repair image into a defect detection network for nondestructive defect detection. The application is compatible with multiple types of test pieces, has strong adaptability, high processing speed and high detection precision, and can be widely applied to structural health monitoring and defect analysis in the fields of aerospace, rail transit, wind power and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of infrared nondestructive testing, and more particularly to a target-guided infrared nondestructive testing light shadow processing method. Background Technology

[0002] With the widespread application of high-performance composite materials in various industrial equipment, the development of structural non-destructive testing technology is particularly crucial. Infrared thermal imaging, as a technique for defect assessment using temperature field response, is widely used in practical engineering applications due to its advantages such as non-contact, high efficiency, and visualization. The basic principle of infrared non-destructive testing is to apply transient or periodic heating to the surface of the object being tested using an external excitation source (such as a halogen lamp, laser, or electric heater), and then acquire thermal response images of the material surface using an infrared thermal imager. This allows for analysis of temperature distribution differences to determine the presence of internal defects such as cracks, delamination, and voids.

[0003] However, in actual testing, when the object being tested has a high thermal reflectivity or a complex surface geometry, the strong reflected light generated by the excitation source can be received by the infrared camera, forming so-called "light shadow" artifacts. These artifacts typically have characteristics such as strong contrast, high brightness, and symmetrical distribution, which can mask the true defect information, leading to missed detections, false detections, or even misjudgments, and seriously interfering with the quantitative assessment of defects.

[0004] Current research methods for addressing the problem of lamp shadows mainly fall into the following categories:

[0005] (1) Image enhancement and filtering methods: such as histogram equalization, high-pass filtering, wavelet transform, etc. These methods can improve image contrast to a certain extent, but they are prone to causing loss of image details and cannot distinguish between real defects and light shadows.

[0006] (2) Physical modeling method: Optical reflection removal is achieved by modeling the distribution of light sources and the reflection characteristics of materials, but the model is difficult to build, the calculation is complex, and the adaptability is poor.

[0007] (3) Deep learning restoration method: It has been gradually applied to the field of image restoration in recent years, but a model system specifically for infrared lamp shadow processing has not yet been formed, especially in terms of the trade-off between defect preservation and artifact elimination.

[0008] Therefore, there is an urgent need for an infrared image light shadow interference processing method that, based on the identification of the light shadow area, preserves the thermal response characteristics of defects to the greatest extent possible, thereby improving the quality of infrared images and the ability to identify subsequent defects. Summary of the Invention

[0009] The purpose of this invention is to overcome the shortcomings of the prior art and provide a target-guided infrared non-destructive testing light shadow processing method.

[0010] The objective of this invention is achieved through the following technical solution:

[0011] A first aspect of the present invention provides a target-guided infrared non-destructive testing light shadow processing method for repairing artifacts or bright areas caused by high reflectivity or direct light in acquired infrared image data and detecting defects, comprising the following steps:

[0012] S1: Acquire infrared images and perform tensor feature processing;

[0013] S2: Based on spatial location information guidance, target localization of the light shadow region is performed on the infrared image after tensor feature processing, and a light shadow mask image is generated;

[0014] S3: Input the light shadow mask image and infrared image into the light shadow restoration network based on the target guidance mechanism Fourier convolution feature extraction to obtain the light shadow restoration image;

[0015] S4: Input the lamp shadow restoration image into the defect detection network for non-destructive defect detection.

[0016] Further, step S1 includes the following sub-steps:

[0017] S11: Apply periodic or pulsed thermal excitation to the surface of the material to be tested through an externally controllable photothermal excitation system;

[0018] S12: Use an infrared thermal imager to acquire time-series infrared images and construct a multi-frame image matrix containing information on the spatiotemporal changes in thermal diffusion, which will then be used as input for subsequent processing.

[0019] S13: Using the PCA algorithm, independent component analysis algorithm, or L4 algorithm for matrix tensor decomposition, noise interference in the thermal distribution image sequence is reduced to obtain the infrared image with tensor feature processing completed.

[0020] Further, step S2 includes the following sub-steps:

[0021] S21: Based on the layout of the excitation source of the photothermal excitation system, the potential lamp shadow area is located a priori.

[0022] S22: Image enhancement and coarse segmentation processing, including the following sub-steps:

[0023] S221: Perform image enhancement processing on the candidate regions previously defined in step S21, including histogram equalization, local contrast enhancement, and edge-preserving filtering;

[0024] S222: An adaptive threshold segmentation algorithm is used to dynamically define the boundary of the high-reflectivity region and extract the set of connected components corresponding to the lamp shadow region;

[0025] S23: Refined light shadow region identification with multiple constraints. The set of connected components extracted in step S222 is subjected to spatial geometric consistency constraint filtering to obtain the generated light shadow mask image. The spatial geometric consistency constraint filtering includes the following sub-steps:

[0026] S231: Horizontal and vertical spacing constraints:

[0027] Set the constraints as follows and Minimum spacing is applied to connected components with horizontal and vertical distributions to remove high-density artifacts; where W is the image width and H is the image height. and These represent the horizontal and vertical distance threshold factors, determined through a sample KS test. This represents the horizontal distance between the center points of the i-th and j-th regions. This represents the vertical distance between the center points of the i-th and j-th regions. , These represent the x-coordinates of the center points of the i-th and j-th regions in the image coordinate system, respectively. , Let represent the ordinate values ​​of the center points of the i-th and j-th regions in the image coordinate system, where i and j represent the region indices and c represents the subscript identifier of the center point;

[0028] S232: Horizontal and vertical alignment constraints:

[0029] Calculate the deviation of the x and y coordinates of the center of the connected domain, set the maximum allowable deviation threshold, and remove misaligned regions;

[0030] S233: Region area consistency constraint:

[0031] Based on the prior setting of upper and lower limits for the size of the light shadow area, excessively large or excessively small interfering targets are eliminated, specifically in the horizontal direction. vertical direction ;in For connected components pixel area To satisfy the horizontal spacing constraint in step S231, To satisfy the vertical spacing constraint in step S231, the vertical candidate set is... , Represents horizontally connected pairs. This represents a pair of vertically connected components. , , , These represent the pixel areas of each connected component;

[0032] S234: Verification of the geometric intersection of the centerlines:

[0033] An intersection relationship judgment model is established using the vectors connecting the center points of regions to filter out regions that do not meet the symmetry condition; assuming that the optimal result is obtained by filtering the horizontally connected components in step S233 ( , () center line Parameterized as: ,in Indicates the line connecting the center points of the horizontally connected domain. Indicates a connection any point on, ( , ) indicates a region The center coordinates, ( , ) indicates a region center coordinates This represents the normalized interpolation parameters of the horizontal centerline between two points; in step S233, the vertical connected components are used to select the optimal result. , () center line Parameterized as: ,in Represents the line connecting the center points of the vertically connected domain. Indicates a connection any point on, ( , ) indicates a region The center coordinates, ( , ) indicates a region center coordinates This represents the normalized interpolation parameters of the longitudinal centerline between two points; the intersection point is calculated using the vector cross product. ,when When intersecting, and These represent parameterized paths. and The index of the intersection point.

[0034] Furthermore, in step S21, when inspecting a planar structural specimen, a central region division method is adopted; based on the axisymmetric physical characteristics of the handheld optical excitation device, a spatial mapping relationship between the image coordinate system and the excitation source is established; the infrared image size is defined as H×W, i.e., height × width, and the boundary coordinates of the central positioning region R are calculated:

[0035]

[0036] In the formula and It is the size of the central region relative to the image's height and width;

[0037] When inspecting irregularly shaped specimens, a deep learning-based target detection network is used to locate targets in the light shadow area.

[0038] Furthermore, the Fourier convolutional feature extraction and shadow restoration network based on the target guidance mechanism in step S3 includes:

[0039] Gated convolutional downsampling module: The infrared image and the lamp shadow mask image are concatenated along the channel dimension and then input into the gated convolutional downsampling module to downsample the concatenated image and obtain the initial feature map. ,have The three-dimensional tensor, in which For the number of channels, and Let the height and width of the spliced ​​feature map be represented respectively. For each channel, its two-dimensional time-domain signal is denoted as... , here as well as These are the row index and column index of the spatial domain, respectively;

[0040] Parallel feature extraction module: Receives the preliminary feature map output by the gated convolutional downsampling module. ,Will Parallel input extraction of global frequency domain information Fast Fourier Convolution module for extracting local spatial information The conventional convolutional modules work together to extract multi-scale spatial context features;

[0041] Global-local feature fusion module: integrates global frequency domain information and local spatial information By adding elements one by one along the channel or in spatial location, preliminary fusion characteristics are obtained: Subsequently, preliminary fusion characteristics were analyzed. By sequentially applying batch normalized BN and ReLU activation, the fused features are obtained: ;

[0042] Skip Connections and Feature Enhancement Module: This module stores shallow features saved during the downsampling process of the gated convolutional downsampling module. Features after fusion Direct addition yields enhanced features. : ;

[0043] Gated convolutional upsampling module: Enhances features through gated deconvolution. The original image resolution is restored to obtain the lamp shadow restoration image.

[0044] Furthermore, the fast Fourier convolution module in the parallel feature extraction module includes:

[0045] right Perform a two-dimensional discrete Fourier transform to obtain the frequency domain representation. ,in , These are the frequency domain row index and the frequency domain column index, respectively.

[0046] After transformation, a set of learnable frequency domain convolution kernels are used. Multiplying it element-wise yields the convolution result. ;

[0047] Subsequently, the inverse Fourier transform was used to... Returning to the time domain, the features output by the branches of the Fast Fourier Convolution module are generated, which are the global frequency domain information. The expression is as follows:

[0048]

[0049] The conventional convolution module in the parallel feature extraction module includes:

[0050] For the initial feature map Applying a series of learnable spatial convolution kernels and biases, denoted as .

[0051] Furthermore, the gated convolutional upsampling module includes:

[0052] S351: Gating weight generation:

[0053]

[0054] In the formula, and These are the learnable convolutional kernel and the bias, respectively. Activate for Sigmoid and output the gate mask. ;

[0055] S352: Deconvolution upsampling:

[0056]

[0057] Where Deconv is a regular deconvolution operator or a transpose convolution operator, the output is... ;

[0058] S353: Gated Fusion

[0059]

[0060] In the formula, the upsampled features with dynamic weights are obtained. ;

[0061] S354: Layer-by-layer iteration:

[0062] Repeat the above process, upsampling multiple times until the image size is restored to the original size, and finally output the repaired result. .

[0063] Furthermore, the Fourier convolutional feature extraction and shadow restoration network based on the target guidance mechanism is trained through a multi-loss function objective joint optimization mechanism, specifically including:

[0064] generator Receive mask condition input, i.e., infrared image With light shadow mask image Output image with light and shadow restoration Discriminator Using the PatchGAN structure, the probability distribution of true / false values ​​in the input image is given by judging the authenticity of local image regions.

[0065] The training goal is to make generated Make as much as possible The result is determined to be true, while retaining the original infrared image without light shadows. Similarity at the pixel and perceptual feature levels; training is performed using pixel reconstruction loss, adversarial loss, feature matching loss, and high receptive field perceptual loss.

[0066] Furthermore, pixel reconstruction loss ,ensure With real images Maintain consistency in areas where there is no light or shadow.

[0067] Combating losses Including discriminator loss and generator loss , is described as In the formula For gradient penalty, This represents the weight coefficients of the generator gradient smoothing loss term. This represents the expected value or batch mean of the sample. This indicates that the discriminator is sensitive to the image. The probability distribution of the output being a "real image" Indicates the image The gradient calculation performed on the discriminator output is used to smooth the generator loss;

[0068] Generator loss for:

[0069] ;

[0070] Feature matching loss Including discriminators based on real and fake samples Loss is expressed as:

[0071]

[0072] In the formula, The output of the discriminator's intermediate layer, The number of intermediate layers. Indicates correspondence The original, undamaged image, i.e., the "correct answer". This represents the output of the generator;

[0073] High receptive field perception loss This includes calculating pixel-wise feature similarity using a pre-trained network, expressed as: In the formula For Fourier convolutional pre-trained encoding networks;

[0074] Combining the above loss functions, the final loss function is:

[0075]

[0076] In the formula, , , , These represent the weights of pixel reconstruction loss, adversarial loss, feature matching loss, and high receptive field perception loss, respectively.

[0077] Furthermore, the defect detection network employs a deep segmentation model, including CANet or U-Net, to extract the boundaries of real defects and quantify their thermal response features, outputting parameters including defect location, area, and severity level for final evaluation.

[0078] The beneficial effects of this invention are:

[0079] In one exemplary embodiment of the present invention, tensor feature processing is first performed on the acquired infrared image to lock the lamp shadow region; then, target localization is performed in the lamp shadow region to generate a high-precision binary lamp shadow mask image; subsequently, the lamp shadow mask image and the infrared image are input into a lamp shadow repair network based on a target-guided Fourier convolution feature extraction mechanism to obtain a lamp shadow repair image; finally, non-destructive defect detection is achieved. This invention is compatible with planar and irregularly shaped structural specimens, has strong adaptability, fast processing speed, and high detection accuracy, and can be widely applied to structural health monitoring and defect analysis in aerospace, rail transportation, wind power, and other fields. Attached Figure Description

[0080] Figure 1 This is a flowchart of a method in an exemplary embodiment of the present invention;

[0081] Figure 2 This is a schematic diagram illustrating the prior localization of potential light and shadow regions based on the layout of excitation sources in an exemplary embodiment of the present invention.

[0082] Figure 3 This is a schematic diagram of image enhancement and coarse segmentation processing in an exemplary embodiment of the present invention;

[0083] Figure 4 This is a schematic diagram of refined light and shadow region recognition with multiple constraints in an exemplary embodiment of the present invention;

[0084] Figure 5 This is a schematic diagram of the target-guided Fourier convolution light shadow processing algorithm framework in an exemplary embodiment of the present invention. Detailed Implementation

[0085] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0086] In the description of this invention, it should be noted that the directions or positional relationships indicated by terms such as "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer" are based on the directions or positional relationships shown in the accompanying drawings and are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0087] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0088] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0089] See Figure 1 , Figure 1 This invention illustrates a target-guided infrared non-destructive testing light shadow processing method provided in an exemplary embodiment. The method repairs artifacts or bright areas caused by highly reflective or direct light in acquired infrared image data and performs defect detection, including the following steps:

[0090] S1: Acquire infrared images and perform tensor feature processing;

[0091] S2: Based on spatial location information guidance, target localization of the light shadow region is performed on the infrared image after tensor feature processing, and a light shadow mask image is generated;

[0092] S3: Input the light shadow mask image and infrared image into the light shadow restoration network based on the target guidance mechanism Fourier convolution feature extraction to obtain the light shadow restoration image;

[0093] S4: Input the lamp shadow restoration image into the defect detection network for non-destructive defect detection.

[0094] Specifically, in this exemplary embodiment, the acquired infrared image is first subjected to tensor feature processing to lock the lamp shadow region; then, the target in the lamp shadow region is located to generate a high-precision binary lamp shadow mask image; subsequently, the lamp shadow mask image and the infrared image are input into a lamp shadow repair network based on a target-guided Fourier convolution feature extraction mechanism to obtain a lamp shadow repair image; finally, non-destructive defect detection is achieved. This invention is compatible with planar and irregularly shaped structural specimens, has strong adaptability, fast processing speed, and high detection accuracy, and can be widely applied to structural health monitoring and defect analysis in aerospace, rail transportation, wind power, and other fields.

[0095] The following will provide a detailed explanation of each step:

[0096] More preferably, in an exemplary embodiment, step S1 locks the light shadow area by combining spatial prior localization with a target detection network.

[0097] Specifically, step S1 includes the following sub-steps:

[0098] S11: Apply periodic or pulsed thermal excitation to the surface of the material to be tested through an externally controllable photothermal excitation system;

[0099] S12: Use an infrared thermal imager to acquire time-series infrared images and construct a multi-frame image matrix containing information on the spatiotemporal changes in thermal diffusion, which will then be used as input for subsequent processing.

[0100] S13: Using the PCA algorithm, independent component analysis algorithm, or L4 algorithm for matrix tensor decomposition, noise interference in the thermal distribution image sequence is reduced to obtain the infrared image with tensor feature processing completed.

[0101] When using the PCA algorithm, the formula for reducing noise interference in the thermal distribution image sequence is as follows: ;

[0102] Indicates after orthogonal transformation The resulting column vectors in the new space Represents the column vector of the original heat map. This represents an orthogonal transformation.

[0103] The matrix tensor decomposition algorithm in step S13 is used to calculate the location information of the defect area in the infrared thermal image.

[0104] More preferably, in an exemplary embodiment, step S2 uses histogram equalization, local contrast enhancement and adaptive threshold segmentation to generate candidate connected components, and introduces multiple constraints such as horizontal / vertical spacing, alignment, area consistency and geometric intersection to quickly screen out artifact points and obtain a high-precision binary mask.

[0105] Specifically, step S2 includes the following sub-steps:

[0106] S21: Based on the excitation source layout of the photothermal excitation system, the potential light shadow area is located a priori; in a preferred exemplary embodiment, when testing a planar structural specimen, a central region division method is adopted; based on the axisymmetric physical characteristics of the handheld photothermal excitation device, a spatial mapping relationship between the image coordinate system and the excitation source is established; the infrared image size is defined as H×W, i.e., height × width, and the boundary coordinates of the central positioning area R are calculated:

[0107]

[0108] In the formula and It is the size of the central region relative to the image's height and width;

[0109] When inspecting irregularly shaped specimens, a deep learning-based target detection network is used to locate targets in the light shadow area.

[0110] A priori localization diagram of the potential light and shadow region based on the excitation source layout is shown below. Figure 2 As shown.

[0111] S22: Image enhancement and coarse segmentation processing, including the following sub-steps:

[0112] S221: Perform image enhancement processing on the candidate regions previously defined in step S21, including histogram equalization, local contrast enhancement, and edge-preserving filtering;

[0113] S222: An adaptive threshold segmentation algorithm is used to dynamically define the boundary of the high-reflectivity region and extract the set of connected components corresponding to the lamp shadow region;

[0114] Image enhancement and coarse segmentation processing diagram as shown below Figure 3 As shown.

[0115] S23: Refined light shadow region identification with multiple constraints. The set of connected components extracted in step S222 is subjected to spatial geometric consistency constraint filtering to obtain the generated light shadow mask image. The spatial geometric consistency constraint filtering includes the following sub-steps:

[0116] S231: Horizontal and vertical spacing constraints:

[0117] Set the constraints as follows and Minimum spacing is applied to connected components with horizontal and vertical distributions to remove high-density artifacts; where W is the image width and H is the image height. and These represent the horizontal and vertical distance threshold factors, determined through a sample KS test. This represents the horizontal distance between the center points of the i-th and j-th regions. This represents the vertical distance between the center points of the i-th and j-th regions. , These represent the x-coordinates of the center points of the i-th and j-th regions in the image coordinate system, respectively. , Let represent the ordinate values ​​of the center points of the i-th and j-th regions in the image coordinate system, where i and j represent the region indices and c represents the subscript identifier of the center point;

[0118] S232: Horizontal and vertical alignment constraints:

[0119] Calculate the deviation of the x and y coordinates of the center of the connected domain, set the maximum allowable deviation threshold, and remove misaligned regions;

[0120] S233: Region area consistency constraint:

[0121] Based on the prior setting of upper and lower limits for the size of the light shadow area, excessively large or excessively small interfering targets are eliminated, specifically in the horizontal direction. vertical direction ;in For connected components pixel area To satisfy the horizontal spacing constraint in step S231, To satisfy the vertical spacing constraint in step S231, the vertical candidate set is... , Represents horizontally connected pairs. This represents a pair of vertically connected components. , , , These represent the pixel areas of each connected component;

[0122] S234: Verification of the geometric intersection of the centerlines:

[0123] An intersection relationship judgment model is established using the vectors connecting the center points of regions to filter out regions that do not meet the symmetry condition; assuming that the optimal result is obtained by filtering the horizontally connected components in step S233 ( , () center line Parameterized as: ,in Indicates the line connecting the center points of the horizontally connected domain. Indicates a connection any point on, ( , ) indicates a region The center coordinates, ( , ) indicates a region center coordinates This represents the normalized interpolation parameters of the horizontal centerline between two points; in step S233, the vertical connected components are used to select the optimal result. , () center line Parameterized as: ,in Represents the line connecting the center points of the vertically connected domain. Indicates a connection any point on, ( , ) indicates a region The center coordinates, ( , ) indicates a region center coordinates This represents the normalized interpolation parameters of the longitudinal centerline between two points; the intersection point is calculated using the vector cross product. ,when When intersecting, and These represent parameterized paths. and The index of the intersection point.

[0124] A schematic diagram of refined light and shadow region recognition with multiple constraints is shown below. Figure 4 As shown.

[0125] After this step, a binary mask image M is generated, which serves as the input for the target area in subsequent lamp shadow restoration.

[0126] More preferably, in an exemplary embodiment, step S3 concatenates the mask and the original heatmap and inputs them into a multi-scale encoder-decoder structure, embedding a Fast Fourier Convolution (FFC) module to achieve collaborative reconstruction of global and local features. Using the light shadow mask image M obtained in step S2 as the input condition for the repair target, the original image I and the mask M are concatenated and input into the following network module. A schematic diagram of the target-guided Fourier convolution light shadow processing algorithm framework is shown below. Figure 5 As shown, the encoder corresponds to the gated convolution downsampling module in S31, the decoder corresponds to the gated convolution upsampling module in S34, and the FFC corresponds to S32 and S33.

[0127] Specifically, the Fourier convolutional feature extraction and shadow restoration network based on the target guidance mechanism in step S3 includes:

[0128] S31: Gated Convolution Downsampling Module (Encoder): The infrared image and the lamp shadow mask image are concatenated along the channel dimension and then input into the gated convolution downsampling module to downsample the concatenated image and obtain the initial feature map. This process can be represented as: In the formula, GConv represents gated convolution, which can dynamically enhance important regional features and suppress irrelevant information; where the initial feature map... have The three-dimensional tensor, in which For the number of channels, and Let the height and width of the spliced ​​feature map be represented respectively. For each channel, its two-dimensional time-domain signal is denoted as... , here as well as These are the row index and column index of the spatial domain, respectively; in, for example... Figure 5 In the exemplary embodiment shown, a progressively increasing channel count design is employed to enhance feature extraction capabilities and adapt to information fusion at different scales. Specifically, the first layer has 64 channels to extract initial low-level features of the image; the second layer increases the number of channels to 128, further deepening the network's perception of image structure; and the third layer expands to 256 channels to capture more complex and abstract global semantic information.

[0129] S32: Parallel Feature Extraction Module (one of the embedded Fast Fourier Convolution (FFC) modules): Receives the preliminary feature map output by the gated convolution downsampling module. ,Will Parallel input extraction of global frequency domain information Fast Fourier Convolution module for extracting local spatial information The conventional convolutional modules work together to extract multi-scale spatial context features;

[0130] In a specific exemplary embodiment, S321: the fast Fourier convolution module in the parallel feature extraction module includes:

[0131] right Perform a two-dimensional discrete Fourier transform to obtain the frequency domain representation. ,in , These are the frequency domain row index and the frequency domain column index, respectively.

[0132] After transformation, a set of learnable frequency domain convolution kernels are used. Multiplying it element-wise yields the convolution result. ;

[0133] Subsequently, the inverse Fourier transform was used to... Returning to the time domain, the features output by the branches of the Fast Fourier Convolution module are generated, which are the global frequency domain information. The expression is as follows:

[0134]

[0135] S322: The conventional convolution module in the parallel feature extraction module includes:

[0136] For the initial feature map Applying a series of learnable spatial convolution kernels and biases, denoted as .

[0137] S33: Global-Local Feature Fusion Module (one of the embedded Fast Fourier Convolution (FFC) modules): This module fuses global frequency domain information. and local spatial information By adding elements one by one along the channel or in spatial location, preliminary fusion characteristics are obtained: In the formula The output of the Fast Fourier Convolution branch contains global frequency domain information; For the output of a regular convolutional branch, local spatial details are preserved; This represents the initial fusion features; subsequently, the initial fusion features were analyzed. By applying Batch Normalization (BN) and ReLU activation sequentially, the fused features are obtained: In the formula Normalize the features of each channel and perform stable training; Increase the nonlinear expressive power of the network; The fused features will contain both global context and local details for subsequent enhancement.

[0138] S34: Skip Connections and Feature Enhancement Module: To prevent deep features from losing low-level details, the shallow features saved during the downsampling process of the gated convolution downsampling module are used after fusion. Features after fusion Direct addition yields enhanced features. : In the formula The shallow features saved during the downsampling process contain richer texture information; the addition operation ensures that the network inherits the details of the shallow layers while preserving the global semantics of the deep layers. The enhanced features will be used as input to the upsampling module to further restore the spatial resolution.

[0139] S35: Gated Convolution Upsampling Module (Decoder): Enhances features through gated deconvolution. The original image resolution is restored to obtain the lamp shadow restoration image.

[0140] In one specific exemplary embodiment, the gated convolutional upsampling module includes:

[0141] S351: Gating weight generation:

[0142]

[0143] In the formula, and These are the learnable convolutional kernel and the bias, respectively. Activate for Sigmoid and output the gate mask. ;

[0144] S352: Deconvolution upsampling:

[0145]

[0146] Where Deconv is a regular deconvolution operator or a transpose convolution operator, the output is... ;

[0147] S353: Gated Fusion

[0148]

[0149] In the formula, the upsampled features with dynamic weights are obtained. ;

[0150] S354: Layer-by-layer iteration:

[0151] Repeat the above process, upsampling multiple times until the image size is restored to the original size, and finally output the repaired result. .

[0152] By using gated deconvolution, upsampling can not only increase spatial resolution, but also... Dynamic noise suppression and enhancement of important areas lay the foundation for generating high-quality, shadow-free images.

[0153] It should be noted that, Figure 5 The example shown is a generator. During the training phase, a discriminator is required. The discriminator used in this exemplary embodiment is a PatchGAN structure. By judging the realism of local image regions, it provides a probability distribution of the real / false values ​​of the input image, guiding the generator to generate more natural and realistic details in the repaired area. After the model is trained, in actual use, the discriminator is not required. Only the trained weight file needs to be used to process the shadow processing network (generator) part introduced in this exemplary embodiment.

[0154] More preferably, in an exemplary embodiment, during the training process of the Fourier convolutional feature extraction network for lamp shadow restoration based on a target-guided mechanism, a joint loss function including pixel-level mean square error, local adversarial loss, perceptual loss, and semantic consistency is employed to ensure the detail and structural continuity of the restoration result. The generator... With discriminator By placing it within an adversarial training framework, competitive optimization can both improve the quality of the repair and ensure the realism of the generated results.

[0155] Specifically, the Fourier convolutional feature extraction and shadow restoration network based on the target guidance mechanism is trained through a multi-loss function target joint optimization mechanism, which includes:

[0156] generator Receive mask condition input, i.e., infrared image With light shadow mask image Output image with light and shadow restoration Discriminator The PatchGAN structure is adopted. By judging the authenticity of local image regions, the probability distribution of the true / false values ​​of the input image is given, which guides the generator to generate more natural and realistic details in the repaired area.

[0157] The training goal is to make generated Make as much as possible The result is determined to be true, while retaining the original infrared image without light shadows. Similarity at the pixel and perceptual feature levels; training is performed using pixel reconstruction loss, adversarial loss, feature matching loss, and high receptive field perceptual loss.

[0158] More preferably, in an exemplary embodiment, pixel reconstruction loss ,ensure With real images Maintain consistency in areas where there is no light or shadow.

[0159] Combating losses Including discriminator loss and generator loss , is described as In the formula For gradient penalty, This represents the weight coefficients of the generator gradient smoothing loss term. This represents the expected value or batch mean of the sample. This indicates that the discriminator is sensitive to the image. The probability distribution of the output being a "real image" Indicates the image The gradient operation performed on the discriminator output is used to smooth the generator loss; (the two discriminators D here, D and D of the feature matching loss, are the same network structure, but their input information is different. The discriminator input of the adversarial loss is the final image generated by the generator, and the discriminator input of the feature matching loss is the high-dimensional information of the intermediate feature layer.)

[0160] Discriminator loss ;

[0161] Generator loss for:

[0162] ;

[0163] Feature matching loss Including discriminators based on real and fake samples Loss is expressed as:

[0164]

[0165] In the formula, The output of the discriminator's intermediate layer, The number of intermediate layers. Indicates correspondence The original, undamaged image, i.e., the "correct answer". This represents the output of the generator; here, both the generator's output and the real label are used as outputs. Through the generator's encoding process, the high-dimensional feature loss of each intermediate layer is compared.

[0166] High receptive field perception loss This includes calculating pixel-wise feature similarity using a pre-trained network, expressed as: In the formula For Fourier convolutional pre-trained encoding networks;

[0167] Combining the above loss functions, the final loss function is:

[0168]

[0169] In the formula, , , , These represent the weights of pixel reconstruction loss, adversarial loss, feature matching loss, and high receptive field perception loss, respectively.

[0170] Specifically, in actual training, the network not only needs to achieve accurate reconstruction at the pixel level and local features, but also needs to fully understand the global structure and semantic relationships of the image. Therefore, the pixel reconstruction loss weight is set to... =1 to ensure basic pixel recovery; set the adversarial loss weight to 1. =0.05, to achieve a balance between GAN training stability and repair quality; set the weight of the high receptive field perceptual loss to 0.05. =1, enabling the network to capture overall texture and structural coherence at a global scale; gradient penalty is applied to the discriminator. =15, used to constrain its continuity and prevent training collapse.

[0171] More preferably, in an exemplary embodiment, the final step S5 involves extracting the true defect boundaries and quantifying features through deep segmentation or manual evaluation, thereby achieving high-fidelity elimination of lamp shadow artifacts and complete preservation of defect information.

[0172] The defect detection network uses a deep segmentation model, including CANet or U-Net, to extract the boundaries of real defects and quantify their thermal response features. It outputs parameters, including defect location, area, and severity level, for final evaluation.

[0173] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A target-guided infrared non-destructive testing light shadow processing method for repairing artifacts or bright areas caused by high reflectivity or direct light in acquired infrared image data and detecting defects, characterized in that: Includes the following steps: S1: Acquire infrared images and perform tensor feature processing; S2: Based on spatial location information guidance, target localization of the light shadow region is performed on the infrared image after tensor feature processing, and a light shadow mask image is generated; S3: Input the light shadow mask image and infrared image into the light shadow restoration network based on the target guidance mechanism Fourier convolution feature extraction to obtain the light shadow restoration image; S4: Input the lamp shadow restoration image into the defect detection network for non-destructive defect detection; Step S2 includes the following sub-steps: S21: Based on the layout of the excitation source of the photothermal excitation system, the potential lamp shadow area is located a priori. S22: Image enhancement and coarse segmentation processing, including the following sub-steps: S221: Perform image enhancement processing on the candidate regions previously defined in step S21, including histogram equalization, local contrast enhancement, and edge-preserving filtering; S222: An adaptive threshold segmentation algorithm is used to dynamically define the boundary of the high-reflectivity region and extract the set of connected components corresponding to the lamp shadow region; S23: Refined light shadow region identification with multiple constraints. The set of connected components extracted in step S222 is subjected to spatial geometric consistency constraint filtering to obtain the generated light shadow mask image. The spatial geometric consistency constraint filtering includes the following sub-steps: S231: Horizontal and vertical spacing constraints: Set the constraints as follows and Minimum spacing is applied to connected components with horizontal and vertical distributions to remove high-density artifacts; where W is the image width and H is the image height. and These represent the horizontal and vertical distance threshold factors, determined through a sample KS test. This represents the horizontal distance between the center points of the i-th and j-th regions. This represents the vertical distance between the center points of the i-th and j-th regions. , These represent the x-coordinates of the center points of the i-th and j-th regions in the image coordinate system, respectively. , Let represent the ordinate values ​​of the center points of the i-th and j-th regions in the image coordinate system, where i and j represent the region indices and c represents the superscript of the center point. S232: Horizontal and vertical alignment constraints: Calculate the deviation of the x and y coordinates of the center of the connected domain, set the maximum allowable deviation threshold, and remove misaligned regions; S233: Region Area Consistency Constraint Based on the prior setting of upper and lower limits for the size of the light shadow area, excessively large or excessively small interfering targets are eliminated, specifically in the horizontal direction. vertical direction ;in For connected components pixel area To satisfy the horizontal spacing constraint in step S231, To satisfy the vertical spacing constraint in step S231, the vertical candidate set is... , Represents horizontally connected pairs. This represents a pair of vertically connected components. , , , These represent the pixel areas of each connected component; S234: Verification of the geometric intersection of the centerlines: An intersection relationship judgment model is established using the vectors connecting the center points of regions to filter out regions that do not meet the symmetry condition; assuming that the optimal result is obtained by filtering the horizontally connected components in step S233 ( , () center line Parameterized as: ,in Indicates the line connecting the center points of the horizontally connected domain. Indicates a connection any point on, ( , ) indicates a region The center coordinates, ( , ) indicates a region center coordinates This represents the normalized interpolation parameters of the horizontal centerline between two points; in step S233, the vertical connected components are used to select the optimal result. , () center line Parameterized as: ,in Represents the line connecting the center points of the vertically connected domain. Indicates a connection any point on, ( , ) indicates a region The center coordinates, ( , ) indicates a region center coordinates This represents the normalized interpolation parameters of the longitudinal centerline between two points; the intersection point is calculated using the vector cross product. ,when When intersecting, and These represent parameterized paths. and The index of the intersection point; The Fourier convolutional feature extraction and shadow restoration network based on the target guidance mechanism in step S3 includes: Gated convolutional downsampling module: The infrared image and the lamp shadow mask image are concatenated along the channel dimension and then input into the gated convolutional downsampling module to downsample the concatenated image and obtain the initial feature map. ,have The three-dimensional tensor, in which For the number of channels, and Let the height and width of the spliced ​​feature map be represented respectively. For each channel, its two-dimensional time-domain signal is denoted as... , here as well as These are the row index and column index of the spatial domain, respectively; Parallel feature extraction module: Receives the preliminary feature map output by the gated convolutional downsampling module. ,Will Parallel input extraction of global frequency domain information Fast Fourier Convolution module for extracting local spatial information The conventional convolutional modules work together to extract multi-scale spatial context features; Global-local feature fusion module: integrates global frequency domain information and local spatial information By adding elements one by one along the channel or in spatial location, preliminary fusion characteristics are obtained: Subsequently, preliminary fusion characteristics were analyzed. By sequentially applying batch normalized BN and ReLU activation, the fused features are obtained: ; Skip Connections and Feature Enhancement Module: This module stores shallow features saved during the downsampling process of the gated convolutional downsampling module. Features after fusion Direct addition yields enhanced features. : ; Gated convolutional upsampling module: Enhances features through gated deconvolution. The original image resolution is restored to obtain the lamp shadow restoration image.

2. The target-guided infrared non-destructive testing light shadow processing method according to claim 1, characterized in that: Step S1 includes the following sub-steps: S11: Apply periodic or pulsed thermal excitation to the surface of the material to be tested through an externally controllable photothermal excitation system; S12: Use an infrared thermal imager to acquire time-series infrared images and construct a multi-frame image matrix containing information on the spatiotemporal changes in thermal diffusion, which will then be used as input for subsequent processing. S13: Using the PCA algorithm, independent component analysis algorithm, or L4 algorithm for matrix tensor decomposition, noise interference in the thermal distribution image sequence is reduced to obtain the infrared image with tensor feature processing completed.

3. The target-guided infrared non-destructive testing light shadow processing method according to claim 2, characterized in that: In step S21, when inspecting a planar structural specimen, a central region division method is adopted; based on the axisymmetric physical characteristics of the handheld optical excitation device, a spatial mapping relationship between the image coordinate system and the excitation source is established; the infrared image size is defined as H×W, i.e., height × width, and the boundary coordinates of the central positioning region R are calculated: ; In the formula and It is the size of the central region relative to the height and width of the image; When inspecting irregularly shaped specimens, a deep learning-based target detection network is used to locate targets in the light shadow area.

4. The target-guided infrared non-destructive testing light shadow processing method according to claim 1, characterized in that: The fast Fourier convolution module in the parallel feature extraction module includes: right Perform a two-dimensional discrete Fourier transform to obtain the frequency domain representation. ,in , These are the frequency domain row index and the frequency domain column index, respectively. After transformation, a set of learnable frequency domain convolution kernels are used. Multiplying it element-wise yields the convolution result. ; Subsequently, the inverse Fourier transform was used to... Returning to the time domain, the features output by the branches of the Fast Fourier Convolution module are generated, which are the global frequency domain information. The expression is as follows: ; The conventional convolution module in the parallel feature extraction module includes: For the initial feature map Applying a series of learnable spatial convolution kernels and biases, denoted as .

5. The target-guided infrared non-destructive testing light shadow processing method according to claim 4, characterized in that: The gated convolutional upsampling module includes: S351: Gating weight generation: ; In the formula, and These are the learnable convolutional kernel and the bias, respectively. Activate for Sigmoid and output the gate mask. ; S352: Deconvolution upsampling: ; Where Deconv is a regular deconvolution operator or a transpose convolution operator, the output is... ; S353: Gated Fusion ; In the formula, This indicates element-wise multiplication, resulting in upsampled features with dynamic weights. ; S354: Layer-by-layer iteration: Repeat the above process, upsampling multiple times until the image size is restored to the original size, and finally output the repaired result. .

6. The target-guided infrared non-destructive testing light shadow processing method according to claim 5, characterized in that: The Fourier convolutional feature extraction and shadow restoration network based on the target guidance mechanism is trained through a multi-loss function objective joint optimization mechanism, specifically including: generator Receive mask condition input, i.e., infrared image With light shadow mask image Output image with light and shadow restoration Discriminator Using the PatchGAN structure, the probability distribution of true / false values ​​in the input image is given by judging the authenticity of local image regions. The training goal is to make generated Make as much as possible It is judged as true, while retaining the original undamaged infrared image. Similarity at the pixel and perceptual feature levels; training is performed using pixel reconstruction loss, adversarial loss, feature matching loss, and high receptive field perceptual loss. This includes calculating pixel-wise feature similarity using a pre-trained network, expressed as: In the formula For Fourier convolution pre-trained encoding networks, Indicates correspondence The original, undamaged image.

7. The target-guided infrared non-destructive testing light shadow processing method according to claim 1, characterized in that: The defect detection network uses a deep segmentation model, including CANet or U-Net, to extract the boundaries of real defects and quantify their thermal response features. It outputs parameters, including defect location, area, and severity level, for final evaluation.