An image recognition-based fault diagnosis method for automobile parts

By combining the improved UnSAM model with the hierarchical Transformer backbone network and symbolic distance field technology, the problems of mask breakage and topology misjudgment in the fault diagnosis of automotive parts under high reflectivity and occlusion conditions are solved. This enables accurate quantification and classification of minute defects, improving the robustness and reliability of the detection system.

CN122391822APending Publication Date: 2026-07-14深圳丰汇汽车电子有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
深圳丰汇汽车电子有限公司
Filing Date
2026-05-07
Publication Date
2026-07-14

Smart Images

  • Figure CN122391822A_ABST
    Figure CN122391822A_ABST
Patent Text Reader

Abstract

The application discloses an automobile part fault diagnosis method based on image recognition and relates to the technical field of automobile part fault diagnosis.The method comprises the following steps: obtaining standardized automobile radiator fin image data; inputting an improved UnSAM model to generate a first fin two-dimensional segmentation mask, a first semantic feature representation and a first signed distance field estimation result of a symbol distance field guided output head regression; performing topological consistency detection on the first fin two-dimensional segmentation mask and the corresponding first semantic feature representation to obtain an abnormal fin two-dimensional segmentation mask; constructing a continuous fin boundary point set representation; reconstructing a continuous closed fin boundary curve; outputting a second semantic feature representation set; constructing a fin deformation feature description vector; and outputting an automobile radiator fin defect fault diagnosis result.The method can inhibit the mask breaking phenomenon, avoid topological misjudgment caused by local pixel distortion and improve the segmentation robustness under a complex industrial lighting environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automotive component fault diagnosis technology, and in particular to an image recognition-based method for automotive component fault diagnosis. Background Technology

[0002] With the continuous improvement of the performance requirements of automotive thermal management systems, the manufacturing quality of automotive radiator fins, as a key heat exchange structure, directly affects the heat dissipation efficiency and reliability of the entire vehicle. In the industrial production process, radiator fins are usually formed by stamping aluminum sheets, which have a highly reflective surface and a highly dense periodic arrangement structure, posing a significant challenge to defect detection based on machine vision. At present, mainstream technologies mostly rely on deep learning segmentation models or traditional image processing methods to perform pixel-level recognition of fin areas and judge defects accordingly.

[0003] Existing two-dimensional pixel-based segmentation methods have significant limitations. Under conditions of high reflectivity and dense occlusion, the boundary information of local regions in images is easily obscured by strong light or shadows, leading to broken, voided, and discontinuous topological phenomena in the fin mask output by the segmentation model. Current techniques typically directly classify mask breaks as structural fractures or severe defects, resulting in numerous false alarms and severely impacting the reliability of the detection system. Furthermore, existing methods generally represent fin boundaries using discrete pixels, resulting in a stepped structure. When analyzing minute deformations (such as sub-pixel-level bending or collapse), it is difficult to provide a continuous and accurate geometric representation, leading to significant calculation errors in key features such as curvature and orientation changes, and failing to achieve accurate quantification and classification of minute defects.

[0004] Traditional detection methods typically rely on a large amount of manually labeled data for model training, which makes it difficult to cover all complex working conditions in real industrial scenarios, resulting in high data acquisition costs and insufficient generalization ability. Summary of the Invention

[0005] One objective of this invention is to propose a fault diagnosis method for automotive parts based on image recognition. This invention can suppress mask breakage, avoid topological misjudgment caused by local pixel distortion, and improve segmentation robustness under complex industrial lighting environments.

[0006] A method for diagnosing automotive component faults based on image recognition according to an embodiment of the present invention includes: The original image data of the car radiator fins is acquired and preprocessed to obtain standardized car radiator fin image data. Standardized automotive radiator fin image data are input into an improved UnSAM model with a hierarchical Transformer as the backbone network and a lightweight gated convolutional adaptation layer embedded in the first two layers. This model generates a first fin two-dimensional segmentation mask, a first semantic feature representation, and a first symbolic distance field estimation result for the output head regression guided by the symbolic distance field. A topological consistency detection is performed on the two-dimensional segmentation mask of the first fin and the corresponding first semantic feature representation. The topological anomaly mask is identified through connected component analysis, contour continuity discrimination and morphological structure constraints to obtain the two-dimensional segmentation mask of the abnormal fin. A coordinate continuity mapping is performed on the two-dimensional segmentation mask of the abnormal fin and its corresponding first symbol distance field estimation results to construct a continuous fin boundary point set representation. An improved implicit neural symbolic distance field model is constructed based on the continuous fin boundary point set representation to reconstruct the continuous closed fin boundary curve; The continuous closed fin boundary curve is fused and corrected with the first fin two-dimensional segmentation mask to generate the second fin two-dimensional segmentation mask. This mask, along with the first semantic feature representation set, is input into the frequency domain regularization module to perform frequency domain main frequency peak alignment and abnormal high-frequency component suppression on the multi-scale feature map, and outputs the second semantic feature representation set. Based on the second fin two-dimensional segmentation mask, continuous closed fin boundary curve and second semantic feature representation, calculate the fin boundary curvature distribution, normal vector change distribution and period deviation distribution, and construct the fin deformation feature description vector; The fin deformation feature description vector is compared and analyzed with the preset standard fin structure model to identify and quantify the defect type, and output the fault diagnosis results of automotive radiator fin defects.

[0007] Optionally, the preprocessing includes illumination normalization, metal reflection suppression, periodic shadow compensation, and noise filtering.

[0008] Optionally, the step of inputting standardized automotive radiator fin image data into an improved UnSAM model with a hierarchical Transformer using a layered shift window attention mechanism as the backbone network and embedding lightweight gated convolutional adaptation layers in the first two layers includes: The standardized automotive radiator fin image data is divided into non-overlapping image blocks according to the image block side length to obtain the block index field. Vectorization operation is performed on the local image block of the automotive radiator fin located at each block index, and the linear projection parameter matrix is ​​input for embedding mapping. The position code corresponding to the block index is superimposed to obtain the initial embedding feature. The initial embedding features at each index are sequentially input into the first lightweight gated convolutional adaptation layer of the first two layers of the improved UnSAM model to obtain the first layer adaptation features. The first layer adaptation features are then input into the second lightweight gated convolutional adaptation layer to obtain the second layer adaptation features. The second layer of adaptation features are input into a hierarchical window attention structure with a hierarchical Transformer containing a hierarchical shift window attention mechanism as the backbone network. This allows for multi-scale modeling of the periodic arrangement relationship and cross-regional dependency relationship of the automotive radiator fins, resulting in backbone features at each scale. Dynamic channel suppression is performed on the backbone features at each scale to weaken the abnormal channel response caused by the high reflectivity of the metal in the automotive radiator fins and enhance the effective boundary channel response, resulting in enhanced features. The enhanced features are then restored to a uniform spatial resolution and subjected to channel stitching and semantic projection to obtain the first semantic feature representation. The first semantic feature representation is used as the input symbolic distance field to guide the output head, generating the first symbolic distance field estimation result; The first semantic feature representation is input into the mask prediction branch to generate the first mask response value. The first symbolic distance field estimation result is normalized and boundedly compressed, and then fused with the first mask response value to obtain the first fin two-dimensional segmentation mask.

[0009] Optionally, performing topological consistency detection on the two-dimensional segmentation mask of the first fin and the corresponding first semantic feature representation includes: The first fin two-dimensional segmentation mask and the corresponding first semantic feature representation are spatially aligned in the same pixel coordinate domain to construct a candidate fin region set for topological consistency detection. Connected component labeling is performed based on the pixel coordinates with a value of 1 in the first fin two-dimensional segmentation mask to obtain a candidate fin connected component set. Contour extraction is performed on each candidate fin connected region in the candidate fin connected region set, and contour continuity is judged based on the changes in adjacent spacing and tangential direction of the contour point sequence to obtain the contour continuity judgment result corresponding to each candidate fin connected region. Based on the first semantic feature representation, the boundary semantic consistency judgment is performed on each candidate fin connected domain to obtain the boundary semantic consistency judgment result corresponding to each candidate fin connected domain. Perform morphological and structural constraint discrimination on each candidate fin connected domain to obtain the morphological and structural constraint discrimination results corresponding to each candidate fin connected domain; By jointly judging the results of contour continuity discrimination, boundary semantic consistency discrimination, and morphological structure constraint discrimination, a two-dimensional segmentation mask for abnormal fins is obtained.

[0010] Optionally, the coordinate continuity mapping of the two-dimensional segmentation mask of the abnormal fin and its corresponding first symbol range field estimation result includes: The abnormal fin pixel region is constructed based on the pixel coordinates of the abnormal fin two-dimensional segmentation mask with a value of 1, and the abnormal fin boundary pixel set is extracted from the abnormal fin pixel region. Using the set of pixels at the boundary of the abnormal fin as the constraint region, symbolic zero-edge localization is performed on the first symbolic distance field estimation result to obtain the set of candidate continuous boundary intersections. Perform deduplication and neighborhood connection on the candidate continuous boundary intersection set to obtain the sequence of continuous boundary points of the abnormal fins; Perform coordinate continuity mapping on the sequence of continuous boundary points of the abnormal fins to obtain a representation of the continuous fin boundary point set; Perform boundary closure verification on the continuous fin boundary point set representation and output the continuous fin boundary point set representation.

[0011] Optionally, the construction of the improved implicit neural symbolic distance field model based on the continuous fin boundary point set representation includes: Based on the continuous fin boundary point set representation, an improved implicit neural symbol distance field model is constructed, and the boundary fitting term is calculated; Based on the improved implicit neural symbolic distance field model, spatial smoothness constraints are constructed; Based on the improved implicit neural symbolic distance field model, a curvature regularization constraint is constructed. Based on the prior physical arrangement of automotive radiator fins, a periodic structure consistency constraint is constructed. Energy minimization optimization is performed on the boundary fitting term, spatial smoothing constraint term, curvature regularization constraint term, and periodic structure consistency constraint term to reconstruct the boundary curve of the continuous closed fin.

[0012] Optionally, the step of fusing and correcting the continuous closed fin boundary curve with the first fin two-dimensional segmentation mask to generate a second fin two-dimensional segmentation mask, and inputting it together with the first semantic feature representation set into the frequency domain regularization module, includes: The continuous closed fin boundary curve is fused and corrected with the first fin two-dimensional segmentation mask to generate the second fin two-dimensional segmentation mask. The second fin two-dimensional segmentation mask and the first semantic feature representation are respectively mapped to the second fin two-dimensional segmentation mask set and the first semantic feature representation set corresponding to the multi-scale spatial feature map; The two-dimensional segmentation mask set of the second fin and the first semantic feature representation set are jointly input into the frequency domain regularization module of the periodic structure self-alignment to construct the frequency domain analysis response at each scale, and obtain the semantic spectrum and mask spectrum. Based on the semantic spectrum and the mask spectrum, the position of the main frequency peak is determined and frequency domain main frequency peak alignment is performed on the semantic spectrum to obtain the semantic spectrum after main frequency peak alignment. The semantic spectrum after the main frequency peak alignment is subjected to abnormal high frequency component suppression, and a two-dimensional discrete Fourier inverse transform is performed to reconstruct it to the spatial domain, outputting a second semantic feature representation set.

[0013] Optionally, the construction of the fin deformation feature description vector includes: A continuous boundary parameterization representation is established based on the two-dimensional segmentation mask of the second fin and the continuous closed fin boundary curve. Arc length consistent sampling is performed on the continuous closed fin boundary curve to obtain the boundary sampling point sequence, boundary tangent vector sequence and boundary normal vector sequence. Calculate the fin boundary curvature distribution based on the boundary sampling point sequence and the boundary tangent vector sequence; Calculate the distribution of normal vector changes based on the boundary normal vector sequence; The periodic deviation distribution is calculated based on the second semantic feature representation. Based on the fin boundary curvature distribution, normal vector change distribution, and period deviation distribution, a fin deformation characteristic description vector is constructed.

[0014] Optionally, the step of comparing and analyzing the fin deformation feature description vector with a preset standard fin structure model includes: Construct a pre-defined standard fin structure model and establish a standard reference distribution for the fin deformation characteristic description vectors; The overall deviation metric is calculated based on the fin deformation feature description vector and the standard deformation feature description vector. Based on the preset standard fin structure model and fin deformation feature description vector, defect type identification is performed to obtain specific defect types, including lodging deformation, bending deformation, edge tearing defects and material missing defects; Based on the overall deviation metric, a corresponding quantitative assessment is performed on the specific defect type to obtain the minor defect, medium defect and severe defect levels, and output the fault diagnosis results of automotive radiator fin defects.

[0015] Optionally, the classification rules for the defect types include: When the mean value of the period deviation is greater than or equal to the preset mean value threshold for lodging deformation, and the standard deviation of the period deviation is greater than or equal to the preset discrete threshold for lodging deformation, it is determined to be a lodging deformation defect. When the standard deviation of the normalized boundary curvature value is greater than or equal to the preset bending deformation discrete threshold, and the maximum value of the normalized boundary curvature value is greater than or equal to the preset bending deformation peak threshold, it is determined to be a bending deformation defect. When the maximum value of the change in the normal vector is greater than or equal to the preset tear peak threshold, or the standard deviation of the change in the normal vector is greater than or equal to the preset tear discrete threshold, it is determined to be an edge tear defect; When the mean value of the normalized boundary curvature is less than or equal to the preset material missing curvature threshold, and the mean value of the period deviation is less than or equal to the preset material missing period threshold, it is determined to be a material missing defect.

[0016] The beneficial effects of this invention are: This invention introduces a symbolic distance field to guide the output head into the large unsupervised vision model framework and couples it with a hierarchical Transformer backbone network with a layered shift window attention mechanism. This achieves a model structure leap from discrete segmentation to continuous geometric perception. The improved UnSAM model synchronously regresses the first symbolic distance field estimation result during the network forward pass, enabling the improved UnSAM model to have an explicit ability to express boundary continuity at the feature level. Under conditions of high reflectivity and occlusion, even if the original pixel boundary information is missing, the symbolic distance field can still maintain the stability of the boundary function through spatial continuity constraints, thereby suppressing mask breakage, avoiding topological misjudgment caused by local pixel distortion, and improving the segmentation robustness in complex industrial lighting environments.

[0017] This invention achieves continuous reconstruction of discrete boundaries by constructing an improved implicit neural symbolic distance field model. By transforming the boundary completion process into an implicit function optimization problem, the reconstructed boundary is naturally generated by the zero level set of the symbolic distance field, thus eliminating the dependence on local pixel gradients. Even when the proportion of missing boundaries is large, it can still complete closed reconstruction based on global geometry and periodic priors, improving the stability and physical consistency of boundary restoration, and exhibiting stronger adaptability in complex occlusion and noise interference scenarios. Attached Figure Description

[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of an image recognition-based fault diagnosis method for automotive parts proposed in this invention; Figure 2 This is a structural block diagram of the improved UnSAM model in the image recognition-based automotive component fault diagnosis method proposed in this invention. Detailed Implementation

[0019] Example 1: Reference Figures 1-2 A method for diagnosing automotive component faults based on image recognition, comprising: The original image data of the car radiator fins is acquired, and illumination normalization, metal reflection suppression, periodic shadow compensation and noise filtering are performed to obtain standardized car radiator fin image data. Metal reflection suppression is achieved through a specular reflection removal algorithm, while periodic shadow compensation is achieved through a Retinex-based illumination decomposition compensation algorithm.

[0020] Standardized automotive radiator fin image data are input into an improved UnSAM model with a hierarchical Transformer as the backbone network and a lightweight gated convolutional adaptation layer embedded in the first two layers. This model generates a first fin two-dimensional segmentation mask, a first semantic feature representation, and a first symbolic distance field estimation result for the output head regression guided by the symbolic distance field. In this embodiment, the following steps are included: dividing the standardized automotive radiator fin image data into non-overlapping image blocks according to the side length of the image blocks to obtain the block index field; performing vectorization operation on the local image block of the automotive radiator fin located at each block index; inputting the linear projection parameter matrix for embedding mapping; and superimposing the position code corresponding to the block index to obtain the initial embedding feature. In Example 1, the block index field consists of a vertical block index and a horizontal block index. The number of vertical blocks is obtained by dividing the image height by the side length of the local image block of the car radiator fins, and the number of horizontal blocks is obtained by dividing the image width by the side length of the local image block of the car radiator fins. The block index field represents the set of all block positions formed after dividing the standardized car radiator fin image data into non-overlapping image blocks; the local image block of the car radiator fins represents the local image content located at the corresponding block index.

[0021] Vectorization operations are performed on the local image blocks of the car radiator fins located at each block index in a preset order. The values ​​of each pixel in the local image block of the car radiator fins in the channel dimension are expanded into a one-dimensional vector in row-major or column-major order to obtain the vectorized local image blocks of the car radiator fins. The vectorized local image blocks of the car radiator fins are input into the linear projection parameter matrix. The vectorized local image blocks of the car radiator fins are mapped from the original pixel space to the embedding feature space of the preset dimension through matrix multiplication to obtain the embedding mapping feature. According to the position of the current block index, the position encoding vector corresponding to the block index is added element by element to the embedding mapping feature to obtain the initial embedding feature at the block index.

[0022] The initial embedding features at each index are sequentially input into the first lightweight gated convolutional adaptation layer of the first two layers of the improved UnSAM model to obtain the first layer adaptation features. The first layer adaptation features are then input into the second lightweight gated convolutional adaptation layer to obtain the second layer adaptation features. In Example 1, the first channel gated feature generated by the first lightweight gated convolution adaptation layer is obtained by performing a one-to-one convolution mapping on the initial embedded features and then passing them through the Sigmoid activation function. The first local convolution response feature extracted by the first lightweight gated convolution adaptation layer is obtained by performing a three-to-three depthwise convolution mapping on the initial embedded features. The first local convolution response feature and the first channel gated feature are multiplied element-wise, and the residual of the element-wise multiplication result is added to the initial embedded features to obtain the first layer adaptation feature.

[0023] The first-layer adaptation features are used as input features to the second lightweight gated convolutional adaptation layer. Using the same calculation method as the first-layer adaptation features, the second local convolutional response features and the second channel gated features are multiplied element-wise. The result of the element-wise multiplication is added to the first-layer adaptation features as a residual to obtain the second-layer adaptation features. This completes the adaptive modulation of the local texture response and the channel response of the high-reflectivity area of ​​the automotive radiator fins.

[0024] The second layer of adaptation features are input into a hierarchical window attention structure with a hierarchical Transformer containing a hierarchical shift window attention mechanism as the backbone network. This allows for multi-scale modeling of the periodic arrangement relationship and cross-regional dependency relationship of the automotive radiator fins, resulting in backbone features at each scale. In Example 1, a hierarchical Transformer containing a layered shifting window attention mechanism serves as the backbone network. The core structure aims to establish a global receptive field across regions while controlling computational complexity by alternately executing local window self-attention calculations and grid translation operations. The backbone network comprises multiple feature extraction stages with progressively decreasing spatial resolution. In any feature extraction layer, the backbone network divides the input spatial feature map into multiple non-overlapping local windows and independently performs standard multi-head self-attention calculations within each local window to extract local texture features of the car radiator fins. In adjacent network layers, multi-head self-attention calculations of shifting windows are performed by cyclically shifting the grid of the local window to the lower right with a fixed step size, breaking the fixed window boundaries of the previous layer to achieve contextual information interaction between adjacent local windows. Simultaneously, between adjacent layer stages, feature block merging operations are used to downsample the spatial feature map, gradually reducing the spatial resolution and multiplying the channel dimensions, constructing a hierarchical multi-scale semantic representation from fine-grained local fin edges to coarse-grained global arrangement structures from bottom to top.

[0025] Based on the backbone network framework, the hierarchical Transformer backbone network is assumed to include... There are k scale stages, where K is a positive integer greater than 1. For the k-th scale stage ( For the k-th scale stage, when k is 1, the input feature of the k-th scale stage is the second layer adaptation feature; when k is greater than 1, the input feature of the k-th scale stage is the feature output from the previous scale stage and passed to the current scale stage; the window partitioning operation is first performed on the input feature of the k-th scale stage to divide the input feature of the k-th scale stage into multiple local attention windows.

[0026] For each feature in a local attention window, perform linear projection of the query matrix, key matrix, and value matrix to obtain the query matrix, key matrix, and value matrix. Calculate the window attention response result at the k-th scale using the query matrix, key matrix, and value matrix. Restore the window attention response result at the k-th scale to the original spatial arrangement to obtain the rearranged intermediate features at the k-th scale.

[0027] Perform shift-window multi-head self-attention calculation on the rearranged intermediate features at the k-th scale stage, and add the result of the shift-window multi-head self-attention calculation to the rearranged intermediate features at the k-th scale stage to obtain the backbone features at the k-th scale.

[0028] Dynamic channel suppression is performed on the backbone features at each scale to weaken the abnormal channel response caused by the high reflectivity of the metal in the automotive radiator fins and enhance the effective boundary channel response, resulting in enhanced features. The enhanced features are then restored to a uniform spatial resolution and subjected to channel stitching and semantic projection to obtain the first semantic feature representation. In Example 1, global average pooling is first performed on the backbone features at the k-th scale to obtain the channel statistical features at the k-th scale. The channel statistical features at the k-th scale are then sequentially input into the first linear transformation parameter matrix, the nonlinear activation function, and the second linear transformation parameter matrix. The output of the second linear transformation parameter matrix is ​​then input into the Sigmoid activation function to obtain the dynamic channel suppression weight vector at the k-th scale. Element-wise multiplication is then performed between the backbone features at the k-th scale and the dynamic channel suppression weight vector at the k-th scale to obtain the enhanced features at the k-th scale.

[0029] The enhanced features at each scale are restored to a uniform spatial resolution through corresponding bilinear interpolation upsampling operations, and then concatenated along the channel dimension to obtain intermediate semantic features after concatenation of multi-scale enhanced features. These intermediate semantic features are then input into the convolution mapping corresponding to the semantic projection convolution parameters and semantic projection bias term to obtain the first semantic feature representation, which is used to represent the semantic feature representation of the boundary, periodic texture, and local anomaly response of the automotive radiator fin structure. ; in, This represents the convolution parameters that project intermediate semantic features onto a unified semantic space; * indicates the convolution operation. This represents the semantic projection bias term. This represents the first semantic feature representation. This represents the intermediate semantic features obtained after concatenating multi-scale enhanced features.

[0030] The first semantic feature representation is used as the input symbolic distance field to guide the output head, generating the first symbolic distance field estimation result; In Example 1, the symbolic distance field guided output head includes a first convolutional mapping layer, a nonlinear activation layer, a second convolutional mapping layer, a nonlinear activation layer, and a linear regression layer connected in sequence.

[0031] The first semantic feature representation is input into the first convolutional mapping layer, and the output of the first convolutional mapping layer is input into the nonlinear activation layer to obtain the intermediate features of the first symbolic distance field. The intermediate features of the first symbolic distance field are input into the second convolutional mapping layer, and the output of the second convolutional mapping layer is input into the nonlinear activation layer to obtain the intermediate features of the second symbolic distance field. The intermediate features of the second symbolic distance field are input into the linear regression layer to obtain the estimation result of the first symbolic distance field.

[0032] The first semantic feature representation is input into the mask prediction branch to generate the first mask response value. The first symbolic distance field estimation result is normalized and boundedly compressed, and then fused with the first mask response value to obtain the first fin two-dimensional segmentation mask.

[0033] In Example 1, the first semantic feature representation is input into the convolutional mapping corresponding to the mask prediction branch to obtain the first mask response value. The first symbolic distance field estimation result is divided by the distance normalization coefficient, which is an adaptive spatial scalar constructed based on the maximum diagonal pixel length of standardized automotive radiator fin image data. It is used to eliminate the dimensional gap between discrete logarithmic probability and absolute spatial physical distance. Distance normalization processing is performed, and the hyperbolic tangent compression function is input to obtain the first symbolic distance field guiding term.

[0034] The first mask response value is obtained by subtracting the product of the dimensionless guiding coefficient and the first symbolic distance field guiding term from the first mask response value and inputting it into the Sigmoid activation function; where the dimensionless guiding coefficient is a learnable weight parameter that is adaptively updated through backpropagation during network training.

[0035] The first mask probability value is compared with the segmentation threshold. When the first mask probability value is greater than or equal to the segmentation threshold, the corresponding pixel coordinate is assigned a value of 1, which represents the fin area of ​​the car radiator. When the first mask probability value is less than the segmentation threshold, the corresponding pixel coordinate is assigned a value of 0, which represents the non-fin area of ​​the car radiator. The first fin two-dimensional segmentation mask is obtained.

[0036] During the training phase of the improved UnSAM model, the symbolic distance field is used as the real supervision label by calculating the accurate distance field obtained from the edge of the mask of a real car radiator fin. The Eikonal equation is used as the spatial regularization loss function for optimization to constrain the gradient magnitude of the symbolic distance field at any point in space to be close to 1, thereby constraining the spatial continuity and underlying physical properties of the generated first symbolic distance field estimation result.

[0037] The improved UnSAM model takes standardized automotive radiator fin image data as input and outputs a first fin 2D segmentation mask, a first semantic feature representation, and a first symbolic distance field estimation result. It employs 4 scale stages and a total of 16 shifted window attention blocks with a parameter scale of 40 million. During training, it performs unsupervised pre-training using publicly available unlabeled image data, and then performs joint fine-tuning using automotive radiator fin production line images, a normal automotive radiator fin benchmark image library, and accurate distance field labels generated from the edges of real fin masks. The mask prediction branch is trained using segmentation loss, and the symbolic distance field-guided output head is trained using distance field regression loss and Eikonal regularization loss.

[0038] Compared to existing UnSAM models, the improved UnSAM model in this implementation deeply customizes the underlying feature perception and high-level output architecture to address the unique physical properties of automotive radiator fins, which are highly reflective, extremely dense, and spatially periodically arranged. A lightweight gated convolutional adaptation layer is embedded at the network feature input, combined with a dynamic channel suppression mechanism. This adaptively weakens the abnormal high-frequency noise generated by the complex optical reflections of the metal surface, refining the feature responses of the true physical boundaries at the source. The backbone network of the traditional large model is replaced with a hierarchical Transformer containing a layered shift window attention mechanism. This reduces the computational complexity of dense, high-resolution calculations while efficiently establishing global multi-scale modeling of the periodic dependencies across regions of the fin array. Furthermore, it breaks through the limitations of conventional large models with single-branch discrete pixel output by adding a signed distance field to guide the output head and eliminating the dimensional gap between continuous physical space and discrete log-probability through an adaptive diagonal spatial scalar. This enables the two-dimensional pure vision segmentation model, which is originally highly susceptible to interference from industrial lighting, to possess the self-healing ability of continuous geometric topology. Under harsh working conditions such as the absence of manual pixel-level annotation and the presence of extreme local light spot occlusion, it can overcome the defects of breakage and voids that are prone to occur in conventional masks, and achieve sub-pixel-level, highly robust closed reconstruction of the heat sink with small deformation and damaged edges.

[0039] A topological consistency detection is performed on the two-dimensional segmentation mask of the first fin and the corresponding first semantic feature representation. The topological anomaly mask is identified through connected component analysis, contour continuity discrimination and morphological structure constraints to obtain the two-dimensional segmentation mask of the abnormal fin. In this embodiment, the following steps are included: spatially aligning the first fin two-dimensional segmentation mask and the corresponding first semantic feature representation in the same pixel coordinate domain to construct a candidate fin region set for topological consistency detection, and performing connected component labeling based on the pixel coordinates with a value of 1 in the first fin two-dimensional segmentation mask to obtain a candidate fin connected component set. In Example 1, a set of foreground pixel coordinates of the car radiator fins is defined on the two-dimensional segmentation mask of the first fin. The set of foreground pixel coordinates of the car radiator fins represents the set of all pixel coordinates in the foreground region of the car radiator fins determined by the two-dimensional segmentation mask of the first fin. The set of foreground pixel coordinates of the car radiator fins is obtained by selecting all pixel coordinates with a value of 1 in the two-dimensional segmentation mask of the first fin.

[0040] Perform eight-neighbor connected component labeling on the set of foreground pixel coordinates of the car radiator fins to obtain a set of connected components, which represents the set of all connected components obtained by the two-dimensional segmentation mask decomposition of the first fin.

[0041] Calculate the area of ​​each connected component in the set of connected components, and calculate the aspect ratio of each connected component in the set of connected components. The aspect ratio is obtained by dividing the height of the bounding rectangle by the width of the bounding rectangle. The height and width of the bounding rectangle are obtained by adding 1 to the difference between the maximum and minimum pixel coordinates of the connected component in the vertical / horizontal direction.

[0042] Connected regions whose area satisfies the preset area condition and whose aspect ratio satisfies the preset slender structure condition are identified as candidate fin connected regions. Connected regions whose area does not satisfy the preset area condition or whose aspect ratio does not satisfy the preset slender structure condition are screened out as non-fin noise regions. All connected regions identified as candidate fin connected regions together constitute the candidate fin connected region set.

[0043] The preset elongated structure condition is that the ratio of the height of the circumscribed rectangle in the vertical direction to the width of the circumscribed rectangle in the horizontal direction of the connected component is greater than a preset aspect ratio threshold.

[0044] Contour extraction is performed on each candidate fin connected region in the candidate fin connected region set, and contour continuity is judged based on the changes in adjacent spacing and tangential direction of the contour point sequence to obtain the contour continuity judgment result corresponding to each candidate fin connected region. In Example 1, for each candidate fin connected region in the candidate fin connected region set, an edge tracking algorithm is used to extract an ordered sequence of contour points arranged in a clockwise direction. For each candidate fin connected region, the distance between adjacent ordered contour points and the tangential direction angle are calculated. The distance between points represents the Euclidean distance between two adjacent ordered contour points, and the tangential direction angle represents the tangential direction of the contour line segment formed by two adjacent ordered contour points. The arctangent function is obtained by calculating the coordinates of two adjacent ordered contour points.

[0045] For each candidate fin connected region, the profile spacing abrupt change index and the direction abrupt change index are calculated. The profile spacing abrupt change index is obtained by statistically analyzing the absolute values ​​of the differences in distances between adjacent points and averaging them. The direction abrupt change index is obtained by statistically analyzing the absolute values ​​of the differences in tangential direction angles between adjacent points and averaging them.

[0046] When the profile spacing mutation index is greater than the profile spacing threshold, or the direction mutation index is greater than the direction mutation threshold, the profile continuity of the corresponding candidate fin connected domain is determined to be abnormal.

[0047] The contour spacing threshold is obtained by statistically analyzing the contour spacing mutation index of normal automotive radiator fin samples, specifically by taking the sum of the mean of normal samples and a certain multiple of the standard deviation; the orientation mutation threshold is obtained by statistically analyzing the orientation mutation index of normal automotive radiator fin samples, specifically by taking the sum of the mean of normal samples and a certain multiple of the standard deviation.

[0048] Based on the first semantic feature representation, the boundary semantic consistency judgment is performed on each candidate fin connected domain to obtain the boundary semantic consistency judgment result corresponding to each candidate fin connected domain. In Example 1, the first semantic feature representation is based on the sub-pixel coordinates of each contour point in two-dimensional space. The bilinear interpolation method is used to sample the ordered contour point sequence of each candidate fin connected domain to obtain the contour semantic feature sequence. The contour semantic feature sequence represents the sequence of all semantic feature vectors obtained by sampling along the ordered contour point sequence of the candidate fin connected domain.

[0049] Based on the contour semantic feature sequence, a semantic mutation index is calculated for each candidate fin connected component. The semantic mutation index represents the degree of semantic consistency change of the boundary of the candidate fin connected component along the contour direction. ; in, The first semantic feature represents the first semantic feature in the second semantic feature. The candidate fin connected domains The semantic feature vector at each contour point The first semantic feature represents the first semantic feature in the second semantic feature. The candidate fin connected domains The semantic feature vector at each contour point Indicates the first Semantic mutation index of candidate fin connected domains, Indicates the first The number of adjacent contour point pairs in the ordered contour point sequence corresponding to each candidate fin connected region; to ensure the integrity of the contour closure evaluation, adjacent contour point pairs include the first and last pixel pairs in the ordered contour point sequence.

[0050] When the semantic mutation index is greater than the semantic mutation threshold, it is determined that there is a boundary semantic consistency anomaly in the connected domain of the corresponding candidate fin. The semantic mutation threshold is determined by statistically distributing the semantic mutation index corresponding to the normal fin boundary in the pre-constructed normal automotive radiator fin reference image library, and by estimating the mean and variance of the semantic mutation index and combining it with a pre-set confidence interval.

[0051] Perform morphological and structural constraint discrimination on each candidate fin connected domain to obtain the morphological and structural constraint discrimination results corresponding to each candidate fin connected domain; In Example 1, for each candidate fin connected region, the compactness of the candidate fin connected region and the skeleton length of the candidate fin connected region are calculated.

[0052] The compactness of the candidate fin connected domain represents the degree of morphological compactness between the area and perimeter of the candidate fin connected domain. It is obtained by multiplying the area of ​​the candidate fin connected domain by a constant four times pi and then dividing by the square of the perimeter of the candidate fin connected domain.

[0053] The candidate fin connected domain skeleton length represents the number of pixels with a value of 1 in the skeleton binary image obtained after the candidate fin connected domain has been rapidly refined by Zhang-Suen. It is obtained by counting all pixels with a value of 1 in the skeleton binary image.

[0054] The skeleton preservation ratio is calculated for each candidate fin connected region, obtained by dividing the skeleton length of the candidate fin connected region by the height of the circumscribed rectangle of the candidate fin connected region.

[0055] When the compactness of the candidate fin connected region is less than the compactness threshold, or the skeleton retention ratio is less than the skeleton retention threshold, it is determined that the corresponding candidate fin connected region has abnormal morphological and structural constraints. The compactness threshold and skeleton retention threshold are adaptively set based on the morphological statistical characteristics of the connected regions of normal fins in the pre-constructed normal automotive radiator fin reference image library, by statistically analyzing the compactness distribution and skeleton retention ratio distribution of normal fin samples and combining them with the pre-set confidence interval range.

[0056] By jointly judging the results of contour continuity discrimination, boundary semantic consistency discrimination, and morphological structure constraint discrimination, a two-dimensional segmentation mask for abnormal fins is obtained.

[0057] In Example 1, a topological anomaly determination metric is constructed for each candidate fin connected domain: When the profile spacing mutation index is greater than the profile spacing threshold, or the direction mutation index is greater than the direction mutation threshold, or the semantic mutation index is greater than the semantic mutation threshold, or the compactness of the candidate fin connected domain is less than the compactness threshold, or the skeleton retention ratio is less than the skeleton retention threshold, the topology anomaly judgment quantity corresponding to the candidate fin connected domain is set to 1.

[0058] When the contour spacing mutation index is not greater than the contour spacing threshold, the direction mutation index is not greater than the direction mutation threshold, the semantic mutation index is not greater than the semantic mutation threshold, the compactness of the candidate fin connected domain is not less than the compactness threshold, and the skeleton preservation ratio is not less than the skeleton preservation threshold, the topology anomaly judgment quantity corresponding to the candidate fin connected domain is set to 0.

[0059] When the topological anomaly determination value corresponding to a candidate fin connected region is 1, the candidate fin connected region is marked as an abnormal fin connected region.

[0060] Perform a union operation on all connected components of the abnormal fins to obtain a two-dimensional segmentation mask for the abnormal fins. The two-dimensional segmentation mask for the abnormal fins represents a binary mask formed by merging all connected components of the abnormal fins in the same pixel coordinate domain: when the pixel coordinates belong to any connected component of the abnormal fins, the value of the corresponding pixel coordinates in the two-dimensional segmentation mask for the abnormal fins is set to 1, indicating an abnormal fin region; when the pixel coordinates do not belong to any connected component of the abnormal fins, the value of the corresponding pixel coordinates in the two-dimensional segmentation mask for the abnormal fins is set to 0, indicating a non-abnormal fin region.

[0061] A coordinate continuity mapping is performed on the two-dimensional segmentation mask of the abnormal fin and its corresponding first symbol distance field estimation results to construct a continuous fin boundary point set representation. In this embodiment, the following steps are included: constructing an abnormal fin pixel region based on the pixel coordinates of the abnormal fin two-dimensional segmentation mask with a value of 1, and extracting the abnormal fin boundary pixel set from the abnormal fin pixel region. In Example 1, the two-dimensional segmentation mask of the abnormal fin and its corresponding first symbol distance field estimation result are spatially registered in the same pixel coordinate domain, and the set of abnormal fin pixel regions is constructed based on the coordinates of all pixels with a value of 1 in the two-dimensional segmentation mask of the abnormal fin.

[0062] For each pixel coordinate in the abnormal fin pixel region set, a neighborhood scan is performed using the four-neighbor method. When there is at least one adjacent pixel coordinate with a value of 0 in the four-neighbor region of a pixel coordinate, the corresponding pixel coordinate is determined to be the abnormal fin boundary pixel coordinate. The abnormal fin boundary pixel set is formed by all abnormal fin boundary pixel coordinates.

[0063] Using the set of pixels at the boundary of the abnormal fin as the constraint region, symbolic zero-edge localization is performed on the first symbolic distance field estimation result to obtain the set of candidate continuous boundary intersections. In Example 1, for the coordinates of each boundary pixel in the abnormal fin boundary pixel set, horizontal adjacent pixel pairs and vertical adjacent pixel pairs are constructed respectively. For each adjacent pixel pair, it is determined whether the sign of the first symbolic distance field estimation result at both ends of the adjacent pixel pair changes. When the signs of the first symbolic distance field estimation result at both ends of the adjacent pixel pair are different or the product is less than or equal to zero, it is determined that there is a candidate continuous boundary intersection point on the grid edge corresponding to the adjacent pixel pair.

[0064] For horizontally adjacent pixel pairs, the positional ratio of the candidate continuous boundary intersection points between the two pixels is determined by proportionally allocating the absolute values ​​of the first symbol distance field estimation results corresponding to the coordinates of the two pixels, thus obtaining the continuous coordinates of the horizontally adjacent candidate continuous boundary intersection points. For vertically adjacent pixel pairs, the continuous coordinates of the vertically adjacent candidate continuous boundary intersection points are obtained using the same solution method as for horizontally adjacent pixel pairs. All horizontally adjacent candidate continuous boundary intersection points and all vertically adjacent candidate continuous boundary intersection points together constitute the set of candidate continuous boundary intersection points.

[0065] Perform deduplication and neighborhood connection on the candidate continuous boundary intersection set to obtain the sequence of continuous boundary points of the abnormal fins; In Example 1, the Euclidean distance between the continuous coordinates of any two candidate continuous boundary intersections in the candidate continuous boundary intersection set is calculated. When the Euclidean distance is less than the preset deduplication distance threshold, the two candidate continuous boundary intersections are merged into the same continuous boundary point.

[0066] Neighborhood connections are performed on all merged continuous boundary points. The Euclidean distance between any two continuous boundary points is calculated. When the Euclidean distance is not greater than the preset connection distance threshold, the two continuous boundary points are established as adjacency. Based on the adjacency relationship between continuous boundary points, a depth-first search is performed in combination with the visited node marking mechanism. All continuous boundary points are tracked and sorted point by point along the same clockwise direction, and the outermost main contour sequence is extracted to obtain the sequence of continuous boundary points of abnormal fins arranged along the boundary direction of the abnormal fins.

[0067] Perform coordinate continuity mapping on the sequence of continuous boundary points of the abnormal fins to obtain a representation of the continuous fin boundary point set; In Example 1, all continuous boundary points in the sequence of continuous boundary points of the abnormal fin are represented by a set according to their order in the sequence to obtain a continuous fin boundary point set representation. Each continuous boundary point in the continuous fin boundary point set representation corresponds to the zero-crossing position of the first symbol distance field estimation result near the boundary of the abnormal fin, which is used to map the discrete pixel boundary in the two-dimensional segmentation mask of the abnormal fin to a continuous coordinate boundary representation.

[0068] Perform boundary closure verification on the continuous fin boundary point set representation and output the continuous fin boundary point set representation; In Example 1, the Euclidean distance between the first and last consecutive boundary points in the continuous fin boundary point set representation is calculated to obtain the closed distance between the first and last consecutive boundary points.

[0069] When the closing distance between the first and last consecutive boundary points is not greater than the preset closing distance threshold, the current continuous fin boundary point set representation is maintained as the continuous fin boundary point set representation output.

[0070] When the closing distance between the first and last continuous boundary points is greater than the preset closing distance threshold, linear coordinate interpolation is performed between the last continuous boundary point and the first continuous boundary point, using the average spacing between adjacent continuous boundary points as a fixed step size, to generate several supplementary continuous boundary points. These supplementary continuous boundary points are then added sequentially to the continuous fin boundary point set representation to form a spatially closed continuous boundary, and the closed continuous fin boundary point set representation is output.

[0071] The closure distance threshold is obtained by statistically analyzing the closure distance between the first and last consecutive boundary points of normal samples, specifically by taking the sum of the mean of normal samples and a certain multiple of the standard deviation.

[0072] An improved implicit neural symbolic distance field model is constructed based on the continuous fin boundary point set representation to reconstruct the continuous closed fin boundary curve; In this embodiment, the following steps are included: constructing an improved implicit neural symbol distance field model based on the continuous fin boundary point set representation, and calculating the boundary fitting term; In Example 1, each continuous boundary point in the continuous fin boundary point set is used as a boundary supervision sample for the improved implicit neural symbolic distance field model. A one-to-one nonlinear mapping relationship between continuous coordinate input and symbolic distance output is established in the continuous coordinate domain. Any continuous coordinate point in the continuous coordinate domain is composed of continuous coordinates in the vertical direction and continuous coordinates in the horizontal direction.

[0073] Input any continuous coordinate point into the improved implicit neural symbolic distance field model to obtain the corresponding symbolic distance field function value. For each continuous boundary point in the continuous fin boundary point set representation, the symbolic distance field function value is constrained to zero. The continuous fin boundary point set representation is used as the zero horizontal boundary constraint to construct a boundary fitting term. The boundary fitting term is obtained by squaring and averaging the symbolic distance field function values ​​corresponding to all continuous boundary points.

[0074] Based on the improved implicit neural symbolic distance field model, spatial smoothness constraints are constructed; In Example 1, multiple spatial sampling points are selected within a continuous coordinate domain to form a spatial sampling point set. For each spatial sampling point, the gradient vector of the improved implicit neural symbolic distance field model at the corresponding point is calculated, and the magnitude of the gradient vector is calculated for each spatial sampling point. The difference between the magnitude of the gradient vector of all spatial sampling points and the target unit value of 1 is squared, and the results of all spatial sampling points are averaged to obtain a spatial smoothing constraint term. This constraint ensures that the gradient magnitude of the symbolic distance field at any point in space approximates 1, thus maintaining the continuity and smoothness of the symbolic distance field in space.

[0075] Based on the improved implicit neural symbolic distance field model, a curvature regularization constraint is constructed. In Example 1, a unit normal vector at a spatial sampling point is constructed based on the normalization of the gradient vector. The curvature value of each spatial sampling point in the set of spatial sampling points is calculated. The curvature value is obtained by taking the divergence operator on the unit normal vector, which represents the degree of geometric divergence of the implicit surface at that point. The curvature values ​​corresponding to all spatial sampling points are squared and the results of all spatial sampling points are averaged to obtain a curvature regularization constraint term, which is used to constrain the smooth transition of the boundary fracture region where no real data is observed and to suppress the high-frequency oscillation of the reconstructed fin boundary curve.

[0076] Based on the prior physical arrangement of automotive radiator fins, a periodic structure consistency constraint is constructed. In Example 1, the physical arrangement prior is to determine the spatial translation vector based on the standard design spacing of the automotive radiator fins. For spatial sampling points in the continuous coordinate domain, the corresponding points of adjacent periods after applying the spatial translation vector are calculated. The absolute values ​​of the differences between the symbolic distance field function values ​​at the spatial sampling points and the symbolic distance field function values ​​at the corresponding points of adjacent periods are averaged to obtain the periodic structure consistency constraint term, which is used to constrain the improved implicit neural symbolic distance field model to follow the global periodic physical laws of the automotive radiator fins when reconstructing the missing boundaries.

[0077] Energy minimization optimization is performed on the boundary fitting term, spatial smoothing constraint term, curvature regularization constraint term, and periodic structure consistency constraint term to reconstruct the boundary curve of the continuous closed fin. In Example 1, the boundary fitting term, spatial smoothing constraint term, curvature regularization constraint term, and periodic structure consistency constraint term are weighted and summed according to preset weights to obtain the total energy function. By minimizing the total energy function, the set of parameters to be optimized in the improved implicit neural symbolic distance field model is iteratively updated to obtain the optimized improved implicit neural symbolic distance field model.

[0078] The optimized set of parameters to be optimized is substituted into the improved implicit neural symbolic distance field model. In the continuous coordinate domain, the continuous coordinate points where the symbolic distance field function values ​​are close to zero are extracted by the grid sampling interpolation method. These points form a continuous closed fin boundary curve, which represents the real physical boundary of the fin reconstructed and stitched by the zero level set of the symbolic distance field function in the continuous space.

[0079] The input-output logic of the implicit neural symbolic distance field model is as follows: the input end receives the representation of the continuous fin boundary point set and the spatial sampling points in the continuous coordinate domain; the output end generates the symbolic distance field function value at each continuous coordinate point; after optimization, the optimized set of parameters to be optimized is substituted into the implicit neural symbolic distance field model; and in the continuous coordinate domain, all continuous coordinate points whose symbolic distance field function values ​​are close to zero are extracted by the grid sampling interpolation method to form a continuous closed fin boundary curve.

[0080] The continuous closed fin boundary curve is fused and corrected with the first fin two-dimensional segmentation mask to generate the second fin two-dimensional segmentation mask. This mask, along with the first semantic feature representation set, is input into the frequency domain regularization module to perform frequency domain main frequency peak alignment and abnormal high-frequency component suppression on the multi-scale feature map, and outputs the second semantic feature representation set. In this embodiment, the method includes: fusing and correcting the continuous closed fin boundary curve with the first fin two-dimensional segmentation mask to generate a second fin two-dimensional segmentation mask; In Example 1, the closed region enclosed by the continuous closed fin boundary curve is determined as the closed region corresponding to the continuous closed fin boundary curve, and closed region filling is performed to obtain the reconstructed region mask corresponding to the continuous closed fin boundary curve.

[0081] The reconstructed region mask corresponding to the continuous closed fin boundary curve is subjected to a pixel-by-pixel logical OR operation with the first fin two-dimensional segmentation mask in the same pixel coordinate domain (that is, when any mask is 1 at the corresponding coordinate, the fusion result is 1, otherwise it is 0), to generate the second fin two-dimensional segmentation mask, which is used to perform topological complementation between the discrete completion result and the original network perception result.

[0082] The second fin two-dimensional segmentation mask and the first semantic feature representation are respectively mapped to the second fin two-dimensional segmentation mask set and the first semantic feature representation set corresponding to the multi-scale spatial feature map; In Example 1, the two-dimensional segmentation mask of the second fin is subjected to nearest neighbor scale mapping according to the spatial resolution corresponding to the k-th scale stage to obtain the two-dimensional segmentation sub-mask of the second fin at the k-th scale.

[0083] According to the spatial resolution corresponding to the k-th scale stage, perform bilinear scale mapping on the first semantic feature representation, and perform channel projection on the result after scale mapping to obtain the first semantic feature sub-representation at the k-th scale.

[0084] The two-dimensional segmentation sub-masks of the second fin at all scales together constitute the two-dimensional segmentation mask set of the second fin, and the first semantic feature sub-representations at all scales together constitute the first semantic feature representation set.

[0085] The two-dimensional segmentation mask set of the second fin and the first semantic feature representation set are jointly input into the frequency domain regularization module of the periodic structure self-alignment to construct the frequency domain analysis response at each scale, and obtain the semantic spectrum and mask spectrum. In the frequency domain regularization module, the first semantic feature representation at the k-th scale is mask-weighted based on the second fin two-dimensional segmentation mask at the k-th scale to obtain the mask-constrained semantic response map at the k-th scale: ; in, Indicates the first Each scale stage in spatial sampling coordinates The mask constraint semantic response value at the location, Indicates the first Each scale stage in spatial sampling coordinates The value of the two-dimensional segmentation submask of the second fin at that location, Indicates the first The number of channels represented by the first semantic feature in each scale stage. Indicates the first The first scale stage Each channel is sampled in spatial coordinates. The first semantic feature at a given location represents the value. Indicates the first Discrete spatial sampling index in the vertical direction for each scale stage. Indicates the first Discrete spatial sampling index in the horizontal direction for each scale stage.

[0086] Perform a two-dimensional discrete Fourier transform on the mask-constrained semantic response map at the k-th scale to obtain the semantic spectrum at the k-th scale stage; simultaneously, perform a two-dimensional discrete Fourier transform on the second fin two-dimensional segmentation mask at the k-th scale to obtain the mask spectrum at the k-th scale stage.

[0087] Based on the semantic spectrum and the mask spectrum, the position of the main frequency peak is determined and frequency domain main frequency peak alignment is performed on the semantic spectrum to obtain the semantic spectrum after main frequency peak alignment. In Example 1, for the k-th scale stage, the semantic dominant frequency peak position and the mask dominant frequency peak position are determined based on the semantic spectrum and the mask spectrum, respectively. The semantic dominant frequency peak position represents the frequency position in the preset frequency search area after removing the zero-frequency DC component, where the semantic spectrum amplitude reaches its maximum value. The mask dominant frequency peak position represents the frequency position in the preset frequency search area after removing the zero-frequency DC component, where the mask spectrum amplitude reaches its maximum value. These positions are used to characterize the real spatial frequency components of the physical arrangement of the automotive radiator fins.

[0088] Using the mask's dominant frequency peak position as the dominant frequency peak alignment target for the k-th scale stage, the vertical and horizontal displacements of the dominant frequency peak position between the semantic dominant frequency peak position and the mask's dominant frequency peak position are calculated. Based on these displacements, a frequency shift is performed on the semantic spectrum for the k-th scale stage, moving the dominant frequency peak position in the semantic spectrum to the mask's dominant frequency peak position, thus completing the dominant frequency peak alignment for the k-th scale stage and obtaining the semantic spectrum after dominant frequency peak alignment.

[0089] The semantic spectrum after the main frequency peak alignment is subjected to abnormal high frequency component suppression, and a two-dimensional discrete Fourier inverse transform is performed to reconstruct it to the spatial domain, outputting a second semantic feature representation set.

[0090] In Example 1, for the k-th scale stage, with the mask main frequency peak position as the center, the frequency domain distance of each frequency index relative to the mask main frequency peak position is calculated. The frequency domain distance represents the Euclidean distance between the corresponding frequency index and the mask main frequency peak position in the frequency domain plane.

[0091] The frequency domain suppression weight function for the k-th scale stage is constructed based on the frequency domain distance and the frequency domain suppression radius: when the frequency domain distance is not greater than the frequency domain suppression radius, the value of the frequency domain suppression weight function at the corresponding frequency index is set to 1, indicating that the spectral components near the main frequency peak are retained; when the frequency domain distance is greater than the frequency domain suppression radius, an exponential attenuation weight is applied to the high-frequency components exceeding the frequency domain suppression radius, and the value of the frequency domain suppression weight function at the corresponding frequency index is [value missing]. ,in For the current frequency domain distance, The frequency domain suppression radius is obtained by statistically analyzing the frequency domain range of the effective energy concentration region around the main frequency peak of the normal sample mask spectrum. The average radius of this frequency domain range is taken as the frequency domain suppression radius. The preset exponential attenuation coefficient is determined based on the attenuation distribution of high-frequency energy outside the main frequency peak of the normal sample, so that the high-frequency components are exponentially attenuated according to a preset ratio after exceeding the frequency domain suppression radius.

[0092] Multiply the frequency domain suppression weight function of the k-th scale stage with the semantic spectrum after aligning the main frequency peak by frequency point to obtain the high-frequency suppressed semantic spectrum of the k-th scale stage. Perform a two-dimensional discrete Fourier inverse transform on the high-frequency suppressed semantic spectrum of the k-th scale stage, and take the real part of the inverse transform result to obtain the second semantic feature representation of the k-th scale stage.

[0093] ; in, Indicates the first Each scale stage in spatial sampling coordinates The second semantic feature sub-representation at the location is used to represent the spatial domain semantic response result after frequency domain main frequency peak alignment and abnormal high frequency component suppression; This indicates that the real part operation is performed on the complex number result. Indicates the first The discrete spatial sampling length in the vertical direction for each scale stage. Indicates the first The discrete spatial sampling length in the horizontal direction for each scale stage. Indicates the first Each scale stage in frequency index The semantic spectrum complex value after suppressing abnormal high-frequency components. Indicates the first Discrete frequency index in the vertical direction for each scale stage Indicates the first Discrete frequency index in the horizontal direction for each scale stage Indicates the first Discrete spatial sampling index in the vertical direction for each scale stage. Indicates the first Discrete spatial sampling index in the horizontal direction for each scale stage It represents the imaginary unit.

[0094] Based on the second fin two-dimensional segmentation mask, continuous closed fin boundary curve and second semantic feature representation, calculate the fin boundary curvature distribution, normal vector change distribution and period deviation distribution, and construct the fin deformation feature description vector; In this embodiment, the following steps are included: establishing a continuous boundary parameterized representation based on the two-dimensional segmentation mask of the second fin and the continuous closed fin boundary curve, and performing arc length consistent sampling on the continuous closed fin boundary curve to obtain a boundary sampling point sequence, a boundary tangent vector sequence, and a boundary normal vector sequence. In Example 1, cubic parametric spline fitting is performed on the discrete coordinate point set in the continuous closed fin boundary curve to construct a second-order continuously differentiable continuous boundary parameterization representation with respect to the cumulative chord length parameter.

[0095] Substitute the arc length parameter corresponding to the h-th boundary sampling position into the continuous boundary parameterization representation of the continuous closed fin boundary curve to obtain the continuous coordinate vector of the h-th boundary sampling point. The continuous coordinate vectors of all boundary sampling points together constitute the boundary sampling point sequence in the sampling order.

[0096] Differentiate the continuous closed fin boundary curve along the arc length parameter at the h-th boundary sampling position to obtain the unit tangent vector along the tangent direction of the continuous closed fin boundary curve at the h-th boundary sampling point. The unit tangent vectors at all boundary sampling points together constitute the boundary tangent vector sequence in the sampling order.

[0097] Based on the two-dimensional segmentation mask of the second fin, determine the boundary normal vector pointing towards the interior of the fin at the h-th boundary sampling point: ; in, Indicates the first The boundary normal vector at each boundary sampling point points to the interior of the two-dimensional segmentation mask of the second fin. This represents the value of the two-dimensional segmentation mask for the second fin at the corresponding pixel coordinates. This represents a coordinate mapping operator that maps continuous coordinates to the coordinates of the nearest neighbor pixel. This represents the inner micro-displacement step size used to determine the direction of the normal, with the dimension of pixels. Indicates the first The first candidate boundary normal vector at each boundary sampling point is obtained by performing an orthogonal rotation on the vertical and horizontal components of the unit tangent vector. Indicates the first The second candidate boundary normal vector at each boundary sampling point is obtained by taking the opposite direction of the first candidate boundary normal vector as a whole. Indicates the first A continuous coordinate vector of boundary sampling points.

[0098] The boundary normal vectors pointing from all boundary sampling points to the interior of the two-dimensional segmentation mask of the second fin together constitute the boundary normal vector sequence according to the sampling order.

[0099] Calculate the fin boundary curvature distribution based on the boundary sampling point sequence and the boundary tangent vector sequence; ; in, Indicates the first The boundary curvature value at each boundary sampling point, with dimensions in the negative first power of pixels. The boundary curve of the continuous closed fin is represented in the first... The first derivative of the vertical continuous coordinates with respect to the arc length parameter at each boundary sampling location. The boundary curve of the continuous closed fin is represented in the first... The first derivative of the horizontal continuous coordinates with respect to the arc length parameter at each boundary sampling location. The boundary curve of the continuous closed fin is represented in the first... The second derivative of the vertical continuous coordinates with respect to the arc length parameter at each boundary sampling position. The boundary curve of the continuous closed fin is represented in the first... The second derivative of the horizontal continuous coordinates with respect to the arc length parameter at each boundary sampling location. This represents the curvature stability constant to prevent the denominator from being zero.

[0100] The fin boundary curvature distribution is formed by the boundary curvature values ​​at all boundary sampling points in the sampling order.

[0101] Calculate the distribution of normal vector changes based on the boundary normal vector sequence; ; in, Indicates the first The change in the normal vector corresponding to each boundary sampling interval This represents a closed-loop modulo index operator based on the total number of boundary sampling points, used to ensure a circular connection between the first and last sampling points. Indicates the first The boundary normal vector at the nth boundary sampling point and the nth boundary normal vector The inner product of the boundary normal vectors at each boundary sampling point. Indicates the first The L2 norm of the boundary normal vector at each boundary sampling point Indicates the first The L2 norm of the boundary normal vector at each boundary sampling point This represents the stability constant for normal changes to prevent the denominator from becoming zero.

[0102] The normal vector change distribution is formed by the normal vector changes corresponding to all boundary sampling intervals in the sampling order.

[0103] The periodic deviation distribution is calculated based on the second semantic feature representation. In Example 1, the second semantic feature sub-representations corresponding to all scale stages are restored to the pixel coordinate domain consistent with the two-dimensional segmentation mask of the second fin, and channel averaging and scale averaging are performed on the second semantic feature sub-representations corresponding to all scale stages to construct the second semantic response field.

[0104] Within the local semantic analysis window, the partial derivatives of the second semantic response field along the vertical direction and along the horizontal direction are calculated for each pixel coordinate. The values ​​of the second fin two-dimensional segmentation mask at the pixel coordinates are used as constraint weights. The second-order statistical matrix composed of the square of the vertical partial derivative, the product of the vertical and horizontal partial derivatives, and the square of the horizontal partial derivative is summed pixel by pixel to obtain the local structure tensor matrix at the h-th boundary sampling point.

[0105] The unit eigenvector corresponding to the largest eigenvalue of the local structure tensor matrix at the h-th boundary sampling point is determined as the local periodic principal direction vector at the h-th boundary sampling point. The inverse cosine of the inner product of the unit tangent vector and the local periodic principal direction vector at the h-th boundary sampling point is determined as the periodic deviation value at the h-th boundary sampling point. The periodic deviation values ​​at all boundary sampling points are combined in the sampling order to form the periodic deviation distribution.

[0106] Based on the fin boundary curvature distribution, normal vector change distribution, and period deviation distribution, a fin deformation characteristic description vector is constructed.

[0107] In Example 1, the boundary sampling interval is obtained by dividing the total arc length of the continuous closed fin boundary curve by the total number of boundary sampling points. The boundary curvature distribution is normalized based on the boundary sampling interval to obtain the normalized boundary curvature value. The mean, standard deviation, and maximum value of the normalized boundary curvature value are calculated based on all normalized boundary curvature values. The standard deviation and maximum value of the normal vector change value are calculated based on all normal vector change values. The mean and standard deviation of the periodic deviation value are calculated based on all periodic deviation values.

[0108] The mean of normalized boundary curvature value, standard deviation of normalized boundary curvature value, maximum value of normalized boundary curvature value, mean of normal vector change value, standard deviation of normal vector change value, maximum value of normal vector change value, mean of period deviation value, and standard deviation of period deviation value are concatenated in a fixed order to construct a fin deformation characteristic description vector.

[0109] The fixed order is as follows: first, concatenate the mean of the normalized boundary curvature value, the standard deviation of the normalized boundary curvature value, and the maximum value of the normalized boundary curvature value; then, concatenate the standard deviation of the normal vector change value and the maximum value of the normal vector change value; finally, concatenate the mean of the period deviation value and the standard deviation of the period deviation value.

[0110] The fin deformation feature description vector is compared and analyzed with the preset standard fin structure model to identify and quantify the defect type, and output the fault diagnosis results of automotive radiator fin defects.

[0111] In this embodiment, the following steps are included: constructing a preset standard fin structure model and establishing a standard reference distribution for the fin deformation feature description vector; In Example 1, a pre-defined standard fin structure model is constructed based on the design parameters of standard automotive radiator fins and defect-free sample data. A continuous geometric analysis method that is exactly the same as the one used to construct the fin deformation feature description vector is performed on all standard fin samples to obtain the standard deformation feature description vector corresponding to the standard fin.

[0112] The pre-defined standard fin structure model is constructed by using the design parameters of a standard automotive radiator fin as a geometric reference constraint and defect-free sample data as statistical calibration data. Based on the design parameters, the boundary length, fin spacing, normal arrangement direction, and periodic arrangement reference of the standard fin are determined. For all defect-free samples, the corresponding fin deformation feature description vectors are extracted according to the process of continuous boundary parameterization, curvature distribution calculation, normal vector change distribution calculation, and periodic deviation distribution calculation. The mean and covariance statistics of the fin deformation feature description vectors of all defect-free samples are performed dimension by dimension to obtain the mean vector and standard covariance matrix of the standard deformation feature description vector, thus realizing the fusion of design parameter constraints and sample statistical distribution.

[0113] The arithmetic mean vector of the standard deformation feature description vectors corresponding to all standard fin samples is obtained by averaging the standard deformation feature description vectors dimension by dimension. The mean vector of the standard deformation feature description vectors is obtained by subtracting the mean vector of the standard deformation feature description vectors from the standard deformation feature description vectors of each standard fin sample. The deviation vector is obtained by multiplying each deviation vector with its own transpose to obtain the outer product matrix. The outer product matrix is ​​then summed item by item and divided by the number of standard samples to obtain the standard covariance matrix of the standard deformation feature description vectors, which is used to characterize the joint variation relationship between various statistical features.

[0114] The overall deviation metric is calculated based on the fin deformation feature description vector and the standard deformation feature description vector. In Example 1, the fin deformation feature description vector corresponding to the fin to be tested is subtracted dimension by dimension from the mean vector of the standard deformation feature description vector to obtain the deviation vector of the fin to be tested relative to the standard state. The transpose of the deviation vector, the inverse matrix of the standard covariance matrix, and the deviation vector are sequentially multiplied to obtain the squared value of the Mahalanobis distance. The square root operation is performed on the squared value of the Mahalanobis distance to obtain the overall deviation metric.

[0115] Based on the preset standard fin structure model and fin deformation feature description vector, defect type identification is performed to obtain specific defect types, including lodging deformation, bending deformation, edge tearing defects and material missing defects.

[0116] The classification rules for defect types include: When the mean value of the period deviation is greater than or equal to the preset mean value threshold for lodging deformation, and the standard deviation of the period deviation is greater than or equal to the preset discrete threshold for lodging deformation, it is determined to be a lodging deformation defect. The mean threshold for lodging deformation is obtained by statistically analyzing the mean of the periodic deviation of normal samples, specifically by taking the sum of the mean of the normal samples and a certain multiple of the standard deviation; the discrete threshold for lodging deformation is obtained by statistically analyzing the standard deviation of the periodic deviation of normal samples, specifically by taking the sum of the mean of the normal samples and a certain multiple of the standard deviation.

[0117] When the standard deviation of the normalized boundary curvature value is greater than or equal to the preset bending deformation discrete threshold, and the maximum value of the normalized boundary curvature value is greater than or equal to the preset bending deformation peak threshold, it is determined to be a bending deformation defect. The discrete threshold for bending deformation is obtained by statistically analyzing the normalized standard deviation of the boundary curvature of normal samples, specifically by taking the sum of the mean of the normal samples and a certain multiple of the standard deviation; the peak threshold for bending deformation is obtained by statistically analyzing the maximum value of the normalized boundary curvature of normal samples, specifically by taking the sum of the mean of the normal samples and a certain multiple of the standard deviation.

[0118] When the maximum value of the change in the normal vector is greater than or equal to the preset tear peak threshold, or the standard deviation of the change in the normal vector is greater than or equal to the preset tear discrete threshold, it is determined to be an edge tear defect; The tear peak threshold is obtained by statistically analyzing the maximum change in the normal sample normal vector, specifically by taking the sum of the normal sample mean and a certain multiple of the standard deviation; the tear dispersion threshold is obtained by statistically analyzing the standard deviation of the change in the normal sample normal vector, specifically by taking the sum of the normal sample mean and a certain multiple of the standard deviation.

[0119] When the mean value of the normalized boundary curvature is less than or equal to the preset material missing curvature threshold, and the mean value of the period deviation is less than or equal to the preset material missing period threshold, it is determined to be a material missing defect. The material missing curvature threshold is obtained by statistically analyzing the normalized boundary curvature mean of normal samples, specifically by subtracting a certain multiple of the standard deviation from the normal sample mean; the material missing period threshold is obtained by statistically analyzing the period deviation mean of normal samples, specifically by subtracting a certain multiple of the standard deviation from the normal sample mean.

[0120] Based on the overall deviation metric, a corresponding quantitative assessment is performed on the specific defect type to obtain the minor defect, medium defect and severe defect levels, and output the fault diagnosis results of automotive radiator fin defects.

[0121] In Example 1, the overall deviation metric is normalized and mapped to a preset severity normalization threshold. The defect severity score is obtained by dividing the overall deviation metric by the sum of the overall deviation metric and the severity normalization threshold.

[0122] Based on the defect severity score, the defect type is divided into minor defects, medium defects and severe defects. The severity score of a minor defect is lower than the first preset classification threshold, the severity score of a medium defect is between the first preset classification threshold and the second preset classification threshold, and the severity score of a severe defect is higher than the second preset classification threshold.

[0123] Example 2: During a continuous production cycle, the implementer deployed the method of the present invention at an online inspection station for automotive radiator fins, continuously inspecting fins from the same batch coming off the line. A linear array imaging unit and a coaxial supplementary lighting unit were configured at the front end of the station. In the acquired raw images, the fins exhibited industrial visual characteristics such as high reflectivity, dense packing, slenderness, and partial occlusion. A total of 18,640 raw images of automotive radiator fins before standardization were continuously acquired for the batch. Subsequent re-inspection confirmed that 913 samples actually had structural abnormalities, including 341 images of collapsed deformation, 286 images of bending deformation, 179 images of edge tearing defects, and 107 images of material missing defects. The remaining samples were normal samples or pseudo-abnormal samples caused by reflection or shadows. To verify the effectiveness of the present invention, a traditional two-dimensional segmentation diagnostic method was selected as a control method.

[0124] After the continuous production cycle begins, the system receives raw image data of automotive radiator fins. Two typical types of interference exist in the raw images: one is a bright saturation band caused by the mirror reflection of the metal surface, and the other is a deep shadow gap caused by the louver structure of adjacent fins. In image F-0217, the implementer observed a bright reflection band approximately 37 pixels long and 6 pixels wide in the central area of ​​a single fin, resulting in a significant decrease in boundary contrast within the same area. In image F-0346, oil stains obscure the lower edge of the fin, forming localized low-brightness patches. After the system performs uniform preprocessing on all raw images, the proportion of bright saturation pixels in the images decreased from 13.8% to 4.9%, the average grayscale of local shadow areas increased by 21.6%, and the overall grayscale variance decreased from 1824 to 1267, indicating that the standardized automotive radiator fin image data has more stable input conditions. The control method uses the same preprocessing results.

[0125] After entering the improved UnSAM model, the system performs non-overlapping image block partitioning on the standardized automotive radiator fin image data and generates initial embedding features at each block index. Taking sample F-0217 as an example, after the sample is divided into multiple local image blocks, the mean channel response of the initial embedding features is significantly higher at the four consecutive block indices corresponding to the high reflectivity area in the center of the fin. However, after the first two lightweight gated convolutional adaptation layers, the first channel gated feature suppresses the high reflectivity channel, and the local texture response is restored. The response of the second adaptation feature at the true edge of the fin is improved by 18.4% compared to the initial embedding feature. The hierarchical Transformer of the hierarchical shift window attention mechanism models multi-scale features and outputs the first fin's two-dimensional segmentation mask, the first semantic feature representation, and the first symbolic distance field estimation result on sample F-0217. Traditional methods incorrectly segment the same fin into two disconnected regions on this sample, with a 9-pixel-wide gap in the middle. Although the first fin's two-dimensional segmentation mask also forms a narrow gap in this region, the first symbolic distance field estimation result shows a continuous zero-crossing trend on both sides of the gap. The symbolic distance field function value near the gap gradually transitions from -2.7 pixels inside the fin to -0.3, 0.2, and 0.9 near the boundary, and then to 2.4 pixels outside, showing a stable transition that can be used for subsequent continuous completion.

[0126] In the topology consistency detection stage, the system performs connected component analysis, contour continuity discrimination, and morphological constraint discrimination on the first fin's two-dimensional segmentation mask and its corresponding first semantic feature representation. Taking sample F-0217 as an example, the target fin corresponding to this sample is divided into two connected components in the first fin's two-dimensional segmentation mask. The areas of the two connected components are 412 pixels and 397 pixels, respectively, and their aspect ratios are 8.6 and 8.2, respectively. Both meet the slender structure condition of the candidate fin's connected components. However, in the contour continuity analysis, the contour spacing mutation index of this sample reaches 2.31, while the contour spacing threshold obtained from the normal fin reference image library is 0.94; the orientation mutation index reaches 0.71, while the normal threshold is 0.26; the semantic mutation index reaches 1.84, while the normal threshold is 0.63; and the skeleton preservation ratio is only 0.58, while the normal lower limit is 0.87. Based on this, the system marks this sample as a topology anomaly mask. In contrast, although sample F-0128 also had local highlights in the original image, its contour spacing abrupt change index was 0.43, direction abrupt change index was 0.11, semantic abrupt change index was 0.27, and skeleton preservation ratio was 0.96, all within the normal range. Therefore, it was not misjudged as an anomaly. Throughout the entire continuous production cycle, the method of this invention identified 1264 abnormal fin two-dimensional segmentation masks in 18640 images, while the traditional method, based solely on connected component breaks and area thresholds, identified 2146 abnormal samples, of which 1087 were confirmed to be false anomalies caused by reflections or shadows after re-examination.

[0127] For samples identified as anomalous, the system performs coordinate continuity mapping on the two-dimensional segmentation mask of the anomalous fin and its corresponding first symbol distance field estimation results. Taking sample F-0217 as an example, the system extracts the set of boundary pixels from the pixel region of the anomalous fin, obtaining a total of 168 boundary pixels; it performs symbol zero-edge localization on the horizontal and vertical adjacent pixel pairs corresponding to the boundary pixels, obtaining 73 candidate continuous boundary intersections in the horizontal direction and 81 candidate continuous boundary intersections in the vertical direction, for a total of 154 candidate continuous boundary intersections. After deduplication and merging, 139 continuous boundary points are retained, and then a sequence of continuous boundary points of the anomalous fin is obtained through neighborhood connectivity and depth-first tracing. The Euclidean distance between the first and last points of this sequence is 3.8 pixels, which is higher than the preset closure distance threshold of 1.5 pixels. Therefore, the system further performs linear interpolation according to the average spacing of adjacent continuous boundary points of 0.92 pixels, and adds 4 supplementary continuous boundary points to obtain a closed continuous fin boundary point set representation. Traditional methods apply morphological closing operations only to the fracture region on the same sample. Although a mask of surface connectivity is obtained, the closed region expands outward by about 5 to 7 pixels relative to the true boundary.

[0128] In the implicit neural symbol distance field reconstruction stage, the system constructs an implicit neural symbol distance field model based on the continuous fin boundary point set representation, and simultaneously calculates the boundary fitting term, spatial smoothness constraint term, curvature regularization constraint term, and periodic structure consistency constraint term. Taking sample F-0217 as an example, the initial boundary fitting term is 1.92, the spatial smoothness constraint term is 0.47, the curvature regularization constraint term is 0.38, and the periodic structure consistency constraint term is 0.29. After energy minimization iterations, these terms converge to 0.08, 0.05, 0.07, and 0.04, respectively, and the total energy function decreases from 2.76 to 0.24. The average boundary deviation between the continuous closed fin boundary curves extracted from the zero-level set and the subsequently manually verified boundaries is 0.41 pixels, while the average boundary deviation obtained by the traditional method through polynomial fitting and edge completion is 2.36 pixels, with the maximum local deviation reaching 4.92 pixels in the fracture region. For another type of real micro-deformation sample F-0346, the original pixel-level boundary can hardly stably reflect the slight collapse of the lower edge. However, the continuous closed fin boundary curve obtained by this invention forms a smooth offset at this position. The subsequent measured arc-shaped outward displacement is 0.17 mm, which corresponds to about 2.8 pixels at the imaging scale, and has a basis for quantifiable analysis.

[0129] In the fusion correction and frequency domain regularization stages, the system first fills the closed region enclosed by the continuous closed fin boundary curves as a reconstructed region mask, and then performs a pixel-by-pixel logical OR operation with the first fin 2D segmentation mask to generate the second fin 2D segmentation mask. Taking sample F-0217 as an example, before fusion, the first fin 2D segmentation mask had 31 background pixel holes in the fracture area. After fusion, the second fin 2D segmentation mask is completely closed, and the number of holes is reduced to 0. Traditional methods can also eliminate holes after the closing operation, but they will introduce an additional 19 non-fin region pixels. The system maps the second fin 2D segmentation mask and the first semantic feature representation to each scale stage and inputs them into the frequency domain regularization module for periodic structure self-alignment. For sample F-0346, in the second scale stage, the dominant frequency peak of the semantic spectrum is located at frequency index (11,3), and the dominant frequency peak of the mask spectrum is located at (13,3). The system calculates that the vertical displacement of the dominant frequency peak is 2 and the horizontal displacement is 0. After frequency shifting of the semantic spectrum, the proportion of abnormal high-frequency energy outside the neighborhood of the dominant frequency peak before high-frequency suppression is 27.4%, which is reduced to 8.1% after high-frequency suppression. In the entire batch of test samples, the method of this invention reduces the average dominant frequency offset of multi-scale features from 1.87 frequency units to 0.34 frequency units. Traditional methods do not have this step, thus retaining more pseudo-high-frequency noise in complex reflective samples.

[0130] In the continuous geometric analysis phase, the system performs cubic parametric spline fitting based on the continuous closed fin boundary curve to establish a parameterized representation of the continuous boundary. It then obtains the boundary sampling point sequence, boundary tangent vector sequence, and boundary normal vector sequence by consistent sampling along the arc length. Taking sample F-0346 as an example, the system samples 160 boundary sampling points along the continuous closed fin boundary curve, calculating the normalized boundary curvature as mean 0.083, standard deviation 0.029, and maximum value 0.174; the normal vector variation as mean 0.117 radians, standard deviation 0.041, and maximum value 0.286 radians; and the period deviation as mean 0.194 radians, standard deviation 0.072, and maximum value 0.341 radians. The resulting fin deformation characteristic description vector is: .

[0131] In the normal sample F-0128, the corresponding vector is: The main differences between the two methods lie in the mean of the period deviation and the maximum value of the normal vector change, which can directly reflect minor collapses and boundary deflections. Traditional methods can only provide discrete quantities such as area, perimeter, and aspect ratio of the circumscribed rectangle for pixel-level statistical features extracted from the same sample, and cannot stably form a distinguishable high-dimensional deformation description.

[0132] In the defect type identification and quantitative assessment phase, the system establishes a standard reference distribution using normal standard samples. The implementer selects 3200 fin samples from the continuous production process that have been re-inspected and confirmed to be defect-free. A standard deformation feature description vector is constructed using a continuous geometric analysis process identical to that of the sample to be tested, and the mean value is calculated dimension-by-dimensional to obtain the standard mean vector. Simultaneously, the standard covariance matrix is ​​calculated. For sample F-0346, the system calculates the Mahalanobis distance by subtracting its fin deformation feature description vector from the standard mean vector dimension-by-dimensional, resulting in an overall deviation metric of 4.28. According to the preset classification rules, when the mean periodic deviation is greater than the mean lodging deformation threshold and the standard deviation of the periodic deviation is greater than the discrete lodging deformation threshold, it is determined to be a lodging deformation defect. Sample F-0346 has a mean periodic deviation of 0.194, which is greater than the preset mean lodging deformation threshold of 0.142, and a standard deviation of 0.072, which is greater than the preset discrete lodging deformation threshold of 0.051. Therefore, it is determined to be a lodging deformation defect. The overall deviation metric is then normalized and mapped to the preset severity normalization threshold of 2.6, resulting in a defect severity score of 0.622. Since this score is higher than the first preset grading threshold of 0.35 and lower than the second preset grading threshold of 0.70, this sample is classified as a medium defect. For another sample, F-0489, the system calculates the normalized boundary curvature standard deviation to be 0.071 and the normalized boundary curvature maximum value to be 0.261, which are higher than the preset bending deformation discrete threshold of 0.043 and the bending deformation peak threshold of 0.188, respectively, and is ultimately identified as a bending deformation defect. The normal vector change maximum value of sample F-0562 reaches 0.611 radians, exceeding the preset tear peak threshold of 0.402, and is identified as an edge tear defect. The normalized boundary curvature mean value of sample F-0614 is 0.019 and the period deviation mean value is 0.036, both lower than the corresponding material missing threshold, and is identified as a material missing defect.

[0133] To demonstrate the feasibility and effectiveness of this invention, the implementer conducted a parallel comparison between the method of this invention and the conventional method on the same batch of 18,640 images. The comparison results show that the conventional method correctly identified 728 images out of 913 real defect samples, while missing 185, resulting in a false negative rate of 20.26%; it also falsely reported 1,094 normal or pseudo-abnormal samples, resulting in a false positive rate of 6.17%. The method of this invention correctly identified 876 images out of the same batch of data, missing 37, resulting in a false negative rate of 4.05%; it also falsely reported 146 normal or pseudo-abnormal samples, resulting in a false positive rate of 0.82%. Regarding pseudo-fracture samples caused by high reflectivity, the conventional method falsely identified 682 images, while the method of this invention falsely identified 73; regarding subpixel-level micro-collapse samples, the conventional method only identified 117 images, while the method of this invention identified 296. Boundary deviation was evaluated on 200 samples with high-precision human contour verification results. The average boundary deviation of the traditional method was 2.14 pixels, while the average boundary deviation of the method of this invention was 0.46 pixels. The average absolute error of the traditional method in estimating small bending amounts was 0.071 mm, while that of the method of this invention was 0.016 mm. When calculating the cost of training sample preparation, the traditional method required pixel-level manual annotation of 5400 images to achieve usable accuracy. The method of this invention does not rely on pixel-level annotation of defective samples and only uses 3200 normal samples to establish a standard reference distribution, thus significantly reducing the degree of human involvement in the data preparation stage.

[0134] After the entire continuous production cycle is completed, the system outputs a lodging deformation defect (moderate defect) for sample F-0346; a bending deformation defect (severe defect) for sample F-0489; an edge tearing defect (severe defect) for sample F-0562; and a material missing defect (minor defect) for sample F-0614.

[0135] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for fault diagnosis of automotive parts based on image recognition, characterized in that, include: The original image data of the car radiator fins is acquired and preprocessed to obtain standardized car radiator fin image data. Standardized automotive radiator fin image data are input into an improved UnSAM model with a hierarchical Transformer as the backbone network and a lightweight gated convolutional adaptation layer embedded in the first two layers. This model generates a first fin two-dimensional segmentation mask, a first semantic feature representation, and a first symbolic distance field estimation result for the output head regression guided by the symbolic distance field. A topological consistency detection is performed on the two-dimensional segmentation mask of the first fin and the corresponding first semantic feature representation. The topological anomaly mask is identified through connected component analysis, contour continuity discrimination and morphological structure constraints to obtain the two-dimensional segmentation mask of the abnormal fin. A coordinate continuity mapping is performed on the two-dimensional segmentation mask of the abnormal fin and its corresponding first symbol distance field estimation results to construct a continuous fin boundary point set representation. An improved implicit neural symbolic distance field model is constructed based on the continuous fin boundary point set representation to reconstruct the continuous closed fin boundary curve; The continuous closed fin boundary curve is fused and corrected with the first fin two-dimensional segmentation mask to generate the second fin two-dimensional segmentation mask. This mask, along with the first semantic feature representation set, is input into the frequency domain regularization module to perform frequency domain main frequency peak alignment and abnormal high-frequency component suppression on the multi-scale feature map, and outputs the second semantic feature representation set. Based on the second fin two-dimensional segmentation mask, continuous closed fin boundary curve and second semantic feature representation, calculate the fin boundary curvature distribution, normal vector change distribution and period deviation distribution, and construct the fin deformation feature description vector; The fin deformation feature description vector is compared and analyzed with the preset standard fin structure model to identify and quantify the defect type, and output the fault diagnosis results of automotive radiator fin defects.

2. The method for diagnosing automotive component faults based on image recognition according to claim 1, characterized in that, The preprocessing includes illumination normalization, metal reflection suppression, periodic shadow compensation, and noise filtering.

3. The method for diagnosing automotive component faults based on image recognition according to claim 1, characterized in that, The improved UnSAM model, which inputs standardized automotive radiator fin image data into a hierarchical Transformer with a layered shift window attention mechanism as the backbone network and embeds lightweight gated convolutional adaptation layers in the first two layers, includes: The standardized automotive radiator fin image data is divided into non-overlapping image blocks according to the image block side length to obtain the block index field. Vectorization operation is performed on the local image block of the automotive radiator fin located at each block index, and the linear projection parameter matrix is ​​input for embedding mapping. The position code corresponding to the block index is superimposed to obtain the initial embedding feature. The initial embedding features at each index are sequentially input into the first lightweight gated convolutional adaptation layer of the first two layers of the improved UnSAM model to obtain the first layer adaptation features. The first layer adaptation features are then input into the second lightweight gated convolutional adaptation layer to obtain the second layer adaptation features. The second layer of adaptation features are input into a hierarchical window attention structure with a hierarchical Transformer containing a hierarchical shift window attention mechanism as the backbone network. This allows for multi-scale modeling of the periodic arrangement relationship and cross-regional dependency relationship of the automotive radiator fins, resulting in backbone features at each scale. Dynamic channel suppression is performed on the backbone features at each scale to weaken the abnormal channel response caused by the high reflectivity of the metal in the automotive radiator fins and enhance the effective boundary channel response, resulting in enhanced features. The enhanced features are then restored to a uniform spatial resolution and subjected to channel stitching and semantic projection to obtain the first semantic feature representation. The first semantic feature representation is used as the input symbolic distance field to guide the output head, generating the first symbolic distance field estimation result; The first semantic feature representation is input into the mask prediction branch to generate the first mask response value. The first symbolic distance field estimation result is normalized and boundedly compressed, and then fused with the first mask response value to obtain the first fin two-dimensional segmentation mask.

4. The method for diagnosing automotive component faults based on image recognition according to claim 1, characterized in that, The topological consistency detection of the two-dimensional segmentation mask of the first fin and the corresponding first semantic feature representation includes: The first fin two-dimensional segmentation mask and the corresponding first semantic feature representation are spatially aligned in the same pixel coordinate domain to construct a candidate fin region set for topological consistency detection. Connected component labeling is performed based on the pixel coordinates with a value of 1 in the first fin two-dimensional segmentation mask to obtain a candidate fin connected component set. Contour extraction is performed on each candidate fin connected region in the candidate fin connected region set, and contour continuity is judged based on the changes in adjacent spacing and tangential direction of the contour point sequence to obtain the contour continuity judgment result corresponding to each candidate fin connected region. Based on the first semantic feature representation, the boundary semantic consistency judgment is performed on each candidate fin connected domain to obtain the boundary semantic consistency judgment result corresponding to each candidate fin connected domain. Perform morphological and structural constraint discrimination on each candidate fin connected domain to obtain the morphological and structural constraint discrimination results corresponding to each candidate fin connected domain; By jointly judging the results of contour continuity discrimination, boundary semantic consistency discrimination, and morphological structure constraint discrimination, a two-dimensional segmentation mask for abnormal fins is obtained.

5. The method for diagnosing automotive component faults based on image recognition according to claim 1, characterized in that, The coordinate continuity mapping of the two-dimensional segmentation mask of the abnormal fins and its corresponding first symbol range field estimation results includes: The abnormal fin pixel region is constructed based on the pixel coordinates of the abnormal fin two-dimensional segmentation mask with a value of 1, and the abnormal fin boundary pixel set is extracted from the abnormal fin pixel region. Using the set of pixels at the boundary of the abnormal fin as the constraint region, symbolic zero-edge localization is performed on the first symbolic distance field estimation result to obtain the set of candidate continuous boundary intersections. Perform deduplication and merging and neighborhood connection on the candidate continuous boundary intersection set to obtain the sequence of continuous boundary points of the abnormal fins; Perform coordinate continuity mapping on the sequence of continuous boundary points of the abnormal fins to obtain a representation of the continuous fin boundary point set; Perform boundary closure verification on the continuous fin boundary point set representation and output the continuous fin boundary point set representation.

6. The method for diagnosing automotive component faults based on image recognition according to claim 1, characterized in that, The improvement of the implicit neural symbolic distance field model based on the continuous fin boundary point set representation includes: Based on the continuous fin boundary point set representation, an improved implicit neural symbol distance field model is constructed, and the boundary fitting term is calculated; Based on the improved implicit neural symbolic distance field model, spatial smoothness constraints are constructed; Based on the improved implicit neural symbolic distance field model, a curvature regularization constraint is constructed. Based on the prior physical arrangement of automotive radiator fins, a periodic structure consistency constraint is constructed. Energy minimization optimization is performed on the boundary fitting term, spatial smoothing constraint term, curvature regularization constraint term, and periodic structure consistency constraint term to reconstruct the boundary curve of the continuous closed fin.

7. The method for diagnosing automotive component faults based on image recognition according to claim 1, characterized in that, The step of fusing and correcting the continuous closed fin boundary curve with the first fin two-dimensional segmentation mask to generate a second fin two-dimensional segmentation mask, and inputting it together with the first semantic feature representation set into the frequency domain regularization module, includes: The continuous closed fin boundary curve is fused and corrected with the first fin two-dimensional segmentation mask to generate the second fin two-dimensional segmentation mask. The second fin two-dimensional segmentation mask and the first semantic feature representation are respectively mapped to the second fin two-dimensional segmentation mask set and the first semantic feature representation set corresponding to the multi-scale spatial feature map; The two-dimensional segmentation mask set of the second fin and the first semantic feature representation set are input into the frequency domain regularization module of the periodic structure self-alignment to construct the frequency domain analysis response at each scale and obtain the semantic spectrum and mask spectrum. Based on the semantic spectrum and the mask spectrum, the position of the main frequency peak is determined and frequency domain main frequency peak alignment is performed on the semantic spectrum to obtain the semantic spectrum after main frequency peak alignment. The semantic spectrum after the main frequency peak alignment is subjected to abnormal high frequency component suppression, and a two-dimensional discrete Fourier inverse transform is performed to reconstruct it to the spatial domain, outputting a second semantic feature representation set.

8. The method for diagnosing automotive component faults based on image recognition according to claim 1, characterized in that, The construction of the fin deformation feature description vector includes: A continuous boundary parameterization representation is established based on the two-dimensional segmentation mask of the second fin and the continuous closed fin boundary curve. Arc length consistent sampling is performed on the continuous closed fin boundary curve to obtain the boundary sampling point sequence, boundary tangent vector sequence and boundary normal vector sequence. Calculate the fin boundary curvature distribution based on the boundary sampling point sequence and the boundary tangent vector sequence; Calculate the distribution of normal vector changes based on the boundary normal vector sequence; The periodic deviation distribution is calculated based on the second semantic feature representation. Based on the fin boundary curvature distribution, normal vector change distribution, and period deviation distribution, a fin deformation characteristic description vector is constructed.

9. The method for diagnosing automotive component faults based on image recognition according to claim 1, characterized in that, The step of comparing and analyzing the fin deformation feature description vector with a preset standard fin structure model includes: Construct a pre-defined standard fin structure model and establish a standard reference distribution for the fin deformation feature description vectors; The overall deviation metric is calculated based on the fin deformation feature description vector and the standard deformation feature description vector. Based on the preset standard fin structure model and fin deformation feature description vector, defect type identification is performed to obtain specific defect types, including lodging deformation, bending deformation, edge tearing defects and material missing defects; Based on the overall deviation metric, a corresponding quantitative assessment is performed on the specific defect type to obtain the minor defect, medium defect and severe defect levels, and output the fault diagnosis results of automotive radiator fin defects.

10. A method for diagnosing automotive component faults based on image recognition according to claim 9, characterized in that, The classification rules for the defect types include: When the mean value of the period deviation is greater than or equal to the preset mean value threshold for lodging deformation, and the standard deviation of the period deviation is greater than or equal to the preset discrete threshold for lodging deformation, it is determined to be a lodging deformation defect. When the standard deviation of the normalized boundary curvature value is greater than or equal to the preset bending deformation discrete threshold, and the maximum value of the normalized boundary curvature value is greater than or equal to the preset bending deformation peak threshold, it is determined to be a bending deformation defect. When the maximum value of the change in the normal vector is greater than or equal to the preset tear peak threshold, or the standard deviation of the change in the normal vector is greater than or equal to the preset tear discrete threshold, it is determined to be an edge tear defect; When the mean value of the normalized boundary curvature is less than or equal to the preset material missing curvature threshold, and the mean value of the period deviation is less than or equal to the preset material missing period threshold, it is determined to be a material missing defect.