A visual recognition method for defects of conductive paste coating
Patent Information
- Application Number
- CN202610676872.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-18
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2046-05-18
AI Technical Summary
[0005]针对现有技术的不足,本发明提供了一种用于导电浆料涂布缺陷的视觉识别方法,解决了现有技术中深度神经网络在导电浆料涂布缺陷识别中因背景纹理与缺陷特征非线性耦合,而导致的卷积通道特征坍缩的问题
[0017] (1) The visual recognition method for conductive paste coating defects decomposes the initial feature map into low-frequency component feature map and high-frequency component feature map through the frequency domain decoupling module. The low-frequency component corresponds to the background feature of the thickness gradient naturally formed by the irregular particles contained in the conductive paste along the coating direction. The high-frequency component corresponds to the weak defect feature superimposed on the thickness gradient. The nonlinear coupling relationship between the background texture and the defect feature in the frequency domain is cut off from the feature representation level. The orthogonal constraint loss is calculated based on the low-frequency component feature map and the high-frequency component feature map. The lower bound of the mutual information between the low-frequency component feature map and the high-frequency component feature map in the feature space is minimized. The low-frequency feature vector and the high-frequency feature vector are forced to be orthogonally distributed. The response suppression of the redundant background feature associated with the thickness gradient in the deep convolution channel to the weak defect feature is suppressed. The weak defect signal that is easily submerged by feature collapse in the continuous frame image sequence is stably preserved.
Smart Images

Figure CN122199557B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep neural network technology, specifically to a visual recognition method for defects in conductive paste coating. Background Technology
[0002] In the battery electrode fabrication process, conductive paste coating is a core step, and its quality directly determines the final performance and safety of the battery. Conductive paste typically contains irregularly distributed metal or carbon particles. During high-speed continuous coating, the paste flows along the coating direction, naturally forming a thickness gradient, which appears as a low-frequency textured background with a certain directionality in the image. During production line operation, minor defects such as bubbles, scratches, and agglomerations may occur. These defects are superimposed on the thickness gradient background as high-frequency edges or localized texture disturbances.
[0003] Current deep neural network-based visual recognition solutions for coating defects typically employ convolutional neural networks to perform end-to-end processing on the acquired coating images. This involves extracting image features layer by layer through stacked convolutional layers, ultimately outputting the defect category and location information. Such solutions rely on the differences in the response of convolutional kernels to local regions in the input image to distinguish between normal and defective areas. In high-speed continuous coating mass production scenarios, the image acquisition system continuously acquires a sequence of consecutive frames of images of the coating surface, and the neural network abstracts the input features step by step within deep convolutional channels.
[0004] The limitations of existing technologies include at least the following problems: When a visual recognition scheme for conductive paste coating defects built on deep neural networks is applied to a high-speed continuous coating mass production scenario, the thickness gradient naturally formed by the irregular particles contained in the conductive paste along the coating direction will form a highly coupled nonlinear relationship with the weak defect features superimposed on it. This relationship will cause feature collapse in the convolution channel during the deep extraction of defect features in the neural network, making the model convolution kernel respond dominantly to the redundant background features associated with the thickness gradient, while limiting the response to weak defect features. Moreover, such internal model representation degradation problems are difficult to be substantially corrected by data augmentation or model fine-tuning, resulting in a continuous adaptation gap between the model's defect feature capture stability in the mass production stage and the actual coating inspection requirements. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a visual recognition method for conductive paste coating defects, which solves the problem of convolution channel feature collapse caused by nonlinear coupling between background texture and defect features in the recognition of conductive paste coating defects using deep neural networks in existing technologies.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a visual recognition method for conductive paste coating defects, comprising the following steps: acquiring a continuous frame image sequence of the area to be detected on a conductive paste coating production line under high-speed continuous mass production conditions; inputting the continuous frame image sequence into a trained deep neural network feature extraction network to extract an initial feature map of the area to be detected; inputting the initial feature map into a frequency domain decoupling module, which performs a Fourier transform on the initial feature map to decompose it into a low-frequency component feature map and a high-frequency component feature map; calculating an orthogonal constraint loss based on the low-frequency component feature map and the high-frequency component feature map; feeding back the orthogonal constraint loss to the frequency domain decoupling module to guide the frequency domain decoupling module to update the low-frequency component feature map and the high-frequency component feature map, and outputting the updated low-frequency component feature map and the updated high-frequency component feature map; performing coating defect recognition based on the updated low-frequency component feature map and the updated high-frequency component feature map, and outputting the defect recognition result.
[0007] Further, the steps for decomposing the initial feature map into low-frequency component feature maps and high-frequency component feature maps are as follows: Perform a two-dimensional fast Fourier transform along the spatial dimension on each channel of the initial feature map to obtain the amplitude spectrum and phase spectrum of the initial feature map in the frequency domain; determine the low-frequency segmentation radius of the amplitude spectrum based on the frequency domain distribution range corresponding to the thickness gradient naturally formed by the irregular particles contained in the conductive slurry along the coating direction; perform frequency domain masking segmentation on the amplitude spectrum based on the low-frequency segmentation radius, taking the components within the low-frequency segmentation radius as low-frequency amplitude components and the components outside the low-frequency segmentation radius as high-frequency amplitude components; perform an inverse Fourier transform on the low-frequency amplitude components and the phase spectrum to obtain the low-frequency component feature map, and perform an inverse Fourier transform on the high-frequency amplitude components and the phase spectrum to obtain the high-frequency component feature map.
[0008] Furthermore, the steps for guiding the frequency domain decoupling module to update the low-frequency component feature map and the high-frequency component feature map are as follows: the orthogonal constraint loss is propagated backward along the gradient propagation path of the frequency domain decoupling module to calculate the gradient of the frequency domain segmentation radius in the frequency domain decoupling module; the frequency domain segmentation radius is iteratively updated according to the gradient of the frequency domain segmentation radius; in each forward propagation process, the frequency domain decoupling module uses the iteratively updated frequency domain segmentation radius to perform Fourier transform decomposition on the initial feature map, and outputs the updated low-frequency component feature map and the updated high-frequency component feature map.
[0009] Furthermore, before feeding the orthogonal constraint loss back to the frequency domain decoupling module, the steps for jointly optimizing the orthogonal constraint loss and the main task loss of the deep neural network are as follows: obtain the main task loss of the deep neural network on the coating defect recognition task, which includes defect classification loss and defect location regression loss; perform a weighted summation of the orthogonal constraint loss and the main task loss to obtain the joint loss function; backpropagate the joint loss function along the backpropagation path of the deep neural network to update the parameters of the frequency domain decoupling module and the defect detection network simultaneously.
[0010] Furthermore, a dynamic adjustment strategy is adopted to determine the weighting coefficients of the orthogonal constraint loss and the main task loss: during the deep neural network training phase, the weighting coefficients of the orthogonal constraint loss are adjusted in stages according to the training progress; as the training progresses, the weighting coefficients of the orthogonal constraint loss are gradually adjusted to a stable value, which is greater than zero.
[0011] Furthermore, the frequency domain decoupling module performs the following steps for Fourier transforming the initial feature map: A two-dimensional Fourier transform is performed on the initial feature map along the spatial dimension to obtain spatial frequency domain features; a one-dimensional Fourier transform is performed on the spatial frequency domain features along the channel dimension to obtain channel frequency domain features; in the joint frequency domain space of the spatial frequency domain features and the channel frequency domain features, the joint low-frequency region corresponding to the thickness gradient naturally formed by the irregular particles contained in the conductive paste along the coating direction is determined; based on the joint low-frequency region, the spatial frequency domain features and the channel frequency domain features are segmented to obtain low-frequency component feature maps and high-frequency component feature maps.
[0012] Furthermore, the steps for calculating the orthogonal constraint loss based on the low-frequency component feature map and the high-frequency component feature map are as follows: expand the low-frequency component feature map and the high-frequency component feature map along the spatial dimension to obtain the low-frequency feature vector set and the high-frequency feature vector set; input the low-frequency feature vector set and the high-frequency feature vector set into the mutual information lower bound estimator, and output the mutual information lower bound estimate value. The mutual information lower bound estimator adopts a trained neural network discriminator; use the mutual information lower bound estimate value as the orthogonal constraint loss.
[0013] Furthermore, the training steps of the mutual information lower bound estimator are as follows: From the historical initial feature maps extracted by the feature extraction network of the trained deep neural network from the historical coating image sequence, positive sample pairs are randomly sampled. The positive sample pairs are the low-frequency component feature maps and high-frequency component feature maps corresponding to the same initial feature map after Fourier transform decomposition. The high-frequency component feature maps in the positive sample pairs are randomly shuffled in the channel dimension to construct negative sample pairs. The positive sample pairs and negative sample pairs are input into the mutual information lower bound estimator to distinguish between positive and negative sample pairs as the training objective, and the mutual information lower bound estimator is trained comparatively.
[0014] Furthermore, before inputting the continuous frame image sequence into the trained deep neural network's feature extraction network, the feature extraction network is pre-trained as follows: a self-supervised contrastive learning framework is used to pre-train the feature extraction network on an unlabeled historical image sequence of conductive slurry coating; during the pre-training process, feature vectors extracted from the same spatial location in adjacent frames within the same continuous frame image sequence are used as positive samples, and feature vectors extracted from random spatial locations in different continuous frame image sequences are used as negative samples; the parameters of the feature extraction network are updated with the training objective of distinguishing between positive and negative sample feature vectors.
[0015] Furthermore, the steps for coating defect identification based on the updated low-frequency component feature map and the updated high-frequency component feature map are as follows: the updated low-frequency component feature map and the updated high-frequency component feature map are concatenated along the channel dimension to obtain a fused feature map; the fused feature map is input into the defect detection network, and the defect category prediction result and defect location regression result are output.
[0016] The present invention has the following beneficial effects:
[0017] (1) The visual recognition method for conductive paste coating defects decomposes the initial feature map into low-frequency component feature map and high-frequency component feature map through the frequency domain decoupling module. The low-frequency component corresponds to the background feature of the thickness gradient naturally formed by the irregular particles contained in the conductive paste along the coating direction. The high-frequency component corresponds to the weak defect feature superimposed on the thickness gradient. The nonlinear coupling relationship between the background texture and the defect feature in the frequency domain is cut off from the feature representation level. The orthogonal constraint loss is calculated based on the low-frequency component feature map and the high-frequency component feature map. The lower bound of the mutual information between the low-frequency component feature map and the high-frequency component feature map in the feature space is minimized. The low-frequency feature vector and the high-frequency feature vector are forced to be orthogonally distributed. The response suppression of the redundant background feature associated with the thickness gradient in the deep convolution channel to the weak defect feature is suppressed. The weak defect signal that is easily submerged by feature collapse in the continuous frame image sequence is stably preserved.
[0018] (2) The visual recognition method for conductive paste coating defects calculates the gradient of the frequency domain segmentation radius and iteratively updates the frequency domain segmentation radius by backpropagating the orthogonal constraint loss along the gradient propagation path of the frequency domain decoupling module. In each forward propagation, the frequency domain decoupling module uses the updated frequency domain segmentation radius to perform Fourier transform decomposition on the initial feature map. The orthogonal constraint loss and the main task loss of the deep neural network in the coating defect recognition task are weighted and summed to obtain the joint loss function. The parameters of the frequency domain decoupling module and the parameters of the defect detection network are updated synchronously along the backpropagation path. The frequency domain segmentation radius is dynamically adjusted according to the actual frequency domain distribution of the current input continuous frame image sequence. There is no need to manually reset the threshold when facing the fluctuation of particle size distribution of conductive paste in different batches or the fine adjustment of coating process parameters. The frequency domain decoupling module automatically calibrates the segmentation boundary, and the mass production process maintains stable separation of the thickness gradient background and weak defect features.
[0019] (3) The visual recognition method for conductive slurry coating defects pre-trains the feature extraction network using a self-supervised contrastive learning framework before inputting the continuous frame image sequence into the feature extraction network. Using unlabeled historical image sequences of conductive slurry coating, the feature vectors extracted from the same spatial position in adjacent frames of the same continuous frame image sequence are used as positive samples, and the feature vectors extracted from random spatial positions in different continuous frame image sequences are used as negative samples. The positive and negative samples are distinguished to update the parameters of the feature extraction network. The mutual information lower bound estimator is trained by contrast. The low-frequency and high-frequency components of the same feature map after Fourier transform decomposition are sampled from the historical initial feature map as positive sample pairs. The high-frequency components are randomly shuffled in the channel dimension to construct negative sample pairs. The estimator is trained to distinguish between positive and negative sample pairs. The feature extraction network learns the spatiotemporal evolution law of coating texture under the condition of no manual labeling. Before the model is deployed, it has prior knowledge of the normal coating texture representation. It still maintains a keen response to weak defect features when facing unknown defect morphology on the production line.
[0020] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0021] Figure 1 This is a flowchart of a visual recognition method for defects in conductive paste coating according to the present invention.
[0022] Figure 2 This is a flowchart illustrating the steps of decomposing an initial feature map into low-frequency component feature maps and high-frequency component feature maps in a visual recognition method for conductive paste coating defects according to the present invention. Detailed Implementation
[0023] Please see Figure 1This invention provides a technical solution: a visual recognition method for conductive paste coating defects, comprising the following steps: acquiring a continuous frame image sequence of the area to be detected on a conductive paste coating production line under high-speed continuous mass production; inputting the continuous frame image sequence into a trained deep neural network feature extraction network to extract an initial feature map of the area to be detected; inputting the initial feature map into a frequency domain decoupling module, which performs a Fourier transform on the initial feature map to decompose it into a low-frequency component feature map and a high-frequency component feature map; calculating an orthogonal constraint loss based on the low-frequency component feature map and the high-frequency component feature map; feeding back the orthogonal constraint loss to the frequency domain decoupling module to guide the frequency domain decoupling module to update the low-frequency component feature map and the high-frequency component feature map, and outputting the updated low-frequency component feature map and the updated high-frequency component feature map; performing coating defect recognition based on the updated low-frequency component feature map and the updated high-frequency component feature map, and outputting the defect recognition result.
[0024] Among them, the low-frequency component mainly characterizes the feature distribution corresponding to the thickness gradient change naturally formed by the irregular particles contained in the conductive paste along the coating direction, while the high-frequency component mainly enhances the response of weak local defects and fine-grained anomalies, and preferentially corresponds to the feature distribution corresponding to the weak defect features superimposed on the thickness gradient change. The deep neural network consists of three parts: a feature extraction network, a frequency domain decoupling module, and a defect detection network. The feature extraction network is used to extract effective features of the region to be detected from a sequence of consecutive frame images. The frequency domain decoupling module is used to separate the background features with thickness gradient and the weak defect features. The defect detection network is used to identify and locate the separated defect features. Orthogonal constraint loss weakens the correlation between low-frequency component feature maps and high-frequency component feature maps in the feature space, avoiding the formation of highly coupled nonlinear correlations between the two, thereby preventing feature collapse in the convolution channels of deep neural networks and ensuring that the model's convolution kernel response to weak defect features is not suppressed by redundant background features. The Fourier transform operation of the frequency domain decoupling module can select different transformation dimensions and transformation methods according to the needs of the actual coating scenario, adapting to the feature decoupling needs under different working conditions. Feature extraction networks can independently extract initial feature maps for each frame in a continuous frame sequence, or they can use 3D convolutional or temporal fusion networks to process multiple frames simultaneously.
[0025] Specifically, such as Figure 2 As shown, the steps to decompose the initial feature map into low-frequency component feature maps and high-frequency component feature maps are as follows: A two-dimensional fast Fourier transform is performed on each channel of the initial feature map along the spatial dimension to obtain the amplitude spectrum and phase spectrum of the initial feature map in the frequency domain, specifically as follows: The initial feature map is a multi-channel feature map output by a deep neural network feature extraction network. The channel dimension is the number of channels in the feature map. Different channels correspond to different feature types. The two-dimensional fast Fourier transform refers to performing fast Fourier transform operations based on the width and height spatial dimensions on the feature map of each channel. The radix-2 fast Fourier transform algorithm is used to convert the spatial domain pixel values of each channel into amplitude and phase information in the frequency domain. The amplitude spectrum is used to characterize the intensity of each frequency component in the frequency domain, and the phase spectrum is used to characterize the phase position of each frequency component in the frequency domain. For example, if the initial feature map is a 64-channel, 256×256 pixel feature map, after performing a two-dimensional fast Fourier transform on each channel along the spatial dimension, the amplitude spectrum and phase spectrum corresponding to the 64 channels will be obtained. The size of each amplitude spectrum and phase spectrum is 256×256. The larger the pixel value of the amplitude spectrum, the stronger the intensity of the corresponding frequency domain component. The pixel value of the phase spectrum reflects the phase shift of the corresponding frequency domain component. Based on the frequency domain distribution range corresponding to the thickness gradient naturally formed by the irregular particles in the conductive paste along the coating direction, the low-frequency segmentation radius of the amplitude spectrum is determined, specifically as follows: By analyzing a large number of historical coating image samples, the distribution law of the thickness gradient naturally formed by the irregular particles contained in the conductive paste along the coating direction in the frequency domain was analyzed. It was found that the thickness gradient is a slowly changing background feature, and the corresponding frequency domain components are mainly concentrated in the central region of the frequency domain. By statistically analyzing the frequency domain distribution of multiple sets of historical samples, the radius range of the central region was determined, and the median value of the range was used as the low-frequency segmentation radius of the amplitude spectrum. For example, by analyzing 1,000 sets of historical coating images with different coating speeds and particle sizes, it was found that the frequency domain components corresponding to the thickness gradient were mainly concentrated in the range of a frequency domain center radius of 30 pixels. Therefore, the low-frequency segmentation radius was determined to be 30 pixels to ensure that the segmented low-frequency components could mainly characterize the background features of the thickness gradient, while the high-frequency components could be more conducive to enhancing the capture of weak defect features. Frequency domain masking is performed on the amplitude spectrum based on the low-frequency segmentation radius. Components within the low-frequency segmentation radius are designated as low-frequency amplitude components, while components outside the low-frequency segmentation radius are designated as high-frequency amplitude components. Specifically: Frequency domain masking can be performed using binary masks or continuous weighted masks. In implementations that require gradient updates to the segmentation radius, continuously differentiable soft masks are preferred. The frequency domain segmentation radius is mapped to a continuous weighted mask through radial basis functions or sigmoid gating functions to ensure gradient propagation. If a binary mask is used, the segmentation radius can be adjusted through outer layer search, discrete update, or approximate update. Specifically, a low-frequency mask matrix with the same size as the amplitude spectrum is constructed. If a soft mask is used, the weight of the region within the low-frequency segmentation radius in the low-frequency mask matrix approaches 1, and the weight of the region outside the low-frequency segmentation radius approaches 0. The weight values change continuously with the distance from the radius. If a binary mask is used, the pixel values of the region within the low-frequency segmentation radius in the low-frequency mask matrix are set to 1, and the pixel values of the region outside the low-frequency segmentation radius are set to 0. Both high and low frequency amplitude components are constructed using an explicit weighting method, that is, the low frequency amplitude component is equal to the low frequency mask multiplied by the amplitude spectrum, and the high frequency amplitude component is equal to the high frequency mask multiplied by the amplitude spectrum. In the soft masking implementation, the high-frequency mask can be constructed from the complementary weights of the low-frequency mask, for example, the high-frequency mask is equal to 1 minus the low-frequency mask. In the binary mask implementation, the high-frequency mask and the low-frequency mask are complementary (the high-frequency mask is 0 in the area where the low-frequency mask is 1, and the high-frequency mask is 1 in the area where the low-frequency mask is 0). For example, if the amplitude spectrum size is 256×256 and the low-frequency segmentation radius is 30 pixels, draw a circular area with a radius of 30 pixels with the center point of the amplitude spectrum as the center. When using a soft mask, the weight within the circular area approaches 1 and the weight outside the area approaches 0. The high-frequency mask is 1 minus the low-frequency mask. The two are multiplied by the amplitude spectrum to obtain the low-frequency and high-frequency amplitude components. When using a binary mask, the low-frequency mask is 1 within the circular area and 0 outside the area, while the high-frequency mask is the opposite. This method enables the initial separation of background features and defect features in the frequency domain.
[0026] The low-frequency amplitude component and phase spectrum are subjected to inverse Fourier transform to obtain the low-frequency component feature map, and the high-frequency amplitude component and phase spectrum are subjected to inverse Fourier transform to obtain the high-frequency component feature map, specifically as follows: The inverse Fourier transform uses the inverse transform algorithm corresponding to the two-dimensional fast Fourier transform to combine the low-frequency amplitude component in the frequency domain with the corresponding phase spectrum and transform it back to the spatial domain to obtain the low-frequency component feature map. This feature map mainly contains the background features with gradually changing thickness gradient. The high-frequency amplitude component is combined with the corresponding phase spectrum and then transformed back to the spatial domain by inverse Fourier transform to obtain the high-frequency component feature map, which mainly contains the weak defect features superimposed on the background. For example, the low-frequency amplitude component obtained by segmentation and the original phase spectrum are input into the inverse Fourier transform module. After the inverse transform operation, the low-frequency component feature map with the same size as the initial feature map is output. The thickness gradient trend of the conductive paste along the coating direction can be clearly seen in the feature map, while the high-frequency component feature map can more prominently show the tiny scratches, missed coatings and other defects.
[0027] The steps for the frequency domain decoupling module to update the low-frequency component feature map and the high-frequency component feature map are as follows: The orthogonal constraint loss is propagated backward along the gradient propagation path of the frequency domain decoupling module to calculate the gradient of the frequency domain segmentation radius in the frequency domain decoupling module, specifically as follows: The orthogonal constraint loss is calculated based on the low-frequency component feature map and the high-frequency component feature map, and is used to characterize the degree of correlation between the two. The gradient propagation path is the back propagation path of parameter update in the deep neural network. Starting from the calculation node of the orthogonal constraint loss, it is derived in reverse along the parameter transfer direction of the frequency domain decoupling module to calculate the gradient value of the frequency domain segmentation radius. This gradient value is used to characterize the degree of influence of the change of the frequency domain segmentation radius on the orthogonal constraint loss. If the gradient value is positive, it means that increasing the frequency domain segmentation radius will increase the orthogonal constraint loss. If the gradient value is negative, it means that increasing the frequency domain segmentation radius will reduce the orthogonal constraint loss. For example, when the gradient value of the frequency domain segmentation radius is calculated to be -0.02, it means that for every unit increase in the frequency domain segmentation radius, the orthogonal constraint loss will decrease by 0.02. That is, increasing the frequency domain segmentation radius at this time is beneficial to weaken the coupling between the two types of features.
[0028] The frequency domain segmentation radius is iteratively updated based on the gradient of the frequency domain segmentation radius, specifically as follows: The gradient descent algorithm is used to minimize the orthogonal constraint loss and iteratively adjust the frequency domain segmentation radius. The step size of each update is determined by the gradient value and the preset learning rate. The update formula is that the new frequency domain segmentation radius is equal to the current frequency domain segmentation radius minus the product of the learning rate and the gradient. The learning rate is used to control the magnitude of each update to avoid the model being unstable due to excessive update magnitude. For example, if the current frequency domain segmentation radius is 30 pixels, the gradient value is -0.02, and the preset learning rate is 0.01, then the frequency domain segmentation radius after this update is 30 - 0.01 × (-0.02) = 30.0002 pixels. Through multiple iterations, the frequency domain segmentation radius that minimizes the orthogonal constraint loss is gradually found. Because a continuously differentiable soft masking method is used, the gradient of the frequency domain segmentation radius can be smoothly propagated, ensuring stable convergence of the iterative update process and solving the problem of non-differentiability of the radius backpropagation under hard masking segmentation.
[0029] During each forward propagation, the frequency domain decoupling module performs a Fourier transform decomposition on the initial feature map using the iteratively updated frequency domain segmentation radius, outputting updated low-frequency component feature maps and updated high-frequency component feature maps, specifically as follows: The forward propagation process of a deep neural network refers to the complete process from the input continuous frame image sequence, through feature extraction, frequency domain decoupling, loss calculation to the output recognition result. In each forward propagation, the frequency domain decoupling module no longer uses the initially set frequency domain segmentation radius, but uses the frequency domain segmentation radius obtained from the previous iteration update, repeating the Fourier transform, frequency domain mask segmentation and inverse Fourier transform steps to obtain the updated low-frequency component feature map and high-frequency component feature map. As the number of iterations increases, the frequency domain segmentation radius is continuously optimized, and the coupling degree of the two types of feature maps after the update is continuously reduced. For example, after 100 iterations, the frequency domain segmentation radius is optimized to 28 pixels. When this radius is used for frequency domain segmentation, the background features in the low-frequency component feature map are purer, and the defect features in the high-frequency component feature map are clearer, significantly reducing the coupling between the two types of features.
[0030] Before feeding the orthogonal constraint loss back to the frequency domain decoupling module, the steps for jointly optimizing the orthogonal constraint loss and the main task loss of the deep neural network are as follows: Obtain the main task loss of the deep neural network for coating defect recognition. The main task loss includes defect classification loss and defect location regression loss, which are as follows: The main task loss is the loss generated when the deep neural network completes the main task of coating defect identification. It is used to characterize the degree of deviation between the model's identification result and the actual defect situation. Among them, the defect classification loss is used to measure the model's accurate judgment of the defect category. For example, when a scratch defect is misjudged as a missing coating defect, a large classification loss will be generated. The defect location regression loss is used to measure the accuracy of the model in locating the defect. For example, when the model predicts a large defect location and the actual defect location deviates significantly, a large regression loss will occur. The main task loss is obtained by inputting the updated low-frequency component feature map and high-frequency component feature map into the defect detection network to obtain the defect category prediction result and the defect location regression result. The prediction result is compared with the pre-labeled actual defect category and location information. The defect classification loss and defect location regression loss are calculated separately using a preset loss calculation method. The defect classification loss and defect location regression loss are then weighted and summed according to preset weights to obtain the main task loss.
[0031] The joint loss function is obtained by weighted summing of the orthogonal constraint loss and the main task loss, which is as follows: Weighted summation refers to assigning a weighting coefficient to the orthogonal constraint loss and the main task loss respectively. The orthogonal constraint loss is multiplied by its corresponding weighting coefficient, and the main task loss is multiplied by its corresponding weighting coefficient. The sum of the two products is the joint loss function. The sum of the two weighting coefficients is 1, which is used to balance the importance of the orthogonal constraint loss and the main task loss. For example, if the weighting coefficient of the orthogonal constraint loss is 0.3, the weighting coefficient of the main task loss is 0.7, the calculated value of the orthogonal constraint loss is 0.2, and the calculated value of the main task loss is 0.5, then the calculated result of the joint loss function is 0.2×0.3+0.5×0.7=0.06+0.35=0.41.
[0032] The joint loss function is backpropagated along the backpropagation path of the deep neural network, and the parameters of the frequency domain decoupling module and the defect detection network are updated synchronously. Specifically: Gradient backpropagation refers to starting from the node where the joint loss function is calculated, and proceeding along the back propagation path of the deep neural network to sequentially calculate the gradient values of all parameters of the frequency domain decoupling module (including frequency domain segmentation radius, frequency domain weighting coefficients, etc.) and all parameters of the defect detection network (including convolutional layer parameters, fully connected layer parameters, etc.). Then, the gradient descent algorithm is used to synchronously update all parameters based on the gradient values, ensuring that the feature decoupling effect of the frequency domain decoupling module and the recognition accuracy of the defect detection network can be optimized simultaneously. For example, during gradient backpropagation, the gradient of the frequency domain segmentation radius of the frequency domain decoupling module and the gradient of the convolutional layer parameters of the defect detection network are calculated simultaneously. After parameter updates, the decoupling effect of the frequency domain decoupling module is better, and the defect detection network is more accurate in identifying and locating defects.
[0033] The weighting coefficients for the orthogonal constraint loss and the main task loss are determined using a dynamic adjustment strategy: During the training phase of a deep neural network, the weighting coefficients of the orthogonal constraint loss are adjusted periodically according to the training progress. Specifically: The training phase of a deep neural network is divided into three stages: early, middle and late. The training focus is different in each stage, so the adjustment strategy of the weighting coefficients is also different. In the early stages of training, the model has not yet developed an effective feature decoupling capability, and the feature coupling problem is quite serious. At this time, it is necessary to focus on optimizing the frequency domain decoupling effect. Therefore, the weighting coefficient of the orthogonal constraint loss is set to a large value. During the middle of training, the model's feature decoupling ability gradually improves, and the feature coupling problem is alleviated. At this time, the weighting coefficient of the orthogonal constraint loss is gradually reduced, while the weighting coefficient of the main task loss is increased. In the later stages of training, the model's feature decoupling effect and defect recognition accuracy tend to stabilize. At this point, the weighting coefficient of the orthogonal constraint loss is adjusted to a small, stable value.
[0034] As the training process progresses, the weighting coefficients of the orthogonal constraint loss are gradually adjusted to stable values, which are greater than zero. Specifically: The training process is measured by the number of iterations, with three preset iteration nodes as the basis for stage division. For example, if the total number of iterations is 1000, the 300th and 700th iterations will be used as stage division nodes; In the early stages of training (1-300 iterations), the weighting coefficient of the orthogonal constraint loss was set to 0.5; During the middle of training (301-700 iterations), the weighting coefficient gradually and linearly decreased from 0.5 to 0.2. In the later stages of training (701-1000 iterations), the weighting coefficients are maintained at a stable value of 0.2. This stable value is greater than zero to ensure that the model can still maintain a certain feature decoupling ability in the later stages of training, avoid the recurrence of feature coupling problems, and at the same time, not affect the optimization effect of the main task loss on the accuracy of defect recognition.
[0035] In this implementation, the initial feature map is subjected to a two-dimensional fast Fourier transform along the spatial dimension for each channel. Combined with the low-frequency segmentation radius determined by historical sample statistics, and a high- and low-frequency weight matrix is constructed using a soft mask or a binary mask, the initial decoupling of the thickness gradient background and weak defects at the frequency domain is achieved. Within the frequency domain decoupling module, the orthogonal constraint loss is used to calculate the segmentation radius gradient in reverse along the gradient propagation path. The radius parameter can be stably iteratively updated by using a continuously differentiable soft mask mechanism, thereby adaptively adjusting the frequency domain segmentation boundary during training. The orthogonal constraint loss and the main task loss are weighted and fused into a joint loss function, and the frequency domain decoupling module and the defect detection network are optimized synchronously. A strategy of dynamically adjusting the weighting coefficients during the training phase is adopted, focusing on decoupling in the early stage and gradually focusing on recognition accuracy in the middle and later stages. This reduces the coupling interference between background features and defect features in deep convolutional channels, alleviates the tendency of feature collapse, and allows the response of weak defects to be maintained.
[0036] Specifically, as another embodiment of the present invention, the frequency domain decoupling module performs a Fourier transform on the initial feature map as follows: The initial feature map is subjected to a two-dimensional Fourier transform along the spatial dimension to obtain spatial frequency domain features, specifically as follows: The spatial dimension refers to the width and height of the initial feature map. The two-dimensional Fourier transform is used to transform the initial feature map from the spatial domain to the spatial frequency domain, capturing the frequency distribution information of the feature map in space. The fast Fourier transform algorithm is used to perform a two-dimensional Fourier transform in the spatial dimension on each channel of the initial feature map, converting the spatial pixel value of each channel into a frequency component in the spatial frequency domain, and obtaining the spatial frequency domain feature. This feature can reflect information such as brightness changes and texture distribution in the spatial dimension of the initial feature map. For example, the initial feature map has 64 channels and 256×256 pixels. After performing a two-dimensional Fourier transform along the spatial dimension, each channel obtains a 256×256 spatial frequency domain feature matrix. Each element in the matrix represents the intensity of the corresponding spatial frequency component. The lower the spatial frequency, the more preferentially it corresponds to the flatter regions in the feature map (such as the background with a thickness gradient). The higher the spatial frequency, the more beneficial it is to enhance the response of the finer regions in the feature map (such as weak defects).
[0037] The channel frequency domain features are obtained by performing a one-dimensional Fourier transform along the channel dimension, specifically as follows: The channel dimension refers to the number of channels in the spatial frequency domain feature. The one-dimensional Fourier transform is used to convert the spatial frequency domain feature from the channel domain to the channel frequency domain, capturing the frequency correlation information between different channels. The fast Fourier transform algorithm is used to perform a one-dimensional Fourier transform on the spatial frequency domain feature along the channel dimension, converting the multi-channel feature value at each spatial location into frequency components in the channel frequency domain, thus obtaining the channel frequency domain feature. This feature can reflect the degree of feature correlation between different channels. For example, if the spatial frequency domain features are 64 channels and 256×256 pixels, after performing a one-dimensional Fourier transform along the channel dimension, 256×256 channel frequency domain feature vectors are obtained. The length of each vector is 64, representing the frequency correlation of different channel features at the corresponding spatial location.
[0038] In the joint frequency domain space of spatial frequency domain characteristics and channel frequency domain characteristics, the joint low-frequency region corresponding to the thickness gradient naturally formed along the coating direction by the irregular particles contained in the conductive paste is determined, specifically as follows: In one embodiment, the channel frequency domain vector at each spatial location is multiplied by the corresponding spatial frequency response to form a two-dimensional joint frequency domain spectrum, thus completing the construction of the joint frequency domain space. In this joint frequency domain space, one dimension is spatial frequency and the other dimension is channel frequency. By analyzing the joint frequency domain distribution of a large number of historical coating image samples, the characteristics corresponding to the gradual change in the thickness gradient of the conductive paste were found. In the joint frequency domain space, it is mainly manifested as a region with low spatial frequency and low channel frequency. This region is the joint low frequency region. By statistically analyzing multiple sets of historical samples, the range of the joint low frequency region was determined. For example, by analyzing 500 sets of historical samples, the joint low-frequency region was determined to be a region with a spatial frequency of less than or equal to 20 and a channel frequency of less than or equal to 10. The frequency domain components within this region mainly correspond to the background features of the thickness gradient, while the frequency domain components outside the region mainly correspond to the features of weak defects.
[0039] Based on the joint low-frequency region, spatial frequency domain features and channel frequency domain features are segmented to obtain low-frequency component feature maps and high-frequency component feature maps, specifically as follows: Construct a binary mask or a continuously scalable mask with the same size as the joint frequency domain spectrum. Set the part of the mask corresponding to the joint low-frequency region to 1 and the part outside the joint low-frequency region to 0. Multiply the mask with the joint frequency domain spectrum, retain the frequency domain components within the joint low-frequency region and remove the frequency domain components outside the region to obtain the low-frequency joint frequency domain spectrum. By retaining the frequency domain components outside the joint low-frequency region and removing the frequency domain components within the region, the high-frequency joint frequency domain spectrum is obtained. The low-frequency joint frequency domain spectrum and the high-frequency joint frequency domain spectrum are processed by inverse transformation. First, the inverse transformation is performed along the channel frequency dimension to recover the channel domain features, and then the inverse transformation is performed along the spatial frequency dimension to recover the spatial frequency domain features. Finally, the two-dimensional inverse Fourier transform is performed to convert back to the spatial domain, and the low-frequency component feature map and the high-frequency component feature map are obtained respectively. This method can achieve deep decoupling of background features and defect features from both spatial and channel dimensions.
[0040] In this implementation scheme, the initial feature map is first subjected to a two-dimensional Fourier transform along the spatial dimension to obtain spatial frequency domain features, and then a one-dimensional Fourier transform along the channel dimension to obtain channel frequency domain features. A two-dimensional joint frequency domain spectrum is constructed by cross-product of the spatial frequency response and the channel frequency domain vector. Based on historical sample statistics, the joint low-frequency region corresponding to the thickness gradient naturally formed by the irregular particles contained in the conductive paste along the coating direction is determined. In this joint frequency domain space, the low-frequency joint frequency domain spectrum and the high-frequency joint frequency domain spectrum are segmented using a binary mask. After inverse transformation processing, the low-frequency component feature map and the high-frequency component feature map are obtained. This can collaboratively characterize the frequency domain distribution differences of background texture and defect details from two dimensions, so that the gradually changing background features of thickness gradient and the local abrupt features of weak defects occupy separable different sub-regions in the joint frequency domain spectrum.
[0041] Specifically, the steps for calculating the orthogonal constraint loss based on the low-frequency component feature map and the high-frequency component feature map are as follows: The low-frequency component feature map and the high-frequency component feature map are unfolded along the spatial dimension respectively to obtain the low-frequency feature vector set and the high-frequency feature vector set, which are as follows: Spatial dimension refers to the width and height dimensions of the feature map. The unfolding operation refers to converting the two-dimensional feature map of each channel into a one-dimensional feature vector. That is, the pixel values in the width and height directions of the feature map are arranged in sequence to form a one-dimensional vector. For a multi-channel feature map, each channel corresponds to a one-dimensional feature vector, and the feature vectors of all channels together constitute a feature vector set. For example, the low-frequency component feature map has 64 channels and 256×256 pixels. After being expanded along the spatial dimension, each channel obtains a one-dimensional feature vector with a length of 256×256=65536. The feature vectors of the 64 channels together constitute the low-frequency feature vector set. The high-frequency component feature map is expanded in the same way to obtain a set of high-frequency feature vectors.
[0042] The low-frequency feature vector set and the high-frequency feature vector set are input into the mutual information lower bound estimator, which outputs the mutual information lower bound estimate. The mutual information lower bound estimator uses a trained neural network discriminator, specifically as follows: The mutual information lower bound estimator is a module used to estimate the lower bound of mutual information between two sets of feature vectors. This module is built using a trained neural network discriminator, which consists of multiple convolutional layers and fully connected layers. The mutual information lower bound estimator outputs a scalar score, which is monotonically transformed and used as the estimated value of the mutual information lower bound. During training, the goal is to make positive sample pairs score higher than negative sample pairs, without pursuing scores that approach a fixed value. After inputting the low-frequency feature vector set and the high-frequency feature vector set into the estimator, the estimator will calculate the lower bound estimate of the mutual information between the two feature vector sets through the internal neural network structure. This estimate is used to characterize the degree of correlation between the two feature vector sets. The larger the estimate, the higher the degree of coupling between the two; the smaller the estimate, the lower the degree of coupling between the two. For example, if the input set of low-frequency feature vectors and the set of high-frequency feature vectors are highly coupled, the lower bound estimator outputs an estimate of 0.8; if the coupling between the two is low, the output estimate is 0.2.
[0043] The lower bound estimate of mutual information is used as the orthogonal constraint loss, specifically as follows: In this invention, the orthogonal constraint loss uses the lower bound estimate of mutual information as a metric. It belongs to the generalized orthogonal constraint, which minimizes the statistical dependence between low-frequency components and high-frequency components, making them statistically orthogonal or decoupled. Since the lower bound estimate of mutual information can accurately characterize the coupling degree between the low-frequency component feature map and the high-frequency component feature map, it is directly used as the orthogonal constraint loss. The optimization objective of the orthogonal constraint loss is to minimize the estimate. By minimizing the orthogonal constraint loss, the nonlinear coupling relationship between the low-frequency component feature map and the high-frequency component feature map can be weakened, avoiding feature collapse in the convolution channel of the deep neural network and ensuring that the model can accurately capture weak defect features. For example, when the lower bound estimate of mutual information is 0.6, the orthogonal constraint loss is also 0.6. The model will gradually reduce this loss value to below 0.1 through parameter updates. At this point, the coupling between the two types of features is significantly reduced, and the defective features can be effectively identified.
[0044] The training steps for the mutual information lower bound estimator are as follows: From the historical initial feature maps extracted by the feature extraction network of a trained deep neural network from the historical coating image sequence, positive sample pairs are randomly sampled. Each positive sample pair consists of the low-frequency component feature map and the high-frequency component feature map corresponding to the same initial feature map after Fourier transform decomposition. Specifically: During the pre-training phase, a mutual information lower bound estimator is trained separately using historical initial feature maps. During the joint training phase, the estimator parameters are fixed or fine-tuned and optimized together with the main network. The historical coating image sequence refers to a large number of conductive slurry coating image sequences previously collected in high-speed continuous coating mass production scenarios. The feature extraction network of the trained deep neural network extracts features from these historical image sequences to obtain historical initial feature maps. From these historical initial feature maps, several historical initial feature maps are selected using random sampling. For each selected historical initial feature map, the Fourier transform method is used to decompose it into corresponding low-frequency component feature maps and high-frequency component feature maps. The low-frequency component feature maps and high-frequency component feature maps obtained from the same historical initial feature map are considered as a positive sample pair. The characteristic of a positive sample pair is that both originate from the same original feature map and have a natural correlation. For example, 1000 historical initial feature maps are randomly sampled, and each feature map is decomposed into one pair of positive samples, resulting in a total of 1000 pairs of positive samples, which are used for the pre-training of the mutual information lower bound estimator.
[0045] To construct negative sample pairs, the high-frequency component feature maps in the positive sample pairs are randomly shuffled along the channel dimension. Specifically: The purpose of constructing negative sample pairs is to provide unrelated feature pairs for training the mutual information lower bound estimator to distinguish between related and unrelated feature pairs. Specifically, the high-frequency component feature map in the positive sample pair is selected, and its feature vectors in the channel dimension are randomly shuffled, that is, the arrangement order of each channel of the high-frequency component feature map is changed. The shuffled high-frequency component feature map no longer has a natural correlation with the original low-frequency component feature map. The shuffled high-frequency component feature map and the original low-frequency component feature map are used as a negative sample pair. For example, select a set of positive sample pairs, where the low-frequency component feature map has 64 channels and the high-frequency component feature map has 64 channels. Randomly shuffle the 64 channels of the high-frequency component feature map to obtain the shuffled high-frequency component feature map. Combine the shuffled high-frequency component feature map with the original low-frequency component feature map to form a set of negative sample pairs, ensuring that there is no obvious correlation between the two types of features in the negative sample pairs.
[0046] Positive and negative sample pairs are input into the mutual information lower bound estimator, with the training objective of distinguishing between positive and negative sample pairs. The mutual information lower bound estimator is then trained comparatively, specifically as follows: Contrastive training refers to training a mutual information lower bound estimator by comparing positive and negative sample pairs, enabling the positive sample pair score to be higher than the negative sample pair score. During training, positive and negative sample pairs are mixed and input into the mutual information lower bound estimator. The estimator outputs a scalar score for each sample pair, which is then monotonically transformed to obtain the mutual information lower bound estimate. The deviation between the positive and negative sample pair scores is calculated using a preset loss function. The parameters of the mutual information lower bound estimator are updated based on the deviation. The training is iterated until the positive sample pair score output by the estimator is stably higher than the negative sample pair score, thus obtaining the trained mutual information lower bound estimator.
[0047] In this implementation, the low-frequency component feature map and the high-frequency component feature map are expanded along the spatial dimension to obtain feature vector sets. The mutual information lower bound estimate between the two is calculated by a mutual information lower bound estimator obtained through comparative training. This estimate is directly used as the orthogonal constraint loss. The mutual information lower bound estimator is constructed using a neural network discriminator. Positive sample pairs are constructed using historical initial feature maps and negative sample pairs are constructed by randomly shuffling channels for pre-training. This enables the estimator to stably distinguish between associated and unassociated feature pairs. The process of minimizing the orthogonal constraint loss forces the low-frequency background features and high-frequency defect features to tend to decouple in a statistical sense, thereby weakening the nonlinear coupling tendency between the two in the deep convolutional channels of the deep neural network and alleviating the feature collapse phenomenon caused by the dominance of background redundant feature responses.
[0048] Specifically, before inputting a sequence of consecutive frame images into the feature extraction network of a trained deep neural network, the pre-training steps for the feature extraction network are as follows: A self-supervised contrastive learning framework is employed to pre-train the feature extraction network on unlabeled historical image sequences of conductive slurry coatings. Specifically: The self-supervised contrastive learning framework is a training framework that does not require manual annotation of samples. It achieves the pre-training of the feature extraction network by constructing the contrast relationship between samples. The unlabeled conductive slurry coating historical image sequence refers to the historical coating image sequence without manual annotation of defect categories and locations. The purpose of pre-training is to enable the feature extraction network to automatically learn the inherent features of conductive slurry coating images (such as thickness gradient, particle distribution, etc.). The unlabeled historical image sequence is input into the feature extraction network. Through the self-supervised contrastive learning framework, the network learns to distinguish between similar features and different features, and gradually optimizes the parameters of the feature extraction network. For example, 10,000 unlabeled historical images of conductive paste coating were selected to form a pre-training sample set. A self-supervised contrastive learning framework was used to pre-train the feature extraction network, which was iterated 500 times to enable the network to accurately extract the inherent features in the images.
[0049] During pre-training, feature vectors extracted from the same spatial location in adjacent frames of the same consecutive frame image sequence are used as positive samples, while feature vectors extracted from random spatial locations in different consecutive frame image sequences are used as negative samples. Specifically: In high-speed coating scenarios, motion compensation is performed on consecutive frames through encoder synchronization or image registration algorithms, so that the same spatial position corresponds to the same physical area of the coating surface. Alternatively, the corresponding position after optical flow alignment can be used; The selection of positive samples is based on the similarity of adjacent frames in the same continuous frame image sequence. After motion compensation or optical flow alignment, the coating scenes of adjacent frames in the same continuous frame image sequence are basically the same, and the feature vectors at the same spatial location have high similarity. Therefore, these feature vectors are used as positive samples to train the network to recognize similar features. The selection of negative samples is based on the differences between different consecutive frame image sequences. The coating conditions corresponding to different consecutive frame image sequences may be different, and the feature vectors of random spatial locations have low similarity. Therefore, these feature vectors are used as negative samples to train the network to recognize different features. For example, select a series of consecutive frame images (containing 100 frames), and after motion compensation, extract the feature vectors of the same spatial location (such as coordinates (50,50)) in the first and second frames as a set of positive samples; select the 50th frame in another series of consecutive frame images, extract the feature vectors of random spatial locations (such as coordinates (100,100)), and combine them with the feature vectors of the previous set as a set of negative samples.
[0050] The training objective is to distinguish between positive and negative sample feature vectors. The parameters of the feature extraction network are then updated as follows: The core objective of pre-training is to enable the feature extraction network to accurately distinguish between positive and negative sample feature vectors, that is, to achieve the highest possible similarity between positive sample feature vectors and the lowest possible similarity between negative sample feature vectors. By using a pre-defined contrast loss function, the similarity deviation between positive and negative sample feature vectors is calculated. Based on the deviation, the parameters of the convolutional layer, pooling layer, and other parameters of the feature extraction network are updated, and the network is iteratively trained until it can effectively distinguish between positive and negative samples. For example, during training, the similarity between the feature vectors of positive samples and the feature vectors of negative samples is calculated by comparing the loss function. If the similarity between positive samples is low and the similarity between negative samples is high, the parameters of the feature extraction network are adjusted to increase the similarity between positive samples and decrease the similarity between negative samples. After multiple iterations, the network can stably distinguish between positive and negative samples, thus completing the pre-training.
[0051] In this implementation scheme, before inputting the continuous frame image sequence into the feature extraction network, a self-supervised contrastive learning framework is used to pre-train the feature extraction network. A contrast task is constructed using a large number of unlabeled conductive paste coating historical image sequences. The network can automatically learn the inherent texture and structural features of the coating images without manual annotation. During the pre-training process, after motion compensation or optical flow alignment, the feature vectors of the same spatial position in adjacent frames within the same continuous frame sequence are used as positive samples, and the feature vectors of random spatial positions in different sequences are used as negative samples. The contrastive loss forces the similarity of positive samples to increase and the similarity of negative samples to decrease, thereby guiding the network to focus on the stable pattern of the coating surface evolution over time rather than instantaneous noise. This pre-training method significantly reduces the dependence on scarce defect annotation data, enabling the feature extraction network to have prior knowledge of normal coating texture before mass production deployment. The subsequent frequency domain decoupling and defect recognition modules can be fine-tuned based on better initial parameters.
[0052] Specifically, the steps for identifying coating defects based on the updated low-frequency component feature map and the updated high-frequency component feature map are as follows: The updated low-frequency component feature map and the updated high-frequency component feature map are concatenated along the channel dimension to obtain a fused feature map, specifically as follows: Channel dimension stitching refers to merging the channels of two feature maps while retaining their respective spatial dimension dimensions. All channels of the low-frequency component feature map and all channels of the high-frequency component feature map are arranged sequentially to form a new multi-channel feature map, namely the fused feature map. This fused feature map mainly contains background features with gradual thickness gradients and weak defect features, which can provide more comprehensive feature information for defect identification. For example, the updated low-frequency component feature map has 64 channels and 256×256 pixels, and the updated high-frequency component feature map has 64 channels and 256×256 pixels. After being stitched together in the channel dimension, a fused feature map with 128 channels and 256×256 pixels is obtained. The first 64 channels of the fused feature map mainly correspond to the low-frequency component features, and the last 64 channels mainly correspond to the high-frequency component features. The fused feature map is input into the defect detection network, and the outputs are the defect category prediction result and the defect location regression result, which are as follows: The defect detection network is a module in a deep neural network used to identify and locate defects. It consists of convolutional layers, fully connected layers, and regression layers. After training, it has the ability to determine the defect category and locate the defect. After the fused feature map is input into the defect detection network, the network further extracts defect features through internal convolutional operations, classifies the defect features through fully connected layers, and outputs the defect category prediction results (such as scratches, missing paint, bumps, etc.). The regression layer predicts the location of the defect and outputs the defect location regression results (such as the coordinates of the top left corner, bottom right corner, or the center coordinates and size of the defect). For example, after inputting the fused feature map into the defect detection network, the network outputs the defect category as "scratch", and the defect location regression result is the upper left corner coordinates (100, 120) and the lower right corner coordinates (150, 130), which means that there is a scratch defect in this area.
[0053] In this implementation, the updated low-frequency component feature map and the updated high-frequency component feature map are concatenated along the channel dimension to obtain a fused feature map that simultaneously contains thickness gradient background information and subtle defect detail information. The fused feature map is then input into a defect detection network consisting of convolutional layers, fully connected layers, and regression layers. After training, this network has the ability to determine the defect category and locate the defect. It can perform convolution processing on the fused feature map to further extract defect-related features, and output the defect category prediction results such as scratches, missing paint, and bumps through the fully connected layer. The regression layer outputs the coordinates or size information of the defect area. Thus, the defect recognition process can both refer to the global distribution features of the low-frequency background to eliminate false defect interference and focus on high-frequency detail features to capture subtle local anomalies.
[0054] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0055] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A visual identification method for defects in conductive paste coating, characterized in that, Includes the following steps: Acquire a sequence of consecutive frame images of the area to be detected on a conductive paste coating production line in a high-speed continuous coating mass production scenario; A sequence of consecutive frames of images is input into a feature extraction network of a trained deep neural network to extract the initial feature map of the region to be detected. The initial feature map is input into the frequency domain decoupling module, which performs a Fourier transform on the initial feature map, decomposing it into low-frequency component feature maps and high-frequency component feature maps. The steps are as follows: Two-dimensional fast Fourier transform is performed on each channel of the initial feature map along the spatial dimension to obtain the amplitude spectrum and phase spectrum of the initial feature map in the frequency domain. The low-frequency segmentation radius of the amplitude spectrum is determined based on the frequency domain distribution range corresponding to the thickness gradient naturally formed by the irregular particles contained in the conductive paste along the coating direction. Frequency domain masking is performed on the amplitude spectrum based on the low-frequency segmentation radius. The components in the amplitude spectrum that are within the low-frequency segmentation radius are taken as low-frequency amplitude components, and the components in the amplitude spectrum that are outside the low-frequency segmentation radius are taken as high-frequency amplitude components. The low-frequency amplitude component and the phase spectrum are subjected to inverse Fourier transform to obtain the low-frequency component feature map, and the high-frequency amplitude component and the phase spectrum are subjected to inverse Fourier transform to obtain the high-frequency component feature map. The orthogonal constraint loss is calculated based on the low-frequency component feature map and the high-frequency component feature map. The steps are as follows: The low-frequency component feature map and the high-frequency component feature map are expanded along the spatial dimension to obtain the low-frequency feature vector set and the high-frequency feature vector set, respectively. The set of low-frequency feature vectors and the set of high-frequency feature vectors are input into the mutual information lower bound estimator, and the output is the mutual information lower bound estimate. The mutual information lower bound estimator uses a trained neural network discriminator. Use the lower bound estimate of mutual information as the orthogonal constraint loss; The orthogonal constraint loss is fed back to the frequency domain decoupling module, guiding the module to update the low-frequency component feature map and the high-frequency component feature map, and outputting the updated low-frequency component feature map and the updated high-frequency component feature map. The steps are as follows: The orthogonal constraint loss is propagated backward along the gradient propagation path of the frequency domain decoupling module to calculate the gradient of the frequency domain segmentation radius in the frequency domain decoupling module; The frequency domain segmentation radius is iteratively updated based on the gradient of the frequency domain segmentation radius; During each forward propagation, the frequency domain decoupling module uses the iteratively updated frequency domain segmentation radius to perform Fourier transform decomposition on the initial feature map, and outputs the updated low-frequency component feature map and the updated high-frequency component feature map. Coating defects are identified based on the updated low-frequency component feature map and the updated high-frequency component feature map, and the defect identification results are output.
2. The visual recognition method for conductive paste coating defects according to claim 1, characterized in that, Before feeding the orthogonal constraint loss back to the frequency domain decoupling module, the steps for jointly optimizing the orthogonal constraint loss and the main task loss of the deep neural network are as follows: Obtain the main task loss of the deep neural network in the coating defect recognition task. The main task loss includes the defect classification loss and the defect location regression loss. The joint loss function is obtained by weighted summation of the orthogonal constraint loss and the main task loss. The joint loss function is backpropagated along the backpropagation path of the deep neural network to synchronously update the parameters of the frequency domain decoupling module and the defect detection network.
3. The visual recognition method for conductive paste coating defects according to claim 2, characterized in that, The weighting coefficients for the orthogonal constraint loss and the main task loss are determined using a dynamic adjustment strategy: During the training phase of a deep neural network, the weighting coefficients of the orthogonal constraint loss are adjusted in stages according to the training progress. As the training process progresses, the weighting coefficients of the orthogonal constraint loss are gradually adjusted to stable values, which are greater than zero.
4. The visual recognition method for conductive paste coating defects according to claim 1, characterized in that, The frequency domain decoupling module performs a Fourier transform on the initial feature map as follows: The initial feature map is subjected to a two-dimensional Fourier transform along the spatial dimension to obtain spatial frequency domain features; The spatial frequency domain features are transformed along the channel dimension using a one-dimensional Fourier transform to obtain the channel frequency domain features. In the joint frequency domain space of spatial frequency domain characteristics and channel frequency domain characteristics, determine the joint low frequency region corresponding to the thickness gradient naturally formed by the irregular particles contained in the conductive paste along the coating direction. Based on the joint low-frequency region, spatial frequency domain features and channel frequency domain features are segmented to obtain low-frequency component feature maps and high-frequency component feature maps.
5. The visual recognition method for conductive paste coating defects according to claim 1, characterized in that, The training steps for the mutual information lower bound estimator are as follows: Positive sample pairs are obtained by randomly sampling from the historical initial feature maps extracted from the historical coating image sequence by the feature extraction network of the trained deep neural network. The positive sample pairs are the low-frequency component feature maps and high-frequency component feature maps corresponding to the same initial feature map after Fourier transform decomposition. Randomly shuffle the high-frequency component feature maps of positive sample pairs along the channel dimension to construct negative sample pairs; Positive and negative sample pairs are input into the mutual information lower bound estimator to distinguish between positive and negative sample pairs as the training objective, and the mutual information lower bound estimator is trained comparatively.
6. The visual recognition method for conductive paste coating defects according to claim 1, characterized in that, Before inputting a sequence of consecutive image frames into the feature extraction network of a trained deep neural network, the pre-training steps for the feature extraction network are as follows: A self-supervised contrastive learning framework was adopted to pre-train the feature extraction network on a sequence of unlabeled historical images of conductive paste coating. During the pre-training process, feature vectors extracted from the same spatial location in adjacent frames of the same continuous frame image sequence are used as positive samples, and feature vectors extracted from random spatial locations in different continuous frame image sequences are used as negative samples. The parameters of the feature extraction network are updated with the training objective of distinguishing between positive and negative sample feature vectors.
7. The visual recognition method for conductive paste coating defects according to claim 1, characterized in that, The steps for coating defect identification based on the updated low-frequency component feature map and the updated high-frequency component feature map are as follows: The updated low-frequency component feature map and the updated high-frequency component feature map are concatenated along the channel dimension to obtain a fused feature map. The fused feature map is input into the defect detection network, and the defect category prediction result and defect location regression result are output.
Citation Information
Patent Citations
Leather defect identification method based on double-branch frequency domain feature decoupling and dynamic channel enhancement network
CN121010819A
Paper coating defect classification method and system based on infrared image recognition
CN121051704A