Vehicle paint coating quality on-line detection and traceability method and system

By simultaneously acquiring data from a linear array camera and a spectral imager, and fusing features from a cross-modal deep convolutional neural network, the subjectivity and lack of traceability inherent in traditional manual inspection are resolved. This enables efficient and accurate detection and traceability of vehicle paint coating quality, thereby optimizing the production process.

CN122089647APending Publication Date: 2026-05-26JAINGXI ISUZU AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610007733.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-06
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Traditional manual inspection of automotive paint coating quality suffers from high subjectivity, low efficiency, and lack of traceability. Existing machine vision and spectral analysis systems still have shortcomings in identifying and tracing the root causes of complex coating defects.

Method used

Spatial domain images and spectral data of the vehicle paint coating are acquired simultaneously by a linear array camera and a spectral imager. Feature fusion is performed using a cross-modal deep convolutional neural network to generate a comprehensive feature vector. Combined with a pre-trained defect identification model and a process node feature library, defect identification and source tracing are achieved.

Benefits of technology

It improves detection accuracy and efficiency, can identify complex defects, quickly locate potential process steps that cause defects, reduce blind rework and production interruptions, and lower production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122089647A_ABST
    Figure CN122089647A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle paint coating quality detection and traceability method and system. The method comprises the following steps: acquiring a vehicle paint coating spatial domain image of a vehicle body and spectral data of a corresponding region; performing denoising and illumination correction processing on the spatial domain image, performing dark current correction and normalization processing on the spectral data, and performing alignment to obtain alignment data; according to the alignment data, using a cross-modal deep convolutional neural network to extract image spatial features and spectral features, and fusing to generate a comprehensive feature vector; inputting the comprehensive feature vector into a defect identification model, and outputting a defect category, position information and a defect grade; according to the defect area, extracting features in the spectral data to form a spectral fingerprint; performing query matching based on the spectrum fingerprints, and judging potential process nodes causing defects; and generating a detection report containing defect information and a traceability result. According to the invention, high-precision detection, intelligent process traceability and closed-loop optimization of vehicle paint coating defects are realized, and the quality and efficiency are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle manufacturing technology, specifically to a method and system for online detection and traceability of vehicle paint coating quality. Background Technology

[0002] The automotive painting process is one of the most critical steps in vehicle manufacturing, directly determining the vehicle's appearance quality and durability. As consumers' demands for automotive exterior quality continue to rise, paint defects (such as orange peel, color difference, graininess, runs, and pinholes) have become significant factors affecting brand image and customer satisfaction. Traditional manual inspection methods suffer from the following common problems: Highly subjective: It relies on the quality inspector's experience and visual judgment, resulting in unstable results.

[0003] Low efficiency: The speed of manual inspection is difficult to match the pace of modern production lines.

[0004] Untraceable: The cause of the defect is difficult to link to a specific process step, resulting in a high rework rate.

[0005] In recent years, machine vision and artificial intelligence technologies have been increasingly applied to automotive coating quality inspection. For example, high-resolution industrial cameras and deep learning algorithms are used for surface defect identification, and some factories have already achieved automated inspection. Meanwhile, spectral analysis technology is also being used for material characterization and color consistency inspection, providing more accurate optical feature information than the human eye.

[0006] However, most existing systems rely solely on visual images or spectral data, which are still insufficient for identifying and tracing the root causes of defects in complex coatings. Summary of the Invention

[0007] In view of the shortcomings of the prior art, the purpose of this invention is to provide an online detection and traceability method and system for automotive paint coating quality, which aims to solve the above-mentioned problems described in the prior art.

[0008] The first aspect of this invention is to provide a method for quality inspection and traceability of automotive paint coatings, the method comprising: Using a linear array camera and a spectral imager, under time synchronization control, spatial domain images of the vehicle body paint coating and spectral data of the corresponding area are simultaneously acquired at the vehicle production line inspection station. The spatial domain image is subjected to denoising and illumination correction processing, while the spectral data is subjected to dark current correction and normalization processing. The processed image data and spectral data are then aligned pixel by pixel through spatial registration to obtain aligned data. Based on the alignment data, image spatial features and spectral features are extracted using a cross-modal deep convolutional neural network, and the image spatial features and spectral features are fused to generate a comprehensive feature vector; The comprehensive feature vector is input into a pre-trained defect recognition model, which outputs the defect category, location information, and defect level of the paint coating. Based on the identified defect areas of the vehicle paint coating, features in the spectral data are extracted to form a spectral fingerprint characterizing the cause of the defects; The spectral fingerprint is queried and matched in a pre-built process node feature library, and the potential process nodes causing defects are identified based on the matching results. A detection report containing defect information and traceability results is generated and fed back to the production execution system or spraying equipment to adjust the spraying process parameters based on the traceability results.

[0009] According to one aspect of the above technical solution, the step of extracting image spatial features and spectral features from the alignment data using a cross-modal deep convolutional neural network, and fusing the image spatial features and the spectral features to generate a comprehensive feature vector for defect identification includes: The pixel-aligned spatial domain image from the aligned data is input into the first convolutional branch of the cross-modal deep convolutional neural network to extract multi-scale image spatial features characterizing surface morphology and texture; simultaneously, the pixel-aligned spectral data from the aligned data is input into the second convolutional branch of the cross-modal deep convolutional neural network to extract spectral sequence features characterizing material composition and coating state. The extracted multi-scale image spatial features and spectral sequence features are input into the feature interaction module. The correlation weight between the multi-scale image spatial features and spectral sequence features is calculated through a cross-attention mechanism, and weighted and information fused to generate enhanced cross-modal features. The enhanced cross-modal features are then subjected to dimensionality reduction and compression through a global average pooling layer to output a comprehensive feature vector of fixed dimensions.

[0010] According to one aspect of the above technical solution, the step of inputting the extracted multi-scale image spatial features and the spectral sequence features into a feature interaction module, calculating the correlation weights between the multi-scale image spatial features and the spectral sequence features through a cross-attention mechanism, and performing weighted summation and information fusion to generate enhanced cross-modal features includes: Using the spectral sequence features as the query vector and the multi-scale image spatial features as the key vector and value vector, the attention weight matrix of each spectral feature point to the image spatial features is calculated through a scaling dot product attention mechanism. The attention weight matrix is ​​used to perform a weighted summation of the multi-scale image spatial features to generate an enhanced image feature representation guided by spectral information. The enhanced image feature representation is residually concatenated with the original multi-scale image spatial features, and then the final enhanced cross-modal features are output after convolution operation.

[0011] According to one aspect of the above technical solution, the step of calculating the attention weight matrix of each spectral feature point to the image spatial features through a scaling dot product attention mechanism, using the spectral sequence features as the query vector and the multi-scale image spatial features as the key vector and value vector, includes: The spectral sequence features are linearly projected through a learnable weight matrix to generate a query vector; simultaneously, the multi-scale image spatial features are linearly projected through two different learnable weight matrices to generate key vectors and value vectors, so that the query vector, key vector, and value vector are aligned in the feature dimension. Calculate the dot product of the query vector and the key vector to obtain an initial relevance score matrix, and then scale the initial relevance score matrix by dividing it by the square root of the key vector dimension to obtain a scaled relevance score matrix. The Softmax function is applied to each row of the scaled relevance score matrix to normalize it so that the sum of all elements in each row is 1, thereby generating the attention weight matrix. Each element in the attention weight matrix represents the degree of attention a spectral feature point pays to an image spatial feature point.

[0012] According to one aspect of the above technical solution, the step of extracting features from the spectral data to form a spectral fingerprint characterizing the cause of the defect based on the identified defect area of ​​the vehicle paint coating includes: Based on the location information of the defect area, a local spectral data block corresponding to the defect area is located and extracted from the pixel-aligned spectral data. The local spectral data block is preprocessed, and the feature parameters of the local spectral data block under different preset feature bands are calculated to form an initial high-dimensional feature set. The initial high-dimensional feature set is subjected to dimensionality reduction, normalization, and encoding to generate a unique spectral fingerprint for feature matching in the process node feature library.

[0013] According to one aspect of the above technical solution, the initial high-dimensional feature set is subjected to dimensionality reduction, normalization, and encoding to generate a unique spectral fingerprint for feature matching in the process node feature library. This step includes: Principal component analysis is used to reduce the dimensionality of the initial high-dimensional feature set, and the first N principal component features are extracted to form a low-dimensional feature vector. The cumulative contribution rate of the first N principal component features exceeds a preset threshold. The feature vectors obtained from the low dimension are standardized by Z-score to make them conform to a standard normal distribution with a mean of 0 and a standard deviation of 1. The standardized feature vectors are quantized into a fixed-length binary sequence to obtain the spectral fingerprint.

[0014] A second aspect of the present invention is to provide a vehicle paint coating quality inspection and traceability system, applied to the method described in the above-mentioned technical solution, the system comprising: The data acquisition module, through a line scan camera and a spectral imager, synchronously acquires spatial domain images of the vehicle body's paint coating and corresponding spectral data at the vehicle production line inspection station under time synchronization control. The data alignment module is used to perform denoising and illumination correction processing on the spatial domain image, and to perform dark current correction and normalization processing on the spectral data. The processed image data and spectral data are then aligned pixel by pixel through spatial registration to obtain aligned data. The feature fusion module is used to extract image spatial features and spectral features from the alignment data using a cross-modal deep convolutional neural network, and to fuse the image spatial features and the spectral features to generate a comprehensive feature vector; The defect identification module is used to input the comprehensive feature vector into the pre-trained defect identification model and output the defect category, location information and defect level of the paint coating. The defect characterization module is used to extract features from the spectral data based on the defect areas identified in the paint coating to form a spectral fingerprint characterizing the cause of the defect. The process matching module is used to query and match the spectral fingerprint in a pre-built process node feature library, and determine the potential process nodes that cause defects based on the matching results. The traceability output module is used to generate an inspection report containing defect information and traceability results, and feed it back to the production execution system or spraying equipment to adjust the spraying process parameters based on the traceability results.

[0015] According to one aspect of the above technical solution, the feature fusion module is specifically used for: The pixel-aligned spatial domain image from the aligned data is input into the first convolutional branch of the cross-modal deep convolutional neural network to extract multi-scale image spatial features characterizing surface morphology and texture; simultaneously, the pixel-aligned spectral data from the aligned data is input into the second convolutional branch of the cross-modal deep convolutional neural network to extract spectral sequence features characterizing material composition and coating state. The extracted multi-scale image spatial features and spectral sequence features are input into the feature interaction module. The correlation weight between the multi-scale image spatial features and spectral sequence features is calculated through a cross-attention mechanism, and weighted and information fused to generate enhanced cross-modal features. The enhanced cross-modal features are then subjected to dimensionality reduction and compression through a global average pooling layer to output a comprehensive feature vector of fixed dimensions.

[0016] A third aspect of the present invention is to provide a readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method described in the above-described technical solution.

[0017] A fourth aspect of the present invention is to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method described in the above technical solutions.

[0018] In summary, this invention integrates machine vision and spectral analysis technologies to construct a complete quality control system, from precise detection to intelligent traceability and closed-loop optimization. Firstly, it achieves a significant breakthrough in detection accuracy and efficiency. Through synchronous acquisition and data registration using a linear array camera and a spectral imager, it ensures a precise correspondence between spatial morphology and material optical information. Furthermore, by combining a cross-modal deep convolutional neural network for deep fusion and intelligent analysis of image and spectral features, the system can simultaneously capture macroscopic morphological defects and microscopic compositional anomalies. This significantly improves the recognition rate and accuracy of complex defects that are difficult to detect using traditional single detection methods. Simultaneously, the fully automated online detection process greatly enhances detection efficiency, perfectly matching the pace of modern high-speed production. Secondly, by extracting the unique spectral fingerprint of the defect area and intelligently matching it with a pre-built process node feature library, it can quickly and accurately locate the potential process steps leading to the defect, moving the quality control checkpoint forward, greatly reducing blind rework and production interruptions, and effectively lowering production costs and material losses. Ultimately, by forming an efficient closed-loop optimization mechanism, the detection and traceability results can be directly fed back to the manufacturing execution system or spraying equipment in real time, providing direct data support for adjusting spraying parameters and optimizing production processes. Attached Figure Description

[0019] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 A schematic flowchart illustrating the online detection and traceability method for vehicle paint coating quality provided in this embodiment of the invention; Figure 2 The structural block diagram of the online detection and traceability system for vehicle paint coating quality provided in the embodiments of the present invention is shown. Detailed Implementation

[0020] To make the objectives, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Several embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that the disclosure of the present invention will be more thorough and complete.

[0021] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.

[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0023] Example 1 Please see Figure 1 The first embodiment of the present invention provides a method for quality inspection and traceability of automotive paint coatings, the method comprising: Step S10: Using a linear array camera and a spectral imager, under time synchronization control, the spatial domain image of the vehicle paint coating and the spectral data of the corresponding area are synchronously acquired at the inspection station of the vehicle production line.

[0024] In this embodiment, a linear array camera and a spectral imager are used for synchronous acquisition under time synchronization control. The linear array camera continuously scans during the vehicle's movement to efficiently acquire high-resolution spatial domain images, which reflect surface morphology, texture, and macroscopic defects. Meanwhile, the spectral imager synchronously captures the reflectance of each pixel at different wavelengths to form spectral data, which reflects the optical characteristics of the material's chemical composition, coating thickness, and microstructure. This ensures that the spatial appearance information and material optical information of the same vehicle location can be accurately matched.

[0025] Step S20: Denoising and illumination correction are performed on the spatial domain image, while dark current correction and normalization are performed on the spectral data. The processed image data and spectral data are then aligned pixel by pixel through spatial registration to obtain aligned data.

[0026] It should be noted that the raw data will contain noise (such as camera noise and environmental interference), uneven illumination, and spatial offset between different sensors. In this embodiment, denoising and illumination correction of the spatial domain image can eliminate the influence of environmental factors and highlight the true surface features. Dark current correction and normalization of the spectral data can eliminate the errors of the sensor itself and standardize the data, ensuring the accuracy of spectral features. The most critical aspects are spatial registration and pixel alignment. Through algorithms, image data and spectral data from different devices are precisely aligned at the pixel level to generate aligned data.

[0027] Step S30: Based on the alignment data, extract the image spatial features and spectral features from it using a cross-modal deep convolutional neural network, and fuse the image spatial features and the spectral features to generate a comprehensive feature vector.

[0028] In this embodiment, generating a comprehensive feature vector is not simply a matter of processing two types of data side-by-side. Instead, a cross-modal deep convolutional neural network is used to extract image spatial features (such as edges, textures, and undulating morphology) and spectral features (such as reflection intensity and absorption peak features in specific bands) from the aligned data, and then these features are deeply fused. This fusion produces a comprehensive feature vector that simultaneously contains information on macroscopic morphological anomalies and microscopic composition / state changes. This allows for the identification of complex defects that are difficult to detect with a single modality, such as color differences that are difficult to detect with the naked eye due to slight unevenness in coating, or uneven thickness of transparent coatings.

[0029] Step S40: Input the comprehensive feature vector into the pre-trained defect recognition model and output the defect category, location information and defect level of the paint coating.

[0030] In this embodiment, the comprehensive feature vector is input into the pre-trained defect recognition model, such as into the pre-trained deep learning classification model. The model will output specific defect information, including defect category such as orange peel, particles, and drips, location information (specific coordinates on the vehicle body), and defect level (such as minor, moderate, and severe).

[0031] Step S50: Based on the identified defect areas of the vehicle paint coating, extract features from the spectral data to form a spectral fingerprint characterizing the cause of the defect.

[0032] In this embodiment, it should be noted that the analysis does not end after the defect is identified. Instead, the focus remains on the defect area, extracting a spectral fingerprint from its spectral data to characterize the cause of the defect. A spectral fingerprint is unique and identifiable. Different process issues, such as nozzle clogging, batch variations in coatings, and environmental contaminants, can cause subtle but distinguishable pattern changes in the optical response, i.e., the spectral curve, of the coating. By extracting a spectral fingerprint characterizing the cause of the defect, evidence is provided for tracing the root cause of the defect.

[0033] Step S60: The spectral fingerprint is queried and matched in a pre-built process node feature library, and the potential process nodes causing defects are determined based on the matching results.

[0034] In this embodiment, the extracted defect spectral fingerprint is compared and queried with a pre-built process node feature library. This feature library stores the standard spectral fingerprints corresponding to each process step (such as different spraying robots, different paint batches, and different cleanliness levels) under normal and abnormal conditions. Through query matching, it is possible to intelligently determine which potential process node the current defect is most likely to originate from. For example, it can be determined that the color difference is caused by the aging of the nozzles at spraying station number three.

[0035] Step S70: Generate an inspection report containing defect information and traceability results, and feed it back to the production execution system or spraying equipment to adjust the spraying process parameters based on the traceability results.

[0036] It should be noted that steps S10-S60 above realize a closed loop from detection and analysis to production control. This step will generate a detection report containing all defect information and source tracing conclusions, and feed it back to the Production Execution System (MES system) or directly to the spraying equipment. This allows production line managers to make decisions based on the report, and the system can even directly adjust the spraying process parameters, such as dynamically adjusting the spraying pressure and flow rate, thereby eliminating problems from the source of spraying and achieving continuous optimization and precise control of production quality.

[0037] In summary, this embodiment integrates machine vision and spectral analysis technologies to construct a complete quality control system, from precise detection to intelligent traceability and closed-loop optimization. Firstly, it achieves a significant breakthrough in detection accuracy and efficiency. Synchronous acquisition and data registration via a linear array camera and a spectral imager ensures precise correspondence between spatial morphology and material optical information. Furthermore, the system utilizes a cross-modal deep convolutional neural network for deep fusion and intelligent analysis of image and spectral features, enabling it to simultaneously capture macroscopic morphological defects and microscopic compositional anomalies. This significantly improves the recognition rate and accuracy of complex defects that are difficult to detect using traditional single-detection methods. Simultaneously, the fully automated online detection process greatly enhances detection efficiency, perfectly matching the pace of modern high-speed production. Secondly, by extracting the unique spectral fingerprint of the defect area and intelligently matching it with a pre-built process node feature library, it can quickly and accurately locate potential process steps leading to defects, moving the quality control checkpoint forward. This greatly reduces blind rework and production interruptions, effectively lowering production costs and material losses. Ultimately, by forming an efficient closed-loop optimization mechanism, the detection and traceability results can be directly fed back to the manufacturing execution system or spraying equipment in real time, providing direct data support for adjusting spraying parameters and optimizing production processes.

[0038] Example 2 The second embodiment of the present invention also provides a method for quality inspection and traceability of vehicle paint coating. The method shown in this embodiment is basically similar to the method shown in the first embodiment, except that: In this embodiment, the step of extracting image spatial features and spectral features from the alignment data using a cross-modal deep convolutional neural network, and fusing the image spatial features and spectral features to generate a comprehensive feature vector for defect identification includes: The pixel-aligned spatial domain image from the aligned data is input into the first convolutional branch of the cross-modal deep convolutional neural network to extract multi-scale image spatial features characterizing surface morphology and texture; simultaneously, the pixel-aligned spectral data from the aligned data is input into the second convolutional branch of the cross-modal deep convolutional neural network to extract spectral sequence features characterizing material composition and coating state. The extracted multi-scale image spatial features and spectral sequence features are input into the feature interaction module. The correlation weight between the multi-scale image spatial features and spectral sequence features is calculated through a cross-attention mechanism, and weighted and information fused to generate enhanced cross-modal features. The enhanced cross-modal features are then subjected to dimensionality reduction and compression through a global average pooling layer to output a comprehensive feature vector of fixed dimensions.

[0039] Specifically, in this embodiment, two independent convolutional branches of a cross-modal deep convolutional neural network are used to process two types of data respectively. The first convolutional branch is dedicated to processing spatial domain images, extracting multi-scale image spatial features from local to global through convolution operations, thereby capturing complete information from fine textures to macroscopic morphology. The second convolutional branch is dedicated to processing spectral data, treating it as a sequential signal, extracting spectral sequence features to capture optical patterns related to material composition and molecular structure.

[0040] The extracted two types of features are then fed into the feature interaction module, employing a cross-attention mechanism. By calculating the correlation weight between image features and spectral features, this weight represents which parts of the image features are most relevant to a given spectral feature point. Then, based on this weight, the features are weighted and fused to generate enhanced cross-modal features. This allows the model to focus on the cross-modal information combination most relevant to the defect.

[0041] The feature dimensions after interactive fusion can be very high and contain spatial information. Global average pooling layers are used to reduce and compress these dimensions, reducing each feature map to a single numerical value, resulting in a fixed-dimensional composite feature vector. This not only reduces subsequent computation and avoids overfitting, but also makes the feature vector insensitive to the spatial location of the feature maps, improving the model's robustness and making it easier to input into standard classifiers for defect identification.

[0042] In this embodiment, the steps of inputting the extracted multi-scale image spatial features and the spectral sequence features into the feature interaction module, calculating the correlation weights between the multi-scale image spatial features and the spectral sequence features through a cross-attention mechanism, and performing weighted summation and information fusion to generate enhanced cross-modal features include: Using the spectral sequence features as the query vector and the multi-scale image spatial features as the key vector and value vector, the attention weight matrix of each spectral feature point to the image spatial features is calculated through a scaling dot product attention mechanism. The attention weight matrix is ​​used to perform a weighted summation of the multi-scale image spatial features to generate an enhanced image feature representation guided by spectral information. The enhanced image feature representation is residually concatenated with the original multi-scale image spatial features, and then the final enhanced cross-modal features are output after convolution operation.

[0043] Specifically, in this embodiment, spectral sequence features are used as the query vector, and image spatial features are used as the key and value vectors. Furthermore, a scaled dot product attention mechanism is used to calculate the degree of attention each spectral feature point receives from all image spatial feature points, forming an attention weight matrix to quantify the nonlinear correlation between cross-modal features.

[0044] Then, using the attention weight matrix calculated in the previous step, the multi-scale image spatial features are weighted and summed. Image feature regions with high weights are emphasized, while regions with low weights are suppressed. The result is an enhanced image feature representation guided by spectral information.

[0045] Finally, to ensure that the fusion process does not lose potentially important basic information from the original image (such as obvious scratches and dents), this embodiment adds the enhanced image feature representation to the original multi-scale image spatial features. This allows the model to learn both spectrally guided enhancement information and retain the original morphological details. Finally, a convolutional layer is applied for fine-tuning, outputting complete and highly correlated final cross-modal features.

[0046] In this embodiment, the step of calculating the attention weight matrix of each spectral feature point to the image spatial features using the spectral sequence features as the query vector and the multi-scale image spatial features as the key vector and value vector, through a scaled dot product attention mechanism, includes: The spectral sequence features are linearly projected through a learnable weight matrix to generate a query vector; simultaneously, the multi-scale image spatial features are linearly projected through two different learnable weight matrices to generate key vectors and value vectors, so that the query vector, key vector, and value vector are aligned in the feature dimension. Calculate the dot product of the query vector and the key vector to obtain an initial relevance score matrix, and then scale the initial relevance score matrix by dividing it by the square root of the key vector dimension to obtain a scaled relevance score matrix. The Softmax function is applied to each row of the scaled relevance score matrix to normalize it so that the sum of all elements in each row is 1, thereby generating the attention weight matrix. Each element in the attention weight matrix represents the degree of attention a spectral feature point pays to an image spatial feature point.

[0047] It should be noted that the original image and spectral features may not be in the same feature space, making it impossible to directly calculate similarity. Therefore, in this embodiment, they are first linearly projected using a learnable weight matrix to generate query vectors, key vectors, and value vectors, respectively. This not only transforms the features to a comparable dimension, but more importantly, allows the model to learn how to optimally construct these vectors for the current defect detection task.

[0048] An initial relevance score is obtained by calculating the dot product of the query vector (derived from the spectrum) and the key vector (derived from the image). A higher score indicates a stronger relevance. Subsequently, the initial score is scaled by dividing it by the square root of the key vector dimension. This is to prevent the variance of the dot product result from becoming too large when the dimension is high, which could cause the gradient of the Softmax function to vanish, thus ensuring the stability of the training process.

[0049] Finally, the Softmax function is applied to each row of the scaled score matrix to normalize the scores, transforming them into a probability distribution so that the sum of all elements in each row is 1. In the resulting attention weight matrix, each element is a weight value between 0 and 1, clearly representing the degree of attention a spectral feature point gives to an image spatial feature point.

[0050] In this embodiment, the step of extracting features from the spectral data to form a spectral fingerprint characterizing the cause of defects based on the identified defect areas of the vehicle paint coating includes: Based on the location information of the defect area, a local spectral data block corresponding to the defect area is located and extracted from the pixel-aligned spectral data. The local spectral data block is preprocessed, and the feature parameters of the local spectral data block under different preset feature bands are calculated to form an initial high-dimensional feature set. The initial high-dimensional feature set is subjected to dimensionality reduction, normalization, and encoding to generate a unique spectral fingerprint for feature matching in the process node feature library.

[0051] Specifically, based on the defect location information provided by the defect recognition model, a local spectral data block that completely corresponds to the defect region is accurately located and extracted from the spectral data that has been aligned with the image pixels.

[0052] After preprocessing the extracted spectral data blocks (such as smoothing filtering), their characteristic parameters are calculated under different preset characteristic bands. These bands may correspond to absorption peaks of specific components in the coating, thickness-sensitive bands, etc. The calculated characteristic parameters may include the mean, variance, slope, curvature of reflectance, area and depth of absorption peaks, etc. These parameters quantify the spectral response of the defect region from different perspectives and together constitute the initial high-dimensional feature set.

[0053] Finally, it should be noted that the initial high-dimensional feature set may contain redundancy and noise. In this embodiment, dimensionality reduction (such as principal component analysis, PCA) can extract the most essential and discriminative information. Then, normalization is performed to eliminate the influence of dimensions, and encoding is carried out to finally generate a unique spectral fingerprint.

[0054] In this embodiment, the step of performing dimensionality reduction, normalization, and encoding on the initial high-dimensional feature set to generate a unique spectral fingerprint for feature matching in the process node feature library includes: Principal component analysis is used to reduce the dimensionality of the initial high-dimensional feature set, and the first N principal component features are extracted to form a low-dimensional feature vector. The cumulative contribution rate of the first N principal component features exceeds a preset threshold. The feature vectors obtained from the low dimension are standardized by Z-score to make them conform to a standard normal distribution with a mean of 0 and a standard deviation of 1. The standardized feature vectors are quantized into a fixed-length binary sequence to obtain the spectral fingerprint.

[0055] Specifically, principal component analysis is used to reduce the dimensionality of the high-dimensional feature set. By selecting the top N principal component features and ensuring that their cumulative contribution rate exceeds a preset threshold, the feature dimensionality can be significantly reduced, noise and redundancy can be removed, and a lower-dimensional, purer feature vector can be obtained while retaining most of the original information.

[0056] The reduced feature vectors are then Z-score standardized to conform to a standard normal distribution with a mean of 0 and a standard deviation of 1. This eliminates the differences in numerical range and scale of different feature parameters, bringing all features to the same scale. This lays a fair foundation for subsequent quantization and coding, and also improves the stability of the subsequent matching process.

[0057] Finally, the standardized continuous-value feature vector is quantized into a fixed-length binary sequence; for example, values ​​greater than 0 are set to 1, and values ​​less than or equal to 0 are set to 0. This binary sequence is the final spectral fingerprint. Then, when matching in the process node feature library, the computationally efficient Hamming distance can be used to measure similarity, achieving extremely fast matching in the traceability process and fully meeting the real-time requirements of industrial online inspection.

[0058] Example 3 Please see Figure 2 The third embodiment of the present invention provides a vehicle paint coating quality inspection and traceability system, applied to the method described in any of the above embodiments, the system comprising: Data acquisition module 10, through a line array camera and a spectral imager, synchronously acquires spatial domain images of the vehicle body paint coating and spectral data of the corresponding area at the vehicle production line inspection station under time synchronization control. The data alignment module 20 is used to perform denoising and illumination correction processing on the spatial domain image, and to perform dark current correction and normalization processing on the spectral data. The processed image data and spectral data are then aligned pixel by pixel through spatial registration to obtain aligned data. The feature fusion module 30 is used to extract image spatial features and spectral features from the alignment data using a cross-modal deep convolutional neural network, and to fuse the image spatial features and the spectral features to generate a comprehensive feature vector. The defect identification module 40 is used to input the comprehensive feature vector into the pre-trained defect identification model and output the defect category, location information and defect level of the paint coating. The defect characterization module 50 is used to extract features from the spectral data based on the defect areas identified in the vehicle paint coating to form a spectral fingerprint characterizing the cause of the defect. The process matching module 60 is used to query and match the spectral fingerprint in a pre-built process node feature library, and determine the potential process nodes that cause defects based on the matching results. The traceability output module 70 is used to generate an inspection report containing defect information and traceability results, and feed it back to the production execution system or spraying equipment to adjust the spraying process parameters based on the traceability results.

[0059] Specifically, the feature fusion module 30 is used for: The pixel-aligned spatial domain image from the aligned data is input into the first convolutional branch of the cross-modal deep convolutional neural network to extract multi-scale image spatial features characterizing surface morphology and texture; simultaneously, the pixel-aligned spectral data from the aligned data is input into the second convolutional branch of the cross-modal deep convolutional neural network to extract spectral sequence features characterizing material composition and coating state. The extracted multi-scale image spatial features and spectral sequence features are input into the feature interaction module. The correlation weight between the multi-scale image spatial features and spectral sequence features is calculated through a cross-attention mechanism, and weighted and information fused to generate enhanced cross-modal features. The enhanced cross-modal features are then subjected to dimensionality reduction and compression through a global average pooling layer to output a comprehensive feature vector of fixed dimensions.

[0060] Example 4 A fourth embodiment of the present invention provides a readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method described in any of the above embodiments.

[0061] Example 5 A fifth embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method described in any of the above embodiments.

[0062] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0063] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.

Claims

1. A method for quality inspection and traceability of automotive paint coatings, characterized in that, The method includes: Using a linear array camera and a spectral imager, under time synchronization control, spatial domain images of the vehicle body paint coating and spectral data of the corresponding area are simultaneously acquired at the vehicle production line inspection station. The spatial domain image is subjected to denoising and illumination correction processing, while the spectral data is subjected to dark current correction and normalization processing. The processed image data and spectral data are then aligned pixel by pixel through spatial registration to obtain aligned data. Based on the alignment data, image spatial features and spectral features are extracted using a cross-modal deep convolutional neural network, and the image spatial features and spectral features are fused to generate a comprehensive feature vector; The comprehensive feature vector is input into a pre-trained defect recognition model, which outputs the defect category, location information, and defect level of the paint coating. Based on the identified defect areas of the vehicle paint coating, features in the spectral data are extracted to form a spectral fingerprint characterizing the cause of the defects; The spectral fingerprint is queried and matched in a pre-built process node feature library, and the potential process nodes causing defects are identified based on the matching results. A detection report containing defect information and source tracing results is generated and fed back to the production execution system or spraying equipment to adjust the spraying process parameters based on the source tracing results.

2. The method for quality inspection and traceability of vehicle paint coating according to claim 1, characterized in that, The steps of extracting image spatial features and spectral features from the alignment data using a cross-modal deep convolutional neural network, and fusing the image spatial features and spectral features to generate a comprehensive feature vector for defect identification include: The pixel-aligned spatial domain image from the aligned data is input into the first convolutional branch of the cross-modal deep convolutional neural network to extract multi-scale image spatial features characterizing surface morphology and texture; simultaneously, the pixel-aligned spectral data from the aligned data is input into the second convolutional branch of the cross-modal deep convolutional neural network to extract spectral sequence features characterizing material composition and coating state. The extracted multi-scale image spatial features and spectral sequence features are input into the feature interaction module. The correlation weight between the multi-scale image spatial features and spectral sequence features is calculated through a cross-attention mechanism, and weighted and information fused to generate enhanced cross-modal features. The enhanced cross-modal features are then subjected to dimensionality reduction and compression through a global average pooling layer to output a comprehensive feature vector of fixed dimensions.

3. The method for quality inspection and traceability of vehicle paint coating according to claim 2, characterized in that, The steps of inputting the extracted multi-scale image spatial features and the spectral sequence features into the feature interaction module, calculating the correlation weights between the multi-scale image spatial features and the spectral sequence features through a cross-attention mechanism, and performing weighted summation and information fusion to generate enhanced cross-modal features include: Using the spectral sequence features as the query vector and the multi-scale image spatial features as the key vector and value vector, the attention weight matrix of each spectral feature point to the image spatial features is calculated through a scaling dot product attention mechanism. The attention weight matrix is ​​used to perform a weighted summation of the multi-scale image spatial features to generate an enhanced image feature representation guided by spectral information. The enhanced image feature representation is residually concatenated with the original multi-scale image spatial features, and then the final enhanced cross-modal features are output after convolution operation.

4. The method for quality inspection and traceability of vehicle paint coating according to claim 3, characterized in that, The step of calculating the attention weight matrix of each spectral feature point to the image spatial features using the spectral sequence features as the query vector and the multi-scale image spatial features as the key vector and value vector, through a scaling dot product attention mechanism, includes: The spectral sequence features are linearly projected through a learnable weight matrix to generate a query vector; simultaneously, the multi-scale image spatial features are linearly projected through two different learnable weight matrices to generate key vectors and value vectors, so that the query vector, key vector, and value vector are aligned in the feature dimension. Calculate the dot product of the query vector and the key vector to obtain an initial relevance score matrix, and then scale the initial relevance score matrix by dividing it by the square root of the key vector dimension to obtain a scaled relevance score matrix. The Softmax function is applied to each row of the scaled relevance score matrix to normalize it so that the sum of all elements in each row is 1, thereby generating the attention weight matrix. Each element in the attention weight matrix represents the degree of attention a spectral feature point pays to an image spatial feature point.

5. The method for quality inspection and traceability of vehicle paint coatings according to any one of claims 1-4, characterized in that, The step of extracting features from the spectral data to form a spectral fingerprint characterizing the cause of defects based on the identified defect areas in the vehicle paint coating includes: Based on the location information of the defect area, a local spectral data block corresponding to the defect area is located and extracted from the pixel-aligned spectral data. The local spectral data block is preprocessed, and the feature parameters of the local spectral data block under different preset feature bands are calculated to form an initial high-dimensional feature set. The initial high-dimensional feature set is subjected to dimensionality reduction, normalization, and encoding to generate a unique spectral fingerprint for feature matching in the process node feature library.

6. The method for quality inspection and traceability of vehicle paint coating according to claim 5, characterized in that, The steps of performing dimensionality reduction, normalization, and encoding on the initial high-dimensional feature set to generate a unique spectral fingerprint for feature matching in the process node feature library include: Principal component analysis is used to reduce the dimensionality of the initial high-dimensional feature set, and the first N principal component features are extracted to form a low-dimensional feature vector. The cumulative contribution rate of the first N principal component features exceeds a preset threshold. The feature vectors obtained from the low dimension are standardized by Z-score to make them conform to a standard normal distribution with a mean of 0 and a standard deviation of 1. The standardized feature vectors are quantized into a fixed-length binary sequence to obtain the spectral fingerprint.

7. A system for quality inspection and traceability of automotive paint coatings, characterized in that, The system, applicable to the method of any one of claims 1-6, comprises: The data acquisition module, through a line scan camera and a spectral imager, synchronously acquires spatial domain images of the vehicle body's paint coating and corresponding spectral data at the vehicle production line inspection station under time synchronization control. The data alignment module is used to perform denoising and illumination correction processing on the spatial domain image, and to perform dark current correction and normalization processing on the spectral data. The processed image data and spectral data are then aligned pixel by pixel through spatial registration to obtain aligned data. The feature fusion module is used to extract image spatial features and spectral features from the alignment data using a cross-modal deep convolutional neural network, and to fuse the image spatial features and the spectral features to generate a comprehensive feature vector; The defect identification module is used to input the comprehensive feature vector into the pre-trained defect identification model and output the defect category, location information and defect level of the paint coating. The defect characterization module is used to extract features from the spectral data based on the defect areas identified in the paint coating to form a spectral fingerprint characterizing the cause of the defect. The process matching module is used to query and match the spectral fingerprint in a pre-built process node feature library, and determine the potential process nodes that cause defects based on the matching results. The traceability output module is used to generate an inspection report containing defect information and traceability results, and feed it back to the production execution system or spraying equipment to adjust the spraying process parameters based on the traceability results.

8. The vehicle paint coating quality inspection and traceability system according to claim 7, characterized in that, The feature fusion module is specifically used for: The pixel-aligned spatial domain image from the aligned data is input into the first convolutional branch of the cross-modal deep convolutional neural network to extract multi-scale image spatial features characterizing surface morphology and texture; simultaneously, the pixel-aligned spectral data from the aligned data is input into the second convolutional branch of the cross-modal deep convolutional neural network to extract spectral sequence features characterizing material composition and coating state. The extracted multi-scale image spatial features and spectral sequence features are input into the feature interaction module. The correlation weight between the multi-scale image spatial features and spectral sequence features is calculated through a cross-attention mechanism, and weighted and information fused to generate enhanced cross-modal features. The enhanced cross-modal features are then subjected to dimensionality reduction and compression through a global average pooling layer to output a comprehensive feature vector of fixed dimensions.

9. A readable storage medium having computer instructions stored thereon, characterized in that, When executed by the processor, this instruction implements the steps of the method as described in any one of claims 1-6.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1-7.