A machine learning-based automobile stamping part defect detection method

CN122928751APending Publication Date: 2026-10-16JIANGSU HSX MASCH MFG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611030348.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-11
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0003]本发明提供一种基于机器学习的汽车冲压件缺陷检测方法,以解决现有方法由于单一成像模态和单一纹理判断导致易混淆缺陷误判率高、无法适应油污和光照环境变化、换型成本高及无法兼顾尺寸偏差检测的问题

Benefits of technology

本发明通过跨模态互证鉴别机制将纹理、高度、偏振多源信息在特征层面深度融合,从根本上提升了易混淆缺陷的鉴别能力,显著降低误判和漏检;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122928751A_ABST
    Figure CN122928751A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of automobile manufacturing quality detection, and particularly relates to a kind of automobile stamping part defect detection methods based on machine learning;The method synchronously acquires multi-directional illumination texture map, polarization degree map and three-dimensional point cloud, inputs the cascade detection model composed of texture anomaly perception network, geometric deformation analysis network and cross-modal mutual authentication discrimination network;Cross-modal mutual authentication discrimination network fuses texture features, local height variance, maximum height difference, curvature sign and polarization degree mean, and outputs mutual authentication confidence that distinguishes easily confused defects;Further, combined with environmental perception, the decision threshold is dynamically adjusted, multi-frame optical flow analysis is used to exclude detachable debris false defects, small sample cross-species rapid adaptation is realized through unsupervised domain adversarial transfer learning, and process compensation is output from the rebound prediction network based on full-surface three-dimensional deviation field;The present application significantly reduces false positives and missed detections, forms a closed loop from detection to process compensation, and has high accuracy and rapid changeover capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of automotive manufacturing quality inspection technology, specifically relating to a machine learning-based method for detecting defects in automotive stamping parts. Background Technology

[0002] Automotive stamping parts, especially body panels, are prone to various defects during the production process, such as roughening, oil marks, indentations, dark cracks, wrinkles, burrs, and springback. Most existing machine learning-based visual inspection methods rely on a single two-dimensional industrial camera to acquire surface images and use convolutional neural networks for defect classification or segmentation. However, the stamping workshop environment is complex, and the surface of stamped parts often has residual oil and liquid. In addition, the workpiece itself has highly reflective and large-curvature free-form surfaces, making it difficult to accurately distinguish a large number of easily confused defects in two-dimensional images. For example, Chinese patent application CN2023110917872 discloses a defect detection system and method for automotive stamping parts. This method acquires grayscale images of the stamping parts using an overhead industrial camera, inputs them into an improved VGG network, and outputs the defect category and location. While this method has some ability to identify cracks and obvious dents, it relies entirely on two-dimensional texture information and cannot acquire physical properties such as height and polarization. In actual production lines, severe roughening and wide oil lines both appear as strip-shaped dark bands with extremely subtle differences in grayscale texture. Minor indentations and oil droplet reflections both form blurry dark spots. Dark cracks resemble the shape of curved surfaces under strong light. These easily confused features lead to a high over-detection and under-detection rate for this method, with a false alarm rate exceeding 15% under interference from oil stains and residual liquid. Furthermore, due to the lack of three-dimensional morphology data, this method cannot detect surface dimensional deviations caused by springback, nor can it distinguish between detachable debris and genuine burrs online. In addition, the stamping production line is frequently changed, and it is costly to re-collect and label a large number of defect samples for new products. The industrial reliability of existing small sample domain adaptive technology is insufficient. Consistent imaging of highly reflective freeform surfaces and reliable detection of low-contrast weak defects are still unsolved problems. In view of this, in order to overcome the above-mentioned technical problems, the present invention proposes a machine learning-based method for detecting defects in automotive stamping parts. Summary of the Invention

[0003] This invention provides a machine learning-based method for detecting defects in automotive stamping parts, which solves the problems of existing methods, such as high misjudgment rate of easily confused defects due to single imaging modality and single texture judgment, inability to adapt to changes in oil and lighting environments, high changeover costs, and inability to take into account dimensional deviation detection.

[0004] To achieve the above objectives, the present invention provides a machine learning-based method for detecting defects in automotive stamping parts, comprising: The multimodal imaging module is controlled to simultaneously acquire two-dimensional texture images and three-dimensional surface topography data of the stamped part under test as multimodal data; The collected multimodal data is input into a cascaded defect detection model, which includes a texture anomaly perception network, a geometric deformation analysis network, and a cross-modal mutual verification and identification network. The texture anomaly perception network locates abnormal regions in two-dimensional texture images and generates a texture anomaly heatmap. The geometric deformation analysis network calculates height deviation and local curvature anomalies in three-dimensional surface topography data to obtain a geometric deviation map. The cross-modal mutual verification and identification network receives texture features and three-dimensional geometric features, and through feature alignment and fusion, outputs a mutual verification confidence score to distinguish easily confused defect types. A comprehensive defect determination is performed based on texture anomaly heatmap, geometric deviation map, and mutual verification confidence level, and the detection results are output.

[0005] Preferably, the multimodal imaging module includes a two-dimensional area array camera, a polarization camera coaxially or off-axis with the two-dimensional area array camera, and at least one three-dimensional line laser profilometer. The two-dimensional area array camera, the polarization camera, and the three-dimensional line laser profilometer are synchronously acquired at the same position through a synchronization triggering unit. The two-dimensional texture image includes an intensity texture map and a polarization degree map, and the three-dimensional surface topography data is a three-dimensional point cloud.

[0006] Preferably, the multimodal imaging module further includes a multi-angle strobe light source array surrounding the lens optical axis, and the synchronous triggering unit controls the light sources at each angle to be lit in a time-division manner within one acquisition cycle, so that the two-dimensional area array camera can acquire multiple light intensity texture maps under different lighting directions; the texture anomaly perception network extracts light and shadow invariant features from the acquired multi-directional light intensity texture maps to eliminate pseudo texture anomalies caused by curved surface light and shadow under strong light.

[0007] Preferably, after feature alignment, the cross-modal mutual verification network extracts the local height variance, maximum height difference, and average curvature sign of the corresponding points in the three-dimensional point cloud for the candidate regions marked by the texture anomaly heatmap, and combines the mean polarization degree of the candidate region in the polarization degree map to generate a mutual verification confidence level that distinguishes between roughness and oil lines, indentation and oil droplets, and dark cracks and curved surface light and shadow.

[0008] Preferably, the geometric deformation analysis network performs height deviation and local curvature anomaly calculations on the three-dimensional surface topography data, including: registering the acquired three-dimensional point cloud with the CAD model of the stamping part, and calculating the deviation value of each measurement point relative to the CAD model to generate a height deviation field.

[0009] Preferably, the system further includes an environmental sensing unit that collects the light intensity at the detection station and the amount of residual oil on the surface of the stamped part in real time. The cascaded defect detection model receives the light intensity and the amount of residual oil on the surface and dynamically adjusts the anomaly judgment threshold and the weighting coefficient of the mutual verification confidence of the texture anomaly sensing network.

[0010] Preferably, after the comprehensive defect determination, a false defect elimination is performed on the candidate areas determined to be attached to the cutting edge debris: by comparing multiple frames of two-dimensional texture images of the same location area collected at different times, the displacement vector and area change of the area are obtained by using optical flow or difference. When the displacement vector exceeds the preset motion threshold or the area attenuation exceeds the attenuation threshold, it is determined to be detachable debris and is removed from the real defects.

[0011] Preferably, the texture anomaly perception network is a convolutional autoencoder based on unsupervised reconstruction, which is trained using only normal stamping sample samples and uses reconstruction error as an anomaly indicator. When the stamping sample type is changed, cross-type rapid adaptation is achieved through domain adversarial transfer learning and fine-tuning of the shallow parameters of the encoder with a small number of new normal samples, without the need to re-collect and label a large number of defect samples.

[0012] Preferably, the method further includes a springback intelligent compensation step: obtaining the deviation field between the registered three-dimensional point cloud of the full-surface of the stamped part and the CAD model, inputting the deviation field into a pre-trained springback prediction network, and outputting the compensation amount of key process parameters; the springback prediction network is a machine learning model based on graph neural network or point cloud autoencoder, and the compensation amount is used to provide feedback to adjust the stamping die clearance or blank holder force.

[0013] The beneficial effects of this invention are as follows: This invention deeply integrates multi-source information such as texture, height, and polarization at the feature level through a cross-modal mutual verification and identification mechanism, fundamentally improving the identification ability of easily confused defects and significantly reducing false positives and false negatives. This invention eliminates strong light and shadow interference from curved surfaces by combining multi-angle stroboscopic light sources with polarization imaging, which greatly improves the detection rate of weak defects such as dark cracks and necking. Environmental perception and dynamic threshold adjustment enable the detection model to remain stable and highly accurate even when the amount of oil stains changes or the ambient light fluctuates. Attached Figure Description

[0014] Figure 1 This is a schematic diagram of the overall process flow of the detection method of the present invention; Figure 2 A flowchart illustrating the process of environmental adaptation and pseudo-defect elimination; Figure 3 A flowchart illustrating the process of rapid adaptation to small samples across varieties; Figure 4 A flowchart illustrating the process of intelligent compensation for rebound. Detailed Implementation

[0015] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments; it should be understood that these embodiments are only used to explain the invention and do not constitute a limitation on the scope of protection; in the following description, the specific calculation methods and thresholds involved are based on preferred parameters verified in industrial field, but the scope of protection of the present invention is not limited thereto.

[0016] Example 1: A machine learning-based method for detecting defects in automotive stamping parts, comprising: The multimodal imaging module is controlled to simultaneously acquire two-dimensional texture images and three-dimensional surface topography data of the stamped part under test as multimodal data; The collected multimodal data is input into a cascaded defect detection model, which includes a texture anomaly perception network, a geometric deformation analysis network, and a cross-modal mutual verification and identification network. The texture anomaly perception network locates abnormal regions in two-dimensional texture images and generates a texture anomaly heatmap. The geometric deformation analysis network calculates height deviation and local curvature anomalies in three-dimensional surface topography data to obtain a geometric deviation map. The cross-modal mutual verification and identification network receives texture features and three-dimensional geometric features, and through feature alignment and fusion, outputs a mutual verification confidence score to distinguish easily confused defect types. A comprehensive defect determination is performed based on texture anomaly heatmap, geometric deviation map, and mutual verification confidence level, and the detection results are output.

[0017] like Figure 1 As shown; this embodiment illustrates how to achieve basic detection of defects in automotive stamping parts through multimodal synchronous acquisition and cascaded network models, mainly by controlling the multimodal imaging module for synchronous acquisition and the multi-task processing of the cascaded defect detection model; Specifically, controlling the multimodal imaging module to simultaneously acquire two-dimensional texture images and three-dimensional surface topography data of the stamped part under test is the foundation for subsequent accurate differentiation. The control is not a simple switching signal, but a nanosecond-level precise timing synchronization process. In existing equipment, the stamping workstation uses a conveyor belt to move the stamped part to the bottom of a gantry-type inspection frame, on which a multimodal imaging module is integrated. When the stamped part reaches the preset position, a photoelectric trigger generates a synchronization signal to the synchronization trigger unit. This unit precisely controls the timing coordination between the area array camera exposure, polarization camera acquisition, and line laser profilometer scanning to ensure that multimodal information is acquired at the same spatial position, avoiding subsequent feature mapping failure due to motion misalignment. The acquired multimodal raw data (including light intensity texture map, polarization degree map, and three-dimensional point cloud) is transmitted in real time via high-speed Ethernet to the data preprocessing unit in the industrial control computer for flat field correction, distortion correction, point cloud outlier removal, and coordinate system normalization, so that the texture image coordinates and point cloud spatial coordinates are accurately mapped. Subsequently, the collected multimodal data is input into the cascaded defect detection model. This model is not a single neural network, but a collaborative multi-task processing system, including three core software modules: a texture anomaly perception network, a geometric deformation analysis network, and a cross-modal mutual verification and identification network. This solves the problem that a single network cannot process both texture and geometric data from different sources simultaneously. The texture anomaly perception network is responsible for locating abnormal regions in the two-dimensional texture image and generating a texture anomaly heatmap M. Its principle is to use an unsupervised reconstruction autoencoder, which only learns the normal stamping part texture distribution. For any region that deviates from the normal texture pattern, the reconstruction residual will increase significantly, thus highlighting the anomaly. The geometric deformation analysis network is responsible for calculating the height deviation and local curvature anomaly of the three-dimensional surface topography data to obtain the geometric deviation map G. Its principle is to quantify the microscopic deviation between the actual shape and the ideal shape by registering the point cloud with the CAD digital model, and to identify three-dimensional defects such as depressions, bulges, and wrinkles.

[0018] The cross-modal cross-verification identification network is key to eliminating easily confused defects. It receives texture features and three-dimensional geometric features, and outputs cross-verification confidence scores to distinguish easily confused defect types through feature alignment and fusion. Two very similar defects in two-dimensional imaging (such as fuzzing and oil marks) have drastically different physical manifestations in three-dimensional height field and polarization light characteristics. The network fused these two types of information after alignment in the feature space, enabling the classifier to make reliable judgments based on multi-dimensional physical attributes, rather than guessing solely based on grayscale texture.

[0019] Finally, a comprehensive defect determination is made based on the texture anomaly heatmap M, the geometric deviation map G, and the cross-modal verification confidence level, and the detection results are output. It does not rely solely on the output of any one network, but integrates the degree of texture anomaly, the amount of three-dimensional shape deviation, and the degree of confidence of cross-modal verification to make the final defect classification and location labeling, which greatly improves the accuracy and robustness of the determination.

[0020] Example 2 This embodiment provides a detailed description of the specific structure of the multimodal imaging module in Embodiment 1 and the principle of light and shadow interference elimination; In one embodiment of the present invention, the multimodal imaging module includes a two-dimensional area array camera, a polarization camera coaxially or off-axis with the two-dimensional area array camera, and at least one three-dimensional line laser profilometer. The two-dimensional area array camera, the polarization camera, and the three-dimensional line laser profilometer are synchronously acquired at the same position through a synchronization triggering unit. The two-dimensional texture image includes an intensity texture map and a polarization degree map, and the three-dimensional surface topography data is a three-dimensional point cloud.

[0021] Hardware configuration and synchronous acquisition method of the multimodal imaging module: The multimodal imaging module includes a 5-megapixel global shutter CMOS area array camera as a two-dimensional area array camera, used to acquire high-resolution light intensity texture maps; a focal plane polarization camera coaxially mounted with the optical axis of the area array camera, used to synchronously acquire polarization maps; two blue line laser profilometers as three-dimensional line laser profilometers, symmetrically distributed on both sides of the camera, with the scanning lines perpendicular to the surface of the stamped part, used to acquire dense three-dimensional point clouds; through an FPGA-based synchronous triggering unit, the two-dimensional area array camera, polarization camera and three-dimensional line laser profilometers are synchronously triggered and acquired at the same detection position, ensuring strict spatial correspondence between the two-dimensional texture image (including light intensity texture map and polarization map) and the three-dimensional surface topography data (i.e., three-dimensional point cloud) at the hardware level; overcoming the problem of pixel-level alignment of data due to different installation positions of discrete sensors, it is the basic hardware guarantee for realizing subsequent cross-modal mutual verification.

[0022] As one embodiment of the present invention, the multimodal imaging module further includes a multi-angle stroboscopic light source array surrounding the optical axis of the lens, and the synchronous triggering unit controls the light sources at each angle to be lit in a time-division manner within one acquisition cycle, so that the two-dimensional area array camera can acquire multiple light intensity texture maps under different lighting directions; the texture anomaly perception network extracts light and shadow invariant features from the acquired multi-directional light intensity texture maps to eliminate pseudo texture anomalies caused by curved surface light and shadow under strong light.

[0023] The multimodal imaging module also includes an eight-segment LED strobe light source array (i.e., a multi-angle strobe light source array) surrounding the lens optical axis; the synchronous triggering unit controls the light sources at each angle to light up in a time-division manner within one acquisition cycle, generating illumination in eight different directions in sequence, so that the two-dimensional area array camera can acquire eight light intensity texture maps I1-I8 with different illumination directions within one part stationary cycle; this set of images contains rich surface direction information; the texture anomaly perception network receives this set of multi-directional light intensity maps at the input end, and its internal encoder learns to distinguish the light and shadow components related to the illumination direction and the material texture components unrelated to the illumination direction through an attention mechanism; for the inherent shadows generated by curved areas such as door handles and edges under a single strong light (often misjudged as dark cracks by 2D models), the network can identify that its light and shadow components will change regularly or disappear under different illumination directions, thereby excluding them from texture anomalies and focusing only on the real texture defects of the material itself; the present invention eliminates the pseudo texture anomalies caused by curved surface light and shadow under strong light through the synergy of structured light active illumination and intelligent algorithm decoding, and significantly reduces the false alarm rate of dark cracks caused by light and shadow.

[0024] Example 3 As one embodiment of the present invention, after feature alignment, the cross-modal mutual verification network extracts the local height variance, maximum height difference, and average curvature sign of the corresponding points in the three-dimensional point cloud for the candidate regions marked by the texture anomaly heatmap, and combines the mean polarization degree of the candidate region in the polarization degree map to generate a mutual verification confidence level that distinguishes between roughness and oil lines, indentation and oil droplets, and dark cracks and curved surface light and shadow.

[0025] In the candidate regions marked by the texture anomaly heatmap M, the network automatically extracts the texture feature vector of the region through ROI Align. Simultaneously, based on the pixel-to-point cloud mapping relationship of the multimodal data, it queries the corresponding spatial point set in the 3D point cloud. Subsequently, the network performs a series of quantitative geometric and optical feature calculations: extracting the local height variance. To measure surface micro-roughness, the maximum height difference Δz is extracted to determine the presence of significant depressions or protrusions. The mean curvature sign κ is calculated to determine whether the local geometry is concave (negative) or convex (positive), and this is combined with the mean polarization degree ρ calculated from the polarization degree map of the candidate region. These features are fed into a fully connected classifier to generate mutual confidence scores that distinguish between various easily confused pairs; for example: The cross-modal mutual verification network receives the intermediate layer texture feature map Ft, geometric deviation map G, and polarization degree map Ip from the texture anomaly perception network. For each high-response candidate region in the texture anomaly heatmap M, the network extracts the texture feature vector of that region through ROI Align, and simultaneously queries the corresponding spatial point set in the point cloud based on the mapping relationship, calculating its local height variance. The maximum height difference Δz and the average curvature sign κ (defined as negative for concave surfaces and positive for convex surfaces) are used to extract the average polarization value ρ of the region from the polarization map Ip; the feature alignment layer combines texture feature vectors and geometric statistical features ( The cross-modal fusion vector (Δz,κ) and polarization feature ρ are concatenated and fed into a fully connected classifier, which outputs the mutual confidence score for multiple easily confused defect types. The specific discrimination logic and the threshold calculation used are as follows: Distinguishing between roughness and oiliness: Calculating candidate regions and ρ; ; ;

[0026] ρ: The average polarization degree of the candidate region (dimensionless, ranging from 0 to 1), characterizing the degree of surface depolarization; The texture anomaly score (dimensionless) of the candidate region is obtained by averaging the residual values ​​output by the texture anomaly perception network over the region. The basic threshold for texture anomaly detection (dimensionless) is set based on the statistical distribution of normal samples. =μ+3σ; Height variance threshold, set to =0.0004mm 2 The surface roughness Ra of the point cloud in this region is approximately 0.02 mm. The first threshold for polarization is set to... = 0.25. Due to the depolarization effect, the polarization degree of exposed metal surfaces is usually greater than 0.3, while the polarization degree of oil films is usually less than 0.2.

[0027] Set height variance threshold =0.0004mm 2 (Corresponding to a surface roughness Ra of approximately 0.02 mm), polarization threshold =0.25 (due to depolarization effect, the polarization degree of metal surfaces is usually >0.3, while the polarization degree of oil films is <0.2); if the texture anomaly value is high, If the texture outlier is high, then the output will show a high-confidence roughness; if the texture outlier is high but... If so, then oil patterns will be output; Distinguishing between indentations and oil droplets: Calculate Δz and κ for candidate regions; ; ;

[0028] The maximum height difference (in mm) of the point set corresponding to the candidate region is defined as the difference between the maximum and minimum height of the point cloud within the region. A negative value indicates that the entire region is lower than the surrounding reference surface. : Mean curvature symbol of candidate region (unit: mm) -1 The average curvature obtained by fitting a local quadratic surface. <0 indicates a concave surface. >0 indicates a convex surface; Negative depth threshold, set to = -0.04mm, the depth of a micro-indentation is usually greater than 0.04mm; Curvature mutation threshold, set to = 0.01mm -1 The edge of the indentation has a sudden change in the sign of curvature. If the absolute value of curvature exceeds this threshold, it indicates that there is a significant geometric change. Set negative depth threshold = -0.04mm (micro-indentation depth is typically greater than 0.04mm), curvature abrupt change threshold =0.01mm -1;like < (i.e., the depth of the indentation exceeds 0.04 mm) and If it is, then it is judged as an indentation; if > If there is no obvious indentation and ρ < 0.2, it is judged as an oil droplet; Distinguishing between dark cracks and curved surface lighting: Calculating the texture anomaly persistence index of anomaly candidate regions under multi-directional lighting. (Defined as the proportion of cases detected as abnormal in all 8 illumination directions), 3D curvature abrupt change value ; ; ;

[0029] Texture anomaly persistence index (dimensionless, value range 0-1) is defined as the ratio of the number of lighting directions that the same candidate region is judged as abnormal by the texture anomaly perception network to the total number of lighting directions in a multi-directional illumination image. : Persistence threshold, set to = 0.75, meaning that anomalies are detected in at least 6 out of 8 lighting directions for a condition to be considered a persistent anomaly. The second threshold for polarization is set to... = 0.35; Set a continuous threshold =0.75, curvature abrupt change threshold is the same as =0.01mm -1 Polarization threshold =0.35 (crack fracture surface causes strong deflection); if ≥ 0.75 and If the abnormal area disappears under multiple lighting directions and the three-dimensional curvature is smooth, it is judged as a false alarm of light and shadow. Distinguishing wrinkling initiation from regular texture: Medium-height wavy undulations appear in the geometric deviation diagram G, and the percentage of high-frequency energy in the statistical region in a specific direction (perpendicular to the stamping direction);

[0030]

[0031] High-frequency energy distribution of the candidate region on a cross section perpendicular to the stamping direction (unit: mm) 2 (mm), calculated using a one-dimensional Fourier transform; The frequency range of wrinkling characteristics is set to... = 0.1mm -1 , = 0.5mm -1 The spatial frequency of the wrinkling initiation segment is concentrated in the range of 0.1-0.5mm. -1 Within the range; Texture anomaly score of candidate region (dimensionless); : Basic threshold for texture anomalies =μ+3σ, determined by the statistical distribution of abnormal scores in normal samples; If the energy is concentrated in the spatial frequency range of 0.1-0.5mm -1 Within the range and the texture outlier value is higher than the base threshold If the undulations are consistent with the regular distribution of the reinforcing rib structure and the texture is normal, it is judged as the initiation of wrinkles; if the undulations are consistent with the regular distribution of the reinforcing rib structure and the texture is normal, it is judged as normal texture.

[0032] The defect comprehensive judgment module receives the output results of the above four discrimination functions, integrates the texture anomaly heat map M, the geometric deviation map G, and the mutual confidence of each candidate region, performs the final defect classification and location labeling according to the preset priority rules (prioritizing the reporting of safety-related defects such as dark cracks and roughening, and then reporting appearance defects in turn), and outputs the detection results to the production line control terminal.

[0033] As one embodiment of the present invention, the geometric deformation analysis network performs height deviation and local curvature anomaly calculation on three-dimensional surface topography data, including: registering the acquired three-dimensional point cloud with the CAD model of the stamping part, calculating the deviation value of each measurement point relative to the CAD model, so as to generate a height deviation field.

[0034] The geometric deformation analysis network calculates height deviation and local curvature anomalies in three-dimensional surface topography data. Specifically, it performs ICP (Iterative Closest Point) precise registration between the acquired three-dimensional point cloud and the CAD model of the stamped part, calculating the deviation value of each measurement point relative to the CAD model to generate a height deviation field. The technical significance of this step lies in transforming the absolute coordinates of the three-dimensional measurement into design deviations with process guidance significance. The network does not look at the height of a point cloud in isolation, but rather at how many micrometers the actual shape is higher or lower than the CAD design. This provides a unified and quantifiable benchmark for judging all dimensional defects (such as springback and dents). The generated height deviation field is then interpolated and imaged, and together with the curvature deviation map, forms a geometric deviation map G, used for subsequent anomaly area marking and cross-verification.

[0035] Example 4 As one embodiment of the present invention, it further includes an environmental sensing unit that collects the light intensity of the detection station and the amount of residual oil on the surface of the stamped part in real time. The cascaded defect detection model receives the light intensity and the amount of residual oil on the surface and dynamically adjusts the anomaly judgment threshold and the weighting coefficient of the mutual verification confidence of the texture anomaly sensing network.

[0036] like Figure 2 As shown, the environmental sensing unit at the entrance of the detection station includes a light intensity sensor and an oil film infrared reflection sensor. The light intensity sensor collects the ambient light intensity E inside the dark room in real time, in lux. The oil film sensor outputs the surface residual oil index W based on the 850nm infrared light reflectance ratio method, with a range of 0-100, where W represents a dry and clean surface, and 100 represents a surface completely covered by a thick oil film. These environmental parameters are sent to the environmental adaptive module via a serial port. The environment adaptation module incorporates an environment-threshold mapping model calibrated through orthogonal experiments. This model uses piecewise linear functions to dynamically calculate the binarized threshold adjustment coefficient α and the mutual confidence weighting coefficient β of the texture anomaly heatmap. When 0 ≤ W < 30, α = 1.0, β = 1.0; When 30≤W<70, α=1.0+0.006×(W-30), β=1.0+0.003×(70-W); When W≥70, α=1.24, β=0.88; In practical applications, the binarization threshold of the texture anomaly heatmap M is adjusted to T = α × The weighting coefficient β of the mutual verification confidence is used to adjust the weight of the geometric / polarization feature confidence during comprehensive judgment. Specifically, the final mutual verification score is: (1-β)×texture confidence + β×(0.6×geometric confidence + 0.4×polarization confidence). When oil stains increase, α is increased to suppress false alarms of oil ripples, and β is decreased to avoid over-reliance on height and polarization signals that may be affected by oil film. The ambient light intensity E is used for closed-loop control of the light source brightness to stabilize the average gray level of the image within the range of 128±10.

[0037] As one embodiment of the present invention, after the comprehensive defect determination, a false defect elimination is performed on the candidate area determined to be attached to the edge debris: by comparing multiple frames of two-dimensional texture images of the same location area collected at different times, the displacement vector and area change of the area are obtained by optical flow or difference. When the displacement vector exceeds the preset motion threshold or the area attenuation exceeds the attenuation threshold, it is determined to be detachable debris and is removed from the real defects.

[0038] For candidate areas marked as suspected burrs by the texture anomaly perception network, this embodiment enables the pseudo-defect elimination unit; the multimodal imaging module continuously acquires three frames of light intensity texture map at 50ms intervals during the current part's static period and stores them in a circular buffer; for each candidate area, the pseudo-defect elimination unit uses the Lucas-Kanade sparse optical flow method to calculate the motion vector of the Shi-Tomasi corner point in the area. Calculation of average motion vector amplitude; assuming N valid corner points are detected in the candidate region, the motion vector of the i-th corner point is... Its motion vector amplitude is: The average motion vector magnitude of all corner points is:

[0039] Calculation of area change rate The Otsu thresholding method is used to calculate the binary mask area of ​​candidate regions in three consecutive frames of images. Let the binary mask area of ​​the candidate region in frame t be . (Unit: pixels) 2 The maximum area among the three frames is The minimum value is The average value is The area change rate is defined as:

[0040] in:

[0041]

[0042]

[0043] False defect detection function Set motion threshold =1.5 pixels, area attenuation threshold =10%; the pseudo-defect discrimination function is: For detachable debris (removal):

[0044] Regarding burr defects (retained):

[0045] : The displacement components of the i-th corner point in the x and y directions between two adjacent frames (unit: pixels); : Motion vector amplitude of the i-th corner point (unit: pixels); N: The total number of valid corner points extracted by the Shi-Tomasi algorithm within the candidate region; The average motion vector magnitude (in pixels) of all corner points within the candidate region, reflecting the overall degree of movement in that region; Area change rate (dimensionless) reflects the degree of area fluctuation of the candidate region across three frames; Motion threshold, set to 1.5 pixels. A value less than this indicates that the target is stationary and is a permanent defect that cannot be removed. Area decay threshold, set to 10%. When the area decay exceeds this percentage, it indicates that the target is shrinking or falling off. After comprehensive defect assessment, a specific process is performed to eliminate false defects in candidate areas identified as edge debris or burrs. Edge debris consists of tiny metal particles adhering to the edge of a part; its two-dimensional image features are very similar to burrs (permanently exposed metal), but the debris may detach in subsequent processes, thus constituting a false defect. This embodiment utilizes the characteristic of detached material shifting within a short, continuous period for identification: the multimodal imaging module continuously acquires three frames of light intensity texture images at 50ms intervals while the part is stationary; the false defect elimination unit uses the optical flow method (Lucas- The Kanade sparse optical flow method calculates the motion vector of the corner points within the region and the rate of change of the area of ​​the region. Its discrimination logic is as follows: if the displacement vector exceeds the preset motion threshold (e.g., 1.5 pixels) or the area attenuation exceeds the attenuation threshold (e.g., 10%), the target is determined to be detachable debris and removed from the list of real defects; if there is no obvious displacement and deformation, it is determined to be a static burr defect and is retained. Through this time-series analysis method, false alarms caused by debris adhesion are effectively eliminated, further reducing the overkill rate of the entire detection system.

[0046] Example 5 As one embodiment of the present invention, it further includes a springback intelligent compensation step: obtaining the deviation field between the registered three-dimensional point cloud of the full surface of the stamped part and the CAD model, inputting the deviation field into a pre-trained springback prediction network, and outputting the compensation amount of key process parameters; the springback prediction network is a machine learning model based on graph neural network or point cloud autoencoder, and the compensation amount is used to feed back and adjust the stamping die clearance or blank holder force.

[0047] like Figure 4As shown, a springback intelligent compensation step is introduced; springback is the elastic recovery of a stamped part after demolding, causing the part shape to systematically deviate from the design dimensions. Traditional methods can only detect this after the fact through inspection tools and cannot compensate online in real time; the method of this invention first obtains the full-surface deviation field: based on the height deviation field, the same point cloud is generated and registered with the CAD digital model. A high-precision robot equipped with a three-dimensional line laser profilometer is used to scan the full surface of the part, obtain millions of point clouds and register them, and obtain the full-surface three-dimensional deviation field that records the three-dimensional deviation vector of each point; For stamped parts requiring strict control of surface dimensions, this method adds a springback intelligent compensation unit after the inspection station. The springback intelligent compensation unit uses a high-precision multi-axis robot to drive a three-dimensional line laser profilometer to scan the entire surface of the stamped part, acquire millions of point cloud data, and perform ICP registration with the CAD model to obtain the three-dimensional deviation field ΔX of the entire surface, that is, the position deviation vector corresponding to each measurement point. Thus, the local height deviation field is expanded into the three-dimensional deviation field of the entire surface. The height abnormality area in the geometric deviation diagram G can be used to quickly locate the springback deviation position. The springback prediction network employs a graph neural network model based on dynamic graph convolution. First, the deviation field ΔX is adaptively downsampled to obtain N=1024 key control points. These points are used as graph nodes, with the node feature vector representing the node's 3D coordinates, deviation vector components (Δx, Δy, Δz), material yield strength, and sheet thickness. K-nearest neighbors (k=20) are used to connect edges based on the spatial distance between nodes. The network consists of three EdgeConv layers and one global max-pooling layer. Finally, a fully connected layer outputs the process parameter compensation, including the die clearance adjustment value (in mm) and the blank holder force adjustment percentage (range -10% to +10%). The network's training data comes from historical batch production records: the average bias field for each batch. The corresponding actual compensation amount (the value after manual adjustment and verification) is used as the supervision signal; the loss function adopts the mean square error (MSE); after training, when the online detection finds that the average deviation field of a batch of parts shows a system springback trend (for example, the average deviation of key points exceeds 0.15mm), the deviation field is input into the springback prediction network to directly calculate the recommended compensation amount, and send it to the stamping machine PLC through the OPC UA protocol to realize real-time compensation for the next stamping; after compensation, the deviation field of the next detection is collected and used to update the network parameters online, forming a self-learning closed loop.

[0048] Example 6 As one embodiment of the present invention, the texture anomaly perception network is a convolutional autoencoder based on unsupervised reconstruction, which is trained only using normal stamping sample and uses reconstruction error as an anomaly indicator; when the stamping sample type is changed, cross-type rapid adaptation is achieved through domain adversarial transfer learning and fine-tuning of the shallow parameters of the encoder with a small number of new normal samples, without the need to re-collect and label a large number of defect samples.

[0049] In this embodiment, the texture anomaly perception network is limited to a convolutional autoencoder based on unsupervised reconstruction (such as the U-Net architecture). Its core training strategy is to train using only normal stamped part samples and use reconstruction error as an anomaly indicator. This is because defect samples are diverse, varied, and difficult to exhaust, while normal samples are easy to obtain in large quantities. The network learns how to reconstruct normal textures. For unseen defect textures, its reconstruction results will deviate from the input, thus generating a high anomaly score. More importantly, this embodiment solves the adaptation problem caused by frequent production line changes: when the stamping part type changes, traditional supervised learning requires the re-collection and manual annotation of a massive number of new part defect samples, which is time-consuming and extremely costly. This invention adopts a combination of domain adversarial transfer learning and parameter fine-tuning. First, the autoencoder is pre-trained using a massive number of normal samples from more than ten historical models, enabling it to learn the underlying texture representation common to stamping parts. When a new part is introduced, only about 20 normal samples need to be collected. After loading the pre-trained model, a domain discriminator is connected after the encoder to form an adversarial network. Through gradient inversion layer training, the encoder is forced to extract domain-invariant features that cannot distinguish between old and new models. At the same time, the decoder uses only a small number of new samples for light fine-tuning (about 500 iterations), enabling the reconstructed output to quickly adapt to the specific texture pattern of the new part. Finally, the abnormal score distribution of the normal samples of the new model is re-statistically analyzed, and the base threshold T_base_new is updated. The entire process requires no defect samples and takes no more than 5 minutes, thus achieving rapid adaptation of the detection model to new models and reaching detection accuracy comparable to mature models. This greatly reduces the threshold and labor costs of data preparation during model changeover, and is an important part of the industrial application of this invention.

[0050] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A machine learning-based method for detecting defects in automotive stamping parts, characterized in that, include: The multimodal imaging module is controlled to simultaneously acquire two-dimensional texture images and three-dimensional surface topography data of the stamped part under test as multimodal data; The collected multimodal data is input into a cascaded defect detection model, which includes a texture anomaly perception network, a geometric deformation analysis network, and a cross-modal mutual verification and identification network. The texture anomaly perception network locates abnormal regions in two-dimensional texture images and generates a texture anomaly heatmap. The geometric deformation analysis network calculates height deviation and local curvature anomalies in three-dimensional surface topography data to obtain a geometric deviation map. The cross-modal mutual verification and identification network receives texture features and three-dimensional geometric features, and through feature alignment and fusion, outputs a mutual verification confidence score to distinguish easily confused defect types. A comprehensive defect determination is performed based on texture anomaly heatmap, geometric deviation map, and mutual verification confidence level, and the detection results are output.

2. The method for detecting defects in automotive stamping parts based on machine learning according to claim 1, characterized in that, The multimodal imaging module includes a two-dimensional area array camera, a polarization camera coaxially or off-axis with the two-dimensional area array camera, and at least one three-dimensional line laser profilometer. The two-dimensional area array camera, polarization camera, and three-dimensional line laser profilometer are synchronously acquired at the same position through a synchronization triggering unit. The two-dimensional texture image includes an intensity texture map and a polarization degree map, and the three-dimensional surface topography data is a three-dimensional point cloud.

3. The method for detecting defects in automotive stamping parts based on machine learning according to claim 2, characterized in that, The multimodal imaging module also includes a multi-angle strobe light source array surrounding the lens optical axis. The synchronous triggering unit controls the light sources at each angle to be lit in a time-division manner within one acquisition cycle, so that the two-dimensional area array camera can acquire multiple light intensity texture maps under different lighting directions. The texture anomaly perception network extracts light and shadow invariant features from the acquired multi-directional light intensity texture maps to eliminate pseudo texture anomalies caused by curved surface light and shadow under strong light.

4. The method for detecting defects in automotive stamping parts based on machine learning according to claim 2, characterized in that, After feature alignment, the cross-modal mutual verification network extracts the local height variance, maximum height difference, and average curvature sign of the corresponding points in the 3D point cloud for the candidate regions marked by the texture anomaly heatmap. Combined with the mean polarization degree of the candidate region in the polarization degree map, it generates mutual verification confidence to distinguish between roughness and oil lines, indentations and oil drops, and dark cracks and curved surface light and shadow.

5. The method for detecting defects in automotive stamping parts based on machine learning according to claim 4, characterized in that, The geometric deformation analysis network performs height deviation and local curvature anomaly calculations on the three-dimensional surface topography data, including: registering the acquired three-dimensional point cloud with the CAD model of the stamping part, calculating the deviation value of each measurement point relative to the CAD model, and generating a height deviation field.

6. The method for detecting defects in automotive stamping parts based on machine learning according to claim 1, characterized in that, It also includes an environmental sensing unit that collects the light intensity of the detection station and the amount of residual oil on the surface of the stamped parts in real time. The cascaded defect detection model receives the light intensity and the amount of residual oil on the surface and dynamically adjusts the anomaly judgment threshold and the weighting coefficient of the mutual verification confidence of the texture anomaly sensing network.

7. The method for detecting defects in automotive stamping parts based on machine learning according to claim 1, characterized in that, After the comprehensive defect determination, the candidate areas identified as having attached edge debris are also subject to false defect elimination: by comparing multiple frames of two-dimensional texture images of the same location area collected at different times, the displacement vector and area change of the area are obtained by using optical flow or difference. When the displacement vector exceeds the preset motion threshold or the area attenuation exceeds the attenuation threshold, it is determined to be detachable debris and is removed from the real defects.

8. The method for detecting defects in automotive stamping parts based on machine learning according to claim 1, characterized in that, The texture anomaly perception network is a convolutional autoencoder based on unsupervised reconstruction. It is trained using only normal stamping sample samples and uses reconstruction error as an anomaly indicator. When the stamping sample type is changed, it can quickly adapt across different types by using domain adversarial transfer learning and fine-tuning the shallow parameters of the encoder with a small number of normal samples of new types, without having to re-collect and label a large number of defect samples.

9. The method for detecting defects in automotive stamping parts based on machine learning according to claim 5, characterized in that, It also includes a springback intelligent compensation step: obtaining the deviation field between the registered three-dimensional point cloud of the full profile of the stamped part and the CAD model, inputting the deviation field into a pre-trained springback prediction network, and outputting the compensation amount of key process parameters; the springback prediction network is a machine learning model based on graph neural network or point cloud autoencoder, and the compensation amount is used to adjust the stamping die clearance or blank holder force.