A Deep Learning-Based Method for Detecting Surface Defects in Composite Material Grinding

By using frequency domain analysis and dual-stream feature extraction techniques, the problem of background texture interference in the detection of defects on the ground surface of composite materials was solved, and efficient and accurate detection of defects at multiple scales was achieved.

CN122089746APending Publication Date: 2026-05-26LIANYUNGANG ZHONGYI AVIATION MATERIALS
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LIANYUNGANG ZHONGYI AVIATION MATERIALS
Filing Date
2026-04-27
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing image analysis methods are unable to effectively distinguish between high-frequency texture backgrounds and defect features in the detection of defects on the ground surfaces of composite materials, leading to false detections and loss of detailed information, and failing to accurately extract multi-scale defect features in complex backgrounds.

Method used

A texture phase suppression raster is constructed by frequency domain analysis, interfering pixels are filtered by pixel-by-pixel differential, and a pixel magnification model is constructed by combining the dual-flow feature extraction of spatial structure flow and contour semantic flow. The distribution field of two-dimensional spatial extreme points is analyzed to dynamically deduce the boundary of the defect area.

Benefits of technology

It effectively suppresses interference from complex background textures, maintains the collaborative expression of high-resolution detail information and deep semantic features, and improves the sensitivity and accuracy of multi-scale defect detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122089746A_ABST
    Figure CN122089746A_ABST
Patent Text Reader

Abstract

This invention relates to the field of image analysis technology, specifically to a method for detecting surface defects in ground composite materials based on deep learning. The specific implementation process includes: importing an initial pixel matrix into a texture phase suppression raster to output a clean base matrix; constructing pixel-guiding anchor points to align and guide the contour semantic flow, generating a pixel aggregation matrix; extracting local neighborhood pixel groups and calculating the deviation, constructing a spatial pixel magnification model and outputting a distortion enhancement matrix; extracting the distribution field of two-dimensional spatial extrema points, deriving a binary decision grid and performing pixel segmentation and truncation, and outputting a pixel mask image. This invention utilizes a texture phase suppression raster and a spatial pixel magnification model to extract multi-scale weak target features from complex image backgrounds with strong interference and high-frequency textures, effectively improving the spatial detail loss and background noise feature amplification effect during deep network downsampling, and enhancing the accuracy of surface defect detection in ground composite materials.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image analysis technology, specifically to a method for detecting surface defects in composite material grinding based on deep learning. Background Technology

[0002] In the production of carbon fiber composite components, the quality of the ground surface directly affects the final performance of the component. To achieve automated surface quality inspection, image analysis-based computer vision technology is widely used. In existing technologies, the detection of defects on the ground surfaces of composite materials typically employs image analysis methods based on general-purpose deep convolutional neural networks. The specific image processing flow is as follows: First, a high-resolution digital image of the ground surface of the composite material is acquired using industrial vision acquisition equipment, and the pixel matrix of the original image is preprocessed, including normalization and scaling. Then, the processed image tensor is input into a pre-constructed deep convolutional neural network, where multiple convolutional kernels are used to perform a sliding window operation on the image in the spatial domain to extract visual features such as local edges and textures at different levels. Finally, through a fully connected layer or a specific network prediction head, the extracted high-dimensional image feature map is mapped to the bounding box coordinates of the target defect or a pixel-level segmentation mask, thereby completing the localization and analysis of the defect region in the image.

[0003] However, the aforementioned existing technologies have significant shortcomings in practical image analysis and processing. Digital images of ground composite material surfaces exhibit extremely unique visual characteristics, often filled with highly directional high-frequency processing textures (such as dense grinding marks) and complex noise caused by uneven illumination. Existing general-purpose convolutional neural networks, when extracting features, employ indiscriminate local aggregation operations on image pixels, lacking feature response suppression mechanisms for specific image regions. This leads to the network easily misclassifying high-frequency normal texture backgrounds as defect edges, resulting in severely distorted image feature representations. Grinding surface defects in digital images exhibit a wide range of scales and morphologies, ranging from large-area contiguous damage to tiny fine lines occupying only a few pixels. When existing networks extract high-level semantic features through continuous pooling and downsampling operations, they inevitably cause the complete loss of spatial detail information of tiny defects in low-resolution feature maps; while the higher-resolution feature maps in shallower layers of the network retain details, they lack a sufficiently large global receptive field to understand the contextual image features of large-scale defects. This limitation in multi-scale feature extraction and cross-level information fusion of images results in poor feature extraction accuracy of existing image analysis methods when faced with complex backgrounds and multi-scale morphologies.

[0004] In summary, existing image analysis methods struggle to accurately extract multi-scale weak target features from complex image backgrounds with strong interference and high-frequency textures when processing digital images of ground composite material surfaces. Consequently, they cannot overcome the loss of spatial details and the amplification effect of background noise features during deep network downsampling.

[0005] To address this, a deep learning-based method for detecting surface defects in ground composite materials is proposed. Summary of the Invention

[0006] The purpose of this invention is to provide a method for detecting defects on the grinding surface of composite materials based on deep learning, for detecting defects on the grinding surface of carbon fiber composite materials.

[0007] To achieve the above objectives, the present invention provides the following technical solution: A deep learning-based method for detecting surface defects in ground composite materials includes: Receive an initial pixel matrix containing a carbon fiber woven substrate; perform frequency domain analysis on the grinding marks and woven texture on the material surface, and construct a texture phase suppression grid; import the initial pixel matrix into the texture phase suppression grid for pixel-by-pixel differential filtering, filter out interfering pixels, and output as a clean substrate matrix; The spatial structure flow and contour semantic flow in the net state base plate matrix are extracted respectively, and the geometric edge pixels in the spatial structure flow are extracted to construct pixel traction anchor points; the pixel traction anchor points are used as spatial orientation guides to align and pull the pixel coordinates of the contour semantic flow, and a pixel aggregation matrix is ​​generated by channel splicing. Local neighborhood pixel groups are continuously extracted from the pixel aggregation matrix, and the deviation between the central pixel and the surrounding pixels within the group is calculated to construct a spatial pixel magnification model. The spatial pixel magnification model is used to perform pixel-by-pixel recombination calculation on the pixel aggregation matrix, and a distortion enhancement matrix is ​​output. The two-dimensional spatial extreme point distribution field of the distortion enhancement matrix is ​​extracted, a binary decision grid is dynamically deduced, and the distortion enhancement matrix is ​​pixel segmented and truncated to output a pixel mask image of the boundary of the grinding defect region.

[0008] Preferably, the specific implementation process for receiving the initial pixel matrix containing the carbon fiber braided substrate includes: The raw optical projection data of the ground surface of carbon fiber composite material is acquired, and the raw optical projection data is parsed into a discrete pixel array set of multiple bands. The spectral response brightness value is extracted along the spatial coordinate axis of the discrete pixel array set, and a grayscale pixel array is generated by linear mapping projection according to the global brightness mapping rule. A Gaussian smoothing operator is applied to the grayscale pixel array to perform local pixel gradient smoothing and filter sensor noise. The geometric boundary coefficient value of the smoothed array is extracted, and bilinear interpolation resampling is performed according to the preset scale transformation kernel to unify the spatial resolution benchmark of the grayscale pixel array, and it is formatted and encapsulated into an initial pixel matrix containing a carbon fiber woven substrate.

[0009] Preferably, the specific implementation process of performing frequency domain analysis on the grinding marks and weave textures on the material surface and constructing a texture phase suppression grid includes: A fast Fourier transform is performed on the initial pixel matrix to map the pixel spatial domain data to the planar spatial frequency domain, generating a spectrum matrix. The spectrum matrix is ​​traversed to extract the amplitude feature vectors and phase feature vectors of the frequency components. Based on the amplitude feature vectors, the peak coordinate set representing grinding marks and weaving textures is located. The peak coordinate set is substituted into a preset anisotropic filtering function to calculate the frequency domain response attenuation weight set. The corresponding frequency components in the spectrum matrix are attenuated and modulated, and the modulated spectrum distribution structure data is extracted. The mask is reconstructed in the frequency domain by combining the phase feature vectors and the modulated data, and then inverse Fourier transform is performed to invert to the spatial domain to construct a texture phase suppression grid.

[0010] Preferably, the specific implementation process of importing the initial pixel matrix into a texture phase suppression raster for pixel-by-pixel differential filtering, filtering out interfering pixels, and outputting a clean base matrix includes: Establish a mapping relationship between the initial pixel matrix and the texture phase suppression raster, and perform pixel-by-pixel gray-level subtraction on the initial pixel matrix and the corresponding texture phase suppression raster to obtain the residual pixel distribution array; statistically analyze the pixel gray-level histogram of the residual pixel distribution array in the global space, and adaptively search for the segmentation boundary between background noise and foreground features based on the histogram distribution characteristics; use the segmentation boundary to discriminate the residual pixel distribution array, set the gray-level values ​​of residual pixels below the segmentation boundary to zero to remove interfering pixels, and retain pixels above the segmentation boundary as salient feature pixels to output as the clean base matrix.

[0011] Preferably, the specific implementation process of extracting the spatial structure flow and contour semantic flow from the net-state base plate matrix respectively, and extracting the geometric edge pixels in the spatial structure flow to construct pixel traction anchor points includes: The net-state substrate matrix is ​​input into a dual-stream feature extraction network in parallel. At the shallow network level, gradient response is aggregated to extract spatial structural flows representing physical details, while at the deep network level, receptive field features are aggregated to extract contour semantic flows representing morphological characteristics. An edge detection operator is applied to the spatial structural flows to calculate the pixel grayscale gradient magnitude and gradient direction angle in each direction. A non-maximum suppression algorithm is used to select pixels with the largest local gradient magnitude on the normal of the gradient direction angle, and a double-threshold connectivity analysis is performed to separate continuous geometric edge pixels. The spatial coordinate system of the geometric edge pixels is extracted and fused with the structural response intensity information to construct pixel traction anchors.

[0012] Preferably, the specific implementation process of using the pixel traction anchor point as spatial orientation guidance to align and guide the contour semantic flow with pixel coordinates, and using channel splicing to generate a pixel aggregation matrix includes: The spatial coordinate system contained in the pixel traction anchor point is analyzed, and the resolution scale parameter of the contour semantic flow is obtained; the spatial mapping offset field between the resolution scale parameter and the spatial coordinate system is calculated to generate an affine transformation displacement vector set; the pixel feature points of the contour semantic flow are deformed and resampled using the affine transformation displacement vector set as a guide, driving the pixel coordinates of the contour semantic flow to generate a convergence offset towards the pixel traction anchor point to complete the spatial alignment traction; the aligned contour semantic flow and the spatial structure flow are extracted, and sequentially stacked along the feature channel dimension, and redundant features are eliminated by channel feature dimensionality reduction mapping to output a pixel aggregation matrix.

[0013] Preferably, the specific implementation process of continuously extracting local neighborhood pixel groups on the pixel aggregation matrix, calculating the deviation between the center pixel and the surrounding pixels within the group, and constructing the spatial pixel magnification model includes: The pixel aggregation matrix is ​​traversed with a preset sliding window size, and a local neighborhood pixel group centered on the current pixel is extracted at each sliding step. The feature vector value of the center pixel in the local neighborhood pixel group and the mean feature vector value of the surrounding pixels are obtained, and the spatial distance metric between the two is calculated to obtain the local feature deviation of the center pixel in the group relative to the surrounding pixels. The local feature deviation data of each pixel in the entire matrix is ​​recorded and fitted to generate a deviation probability density function. Based on the tail dragging shape of the deviation probability density function, a nonlinear mapping activation function is derived. The nonlinear mapping activation function is combined with the corresponding spatial neighborhood distance attenuation weight factor for network encapsulation to construct a spatial pixel magnification model.

[0014] Preferably, the specific implementation process of using the spatial pixel magnification model to perform pixel-by-pixel recombination calculation on the pixel aggregation matrix and outputting the distortion enhancement matrix includes: The pixel aggregation matrix is ​​input into the spatial pixel magnification model, and the nonlinear mapping activation function is used to perform nonlinear mapping calculation on the pixel feature values ​​of each channel. The spatial neighborhood distance attenuation weight factor is used to perform weighted summation on the features of surrounding pixels in the local neighborhood pixel group, and the summation result is used as a compensation term to be incorporated into the feature of the center pixel in the group after the mapping calculation to complete the reorganization and aggregation of pixel context information. The spatial distribution entropy value of the reorganized and aggregated pixel features is evaluated, and feature sharpening operators are applied to the regions with fluctuating information entropy to perform local gain processing. All pixel data after reorganization and gain processing are collected, rearranged and assembled into a two-dimensional data structure according to the original row and column coordinate indices, and output as a distortion enhancement matrix.

[0015] Preferably, the specific implementation process of extracting the two-dimensional spatial extremum point distribution field of the distortion enhancement matrix, dynamically deducing the binary decision grid, and performing pixel segmentation and truncation on the distortion enhancement matrix to output the pixel mask image of the grinding defect region boundary includes: The Laplacian operator is used to scan and calculate the distortion enhancement matrix to locate the spatial extreme points where pixel intensity polarity is reversed, and a two-dimensional spatial extreme point distribution field is constructed. Using the density clustering of extreme points within the two-dimensional spatial extreme point distribution field, an adaptive region growing algorithm is used to divide densely populated extreme point areas into foreground candidate regions and the remaining areas into background suppression regions, dynamically deriving a binary decision grid. This binary decision grid is then superimposed onto the distortion enhancement matrix. Pixels falling into the background suppression region are truncated to zero, while the activation values ​​of pixels falling into the foreground candidate region are retained. Morphological closing operations are performed on the pixel blocks with retained activation values ​​to fill holes and smooth the outer boundaries, outputting a pixel mask image of the grinding defect region boundary.

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention performs frequency domain analysis on the initial pixel matrix of the composite material grinding surface and constructs a texture phase suppression grid to specifically suppress high-frequency background information with obvious directionality, such as grinding tool marks and carbon fiber weaving textures. Then, it obtains the clean base plate matrix through pixel-by-pixel differential filtering, which reduces the interference of complex background textures on the image feature extraction process. This allows defect-related pixels to be more clearly expressed in image analysis, thereby effectively reducing the problem of false detection and misjudgment that are prone to occur under complex processing texture backgrounds.

[0017] 2. This invention constructs a dual-flow feature extraction mechanism of spatial structure flow and contour semantic flow, and uses geometric edge pixels to form pixel traction anchors to spatially align and traction the contour semantic flow before performing channel-level feature fusion. This achieves the collaborative expression between high-resolution structural detail information and deep semantic feature information. It can not only maintain the spatial detail features of small defects, but also use the global receptive field of deep features to identify large-scale defect morphology, thereby improving the comprehensive detection capability of multi-scale defect targets.

[0018] 3. This invention constructs a spatial pixel magnification model to model the deviation of local neighborhood pixels in the pixel aggregation matrix and implements nonlinear enhancement processing, thereby strengthening defect pixels that have abnormal feature deviations relative to the surrounding normal texture. At the same time, it combines a two-dimensional spatial extreme point distribution field and an adaptive binary decision grid to achieve accurate segmentation of the defect region. Thus, it can highlight weak defect signals and accurately output the defect region boundary under complex background conditions, thereby improving the sensitivity and positioning accuracy of defect detection on the grinding surface of composite materials. Attached Figure Description

[0019] Figure 1 This is a flowchart of a deep learning-based method for detecting surface defects in composite materials during grinding, as proposed in this invention. Figure 2 This is a schematic diagram of the pixel aggregation matrix proposed in this invention; Figure 3 This is a schematic diagram of the spatial pixel magnification model proposed in this invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It must be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to constitute any limitation on the scope of protection of this invention. Therefore, all equivalent changes or modifications conceived by those skilled in the art based on the content disclosed in this invention without inventive effort should fall within the scope of protection claimed by this invention.

[0021] Reference Figures 1 to 3 This invention provides a method for detecting surface defects in ground composite materials based on deep learning, the technical solution of which is as follows:

[0022] Example 1: Reference Figure 1 This embodiment proposes a deep learning-based method for detecting surface defects in ground composite materials, including: Receive an initial pixel matrix containing a carbon fiber woven substrate; perform frequency domain analysis on the grinding marks and woven texture on the material surface, and construct a texture phase suppression grid; import the initial pixel matrix into the texture phase suppression grid for pixel-by-pixel differential filtering, filter out interfering pixels, and output as a clean substrate matrix; The spatial structure flow and contour semantic flow in the net state base plate matrix are extracted respectively, and the geometric edge pixels in the spatial structure flow are extracted to construct pixel traction anchor points; the pixel traction anchor points are used as spatial orientation guides to align and pull the pixel coordinates of the contour semantic flow, and a pixel aggregation matrix is ​​generated by channel splicing. Local neighborhood pixel groups are continuously extracted from the pixel aggregation matrix, and the deviation between the central pixel and the surrounding pixels within the group is calculated to construct a spatial pixel magnification model. The spatial pixel magnification model is used to perform pixel-by-pixel recombination calculation on the pixel aggregation matrix, and a distortion enhancement matrix is ​​output. The two-dimensional spatial extreme point distribution field of the distortion enhancement matrix is ​​extracted, a binary decision grid is dynamically deduced, and the distortion enhancement matrix is ​​pixel segmented and truncated to output a pixel mask image of the boundary of the grinding defect region.

[0023] Furthermore, the specific implementation process for receiving the initial pixel matrix containing the carbon fiber braided substrate includes: The raw optical projection data of the ground surface of carbon fiber composite material is acquired, and the raw optical projection data is parsed into a discrete pixel array set of multiple bands. The spectral response brightness value is extracted along the spatial coordinate axis of the discrete pixel array set, and a grayscale pixel array is generated by linear mapping projection according to the global brightness mapping rule. A Gaussian smoothing operator is applied to the grayscale pixel array to perform local pixel gradient smoothing and filter sensor noise. The geometric boundary coefficient value of the smoothed array is extracted, and bilinear interpolation resampling is performed according to the preset scale transformation kernel to unify the spatial resolution benchmark of the grayscale pixel array, and it is formatted and encapsulated into an initial pixel matrix containing a carbon fiber woven substrate.

[0024] Specifically, an industrial linear array camera with a resolution of no less than 2048×2048 pixels is used to scan and acquire data on the surface of the ground carbon fiber reinforced resin matrix composite workpiece. A ring-shaped coaxial white light source covering the visible spectrum range of 400 nm to 800 nm is used as the light source to ensure uniform illumination of the surface texture features. The raw optical projection data contains channel response information for the red, green, and blue bands. This raw optical projection data is parsed into discrete pixel arrays corresponding to the three bands. Each pixel array records the spectral radiant intensity value at its corresponding spatial location, thus laying the data foundation for subsequent spectral feature extraction. Taking a certain type of T800 grade carbon fiber composite workpiece as an example, under the processing conditions of a grinding speed of 30 m / s and a feed rate of 0.2 mm / s, the signal-to-noise ratio of the acquired raw image can reach over 38 dB, effectively preserving the spectral difference characteristics of the surface defect areas.

[0025] Spectral response brightness values ​​are extracted along the spatial coordinate axes of the discrete pixel matrix set and linearly mapped and projected according to a global brightness mapping rule to generate a grayscale pixel array. The global brightness mapping rule uses the brightness weighting coefficients specified in the international standard ITU-R BT.601 to weight and fuse the red, green, and blue channels, with a weight of 0.299 for the red channel, 0.587 for the green channel, and 0.114 for the blue channel. This linearly projects the three-channel color information onto a single-channel grayscale space, generating a grayscale pixel array. This processing method preserves the carbon fiber weave texture information and defect grayscale contrast while compressing the input dimension of the subsequent network to a single channel, effectively reducing the computational resource consumption required for model training. Experimental verification shows that the grayscale image after the above weighted mapping processing achieves an average grayscale difference of 42 grayscale levels (based on a quantization range of 0 to 255) between the cracked area and the intact woven substrate, significantly higher than the approximately 27 grayscale levels obtained by the direct conversion method, which is more conducive to the subsequent feature extraction network's identification of defect areas.

[0026] A Gaussian smoothing operator is applied to the grayscale pixel array to smooth local pixel gradients and filter sensor noise. The kernel size of the Gaussian smoothing operator is set to 5×5, and the standard deviation σ is set to 1.0. This parameter configuration effectively preserves the gradient information of carbon fiber weave texture and defect edges while smoothing sensor thermal noise and quantization noise, preventing over-smoothing from causing the loss of fine crack features. In actual testing, after applying the above Gaussian smoothing processing to an image containing a fine layered defect with a width of approximately 15 micrometers, the gradient response value retention rate of the defect region reached 91.3%, while the standard deviation of background random noise decreased from approximately 6.8 gray levels before processing to approximately 1.9 gray levels after processing, demonstrating a good balance between noise suppression performance and feature preservation ability.

[0027] The geometric boundary coefficients of the smoothed array are extracted, and bilinear interpolation resampling is performed according to a preset scale transformation kernel to unify the spatial resolution benchmark of the grayscale pixel array. This is then formatted and encapsulated into an initial pixel matrix containing a carbon fiber woven substrate. The bilinear interpolation resampling resamples images from different acquisition devices or distances to a standard spatial resolution benchmark of 224×224 pixels, which matches the input layer size of the subsequent deep learning feature extraction network. The bilinear interpolation method calculates a weighted average of the grayscale values ​​of the four adjacent pixels around the target pixel location. While ensuring interpolation accuracy, compared to the nearest neighbor interpolation method, the peak signal-to-noise ratio of the resampled image is improved by approximately 2.1 dB, effectively reducing jagged artifacts introduced by resolution conversion. The initial pixel matrix is ​​encapsulated in tensor format, with dimensions of batch number × channel number × height × width, where the number of channels is 1, and both the height and width are 224. This serves as a standardized data interface input for subsequent feature extraction.

[0028] This embodiment improves the problem of low defect feature extraction accuracy caused by strong sensor noise interference and inconsistent resolution of multiple devices in the grinding surface image of carbon fiber composite materials by the synergistic effect of multi-band spectral analysis and global brightness linear mapping, Gaussian smoothing denoising and bilinear interpolation resampling, and enhances the generalization ability of the detection system under complex working conditions.

[0029] Furthermore, the specific implementation process of performing frequency domain analysis on the grinding marks and weave textures on the material surface and constructing a texture phase suppression grid includes: A fast Fourier transform is performed on the initial pixel matrix to map the pixel spatial domain data to the planar spatial frequency domain, generating a spectrum matrix. The spectrum matrix is ​​traversed to extract the amplitude feature vectors and phase feature vectors of the frequency components. Based on the amplitude feature vectors, the peak coordinate set representing grinding marks and weaving textures is located. The peak coordinate set is substituted into a preset anisotropic filtering function to calculate the frequency domain response attenuation weight set. The corresponding frequency components in the spectrum matrix are attenuated and modulated, and the modulated spectrum distribution structure data is extracted. The mask is reconstructed in the frequency domain by combining the phase feature vectors and the modulated data, and then inverse Fourier transform is performed to invert to the spatial domain to construct a texture phase suppression grid.

[0030] Specifically, the Fast Fourier Transform (FFT) is based on the Cooley-Tukey butterfly architecture. It performs a two-dimensional Discrete Fourier Transform on an initial pixel matrix of size 224×224, converting the grayscale distribution information of each pixel in the original spatial domain into a complex representation of each frequency component in the frequency domain, thereby generating a spectrum matrix of the same size as the original matrix. The origin of the spectrum matrix is ​​shifted to the center of the matrix through a spectrum centering shift operation, which can intuitively present the low-frequency energy concentration area and the high-frequency component distribution structure. Taking a grinding surface image obtained from a T700 grade carbon fiber reinforced epoxy resin composite material under conditions of a spindle speed of 4500 rpm and an axial cutting depth of 0.15 mm as an example, after the above FFT processing, the low-frequency energy accounts for approximately 80% of the total spectrum energy in the spectrum matrix. Among the remaining 20% ​​of high-frequency components, the frequency peaks corresponding to the periodic components of the grinding tool marks and weaving textures show a clear symmetrical bright spot distribution in the spectrum image, providing a reliable frequency domain feature basis for subsequent peak coordinate positioning.

[0031] The amplitude and phase feature vectors of the frequency components are extracted by traversing the spectrum matrix. Based on the amplitude feature vectors, the peak coordinate set representing grinding marks and braided textures is located. The amplitude feature vector is composed of the magnitude of each complex component of the spectrum matrix, and the phase feature vector is composed of the argument of each complex component. Both are stored independently to support subsequent step-by-step processing. Based on the amplitude feature vectors, a local maximum detection algorithm is used to scan the spectrum amplitude map region by region. Frequency coordinate points with amplitude values ​​exceeding 4.5 times the standard deviation threshold of the global mean are marked as candidate peaks. The candidate peaks are then classified and filtered by combining the prior spatial frequency range of the carbon fiber braided structure (the dominant frequency of the braided texture is usually distributed in the range of 0.08 to 0.25 periods per pixel, and the dominant frequency of the grinding mark is usually distributed in the range of 0.30 to 0.48 periods per pixel). Finally, the peak coordinate set is formed. In the above experimental case, the extracted peak coordinate set contains a total of 14 significant peak points, of which 6 correspond to the warp and weft periodic components of the woven texture, and 8 correspond to the tool pattern harmonic components of different grinding feed directions. The spatial frequency error of the peak coordinate positioning does not exceed 0.005 cycles per pixel, which accurately reflects the frequency domain distribution law of the two types of texture structures.

[0032] The peak coordinate set is substituted into a preset anisotropic filtering function to calculate the frequency domain response attenuation weight set. This attenuates and modulates the corresponding frequency components in the spectrum matrix, extracting the modulated spectrum distribution structure data. The anisotropic filtering function is based on a Gaussian notch filter. For each peak coordinate point, a direction-selective elliptical attenuation response region is constructed around it. The major axis of the ellipse is parallel to the main direction of the corresponding texture, and the minor axis is perpendicular to the texture direction. The ratio of the major axis to the minor axis is set to 3:1 to ensure that while sufficiently suppressing periodic texture frequency components, minimal interference is maintained for frequency components in non-texture directions. The attenuation coefficient at each point in the attenuation weight set is determined by the anisotropic Gaussian function. The attenuation coefficient at the peak is set to 0.04, retaining 4% of the original frequency component energy. The transition region smoothly attenuates to 1.0 in the outer, unattenuated region according to a Gaussian curve. The attenuation weight set is multiplied element-wise by the original spectrum matrix to achieve selective attenuation modulation of the main frequency components of the grinding tool marks and weaving textures. The modulated spectrum is then saved as modulated spectrum distribution structure data. In the verification experiment of the above T700 grade carbon fiber composite material case, after attenuation modulation, the average amplitude of the frequency component related to the braided texture decreased from 187.3 gray levels before modulation to 8.9 gray levels; the average amplitude of the frequency component related to the grinding tool mark decreased from 143.6 gray levels before modulation to 11.4 gray levels.

[0033] By combining the phase eigenvectors and the modulated spectral distribution structure data, a mask is reconstructed in the frequency domain, and then inverted to the spatial domain using an inverse Fourier transform to construct a texture phase suppression grid. The frequency domain mask is resynthesized from the amplitude information of the modulated spectral distribution structure data and the original retained phase eigenvectors to form a complex spectrum. This reconstruction method ensures the phase continuity of the spatial domain signal and avoids block artifacts introduced by phase distortion during the inverse transform. After the complex spectrum is decentered and shifted back, it is inverted to the spatial domain using a two-dimensional fast Fourier transform. The resulting real part data constitutes the texture phase suppression grid. The texture phase suppression grid appears in the spatial domain as a 224×224 real-valued matrix of the same size as the original initial pixel matrix. Periodic grinding marks and weaving texture components have been systematically removed, while non-periodic abnormal features such as surface defects, cracks, delamination, and fiber pull-out are prominently preserved. In the above experimental verification, after the texture phase suppression grid processing, the contrast-to-noise ratio between the defect area and the background texture area was improved from 1.73 before processing to 6.84 after processing, which effectively improved the sensitivity of the subsequent deep learning detection network to perceive subtle defects.

[0034] This embodiment improves upon the problem of high false detection rates caused by severe interference from periodic weave textures and grinding marks on defect features during the inspection of ground carbon fiber composite surfaces. It employs a complete closed-loop processing chain, including Fast Fourier Transform (FFT), amplitude and phase dual-feature separation and extraction, anisotropic notch attenuation modulation, and inverse Fourier transform spatial domain reconstruction. Frequency domain analytical suppression enhances the contrast-to-noise ratio and preserves phase feature vectors throughout the processing, ensuring signal fidelity in the spatial domain reconstruction results. This provides a high-quality, low-interference input feature foundation for subsequent deep learning feature extraction networks.

[0035] Furthermore, the specific implementation process of importing the initial pixel matrix into a texture phase suppression grid for pixel-by-pixel differential filtering, filtering out interfering pixels, and outputting a clean base matrix includes: Establish a mapping relationship between the initial pixel matrix and the texture phase suppression raster, and perform pixel-by-pixel gray-level subtraction on the initial pixel matrix and the corresponding texture phase suppression raster to obtain the residual pixel distribution array; statistically analyze the pixel gray-level histogram of the residual pixel distribution array in the global space, and adaptively search for the segmentation boundary between background noise and foreground features based on the histogram distribution characteristics; use the segmentation boundary to discriminate the residual pixel distribution array, set the gray-level values ​​of residual pixels below the segmentation boundary to zero to remove interfering pixels, and retain pixels above the segmentation boundary as salient feature pixels to output as the clean base matrix.

[0036] Specifically, since both the initial pixel matrix and the texture phase suppression grid are formatted and encapsulated using a unified 224×224 spatial resolution standard, they are perfectly aligned in the row and column coordinate system. Therefore, a one-to-one correspondence of pixel-wise coordinates can be directly established, ensuring spatial consistency in subsequent differential operations. Based on this, a pixel-wise gray-level subtraction operation is performed on the initial pixel matrix and the corresponding texture phase suppression grid. This involves subtracting the gray-level estimate of the corresponding coordinate position in the texture phase suppression grid from the gray-level value at each coordinate position in the initial pixel matrix, obtaining a residual pixel distribution array. In this residual pixel distribution array, the regular gray-level fluctuations contributed by periodic grinding marks and weaving textures have been largely eliminated, while the defect area, due to its non-periodic gray-level anomaly characteristics, still retains a significant residual response after the differential operation. Taking the measured image of the ground surface of a T800 grade carbon fiber composite workpiece as an example, after performing pixel-by-pixel gray-level subtraction, the mean absolute value of the residual gray level in the intact woven substrate area decreased from about 34.2 gray levels before subtraction to about 4.7 gray levels, while the mean absolute value of the residual gray level in the crack defect area remained at about 51.8 gray levels.

[0037] The residual pixel distribution array is statistically analyzed in the global space using a pixel grayscale histogram. Based on the histogram distribution characteristics, an adaptive search is performed to find the segmentation boundary between background noise and foreground features. The grayscale histogram is statistically analyzed for the residual grayscale values ​​of all 50,176 pixels (224×224 pixels) with a statistical step size of one grayscale level. The residual grayscale values ​​of intact background regions are concentrated in the low grayscale range due to differential cancellation, exhibiting a narrow peak shape with a peak value near zero. Conversely, the residual grayscale values ​​of defective foreground regions are dispersed in the higher grayscale range, forming a trailing distribution on the right side of the histogram. The adaptive segmentation boundary search algorithm is based on the Otsu threshold segmentation principle. It calculates the inter-class variance by traversing all candidate thresholds and determines the optimal segmentation boundary by maximizing the inter-class variance. The segmentation boundary is used to discriminate the residual pixel distribution array. Residual pixels with grayscale values ​​below the segmentation boundary are set to zero to eliminate interfering pixels, while pixels with grayscale values ​​above the segmentation boundary are retained as salient feature pixels. The output is a clean background matrix. In the clean-state substrate matrix, the background interference pixel areas after zeroing are uniformly black, while the areas containing salient feature pixels retain their original residual gray values, clearly showing the spatial distribution outline of the defects. In the above-mentioned experimental case, after extraction by the clean-state substrate matrix, the pixel signal-to-noise ratio of the defect area increased from approximately 11.0 dB in the residual array stage to approximately 23.7 dB, effectively providing a low-interference, high-contrast input foundation for the subsequent dual-stream feature extraction network.

[0038] This embodiment utilizes pixel-wise differential filtering and adaptive segmentation to output a clean base matrix. Through the synergistic effect of same-name coordinate differential operation and Otsu's adaptive threshold discrimination, it improves the problem of the difficulty in effectively separating periodic texture interference pixels from defective foreground pixels, providing high-quality input for subsequent deep feature extraction.

[0039] Furthermore, the specific implementation process of extracting the spatial structure flow and contour semantic flow from the net-state base plate matrix, and constructing the geometric edge pixels from the spatial structure flow as pixel traction anchor points includes: The net-state substrate matrix is ​​input into a dual-stream feature extraction network in parallel. At the shallow network level, gradient response is aggregated to extract spatial structural flows representing physical details, while at the deep network level, receptive field features are aggregated to extract contour semantic flows representing morphological characteristics. An edge detection operator is applied to the spatial structural flows to calculate the pixel grayscale gradient magnitude and gradient direction angle in each direction. A non-maximum suppression algorithm is used to select pixels with the largest local gradient magnitude on the normal of the gradient direction angle, and a double-threshold connectivity analysis is performed to separate continuous geometric edge pixels. The spatial coordinate system of the geometric edge pixels is extracted and fused with the structural response intensity information to construct pixel traction anchors.

[0040] Specifically, the dual-stream feature extraction network uses an improved lightweight residual network as its backbone. The two branches share the parameters of the first and second residual blocks (layer1 and layer2) to reduce computational overhead and extend into independent subsequent layers. The spatial structure flow branch, after the layer2 output (256 channels, 28×28 feature map size), is followed by a 1×1 convolution to reduce the number of channels to 64. The contour semantic flow branch continues through layers 3 to 5. After the layer5 output (2048 channels, 7×7 feature map size), it is restored to 28×28 through bilinear upsampling, and then reduced to 256 channels through a 1×1 convolution. The network uses the Adam optimizer with a learning rate of 1×10⁻⁶. -4 During training, after the backbone network pre-trains and initializes its weights, the first-layer convolutional kernels are averaged along the channel dimension to adapt to the single-channel grayscale input. Two branches are computed in parallel and independently, without interference, ensuring that both shallow physical detail features and deep semantic morphological features are fully extracted. An edge detection operator is applied to the spatial structure flow to calculate the pixel grayscale gradient magnitude and gradient direction angle in each direction. The edge detection operator uses the Sobel operator to calculate the first-order partial derivatives of pixel grayscale in both the horizontal and vertical directions, and synthesizes the gradient magnitude based on the Pythagorean theorem. Simultaneously, the gradient direction angle of each pixel is calculated through arctangent operation. The direction angle values ​​are quantized into four discrete directions: 0 degrees, 45 degrees, 90 degrees, and 135 degrees, to support the directional traversal operation of the subsequent non-maximum suppression algorithm.

[0041] A non-maximum suppression algorithm is used to filter pixels with the largest local gradient magnitude along the normal of the gradient direction angle. The algorithm compares the gradient magnitude of each pixel with that of its adjacent pixels along the normal direction corresponding to the gradient direction angle, retaining only the local maximum value and setting the gradient magnitude of non-local maxima pixels to zero. This compresses the original edge response with a certain width into a precise edge line of single-pixel width. Based on this, a dual-threshold connectivity analysis is performed to separate continuous geometric edge pixels. The high threshold is set to 0.20 times the global maximum gradient magnitude, and the low threshold is set to 0.40 times the high threshold. Pixels above the high threshold are directly identified as strong edge pixels, while pixels between the high and low thresholds that are connected to strong edge pixels are identified as weak edge pixels and retained. The remaining pixels are discarded. In an experiment using a CF / EP composite grinding specimen as the test object, after nonmaximum suppression and dual threshold connectivity analysis, the edge line width of a single crack defect was compressed from approximately 4.7 pixels in the original response of the Sobel operator to approximately 1.2 pixels, with an edge positioning accuracy error of less than 1 pixel, thus fully preserving the continuity and accuracy of the defect edge.

[0042] The spatial coordinate system of the geometric edge pixels is extracted and fused with the structural response intensity information to construct pixel traction anchors. The spatial coordinate system records the row and column coordinates of each geometric edge pixel in a 224×224 matrix, and the structural response intensity information records the gradient magnitude preserved by non-maximum suppression at the corresponding position. The two are fused and encapsulated in a structured data format to form the pixel traction anchor set. In the above experimental case, an average of about 2347 pixel traction anchors are constructed per image, distributed at the boundary contour positions of defects such as cracks, delamination, and fiber pull-out, providing a precise orientation guidance benchmark for the spatial alignment traction of the subsequent contour semantic flow.

[0043] This embodiment performs parallel dual-stream interception and pixel-guided anchor point construction. By functionally separating the shallow gradient response and the deep semantic receptive field, and combining non-maximum suppression and dual threshold analysis for precise edge localization, it improves the problem that a single feature stream cannot simultaneously take into account the physical details of surface defects and the overall morphological information of carbon fiber composite materials. It effectively controls the edge localization accuracy error and provides high-precision spatial guiding anchor points for subsequent multi-stream feature alignment and fusion.

[0044] Furthermore, the specific implementation process of using the pixel traction anchor point as a spatial orientation guide to align and guide the contour semantic flow with pixel coordinates, and generating a pixel aggregation matrix using channel splicing includes: The spatial coordinate system contained in the pixel traction anchor point is analyzed, and the resolution scale parameter of the contour semantic flow is obtained; the spatial mapping offset field between the resolution scale parameter and the spatial coordinate system is calculated to generate an affine transformation displacement vector set; the pixel feature points of the contour semantic flow are deformed and resampled using the affine transformation displacement vector set as a guide, driving the pixel coordinates of the contour semantic flow to generate a convergence offset towards the pixel traction anchor point to complete the spatial alignment traction; the aligned contour semantic flow and the spatial structure flow are extracted, and sequentially stacked along the feature channel dimension, and redundant features are eliminated by channel feature dimensionality reduction mapping to output a pixel aggregation matrix.

[0045] Reference Figure 2 Specifically, since the feature map resolution of the contour semantic flow is typically reduced to a fraction of the original input size after downsampling through deep networks, taking the network architecture in this embodiment as an example, the feature map resolution of the contour semantic flow in the output layer of the fifth residual block is 28×28, which is 8 times the spatial downsampling ratio compared to the input of 224×224, i.e., the resolution scale parameter is 8. After obtaining the resolution scale parameter, the position information of the pixel traction anchor point in the 224×224 coordinate system can be mapped to the 28×28 feature space of the contour semantic flow, establishing a cross-scale coordinate correspondence.

[0046] The spatial mapping offset field between the resolution scale parameter and the spatial coordinate system is calculated to generate an affine transformation displacement vector set. The spatial mapping offset field is calculated through a learnable spatial transformation network, using the contour semantic flow feature map and pixel traction anchor coordinates as joint inputs. The output is a two-dimensional displacement vector field of the same size as the contour semantic flow feature map. The displacement vector at each position in the field represents the direction and magnitude of the pixel feature point's offset towards the target alignment position. All displacement vectors are collected to form the affine transformation displacement vector set. The learnable spatial transformation network consists of a localization network and a sampling grid generator. The localization network receives a channel concatenation of the contour semantic flow feature map (28×28×256) and the sparse pixel traction anchor coordinate set (encoded as a 28×28×1 density map using Gaussian heatmap encoding) as input. After passing through three layers of 3×3 convolutions (with 128, 64, and 2 channels respectively) and ReLU activation, it outputs a two-channel displacement vector map (x-direction offset and y-direction offset) of the same size as the feature map.

[0047] Guided by the affine transformation displacement vector set, deformation resampling interpolation is performed on the pixel feature points of the contour semantic flow, driving the pixel coordinates of the contour semantic flow to converge and offset towards the pixel traction anchor point to complete spatial alignment traction. The deformation resampling interpolation adopts the bilinear interpolation method, and the resampled feature value is obtained by weighted averaging of the feature values ​​of the four surrounding neighborhoods at the offset sub-pixel coordinate position, ensuring the continuity and smoothness of feature values ​​during spatial alignment. After spatial alignment traction, the average spatial deviation between the center coordinates of each defect morphology feature region in the contour semantic flow and the corresponding pixel traction anchor point is reduced from about 5.8 feature pixels before alignment (corresponding to about 46.4 pixels in the original space) to about 0.9 feature pixels (corresponding to about 7.2 pixels in the original space), improving the alignment accuracy by about 84.5%.

[0048] The aligned contour semantic stream and the spatial structure stream are extracted and sequentially stacked along the feature channel dimension. Redundant features are eliminated through channel feature dimensionality reduction mapping, resulting in a pixel aggregation matrix. The channel stacking operation concatenates the spatial structure stream (64 channels) and the aligned contour semantic stream (256 channels) along the channel dimension to form a 320-channel fused feature map. Then, a 1×1 convolution kernel is used to achieve channel dimensionality reduction, compressing the 320 channels to 128 channels. While eliminating redundant feature channels, the complementary information of the two-stream fusion is preserved, and the output is the pixel aggregation matrix with 128 channels and a resolution of 224×224.

[0049] This embodiment utilizes cross-scale spatial alignment and channel splicing fusion guided by pixel-guided anchor points. Through learnable affine transformation displacement fields, it drives the deep semantic flow to converge towards the shallow structural anchor points, improving the spatial misalignment problem caused by the resolution inconsistency between deep semantic features and shallow structural features. The pixel aggregation matrix after dual-flow fusion simultaneously carries the detailed edge information of defects and the overall semantic morphology information, providing a sufficient multi-dimensional feature foundation for subsequent pixel-level defect enhancement analysis.

[0050] Furthermore, the specific implementation process of continuously extracting local neighborhood pixel groups from the pixel aggregation matrix, calculating the deviation between the center pixel and the surrounding pixels within the group, and constructing the spatial pixel magnification model includes: The pixel aggregation matrix is ​​traversed with a preset sliding window size, and a local neighborhood pixel group centered on the current pixel is extracted at each sliding step. The feature vector value of the center pixel in the local neighborhood pixel group and the mean feature vector value of the surrounding pixels are obtained, and the spatial distance metric between the two is calculated to obtain the local feature deviation of the center pixel in the group relative to the surrounding pixels. The local feature deviation data of each pixel in the entire matrix is ​​recorded and fitted to generate a deviation probability density function. Based on the tail dragging shape of the deviation probability density function, a nonlinear mapping activation function is derived. The nonlinear mapping activation function is combined with the corresponding spatial neighborhood distance attenuation weight factor for network encapsulation to construct a spatial pixel magnification model.

[0051] Reference Figure 3 Specifically, the sliding window size is set to 7×7 pixels, the sliding step size is 1 pixel, and the boundary area is processed by zero-value filling to ensure that all 50176 pixels of 224×224 in the pixel aggregation matrix can participate in the construction of local neighborhood pixel groups as center pixels. Each local neighborhood pixel group contains 49 pixel positions (including the center pixel itself and the surrounding 48 pixels), and each carries the corresponding feature vector value in the 128-channel feature dimension.

[0052] The feature vector values ​​of the central pixel and the average feature vector values ​​of the surrounding pixels within the local neighborhood pixel group are obtained. The spatial distance metric between them is calculated to determine the local feature deviation of the central pixel relative to the surrounding pixels. The spatial distance metric uses Euclidean distance in a 128-dimensional feature space, that is, the Euclidean distance between the feature vector of the central pixel and the average feature vector of the surrounding 48 pixels is calculated. This distance value is the local feature deviation of the central pixel. In the image of the ground surface of carbon fiber composite material, the central pixel and the surrounding pixels in the intact background area are relatively similarly distributed in the feature space, with an average local feature deviation of approximately 2.17. However, the central pixel located at the edge of defects such as cracks and fiber pull-outs has a significantly different physical properties from the surrounding background pixels, with an average local feature deviation of approximately 14.83. The deviation ratio between the two types of areas is approximately 6.8 times, demonstrating significant distinguishing ability.

[0053] Local feature deviation data for each pixel within the entire matrix were recorded, and a deviation probability density function was generated. This probability density function was fitted using kernel density estimation to represent the distribution of all pixel deviation data. In the experimental data, the deviation probability density function exhibited a clear bimodal distribution. The low deviation peak (corresponding to the background pixel group) was located at approximately 2.1 deviation, while the high deviation tail (corresponding to the defect edge pixel group) formed a wide distribution in the deviation range of approximately 14 to 22. The tail dragging pattern clearly reflected the abnormal deviation characteristics of the defect pixels relative to the background pixels.

[0054] Based on the tail dragging pattern of the deviation probability density function, a nonlinear mapping activation function is derived. This nonlinear mapping activation function is then networked and encapsulated with a corresponding spatial neighborhood distance attenuation weight factor to construct a spatial pixel magnification model. The nonlinear mapping activation function is designed as an exponential gain activation function, referencing the tail shape of the deviation probability density function. It applies a near-linear, mild response to low-deviation pixels and an exponential gain amplification to high-deviation pixels, thereby enhancing the characteristic response differences in defective regions. The spatial neighborhood distance attenuation weight factor is based on a 7×7 Gaussian weight kernel. Pixels farther from the center pixel are assigned lower weights. The center pixel itself, as the current evaluation subject, best represents the actual physical state, hence its weight is set to 1.0. Simultaneously, based on the smooth attenuation characteristics of the Gaussian function, the weight of the farthest corner pixel smoothly transitions to approximately 0.12, ensuring reasonable modeling of spatial locality. The networked encapsulation of these two components constitutes the spatial pixel magnification model, with approximately 0.38 megabytes of parameters and a computation time of approximately 12 milliseconds for inference on a single image.

[0055] This embodiment utilizes the calculation of local neighborhood pixel group deviation and the construction of a spatial pixel magnification model. Through data-driven deviation probability density function fitting and exponential gain nonlinear activation function design, it improves the problem of insufficient gain difference between defect and background regions and difficulty in effectively separating defect response from background in linear feature enhancement methods. It amplifies the feature deviation ratio between defect pixels and background pixels, thereby enhancing the discrimination basis for subsequent pixel-level segmentation.

[0056] Furthermore, the specific implementation process of using the spatial pixel magnification model to perform pixel-by-pixel recombination calculations on the pixel aggregation matrix and outputting the distortion enhancement matrix includes: The pixel aggregation matrix is ​​input into the spatial pixel magnification model, and the nonlinear mapping activation function is used to perform nonlinear mapping calculation on the pixel feature values ​​of each channel. The spatial neighborhood distance attenuation weight factor is used to perform weighted summation on the features of surrounding pixels in the local neighborhood pixel group, and the summation result is used as a compensation term to be incorporated into the feature of the center pixel in the group after the mapping calculation to complete the reorganization and aggregation of pixel context information. The spatial distribution entropy value of the reorganized and aggregated pixel features is evaluated, and feature sharpening operators are applied to the regions with fluctuating information entropy to perform local gain processing. All pixel data after reorganization and gain processing are collected, rearranged and assembled into a two-dimensional data structure according to the original row and column coordinate indices, and output as a distortion enhancement matrix.

[0057] Specifically, the nonlinear mapping calculation uses the exponential gain activation function built into the spatial pixel magnification model as the core. It performs independent nonlinear mapping transformation on the feature values ​​of each channel in the 128 channels of the pixel aggregation matrix. The values ​​in the low feature response region approach zero after mapping, while the values ​​in the high feature response region are significantly expanded after exponential gain, thereby realizing the nonlinear reshaping of the feature distribution within the channel.

[0058] The spatial neighborhood distance attenuation weighting factor is used to perform a weighted summation of the features of surrounding pixels within the local neighborhood pixel group. The summation result is then incorporated as a compensation term into the center pixel features within the group after mapping calculation, completing the reorganization and aggregation of pixel context information. The weighted summation process uses a 7×7 Gaussian weight kernel to perform a weighted average of the feature vectors of the 48 pixels surrounding the current center pixel. The resulting mean of the surrounding context features is then superimposed on the center pixel features that have undergone nonlinear mapping with a fusion coefficient of 0.35. This ensures that the final feature of each pixel simultaneously includes its own nonlinear enhancement response and the compensation information of the local spatial context. This context fusion mechanism ensures that isolated noise points, lacking neighborhood support, are not mistakenly enhanced, while continuous defective regions obtain stable enhancement gains due to mutual support from neighboring pixels. Taking a measured image of a carbon fiber composite grinding panel (300 mm × 200 mm, grinding depth 0.2 mm) as an example, after the above-mentioned recombination and polymerization, the average feature response value of the pixel corresponding to the fine crack defect with a width of about 8 micrometers increased from about 5.3 at the input to about 29.7, with a gain of about 5.6 times. In contrast, the average feature response value of the adjacent intact background pixel only increased from about 1.8 to about 2.3, with a gain of only about 1.3 times. The gain difference between the two types of regions has significantly increased.

[0059] The entropy value of the spatial distribution of pixel features after recombination and aggregation is evaluated, and a feature sharpening operator is applied to areas with fluctuating information entropy for local gain processing. The information entropy evaluation calculates the entropy value of the entire image in blocks of 8×8 pixels. High information entropy areas correspond to transitional zones with complex feature distributions near defect boundaries. A Laplacian sharpening operator is applied to these high information entropy areas for local gain processing, enhancing the gradient contrast of the defect boundaries and making the pixel-level response of the defect edges clearer and sharper. In the above experimental case, after feature sharpening processing, the average gradient magnitude of the defect edge region increased from approximately 18.4 before processing to approximately 31.6.

[0060] All recombined and amplified pixel data are collected and rearranged according to their original row and column coordinate indices to form a two-dimensional data structure, outputting a distortion enhancement matrix. This distortion enhancement matrix has 128 channels and a resolution of 224×224, where the feature responses of defective regions are fully amplified while the feature responses of background regions are suppressed. The overall signal-to-noise ratio is improved by approximately 8.9 dB compared to the pixel aggregation matrix, providing high-quality feature input for subsequent pixel-level binary segmentation.

[0061] This embodiment utilizes a spatial pixel magnification model to reconstruct and output a distortion enhancement matrix pixel by pixel. Through a triple enhancement mechanism of nonlinear mapping gain, context-weighted compensation fusion, and information entropy-guided local sharpening, it improves the problem that subtle defects have a weak response in the feature space and are difficult to effectively distinguish from background features, thus effectively supporting the subsequent implementation of accurate binary segmentation.

[0062] Furthermore, the specific implementation process of extracting the two-dimensional spatial extremum point distribution field of the distortion enhancement matrix, dynamically deducing the binary decision grid, and performing pixel segmentation and truncation on the distortion enhancement matrix to output the pixel mask image of the grinding defect region boundary includes: The Laplacian operator is used to scan and calculate the distortion enhancement matrix to locate the spatial extreme points where pixel intensity polarity is reversed, and a two-dimensional spatial extreme point distribution field is constructed. Using the density clustering of extreme points within the two-dimensional spatial extreme point distribution field, an adaptive region growing algorithm is used to divide densely populated extreme point areas into foreground candidate regions and the remaining areas into background suppression regions, dynamically deriving a binary decision grid. This binary decision grid is then superimposed onto the distortion enhancement matrix. Pixels falling into the background suppression region are truncated to zero, while the activation values ​​of pixels falling into the foreground candidate region are retained. Morphological closing operations are performed on the pixel blocks with retained activation values ​​to fill holes and smooth the outer boundaries, outputting a pixel mask image of the grinding defect region boundary.

[0063] Specifically, the Laplacian operator uses a standard 5×5 discrete Laplacian kernel to convolve and scan the feature maps of each channel of the distortion enhancement matrix, detecting the zero-crossing positions of the second derivative of pixel intensity, i.e., the polarity reversal positions between local maxima and minima. These positions correspond to the abrupt changes in feature response near the defect boundary. The coordinates of the extreme points of the 128 channels are combined and projected onto a 224×224 two-dimensional space to construct the two-dimensional extreme point distribution field. Each coordinate position in the field records whether an extreme point response exists and the corresponding extreme intensity. In a field verification experiment on the ground surface of a carbon fiber woven composite material, the extreme point density in the crack defect region of the two-dimensional extreme point distribution field is approximately 14.7 per 100 square pixels, while the extreme point density in the intact background region is approximately 1.9 per 100 square pixels, a density ratio of approximately 7.7 times. The extreme point density has a significant indicative ability for defect regions.

[0064] Utilizing the density clustering of extreme points within the two-dimensional spatial extreme point distribution field, an adaptive region growing algorithm divides densely populated extreme point areas into foreground candidate regions and the remaining areas into background suppression regions, dynamically deriving a binary decision grid. The adaptive region growing algorithm uses pixel locations with extreme point density exceeding 2.5 times the overall image average as seed points, expanding outwards using four-connected domains as the growth rule. When the extreme point density of adjacent pixels exceeds 1.2 times the overall image average, they are included in the foreground candidate region; otherwise, expansion stops, forming the foreground candidate boundaries for each connected defect region. The extreme point density ratios of 2.5 and 1.2 are fixed hyperparameters determined by this invention through grid search verification (F1 score optimization) on a carbon fiber composite grinding surface dataset; those skilled in the art can set them according to actual conditions. All pixels in the foreground candidate region are assigned a value of 1, and pixels in the background suppression region are assigned a value of 0, collectively forming the binary decision grid. The binary decision grid is superimposed on the distortion enhancement matrix, and pixels falling into the background suppression region are truncated to zero, while the activation values ​​of pixels falling into the foreground candidate region are retained. The overlay operation is implemented by pixel-wise multiplication. In the binary decision grid, the position with a value of 0 will clear all 128 channel feature values ​​of the corresponding position of the distortion enhancement matrix to zero, while the position with a value of 1 will retain the original feature activation value unchanged, thereby achieving accurate foreground and background separation in the feature space and eliminating the interference of the background region on subsequent morphological processing.

[0065] Morphological closing operations are performed on pixel blocks with retained activation values ​​to fill holes and smooth the outer boundaries, outputting a pixel mask image of the grinding defect region boundary. The morphological closing operation uses a circular structuring element with a radius of 3 pixels, performing dilation followed by erosion to fill holes caused by weak local feature responses within the defect region and smooth the jagged, irregular shape of the defect contour's outer boundary. The pixel mask image is a single-channel binary image with the same size as the original input image (224×224). White areas (pixel value 255) precisely mark the spatial distribution range of the grinding defects, while black areas (pixel value 0) correspond to intact surface areas. In a system verification experiment using 100 images of the ground surface of T800 grade carbon fiber composite material containing various defects (cracks, delamination, fiber pull-out) as the test set, the mean cross-union ratio (CUNR) between the pixel mask image and the manually labeled gold standard reached 0.87, the pixel-level precision was 90%, the pixel-level recall was 89%, and the overall F1 score was 90%. All indicators were significantly better than traditional image processing methods (mean CUNR of approximately 0.631) and baseline deep learning methods that did not adopt the frequency domain texture suppression and dual-stream alignment fusion process of this invention (mean CUNR of approximately 0.784).

[0066] This embodiment dynamically extrapolates a binary decision grid based on the distribution field of two-dimensional extrema points and outputs a pixel mask image after morphological post-processing. Through a complete segmentation link of Laplacian extrema point density field characterization, adaptive region growth segmentation, and morphological hole filling smoothing, it improves the problems of low extraction accuracy of surface defect contours and high missed detection rate of minute defects in carbon fiber composite materials, and improves the accuracy of pixel mask images.

[0067] Example 2: This embodiment deploys the above-mentioned deep learning-based composite material grinding surface defect detection method in a factory's industrial control computing system to detect defects on the grinding surface of carbon fiber composite materials.

[0068] Furthermore, the system acquires raw optical projection data of the ground surface of carbon fiber composite material using an industrial linear array camera. The camera's physical resolution is set to 4096×4096 pixels, and it is equipped with a coaxial white light source to eliminate shadows on the material surface. The system receives a discrete pixel array containing three bands: red, green, and blue. It extracts the spectral response brightness values ​​along the pixel spatial coordinate axis and linearly sums the brightness values ​​of the red, green, and blue channels according to internationally standardized brightness weighting coefficients, mapping and projecting to generate a grayscale pixel array with one channel. To remove sensor thermal noise and quantization noise, the system performs local pixel gradient smoothing on the grayscale array using a Gaussian smoothing operator with a kernel size of 5×5 and a standard deviation of 1. After smoothing, the algorithm extracts the geometric boundary coefficient values ​​of the array, uses bilinear interpolation to perform a weighted average of the four surrounding adjacent pixels, and resamples its spatial resolution to a standard size of 224×224 pixels. Finally, it encapsulates this data in tensor format as an initial pixel matrix containing a carbon fiber woven substrate, with its data dimensions standardized as batch number × 1 channel × height × width.

[0069] Furthermore, the system performs frequency domain analysis on the grinding marks and weave textures on the material surface to construct a texture phase suppression grid. A two-dimensional Fast Fourier Transform based on a butterfly architecture is performed on the initial pixel matrix to map the pixel spatial domain data to the planar spatial frequency domain, generating a spectrum matrix, and shifting the low-frequency components to the center of the spectrum. The spectrum matrix is ​​traversed, and the magnitude and argument of each complex component are calculated to independently construct amplitude and phase eigenvectors. Based on the amplitude eigenvectors, the system uses a local maximum detection algorithm to select coordinate points whose amplitudes significantly exceed the global mean by several times, thereby locating the peak coordinate set representing the periodic grinding marks and weave textures. The system substitutes these peak coordinates into a preset Gaussian notch anisotropic filter function to calculate an elliptical distributed frequency domain response attenuation weight set, and performs multiplicative attenuation modulation on the corresponding high-frequency interference components of the spectrum matrix. After modulation, the retained original phase feature vector is recombine with the modulated amplitude data, and an inverse fast Fourier transform is performed to invert to the spatial domain, generating a real-valued matrix with periodic texture removed, i.e., a texture phase suppression grid. After obtaining the suppression grid, the system establishes a strict mapping relationship between the initial pixel matrix and the texture phase suppression grid in the row and column system of corresponding pixel coordinates. A pixel-by-pixel gray-level subtraction operation is performed on both, i.e., the original gray-level value is subtracted from the gray-level estimate corresponding to the suppression grid, generating a residual pixel distribution array. The system calculates the pixel gray-level histogram of this residual array in global space with a step size of one gray level, and adaptively searches for the optimal segmentation boundary between background noise and foreground features by maximizing the inter-class variance. Using this segmentation boundary, the system forcibly clears the gray-level values ​​of pixels in the residual array below the boundary to 0, retaining only the salient feature pixels above the boundary, thus outputting a clean background matrix after removing interference.

[0070] Furthermore, the system inputs the net-state substrate matrix into a dual-stream feature extraction network based on a residual network architecture. In the shallow network stage, the system aggregates gradient responses using convolutional kernels with small receptive fields to extract the spatial structural flow representing physical details. In the deep network stage, after multiple downsampling operations, the system aggregates multi-scale receptive field features to extract the contour semantic flow representing morphological characteristics. For the spatial structural flow, the system applies the Sobel edge detection operator to calculate the partial derivatives in the horizontal and vertical directions, synthesizes the pixel grayscale gradient magnitude using the Pythagorean theorem, and calculates the gradient direction angle. Non-maximum suppression is performed in the normal direction of the gradient direction angle to remove pixels with non-local maxima, compressing the edge response to a width of 1 pixel. Subsequently, a two-threshold connectivity analysis is applied to separate continuous geometric edge pixels, extract their spatial coordinates and corresponding gradient magnitudes, and package them into a set of pixel traction anchor points.

[0071] Furthermore, the system uses pixel-guided anchor points as spatial orientation guidance to align and guide the deep contour semantic flow, which has a resolution only 1 / 8 of the input size. It obtains the resolution scale parameter of the deep feature map and calculates the mapping offset field between this parameter and the spatial position of the anchor point through a learnable spatial transformation network module, generating an affine transformation displacement vector set composed of direction and amplitude. Using this vector set, the system performs sub-pixel-level bilinear resampling interpolation on the feature points of the contour semantic flow, driving the low-resolution coordinates of the deep semantic flow to converge and offset towards the shallow, precise geometric anchor points, completing the spatial alignment. After alignment, the system serializes and stacks the spatial structure flow and the contour semantic flow along the feature channel dimension, and performs cross-channel linear combination using 1×1 convolutional kernels to reduce dimensionality and eliminate redundancy, ultimately generating a pixel aggregation matrix containing 128 channels. Based on this, the system further constructs a spatial pixel magnification model to enhance subtle defects. A full image traversal is performed on the pixel aggregation matrix using a 7×7 pixel sliding window and a 1-pixel stride, extracting a local neighborhood pixel group centered on the current pixel. In the multidimensional feature space, the local feature deviation is obtained by calculating the Euclidean distance between the feature vector of the central pixel and the mean feature vectors of the surrounding 48 pixels. The system records the deviation data of the entire matrix and generates a two-peaked deviation probability density function by fitting kernel density estimation. Based on the long-tailed distribution of this function, the system configures an exponentially gain-type nonlinear mapping activation function to give exponential amplification to pixels with high deviation, and combines it with a Gaussian kernel-based spatial neighborhood distance attenuation weight factor for network encapsulation, forming a spatial pixel amplification model with approximately 0.38 megapixels. This model is used to perform nonlinear mapping on the pixel aggregation matrix, and then the surrounding features are weighted and summed according to the distance attenuation weight. The result is used as a compensation term and integrated into the central pixel to complete the context information recombination. After recombination, the system evaluates the spatial distribution information entropy of pixel features in 8×8 blocks, and applies a Laplacian sharpening operator for local gain processing in defective transition regions with drastic fluctuations in information entropy. Finally, the processed data is rearranged according to the original row and column indices to output a distortion enhancement matrix with high signal-to-noise ratio.

[0072] Furthermore, the system utilizes a 5×5 discrete Laplacian operator to perform a two-dimensional scan of the distortion enhancement matrix, searching for points where the second derivative passes through zero, accurately locating the coordinates of spatial extrema points where pixel intensity polarity is reversed, and summarizing them to construct a two-dimensional spatial extrema point distribution field. The density clustering of extrema points within this distribution field is evaluated, and pixels with a density exceeding a specific multiple of the global mean are used as seed points to perform 4-connected adaptive region growing. After growing, densely populated regions of extrema points are divided into foreground candidate regions and assigned a value of 1, while sparse regions are divided into background suppression regions and assigned a value of 0, thus deriving a binary decision grid. The system multiplies and superimposes this grid with the distortion enhancement matrix pixel by pixel, achieving background zeroing and foreground activation value preservation. For the preserved foreground patches, the system uses circular structuring elements of a specific radius to sequentially perform dilation and erosion morphological closing operations, effectively filling the internal holes of defects caused by weak local responses and smoothing the jagged edges of the defect boundaries. Finally, it outputs a one-channel pixel mask image of the same size as the original image, accurately representing the boundary of the grinding defect region.

[0073] This embodiment effectively improves the problem of severe interference from dense grinding marks and woven backgrounds when processing carbon fiber materials by using frequency domain analysis and texture raster suppression. It overcomes the limitation of deep neural networks in easily losing spatial details of minute defects after multiple downsampling by utilizing dual-stream alignment of spatial structure flow and contour semantic flow, as well as a spatial pixel amplification model. Furthermore, it amplifies the response difference between defect pixels and the normal background by amplification under a nonlinear mapping mechanism. Combined with adaptive region growing and morphological processing, it achieves high-sensitivity capture and high-precision boundary segmentation of weak target defect signals such as microcracks and delamination in multi-scale complex backgrounds, reducing the false detection and false negative rates in industrial quality inspection environments and improving the automation and intelligence level of surface quality inspection of composite material components.

[0074] It should be clarified that the embodiments described above are merely exemplary and are intended to aid in understanding the present invention, not to limit it. Those skilled in the art can make various changes and modifications after grasping the core ideas of the present invention. Therefore, the scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for detecting surface defects in ground composite materials based on deep learning, characterized in that, include: Receive an initial pixel matrix containing a carbon fiber braided substrate; Frequency domain analysis is performed on the grinding marks and weaving textures on the material surface, and a texture phase suppression grid is constructed. The initial pixel matrix is ​​then imported into the texture phase suppression grid for pixel-by-pixel differential filtering to filter out interfering pixels and output as a clean base matrix. The spatial structure flow and contour semantic flow in the net state base plate matrix are extracted respectively, and the geometric edge pixels in the spatial structure flow are extracted to construct pixel traction anchor points; Using the pixel traction anchor point as a spatial orientation guide, the contour semantic flow is aligned and pulled by pixel coordinates, and a pixel aggregation matrix is ​​generated by channel splicing. Local neighborhood pixel groups are continuously extracted from the pixel aggregation matrix, and the deviation between the central pixel and the surrounding pixels within the group is calculated to construct a spatial pixel magnification model. The spatial pixel magnification model is used to perform pixel-by-pixel recombination calculation on the pixel aggregation matrix, and a distortion enhancement matrix is ​​output. The two-dimensional spatial extreme point distribution field of the distortion enhancement matrix is ​​extracted, a binary decision grid is dynamically deduced, and the distortion enhancement matrix is ​​pixel segmented and truncated to output a pixel mask image of the boundary of the grinding defect region.

2. The method for detecting surface defects in composite material grinding based on deep learning according to claim 1, characterized in that, The specific implementation process for receiving the initial pixel matrix containing the carbon fiber braided substrate includes: The raw optical projection data of the ground surface of carbon fiber composite material is acquired, and the raw optical projection data is parsed into a discrete pixel array set of multiple bands. The spectral response brightness value is extracted along the spatial coordinate axis of the discrete pixel array set, and a grayscale pixel array is generated by linear mapping projection according to the global brightness mapping rule. A Gaussian smoothing operator is applied to the grayscale pixel array to perform local pixel gradient smoothing and filter sensor noise. The geometric boundary coefficient value of the smoothed array is extracted, and bilinear interpolation resampling is performed according to the preset scale transformation kernel to unify the spatial resolution benchmark of the grayscale pixel array, and it is formatted and encapsulated into an initial pixel matrix containing a carbon fiber woven substrate.

3. The method for detecting surface defects in composite material grinding based on deep learning according to claim 1, characterized in that, The specific implementation process of performing frequency domain analysis on grinding marks and weave textures on material surfaces and constructing a texture phase suppression grid includes: A fast Fourier transform is performed on the initial pixel matrix to map the pixel spatial domain data to the planar spatial frequency domain, generating a spectrum matrix. The spectrum matrix is ​​traversed to extract the amplitude feature vectors and phase feature vectors of the frequency components. Based on the amplitude feature vectors, the peak coordinate set representing grinding marks and weaving textures is located. The peak coordinate set is substituted into a preset anisotropic filtering function to calculate the frequency domain response attenuation weight set. The corresponding frequency components in the spectrum matrix are attenuated and modulated, and the modulated spectrum distribution structure data is extracted. The mask is reconstructed in the frequency domain by combining the phase feature vectors and the modulated data, and then inverse Fourier transform is performed to invert to the spatial domain to construct a texture phase suppression grid.

4. The method for detecting surface defects in composite material grinding based on deep learning according to claim 1, characterized in that, The specific implementation process of importing the initial pixel matrix into a texture phase suppression raster for pixel-by-pixel differential filtering, filtering out interfering pixels, and outputting a clean base matrix includes: Establish a mapping relationship between the initial pixel matrix and the texture phase suppression raster, and perform pixel-by-pixel gray-level subtraction on the initial pixel matrix and the corresponding texture phase suppression raster to obtain the residual pixel distribution array; statistically analyze the pixel gray-level histogram of the residual pixel distribution array in the global space, and adaptively search for the segmentation boundary between background noise and foreground features based on the histogram distribution characteristics; use the segmentation boundary to discriminate the residual pixel distribution array, set the gray-level values ​​of residual pixels below the segmentation boundary to zero to remove interfering pixels, and retain pixels above the segmentation boundary as salient feature pixels to output as the clean base matrix.

5. The method for detecting surface defects in composite material grinding based on deep learning according to claim 1, characterized in that, The specific implementation process of extracting the spatial structure flow and contour semantic flow from the net-state base plate matrix, and constructing the geometric edge pixels from the spatial structure flow as pixel traction anchor points includes: The net-state substrate matrix is ​​input into a dual-stream feature extraction network in parallel. At the shallow network level, gradient response is aggregated to extract spatial structural flows representing physical details, while at the deep network level, receptive field features are aggregated to extract contour semantic flows representing morphological characteristics. An edge detection operator is applied to the spatial structural flows to calculate the pixel grayscale gradient magnitude and gradient direction angle in each direction. A non-maximum suppression algorithm is used to select pixels with the largest local gradient magnitude on the normal of the gradient direction angle, and a double-threshold connectivity analysis is performed to separate continuous geometric edge pixels. The spatial coordinate system of the geometric edge pixels is extracted and fused with the structural response intensity information to construct pixel traction anchors.

6. The method for detecting surface defects in composite material grinding based on deep learning according to claim 1, characterized in that, The specific implementation process of using the pixel traction anchor point as a spatial orientation guide to align and guide the contour semantic flow with pixel coordinates, and using channel splicing to generate a pixel aggregation matrix includes: The spatial coordinate system contained in the pixel traction anchor point is analyzed, and the resolution scale parameter of the contour semantic flow is obtained; the spatial mapping offset field between the resolution scale parameter and the spatial coordinate system is calculated to generate an affine transformation displacement vector set; the pixel feature points of the contour semantic flow are deformed and resampled using the affine transformation displacement vector set as a guide, driving the pixel coordinates of the contour semantic flow to generate a convergence offset towards the pixel traction anchor point to complete the spatial alignment traction; the aligned contour semantic flow and the spatial structure flow are extracted, and sequentially stacked along the feature channel dimension, and redundant features are eliminated by channel feature dimensionality reduction mapping to output a pixel aggregation matrix.

7. The method for detecting surface defects in composite material grinding based on deep learning according to claim 1, characterized in that, The specific implementation process of continuously extracting local neighborhood pixel groups on the pixel aggregation matrix, calculating the deviation between the center pixel and the surrounding pixels within the group, and constructing the spatial pixel magnification model includes: The pixel aggregation matrix is ​​traversed with a preset sliding window size, and a local neighborhood pixel group centered on the current pixel is extracted at each sliding step. The feature vector value of the center pixel in the local neighborhood pixel group and the mean feature vector value of the surrounding pixels are obtained, and the spatial distance metric between the two is calculated to obtain the local feature deviation of the center pixel in the group relative to the surrounding pixels. The local feature deviation data of each pixel in the entire matrix is ​​recorded and fitted to generate a deviation probability density function. Based on the tail dragging shape of the deviation probability density function, a nonlinear mapping activation function is derived. The nonlinear mapping activation function is combined with the corresponding spatial neighborhood distance attenuation weight factor for network encapsulation to construct a spatial pixel magnification model.

8. The method for detecting surface defects in composite material grinding based on deep learning according to claim 7, characterized in that, The specific implementation process of using the spatial pixel magnification model to perform pixel-by-pixel recombination calculations on the pixel aggregation matrix and outputting the distortion enhancement matrix includes: The pixel aggregation matrix is ​​input into the spatial pixel magnification model, and the nonlinear mapping activation function is used to perform nonlinear mapping calculation on the pixel feature values ​​of each channel. The spatial neighborhood distance attenuation weight factor is used to perform weighted summation on the features of surrounding pixels in the local neighborhood pixel group, and the summation result is used as a compensation term to be incorporated into the feature of the center pixel in the group after the mapping calculation to complete the reorganization and aggregation of pixel context information. The spatial distribution entropy value of the reorganized and aggregated pixel features is evaluated, and feature sharpening operators are applied to the regions with fluctuating information entropy to perform local gain processing. All pixel data after reorganization and gain processing are collected, rearranged and assembled into a two-dimensional data structure according to the original row and column coordinate indices, and output as a distortion enhancement matrix.

9. The method for detecting surface defects in composite material grinding based on deep learning according to claim 1, characterized in that, The specific implementation process of extracting the two-dimensional spatial extremum point distribution field of the distortion enhancement matrix, dynamically deducing the binary decision grid, performing pixel segmentation and truncation on the distortion enhancement matrix, and outputting the pixel mask image of the grinding defect region boundary includes: The Laplacian operator is used to scan and calculate the distortion enhancement matrix to locate the spatial extreme points where pixel intensity polarity is reversed, and a two-dimensional spatial extreme point distribution field is constructed. Using the density clustering of extreme points within the two-dimensional spatial extreme point distribution field, an adaptive region growing algorithm is used to divide densely populated extreme point areas into foreground candidate regions and the remaining areas into background suppression regions, dynamically deriving a binary decision grid. This binary decision grid is then superimposed onto the distortion enhancement matrix. Pixels falling into the background suppression region are truncated to zero, while the activation values ​​of pixels falling into the foreground candidate region are retained. Morphological closing operations are performed on the pixel blocks with retained activation values ​​to fill holes and smooth the outer boundaries, outputting a pixel mask image of the grinding defect region boundary.