Electronic circuit board defect detection intelligent method based on RMT deep learning model

By combining CNN and RMT methods, the problem of noise interference in electronic circuit board defect detection is solved, higher detection accuracy and robustness are achieved, and the automation level of the production line is improved.

CN119850541AActive Publication Date: 2025-04-18CHINA THREE GORGES UNIV

Patent Information

Application Number
CN202411908106.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-18
Estimated Expiration
2044-12-24

AI Technical Summary

Technical Problem

During the electronic circuit board defect detection process based on the RMT deep learning model, the model's excessive sensitivity to abnormal noise leads to errors or missed detection of defect recognition, especially in complex manufacturing environments.

Method used

Combining convolutional neural network (CNN) and random matrix theory (RMT), image features are automatically extracted through CNN, and RMT performs noise analysis and filtering, suppresses interference of environmental factors on image quality, and improves model stability and detection accuracy.

Benefits of technology

It effectively reduces noise interference, enhances detection accuracy and robustness, improves the automation level and detection effect of the production line, and reduces the false detection and missed detection rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850541A_ABST
    Figure CN119850541A_ABST
Patent Text Reader

Abstract

The invention discloses an electronic circuit board defect detection intelligent method based on an RMT deep learning model, and relates to the technical field of electronic circuit board detection, and the method comprises the following steps: carrying out the image collection of an electronic circuit board through high-resolution camera shooting, carrying out the de-noising processing of an image, reducing the noise influence caused by environmental factors and equipment errors, and improving the detection precision of the electronic circuit board. And a clean input image is provided for subsequent analysis. According to the method, the convolutional neural network and the random matrix theory are combined, so that the accuracy and robustness of defect detection of the electronic circuit board are remarkably improved. The CNN accurately extracts image features, the RMT effectively filters noise, and the model stability is enhanced. The self-adaptive algorithm and the multi-task learning optimization training process reduce false detection and missing detection and improve the detection efficiency, thereby improving the automation level and the detection precision of the production line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic circuit board detection, and in particular to an intelligent method for electronic circuit board defect detection based on an RMT deep learning model. Background Art

[0002] Intelligent detection of defects on electronic circuit boards based on the RMT deep learning model refers to the use of a combination of random matrix theory (RMT) and deep learning to automatically detect and analyze defects on electronic circuit boards (PCBs). In this method, the image of the electronic circuit board is first feature extracted and learned through a deep learning model to identify and classify various defects in the image (such as cracks, short circuits, welding defects, etc.). Then, random matrix theory is applied to analyze and process the statistical characteristics of high-dimensional data in the image to help improve the robustness and accuracy of the detection process. Under this effect, RMT helps to improve the training efficiency of the deep learning model, reduce noise interference, and optimize feature expression, thereby improving the accuracy and real-time performance of defect detection on electronic circuit boards. In general, this intelligent detection method combines advanced mathematical theory with artificial intelligence technology, and can achieve more efficient and accurate quality control in the manufacturing of electronic products.

[0003] The prior art has the following deficiencies:

[0004] In the process of intelligent defect detection of electronic circuit boards based on the RMT deep learning model, the model may be overly sensitive to abnormal noise. Although the deep learning model has efficient feature extraction capabilities when processing a large number of PCB images, since RMT relies more on statistical characteristics in the analysis of high-dimensional data, when the model encounters non-standard noise in the image (for example, uneven lighting or sensor errors, etc.), RMT may not be able to effectively distinguish between noise and actual defects when processing these noises, resulting in errors or missed detections of defect identification. Especially in a manufacturing environment, due to factors such as equipment aging and changes in ambient light, the noise generated may be extremely complex and difficult to be identified by traditional image processing methods. If this problem is not solved in a timely manner, it may lead to a large-scale increase in product defect rates, thereby affecting product quality and increasing rework costs. In some electronic products with high precision requirements, it may even cause unforeseen safety hazards, such as functional failure or short circuit risks of circuit boards, which seriously affect the safety of end users and the reliability of products.

[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention

[0006] The purpose of the present invention is to provide an intelligent method for electronic circuit board defect detection based on the RMT deep learning model. By combining convolutional neural networks (CNN) and random matrix theory (RMT), this solution effectively improves the accuracy and robustness of electronic circuit board (PCB) defect detection. CNN automatically extracts image features and accurately identifies tiny or irregular defects, while RMT suppresses the interference of environmental factors on image quality through noise analysis and filtering, thereby improving the stability of the model. Adaptive algorithms and multi-task learning (MTL) optimize the training process, reduce false detections and missed detections, and improve detection efficiency. The overall solution reduces noise interference, enhances detection accuracy, and improves the automation level and detection effect of the production line to solve the problems in the above-mentioned background technology.

[0007] In order to achieve the above object, the present invention provides the following technical solution: an intelligent method for defect detection of electronic circuit boards based on the RMT deep learning model, comprising the following steps:

[0008] The electronic circuit board is imaged through high-resolution video and denoised to reduce the noise impact caused by environmental factors and equipment errors, providing clean input images for subsequent analysis.

[0009] A convolutional neural network is used to extract features from the collected electronic circuit board images. The convolutional neural network model extracts local and global features from the image through layer convolution and pooling operations, providing rich feature representation for subsequent defect detection.

[0010] Use random matrix theory to process high-dimensional data extracted by deep learning models. By constructing a data matrix and applying the eigendecomposition method of random matrix theory, analyze the noise pattern in the image, and distinguish between noise and defects through statistical analysis methods to reduce the interference of noise on defect identification.

[0011] Based on deep learning algorithms, combined with features processed by random matrix theory, defects are classified and detected. Multi-task learning methods are used to jointly optimize image defect classification and positioning problems, thereby effectively identifying different types of defects.

[0012] On the basis of the deep learning model, an adaptive algorithm optimization process is introduced, and error correction is performed through an improved loss function. The optimization algorithm based on the gradient descent method is adopted, combined with the high-dimensional features extracted by random matrix theory, to iteratively optimize the model and improve the accuracy and robustness of defect detection.

[0013] Preferably, the electronic circuit board is imaged by high-resolution photography, and the image is denoised to reduce the noise impact caused by environmental factors and equipment errors, and provide a clean input image for subsequent analysis. The specific steps are as follows:

[0014] First, a high-resolution camera is used to capture images of the electronic circuit board;

[0015] After image acquisition, illumination equalization is performed;

[0016] Smooth the image to remove interference from non-target signals;

[0017] After image acquisition and denoising, the images were normalized and resized.

[0018] Preferably, a convolutional neural network is used to extract features from the collected electronic circuit board images. The convolutional neural network model extracts local and global features from the image through layer convolution and pooling operations, providing rich feature representation for subsequent defect detection. The specific steps are as follows:

[0019] After high-resolution image acquisition and denoising, the image will serve as the input of CNN;

[0020] An activation function is added after each convolution operation to introduce nonlinear mapping;

[0021] Pooling is performed after convolution and activation functions;

[0022] After convolution and pooling operations, the deep layers of the CNN will begin to extract global features in the image, leading to a higher-level understanding of the image of the entire circuit board.

[0023] Preferably, random matrix theory is used to process high-dimensional data extracted by the deep learning model, and the interference of noise on defect identification is reduced by constructing a data matrix. The specific steps are as follows:

[0024] After CNN extracts features, a set of high-dimensional data is obtained, which contains local and global features of the image;

[0025] The constructed data matrix was subjected to spectral analysis using the eigendecomposition method of RMT;

[0026] Through the eigenvalue decomposition of RMT, the key steps of noise pattern recognition are obtained;

[0027] After feature decomposition and noise removal, the remaining high-dimensional data contains the image features that have been filtered out through noise, and the retained features accurately reflect the defects in the image.

[0028] Preferably, based on the deep learning algorithm, combined with the features processed by random matrix theory, the defects are classified and detected, and the image defect classification and positioning problems are jointly optimized by using the multi-task learning method, so as to effectively identify different types of defects. The specific steps are as follows:

[0029] The features processed by CNN and RMT will be used as input to the multi-task learning model. Let the input features processed by CNN and RMT be expressed as Where m is the number of samples, n is the feature dimension of each sample, and the multi-task learning model performs joint training of two tasks by sharing some network layers;

[0030] The output of the localization task is the coordinates of the defect location L = {x, y}. The constructed MTL model will share the parameters θ shared To learn the input features, the calculation expression is as follows:

[0031]

[0032] In the formula, F shared is the shared feature output after the shared network layer, F is the input feature, is a nonlinear transformation of the shared part;

[0033] In MTL, in order to jointly optimize the classification and positioning tasks, the loss function needs to comprehensively consider the losses of the two tasks and weight them. The cross entropy loss function is used to calculate the classification loss. The calculation expression is as follows:

[0034]

[0035] Where, L class is the classification loss, y ij is the one-hot encoding value of the true label, is the true label of sample i belonging to category j, is the predicted probability value, the model predicts the probability that sample i belongs to category j, and k is the total number of categories;

[0036] The loss of the positioning task uses the mean square error to calculate the coordinate error. The calculation expression is as follows:

[0037]

[0038] Where, L loc is the positioning loss, and They represent the x-coordinate and y-coordinate of the defect position of the i-th sample predicted by the model, respectively. i and i Respectively represent the x-coordinate and y-coordinate of the true defect position of the i-th sample;

[0039] In order to balance the impact of the two tasks on the model, the weight coefficient λ is introduced class and λ loc , a weighted combination of the two losses is performed to obtain the final multi-task loss function, and the calculation expression is as follows:

[0040] LMTL =λ class L class +λ loc L loc

[0041] Where, L MTL is the joint loss function, λ class is the weight coefficient of the classification task, λ loc is the loss function for the classification task;

[0042] The goal of optimization is to minimize this weighted loss function, which is expressed as follows:

[0043]

[0044] In the formula, The model parameters θ, L are optimized by minimizing the loss function MTL (θ) is the total loss function, θ is the model parameter, L class (θ) is the loss function for the classification task, L loc (θ) is the loss function of the localization task;

[0045] In order to optimize the loss function L MTL , the gradient descent method is used to minimize the loss function. In each round of training, the gradient of each parameter is calculated using the following formula and the parameters are updated;

[0046]

[0047] Where η is the learning rate, is the loss function L MTL (θ) Gradient of parameter θ;

[0048] After training, the model outputs the classification probability and positioning coordinates and The defects are finally classified and located. The classification task determines the type of defect by the maximum probability value output. The expression is as follows:

[0049]

[0050] In the formula, c pred is the predicted category label of the final output of the model, according to the classification probability of the model Determine the predicted category by taking the maximum probability value;

[0051] The accuracy of the position is evaluated by calculating the error between the predicted coordinates and the true coordinates. The following indicators are used to evaluate the positioning accuracy;

[0052]

[0053] Where Position Error represents the error between the predicted defect position and the actual position.

[0054] Preferably, based on the deep learning model, the model is iteratively optimized to improve the accuracy and robustness of defect detection. The specific steps are as follows:

[0055] In the optimization process, the parameters of the deep learning model are first initialized, and the high-dimensional features processed by RMT are used as input data. The input features of the model are set as Where m is the total number of samples, d is the feature dimension of each sample, and after the deep learning model extracts the features, the parameters in the model will affect the final prediction results. By optimizing the parameters, the output of the model is more in line with the real label. The expression is as follows: f(X,W,b)=XW+b, where f(X,W,b) is the predicted output of the model, X is the feature input matrix after RMT processing, and W and b are the weight and bias parameters of the model respectively.

[0056] In order to optimize the parameters of the model, a loss function is defined to measure the difference between the model output and the true label. An improved loss function is used. Combined with the characteristics of image defect detection, a noise suppression term is added. The standard loss function is set to mean square error. To solve the noise interference, a regularization term λR(W) based on RMT is introduced, where R(W) represents the norm of the feature matrix extracted by RMT analysis. The final loss function formula is as follows:

[0057]

[0058] Where L(W,b) is the sum of the losses on the entire training set, and f(X p ,W,b) is the prediction output of the model, which represents the model's prediction for the pth sample, X p is the input feature of the pth sample, Y p is the true label of the p-th sample, λR(W) is the regularization term, which is used to control the influence of the regularization term on the loss function;

[0059] Next, the gradient descent method is used to minimize the loss function, and these parameters are updated by calculating the gradient of the loss function with respect to the model parameters W and b. Specifically, the gradients of the weights and biases are obtained by calculating the partial derivatives of the loss function with respect to the parameters. The calculation expression is as follows:

[0060]

[0061] The update rules are as follows:

[0062]

[0063] Where λ is the regularization coefficient, Y is the true label matrix with a size of m·d, d is the feature dimension of each sample, and X T is the transpose of matrix X, W (t+1) is the weight at the t+1th iteration, b (t+1) is the bias at the t+1th iteration, η is the learning rate, W (t) is the weight at the tth iteration, b (t) is the bias at the tth iteration;

[0064] In order to improve the efficiency of the optimization process, the adaptive optimization algorithm Adam optimizer is introduced. The Adam optimizer combines the ideas of momentum and adaptive learning rate adjustment. At each update, the Adam optimizer adjusts the learning rate of each parameter according to the mean and variance of the past gradients to further improve the speed and stability of parameter updates. The update formula of Adam is as follows;

[0065]

[0066]

[0067] In the formula, represents the mean gradient of weight W at the tth iteration, β1 is the momentum decay coefficient, represents the mean gradient of the previous iteration, represents the gradient of the loss function L(W,b) with respect to the weight W, represents the mean squared gradient of the weight W at the tth iteration, β2 is the squared gradient attenuation coefficient, represents the mean squared gradient of the previous iteration, represents the bias-corrected gradient mean after the tth iteration, It represents the bias-corrected mean squared gradient after the tth iteration, and ∈ is a small constant used to prevent division by zero errors and ensure stability.

[0068] In the above technical solution, the technical effects and advantages provided by the present invention are:

[0069] The present invention combines convolutional neural networks (CNN) with random matrix theory (RMT), and this solution effectively solves the noise interference problem in electronic circuit board (PCB) defect detection. The convolutional neural network can automatically identify the local details and global structure of the circuit board from the image during the image feature extraction process, especially the complex defect types. Compared with traditional methods, CNN can more accurately identify tiny or irregular defects, and RMT effectively suppresses the influence of noise by decomposing the features of high-dimensional data, and enhances the robustness of the model to non-standard noise in the image (such as uneven lighting, sensor errors, etc.). Through the noise analysis and filtering of RMT, the system can identify and eliminate the noise components in the image, so that the model can still maintain high detection accuracy in various complex environments, thereby significantly improving the accuracy and robustness of the entire detection system.

[0070] Especially in complex production environments, PCB quality inspection is often affected by many factors, such as equipment aging, changes in ambient light, sensor errors, etc., all of which may lead to a decline in image quality. Traditional image processing methods often have difficulty handling these complex noises, resulting in false detections or missed detections. By combining CNN's deep feature extraction and RMT's noise filtering, this solution can effectively reduce the impact of these external factors and ensure high accuracy and stability of defect detection results. The application of this technology has greatly improved the automation level and detection accuracy of the electronic circuit board inspection process, helping to improve production efficiency, reduce costs and reduce quality problems, especially in the field of high-precision electronic products with extremely high defect requirements.

[0071] The present invention further optimizes the defect detection process through adaptive algorithm optimization and multi-task learning (MTL), which not only improves the detection efficiency, but also significantly reduces the occurrence of false detection and missed detection. The adaptive algorithm dynamically adjusts the learning rate according to the change of the loss function during the training process to ensure that the deep learning model can converge quickly and avoid falling into the local optimal solution, thereby effectively shortening the training time. At the same time, the multi-task learning method is used to jointly train the defect classification and positioning tasks, so that the model can complete multiple goals at the same time in one processing process, thereby improving the overall detection efficiency. Through joint optimization, the model can accurately determine the defect type and accurately locate its position in the image, avoiding redundant calculations and inconsistencies caused by training multiple models separately.

[0072] In addition, when processing high-dimensional data, RMT can effectively remove noise from image features and retain only meaningful defect features. In this way, in practical applications, the system can extract effective information from a large number of PCB images more quickly, greatly improving the detection speed. By reducing noise interference, the system also reduces the false detection rate and missed detection rate, especially when facing images in complex backgrounds and complex environments (such as aging equipment or uneven lighting), the detection accuracy has been greatly improved. Overall, the combination of adaptive optimization and RMT technology enables this solution to more efficiently and accurately identify defects in industrial production, greatly improving the automation level and detection accuracy of the production line, and reducing the cost and error rate of manual inspection. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0074] Figure 1 This is a method flow chart of the intelligent method for electronic circuit board defect detection based on the RMT deep learning model of the present invention. DETAILED DESCRIPTION

[0075] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present disclosure will be more comprehensive and complete, and the concept of the example embodiments will be fully conveyed to those skilled in the art.

[0076] The present invention provides Figure 1 The electronic circuit board defect detection intelligent method based on the RMT deep learning model shown includes the following steps:

[0077] The electronic circuit board (PCB) is imaged through high-resolution video and denoised to reduce the noise impact caused by environmental factors and equipment errors, providing clean input images for subsequent analysis.

[0078] The electronic circuit board is imaged through high-resolution video and denoised to reduce the noise impact caused by environmental factors and equipment errors, providing a clean input image for subsequent analysis. The specific steps are as follows:

[0079] First, use a high-resolution camera (such as an industrial-grade camera or scanner) to capture images of the electronic circuit board (PCB);

[0080] It is very important to choose the right camera equipment, which should have high pixels, high dynamic range and high spectral response to capture enough fine image details. These images must be clear enough to accurately reflect every small defect on the circuit board. To ensure the consistency of the acquired data, avoid offset or movement between the camera and the circuit board during image acquisition to ensure the geometric alignment of the image. To reduce interference caused by equipment or environmental changes, the camera should be mounted on a stable bracket and use a suitable light source to ensure uniform illumination of the circuit board surface.

[0081] After image acquisition, illumination equalization is performed;

[0082] Since there may be uneven lighting or shadows in the manufacturing environment, it directly affects the image quality. In particular, the surface of the circuit board may produce light spots or shadows due to uneven material reflection, which interferes with image analysis. Therefore, after image acquisition, lighting equalization is performed first. This step can adjust the brightness and contrast of the image through image preprocessing algorithms (such as histogram equalization) to make the details of the circuit board surface more prominent. Lighting equalization adjusts the global brightness distribution of the image to ensure that the brightness range is distributed as evenly as possible and eliminate image distortion caused by uneven lighting. This helps to improve the stability of subsequent image analysis and ensure that the model can accurately extract defect features even in low-contrast or high-reflection areas.

[0083] Smooth the image to remove interference from non-target signals;

[0084] During image acquisition, the camera sensor or environmental factors (such as electronic equipment interference) often cause various noises in the image, such as salt noise, salt and pepper noise, random noise, etc. In order to solve this problem, noise removal is required, that is, smoothing the image to remove the interference of non-target signals. Common denoising methods include Gaussian filtering, median filtering, and bilateral filtering. Gaussian filtering smoothes the image by calculating the weighted average of the area around each pixel, which is particularly suitable for Gaussian noise. Median filtering effectively removes salt and pepper noise by replacing each pixel value with the median in its neighborhood. Bilateral filtering takes into account the edges of the image, retaining edge information while removing noise, which is particularly important for retaining details in circuit board images. These denoising methods can help remove noise caused by equipment errors or external factors, ensuring that subsequent image analysis can be performed based on clear and clean images.

[0085] After image acquisition and denoising, the images are normalized and resized;

[0086] This step is a key step to ensure that the subsequent deep learning model can correctly process the input image and unify the size. First, the image size needs to be standardized, for example, the image is scaled to a fixed resolution (such as 256x256 pixels or 512x512 pixels) to ensure that the input size of each image is consistent, which is convenient for the deep learning model to perform batch processing. The aspect ratio of the image should be maintained during the image resizing process to avoid distortion caused by stretching or scaling. In addition, the image also needs to be color standardized (such as standardization of RGB channels) to normalize the pixel values ​​to a uniform range (such as 0-1 or -1 to 1) to eliminate brightness differences and dynamic range differences between different images. The standardized image can effectively reduce the deviation caused by data inconsistency and improve the convergence speed and accuracy during model training.

[0087] Convolutional neural network (CNN) is used to extract features from the collected electronic circuit board images. The convolutional neural network model extracts local and global features in the image through layer convolution and pooling operations, providing rich feature representation for subsequent defect detection;

[0088] A convolutional neural network is used to extract features from the collected electronic circuit board images. The convolutional neural network model extracts local and global features from the image through layer convolution and pooling operations, providing rich feature representation for subsequent defect detection. The specific steps are as follows:

[0089] After high-resolution image acquisition and denoising, the image will serve as the input of CNN;

[0090] After the image is input into CNN, it first enters the convolution layer. The function of the convolution layer is to perform convolution operations on the image through multiple convolution kernels (or filters) to extract local features in the image, such as edges, textures, corners, etc. The convolution operation scans the entire image by sliding the convolution kernel, performs weighted summation in each local area, and generates a feature map. These feature maps reflect the basic information in the image, such as lines, boundaries, color changes, etc., helping the network capture subtle local features on the circuit board. Due to the different sizes of the convolution kernels, the network can extract features of different scales, providing richer input data for subsequent defect detection.

[0091] An activation function is added after each convolution operation to introduce nonlinear mapping;

[0092] The activation function changes the negative values ​​in the feature map output by the convolution operation to zero and retains the positive values, thereby enhancing the nonlinear expression ability of the model. ReLU can help the network adapt to complex image patterns more flexibly and avoid the limitations of the linear model's expression ability. Through the activation function, the network can better capture the characteristics of irregular or nonlinear changes in the image, which is especially important when identifying complex defects on circuit boards (such as tiny cracks or irregular defects). In addition, ReLU can also improve training speed and stability, prevent the gradient vanishing problem, and enable deep networks to be effectively trained and optimized.

[0093] Pooling is performed after the convolution operation and activation function;

[0094] The main function of the pooling layer is to downsample the feature map, reduce the size of the feature map, and retain the most important information. Commonly used pooling operations are max pooling and average pooling. Among them, max pooling represents the characteristics of each local area by selecting the maximum value in the area, while average pooling takes the average value of the local area. The pooling operation can reduce the dimension of the feature map, thereby reducing the amount of calculation and improving the computational efficiency of the model. In addition, the pooling layer can also enhance the model's tolerance to local position changes, so that the network can still accurately detect defects in different positions.

[0095] After convolution and pooling operations, the deep network of CNN will begin to extract global features in the image, thus gaining a higher-level understanding of the image of the entire circuit board;

[0096] As the number of network layers increases, the network can gradually extract more abstract features from the detailed information of the image, such as different types of defects, defects of different forms, etc. The deep network of CNN can fuse local and global features to form a complete feature representation. Especially in defect detection, the network can not only identify the local features of a single defect, but also understand the relationship between these features, so as to make accurate classification and positioning. Finally, after convolution and pooling operations, the feature vector output by CNN will be used as the input of the subsequent classifier or regressor, providing strong feature support for accurate defect detection and positioning.

[0097] Use random matrix theory (RMT) to process high-dimensional data extracted by deep learning models. By constructing a data matrix and applying the eigendecomposition method of random matrix theory (RMT), the noise pattern in the image is analyzed. The noise and defects are distinguished through statistical analysis methods to reduce the interference of noise on defect identification.

[0098] The high-dimensional data extracted by the deep learning model is processed using random matrix theory (RMT). By constructing a data matrix, the interference of noise on defect identification is reduced. The specific steps are as follows:

[0099] After CNN extracts features, a set of high-dimensional data is obtained, which contains local and global features of the image;

[0100] In order to apply RMT, these high-dimensional data need to be converted into a matrix for subsequent statistical analysis. Usually, the image features are expanded into a two-dimensional matrix, where each row represents a sample and each column represents a feature. The constructed data matrix can include features from multiple images, or it can be features extracted from different convolutional layers of a single image. In this way, RMT can perform statistical analysis on these high-dimensional data to find potential noise patterns and anomalies in the data structure. This step is the basis for applying RMT and provides a mathematical framework for subsequent analysis of noise and defects.

[0101] The constructed data matrix was subjected to spectral analysis using the eigendecomposition method of RMT;

[0102] RMT can identify different statistical characteristics in the data by calculating the distribution of eigenvalues ​​of the data matrix. The eigenvalues ​​of the image feature matrix reflect the internal structure of the data, and the distribution of eigenvalues ​​can reveal the difference between noise and useful signals (such as defect features). Under normal circumstances, noise in an image usually appears as a small eigenvalue with a relatively scattered distribution, while defect features usually appear as concentrated or abnormal peaks in the distribution of eigenvalues. By analyzing the eigenvalues, potential noise patterns can be discovered and distinguished from real defects in the image.

[0103] Through the eigenvalue decomposition of RMT, the key steps of noise pattern recognition are obtained;

[0104] The model will separate noise from actual defects based on the size and distribution of eigenvalues. Noise usually appears as a pattern with small eigenvalues ​​and a wide distribution, while real defect features usually appear as more concentrated eigenvalues ​​or specific patterns. Therefore, when using RMT for data denoising, the part with smaller eigenvalues ​​(i.e., noise) is usually suppressed, and only those eigenvalues ​​related to defects are retained. This can be done by setting a threshold and removing the part corresponding to the eigenvalues ​​less than the threshold from the data matrix. In this way, the noise is effectively filtered, providing cleaner and more stable input data for subsequent defect detection.

[0105] After feature decomposition and noise removal, the remaining high-dimensional data contains the image features that have been filtered out through noise, and the retained features accurately reflect the defects in the image;

[0106] Using statistical analysis methods, the denoised data is further processed to ensure that noise and defects are effectively distinguished. Specifically, the remaining features can be classified through cluster analysis, correlation analysis and other methods to ensure that only those features related to actual defects are retained. These valid features will be passed as input data to subsequent defect detection models (such as classifiers or regressors) to further optimize the defect detection results. In this way, RMT helps deep learning models improve their robustness to noise, reduce false detections and missed detections, and thus greatly improve the accuracy and stability of defect detection.

[0107] Based on deep learning algorithms, combined with features processed by random matrix theory (RMT), defects are classified and detected. Multi-task learning (MTL) methods are used to jointly optimize image defect classification and positioning problems, thereby effectively identifying different types of defects.

[0108] Based on the deep learning algorithm, combined with the features processed by random matrix theory (RMT), defects are classified and detected. The multi-task learning (MTL) method is used to jointly optimize the image defect classification and positioning problems, so as to effectively identify different types of defects. The specific steps are as follows:

[0109] The features processed by CNN and RMT will be used as input to the multi-task learning (MTL) model. In the MTL framework, a shared neural network model is usually constructed, in which one part of the network structure is used for the image classification task and the other part of the network structure is used for the positioning task. The input features processed by CNN and RMT are represented as Where m is the number of samples, n is the feature dimension of each sample, and the multi-task learning model performs joint training of two tasks by sharing some network layers;

[0110] The output of the localization task is the coordinates of the defect location L = {x, y}. The constructed MTL model will share the parameters θ shared To learn the input features, the calculation expression is as follows:

[0111]

[0112] , where F shared is the shared feature output after the shared network layer, F is the input feature, is a nonlinear transformation of the shared part;

[0113] In MTL, in order to jointly optimize the classification and positioning tasks, the loss function needs to comprehensively consider the losses of the two tasks and weight them. The cross entropy loss function is used to calculate the classification loss. The calculation expression is as follows:

[0114]

[0115] , where L class is the classification loss, y ij is the one-hot encoding value of the true label, is the true label of sample i belonging to category j, is the predicted probability value, the model predicts the probability that sample i belongs to category j, and k is the total number of categories;

[0116] The loss of the positioning task uses the mean square error (MSE) to calculate the coordinate error. The calculation expression is as follows:

[0117]

[0118] Where, L loc It is the positioning loss, that is, when the model predicts the position, it calculates the difference between the predicted position and the actual position. and They represent the x-coordinate and y-coordinate of the defect position of the i-th sample predicted by the model, respectively. i and i Respectively represent the x-coordinate and y-coordinate of the true defect position of the i-th sample;

[0119] In order to balance the impact of the two tasks on the model, the weight coefficient λ is introduced class and λ loc , a weighted combination of the two losses is performed to obtain the final multi-task loss function, and the calculation expression is as follows:

[0120] L MTL =λ class L class +λ loc L loc

[0121] Where, L MTL is the joint loss function, which is the total loss function in multi-task learning. It is the loss L of the classification task. class and the loss L for the localization task loc The weighted sum of class is the weight coefficient of the classification task, which determines the importance of the classification task in the total loss function, λ loc It is the loss function for classification tasks, which measures the difference between the class probability predicted by the model and the true label;

[0122] The goal of optimization is to minimize this weighted loss function, which is expressed as follows:

[0123]

[0124] In the formula, The model parameters θ, L are optimized by minimizing the loss function MTL(θ) is the total loss function, θ is the model parameter, which is the parameter set of the model, usually including all network weights and bias terms, L class (θ) is the loss function of the classification task, which is used to measure the difference between the category predicted by the model and the true category. loc (θ) is the loss function of the localization task, which calculates the difference between the predicted defect coordinates and the true coordinates by the mean square error (MSE);

[0125] In order to optimize the loss function L MTL , use the gradient descent method (such as Adam optimizer) to minimize the loss function. In each round of training, the gradient of each parameter is calculated using the following formula and the parameters are updated;

[0126]

[0127] Where η is the learning rate, is the loss function L MTL (θ) Gradient of parameter θ;

[0128] Since part of the network is shared between tasks, during back propagation, the gradient is propagated to the relevant parameters of the classification and localization tasks at the same time, and these parameters are adjusted according to the weighted value of the loss function.

[0129] After training, the model outputs the classification probability and positioning coordinates and The defects are finally classified and located. The classification task determines the type of defect by the maximum probability value output. The expression is as follows:

[0130]

[0131] In the formula, c pred is the predicted category label of the final output of the model, according to the classification probability of the model Determine the predicted category by taking the maximum probability value;

[0132] The accuracy of the position is evaluated by calculating the error between the predicted coordinates and the true coordinates. The following indicators are used to evaluate the positioning accuracy;

[0133]

[0134] Where Position Error represents the error between the predicted defect position and the true position. This error measures the distance between the predicted position and the true position. The unit is the number of pixels in the image, reflecting the accuracy of the positioning task.

[0135] Based on the deep learning model, an adaptive algorithm optimization process is introduced to correct errors through an improved loss function. The optimization algorithm based on the gradient descent method is used, combined with high-dimensional features extracted by random matrix theory (RMT), to iteratively optimize the model and improve the accuracy and robustness of defect detection.

[0136] Based on the deep learning model, the model is iteratively optimized to improve the accuracy and robustness of defect detection. The specific steps are as follows:

[0137] In the optimization process, the parameters of the deep learning model are first initialized, and the high-dimensional features processed by RMT are used as input data. The input features of the model are set as Where m is the total number of samples, d is the feature dimension of each sample, and after the deep learning model extracts the features, the parameters in the model will affect the final prediction results. By optimizing the parameters, the output of the model is more in line with the real label. The expression is as follows: f(X,W,b)=XW+b, where f(X,W,b) is the predicted output of the model, X is the feature input matrix after RMT processing, and W and b are the weight and bias parameters of the model respectively.

[0138] In order to optimize the parameters of the model, a loss function is defined to measure the difference between the model output and the true label. An improved loss function is used. Combined with the characteristics of image defect detection, a noise suppression term is added. The standard loss function is set to mean square error. To solve the noise interference, a regularization term λR(W) based on RMT is introduced, where R(W) represents the norm of the feature matrix extracted by RMT analysis. The final loss function formula is as follows:

[0139]

[0140] Where L(W,b) is the sum of the losses on the entire training set, and f(X p ,W,b) is the prediction output of the model, which represents the model's prediction for the pth sample, X p is the input feature of the pth sample, Y p is the true label of the p-th sample, λR(W) is the regularization term, which is used to control the influence of the regularization term on the loss function;

[0141] Next, the gradient descent method is used to minimize the loss function, and these parameters are updated by calculating the gradient of the loss function with respect to the model parameters W and b. Specifically, the gradients of the weights and biases are obtained by calculating the partial derivatives of the loss function with respect to the parameters. The calculation expression is as follows:

[0142]

[0143] The update rules are as follows:

[0144]

[0145] Where λ is the regularization coefficient, which is used to control the weight of the regularization term, Y is the true label matrix with a size of m·d, d is the feature dimension of each sample, and X T is the transpose of matrix X, W (t+1) is the weight at the t+1th iteration, b (t+1) is the bias at the t+1th iteration, η is the learning rate, W (t) is the weight at the tth iteration, b (t) is the bias at the tth iteration;

[0146] The role of the update rule is to adjust the parameters (weights and biases) of the deep learning model through the gradient descent method to minimize the loss function, thereby improving the performance of the model in the defect detection task. Specifically, the update rule calculates the direction and magnitude of each parameter adjustment based on the gradient of the loss function with respect to the model parameters. The gradient represents the rate of change of the loss function with respect to the model parameters, indicating the direction in which the loss function increases or decreases fastest. Therefore, the parameters are adjusted in the direction of the negative gradient, that is, optimized "towards the direction of minimum loss". By continuously iteratively updating the parameters, the model gradually reduces the difference between the predicted value and the true value, thereby achieving more accurate defect detection. In this process, the gradient descent method gradually reduces the error of the model on the training data by continuously optimizing the weights and biases, and finally achieves better performance. This update rule can effectively guide the model to converge to the optimal solution and improve the generalization ability and robustness of the model.

[0147] In order to improve the efficiency of the optimization process, the adaptive optimization algorithm Adam optimizer is introduced. The Adam optimizer combines the ideas of momentum and adaptive learning rate adjustment. At each update, the Adam optimizer adjusts the learning rate of each parameter according to the mean and variance of the past gradients to further improve the speed and stability of parameter updates. The update formula of Adam is as follows;

[0148]

[0149] In the formula, It represents the mean gradient of weight W at the tth iteration, i.e., the momentum term, which is used to accelerate the gradient descent process. β1 is the momentum attenuation coefficient, which is usually set to 0.9. It determines the influence of the mean gradient of the previous step on the mean gradient of the current step. represents the mean gradient of the previous iteration, Represents the gradient of the loss function L(W,b) with respect to the weight W, that is, the derivative of the loss with respect to the weight, indicating how to adjust the weight to minimize the loss function. It represents the square mean of the gradient of the weight W at the tth iteration, that is, the RMSProp part, which reflects the fluctuation of the gradient. β2 is the square attenuation coefficient of the gradient, which is usually taken as 0.999. represents the mean squared gradient of the previous iteration, It represents the bias-corrected mean gradient after the tth iteration, avoiding the problem of initial bias toward zero. It represents the bias-corrected mean squared gradient after the tth iteration, and ∈ is a small constant used to prevent division by zero errors and ensure stability.

[0150] Through the derivation of the above formula, the Adam optimizer effectively combines momentum and adaptive learning rate adjustment, and dynamically adjusts the step size according to the gradient mean and the gradient square mean at each parameter update, which not only accelerates convergence but also avoids overfitting. Through the adjustment of these optimization parameters, Adam can quickly and stably optimize the parameters of the model in complex tasks, such as electronic circuit board defect detection, thereby improving the accuracy and robustness of detection.

[0151] Specific implementation method 1: This implementation method proposes an electronic circuit board (PCB) defect detection system integrating convolutional neural network (CNN) and random matrix theory (RMT), aiming to improve the accuracy and robustness of defect recognition in the manufacturing process of electronic products. This system completes high-precision defect detection through a series of steps from image acquisition to denoising, feature extraction, noise filtering and optimization processing.

[0152] First, the system uses a high-resolution industrial camera to capture images of electronic circuit boards. High-resolution images can capture subtle defects and detailed structures on PCB circuit boards, which is crucial for subsequent defect detection. Due to factors such as uneven lighting, sensor errors, or environmental interference in actual applications, the image may contain a lot of noise. Therefore, after the image is acquired, denoising must be performed to improve the image quality. The denoising process includes processing methods such as lighting equalization, white balance correction, and image size standardization. Light equalization ensures that the brightness of the image is evenly distributed throughout the area to avoid loss of details in some areas due to uneven light sources; white balance correction corrects color distortion and restores the natural color of the image; and image size standardization ensures the uniformity of the image in the subsequent deep learning model, which is convenient for batch processing. The core goal of this stage is to remove the noise caused by equipment and environmental factors, and provide stable and clear input data for subsequent feature extraction.

[0153] The denoised image is fed into a convolutional neural network (CNN) for feature extraction. CNN is powerful in image processing. It can extract multi-level feature information from images through multiple layers of convolutional layers, activation layers, and pooling layers. In the first convolutional layer, CNN uses a set of convolutional kernels to perform convolution operations on the image to capture low-level features such as edges, textures, and shapes in the image. As the number of network layers increases, CNN will gradually shift from local feature extraction to global feature extraction, identifying more complex structures and patterns in the image (such as connections, solder joints, potential defect areas on circuit boards, etc.). This hierarchical feature extraction method enables CNN to automatically extract important features from images that do not rely on manual design, laying the foundation for subsequent defect detection.

[0154] After CNN extracts features, a high-dimensional feature representation is obtained. These feature information may contain noise or irrelevant information, which affects the accurate identification of subsequent defects. To solve this problem, the system introduces random matrix theory (RMT). RMT can identify noise patterns in the data and distinguish them from real defect features by performing eigenvalue decomposition on high-dimensional data. Specifically, RMT first converts the high-dimensional features extracted by CNN into the form of a mathematical matrix by constructing a data matrix. Then, RMT performs spectral analysis on the matrix and calculates the distribution of eigenvalues. According to the theory of RMT, noise is usually manifested as a part with a smaller eigenvalue, while defect features are manifested as a larger eigenvalue or a concentration of specific patterns. Through this analysis, RMT can effectively identify and suppress noise components, remove them from the data matrix, and retain representative defect features. This process improves the robustness of the model to noise, making subsequent defect classification and positioning more accurate.

[0155] The high-dimensional features optimized by RMT are input into the subsequent classification model to classify and locate defects. Defect detection not only requires identifying the types of defects on the circuit board (such as cracks, poor welding, short circuits, etc.), but also requires accurately locating the specific locations of these defects in the image. In order to achieve this goal, this embodiment adopts a multi-task learning (MTL) method to simultaneously handle the classification and position regression of defects by jointly training a classifier and a regressor. The classification task is responsible for determining whether each area contains defects and classifying its type; the regression task is responsible for accurately predicting the location of the defects in the image. Through the joint optimization of MTL, the model can handle multiple target tasks at the same time, avoid information loss, and improve the overall detection effect. After these steps, the final system can efficiently and accurately identify and locate various defects on electronic circuit boards.

[0156] Specific implementation method 2: This implementation method proposes a method for electronic circuit board defect detection that combines an adaptive algorithm and RMT optimization. This method uses an adaptive algorithm to optimize the deep learning model, and combines RMT technology to identify and remove noise, ultimately achieving high-precision, low false positive rate defect detection. Unlike traditional methods, this system continuously adjusts the parameters in the learning process so that the model can adaptively adjust the detection strategy under different environmental conditions.

[0157] The system first uses a high-resolution camera to capture PCB images and perform denoising. During the image acquisition process, a high-quality industrial camera is used to ensure that sufficiently detailed image data is obtained, especially tiny circuit defects. The core of denoising is to eliminate interference introduced by factors such as uneven lighting, sensor errors, and environmental noise. In the denoising process, in addition to basic lighting equalization and white balance correction, noise removal algorithms (such as bilateral filtering) are also introduced. Bilateral filtering can retain edge information in the image while removing noise, which is crucial for subsequent defect detection and can ensure that subtle defects on the circuit board will not be blurred or lost.

[0158] After image denoising, feature extraction is performed using a convolutional neural network (CNN). In order to improve the stability and accuracy of the training process, this embodiment introduces an adaptive optimization algorithm. Traditional gradient descent methods sometimes encounter problems such as slow convergence and local optimal solutions in deep learning. Adaptive optimization algorithms (such as the Adam optimizer) can dynamically adjust the learning rate according to the changes in the loss function during training to accelerate convergence and avoid falling into local optimal solutions by adaptively adjusting the learning rate. The adaptive optimization algorithm enables the model to adjust parameters more flexibly and adapt to image features of different complexities, thereby improving the accuracy and robustness of defect detection.

[0159] Before training the deep learning model, the system also uses random matrix theory (RMT) to analyze and optimize the high-dimensional features extracted by CNN. RMT can identify the difference between noise patterns and defect features in the image by performing eigenvalue decomposition on the data matrix. Through spectral analysis of the feature matrix, RMT can reveal the difference between noise and defect features, and by filtering out noise with small eigenvalues, retaining larger eigenvalues, which are related to actual defects. In this way, the features optimized by RMT will greatly reduce noise interference and improve the robustness of the model in complex environments. Finally, these optimized features will be input into the classifier for defect identification and location.

[0160] The optimized feature data is fed into the classifier for final defect detection. This stage uses the multi-task learning (MTL) method to optimize both defect classification and defect location tasks. In this way, the system can not only accurately identify the types of defects on the circuit board, but also accurately locate the locations of these defects. Ultimately, by combining the adaptive optimization algorithm with RMT optimization, the system can maintain high-precision defect detection capabilities in a noisy and complex environment, reduce the occurrence of false detections and missed detections, and improve the stability of detection.

[0161] Specific implementation method three: This implementation method proposes an electronic circuit board defect detection system based on random matrix theory (RMT) and multi-task learning (MTL), aiming to solve the problems of large noise interference and low defect recognition accuracy in traditional methods. Through the joint optimization of multi-task learning, the system can simultaneously handle the classification and location tasks of defects, combined with the noise filtering ability of RMT, making the entire detection process more efficient and accurate.

[0162] In this embodiment, a high-resolution camera is first used to capture the PCB image to ensure that the image quality meets the requirements of subsequent analysis. The captured image may be affected by various factors, such as ambient light, device sensor errors, etc., resulting in noise in the image. Therefore, denoising must be performed after image acquisition. Denoising is not just a simple removal of random noise in the image, but also includes preprocessing operations such as illumination equalization and white balance correction. These processing steps can reduce the impact of environmental changes, ensure the stability of image quality, and provide clean input data for subsequent deep learning models.

[0163] The denoised image is fed into a convolutional neural network (CNN) for feature extraction. CNN extracts local and global features through convolution and pooling layers to identify structural information such as circuit board details, solder joints, and connecting lines. In this embodiment, a multi-task learning (MTL) method is used to combine defect classification and positioning tasks for optimization. Multi-task learning can train multiple tasks simultaneously in the same model, thereby improving the efficiency and accuracy of the model. Through joint training, the network can simultaneously handle image defect classification and positioning problems, avoiding information loss or inconsistency between features, and improving the comprehensive detection performance of the system.

[0164] After CNN feature extraction, the system optimizes high-dimensional data through random matrix theory (RMT). RMT can identify and remove the noise part in the data by performing spectral analysis on the feature matrix. Noise usually appears as small eigenvalues. RMT filters these eigenvalues ​​to retain more valuable defect-related features. This process can effectively improve the robustness of the model and reduce the impact of noise interference on defect detection. Finally, the features optimized by RMT are passed to the classifier and regressor for defect classification and location.

[0165] After multi-task learning and RMT optimization, the features finally enter the classification module for accurate classification and location of defects. By combining classification and regression tasks, the system can accurately identify various defects in the image and locate their specific positions in the circuit board. Due to the combination of RMT noise optimization and MTL joint training, the system can maintain high-precision and high-robust defect detection capabilities in complex production environments, significantly improving the quality control level in the production process of electronic circuit boards.

[0166] The present invention combines convolutional neural networks (CNN) with random matrix theory (RMT), and this solution effectively solves the noise interference problem in electronic circuit board (PCB) defect detection. The convolutional neural network can automatically identify the local details and global structure of the circuit board from the image during the image feature extraction process, especially the complex defect types. Compared with traditional methods, CNN can more accurately identify tiny or irregular defects, and RMT effectively suppresses the influence of noise by decomposing the features of high-dimensional data, and enhances the robustness of the model to non-standard noise in the image (such as uneven lighting, sensor errors, etc.). Through the noise analysis and filtering of RMT, the system can identify and eliminate the noise components in the image, so that the model can still maintain high detection accuracy in various complex environments, thereby significantly improving the accuracy and robustness of the entire detection system.

[0167] Especially in complex production environments, PCB quality inspection is often affected by many factors, such as equipment aging, changes in ambient light, sensor errors, etc., all of which may lead to a decline in image quality. Traditional image processing methods often have difficulty handling these complex noises, resulting in false detections or missed detections. By combining CNN's deep feature extraction and RMT's noise filtering, this solution can effectively reduce the impact of these external factors and ensure high accuracy and stability of defect detection results. The application of this technology has greatly improved the automation level and detection accuracy of the electronic circuit board inspection process, helping to improve production efficiency, reduce costs and reduce quality problems, especially in the field of high-precision electronic products with extremely high defect requirements.

[0168] The present invention further optimizes the defect detection process through adaptive algorithm optimization and multi-task learning (MTL), which not only improves the detection efficiency, but also significantly reduces the occurrence of false detection and missed detection. The adaptive algorithm dynamically adjusts the learning rate according to the change of the loss function during the training process to ensure that the deep learning model can converge quickly and avoid falling into the local optimal solution, thereby effectively shortening the training time. At the same time, the multi-task learning method is used to jointly train the defect classification and positioning tasks, so that the model can complete multiple goals at the same time in one processing process, thereby improving the overall detection efficiency. Through joint optimization, the model can accurately determine the defect type and accurately locate its position in the image, avoiding redundant calculations and inconsistencies caused by training multiple models separately.

[0169] In addition, when processing high-dimensional data, RMT can effectively remove noise from image features and retain only meaningful defect features. In this way, in practical applications, the system can extract effective information from a large number of PCB images more quickly, greatly improving the detection speed. By reducing noise interference, the system also reduces the false detection rate and missed detection rate, especially when facing images in complex backgrounds and complex environments (such as aging equipment or uneven lighting), the detection accuracy has been greatly improved. Overall, the combination of adaptive optimization and RMT technology enables this solution to more efficiently and accurately identify defects in industrial production, greatly improving the automation level and detection accuracy of the production line, and reducing the cost and error rate of manual inspection.

[0170] The above description is only by way of illustration of certain exemplary embodiments of the present invention. It is undoubted that those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the above drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.

Claims

1. An intelligent method for defect detection of electronic circuit boards based on the RMT deep learning model, characterized in that: The following steps are involved: The electronic circuit board is imaged through high-resolution video and denoised to reduce the noise impact caused by environmental factors and equipment errors, providing clean input images for subsequent analysis. A convolutional neural network is used to extract features from the collected electronic circuit board images. The convolutional neural network model extracts local and global features from the image through layer convolution and pooling operations, providing rich feature representation for subsequent defect detection. Use random matrix theory to process high-dimensional data extracted by deep learning models. By constructing a data matrix and applying the eigendecomposition method of random matrix theory, analyze the noise pattern in the image, and distinguish between noise and defects through statistical analysis methods to reduce the interference of noise on defect identification. Based on deep learning algorithms, combined with features processed by random matrix theory, defects are classified and detected. Multi-task learning methods are used to jointly optimize image defect classification and positioning problems, thereby effectively identifying different types of defects. On the basis of the deep learning model, an adaptive algorithm optimization process is introduced, and error correction is performed through an improved loss function. The optimization algorithm based on the gradient descent method is adopted, combined with the high-dimensional features extracted by random matrix theory, to iteratively optimize the model and improve the accuracy and robustness of defect detection.

2. The intelligent method for electronic circuit board defect detection based on the RMT deep learning model according to claim 1 is characterized in that: The electronic circuit board is imaged through high-resolution video and denoised to reduce the noise impact caused by environmental factors and equipment errors, providing a clean input image for subsequent analysis. The specific steps are as follows: First, a high-resolution camera is used to capture images of the electronic circuit board; After image acquisition, illumination equalization is performed; Smooth the image to remove interference from non-target signals; After image acquisition and denoising, the images were normalized and resized.

3. The intelligent method for electronic circuit board defect detection based on RMT deep learning model according to claim 1 is characterized in that: A convolutional neural network is used to extract features from the collected electronic circuit board images. The convolutional neural network model extracts local and global features from the image through layer convolution and pooling operations, providing rich feature representation for subsequent defect detection. The specific steps are as follows: After high-resolution image acquisition and denoising, the image will serve as the input of CNN; An activation function is added after each convolution operation to introduce nonlinear mapping; Pooling is performed after convolution and activation functions; After convolution and pooling operations, the deep layers of the CNN will begin to extract global features in the image, leading to a higher-level understanding of the image of the entire circuit board.

4. The intelligent method for electronic circuit board defect detection based on the RMT deep learning model according to claim 1 is characterized in that: Use random matrix theory to process high-dimensional data extracted by deep learning models. By constructing a data matrix, the interference of noise on defect identification can be reduced. The specific steps are as follows: After CNN extracts features, a set of high-dimensional data is obtained, which contains local and global features of the image; The constructed data matrix was subjected to spectral analysis using the eigendecomposition method of RMT; Through the eigenvalue decomposition of RMT, the key steps of noise pattern recognition are obtained; After feature decomposition and noise removal, the remaining high-dimensional data contains the image features that have been filtered out through noise, and the retained features accurately reflect the defects in the image.

5. The intelligent method for electronic circuit board defect detection based on RMT deep learning model according to claim 1 is characterized in that: Based on the deep learning algorithm, combined with the features processed by random matrix theory, defects are classified and detected. The multi-task learning method is used to jointly optimize the image defect classification and positioning problems, so as to effectively identify different types of defects. The specific steps are as follows: The features processed by CNN and RMT will be used as input to the multi-task learning model. Let the input features processed by CNN and RMT be expressed as Where m is the number of samples, n is the feature dimension of each sample, and the multi-task learning model performs joint training of two tasks by sharing some network layers; The output of the localization task is the coordinates of the defect location L = {x, y}. The constructed MTL model will share the parameters θ shared To learn the input features, the calculation expression is as follows: In the formula, F shared is the shared feature output after the shared network layer, F is the input feature, is a nonlinear transformation of the shared part; In MTL, in order to jointly optimize the classification and positioning tasks, the loss function needs to comprehensively consider the losses of the two tasks and weight them. The cross entropy loss function is used to calculate the classification loss. The calculation expression is as follows: Where, L class is the classification loss, y ij is the one-hot encoding value of the true label, is the true label of sample i belonging to category j, is the predicted probability value, the model predicts the probability that sample i belongs to category j, and k is the total number of categories; The loss of the positioning task uses the mean square error to calculate the coordinate error. The calculation expression is as follows: Where, L loc is the positioning loss, and They represent the x-coordinate and y-coordinate of the defect position of the i-th sample predicted by the model, respectively. i and i Respectively represent the x-coordinate and y-coordinate of the true defect position of the i-th sample; In order to balance the impact of the two tasks on the model, the weight coefficient λ is introduced class and λ loc , a weighted combination of the two losses is performed to obtain the final multi-task loss function, and the calculation expression is as follows: L MTL =λ class L class +λ loc L loc Where, L MTL is the joint loss function, λ class is the weight coefficient of the classification task, λ loc is the loss function for the classification task; The goal of optimization is to minimize this weighted loss function, which is expressed as follows: In the formula, The model parameters θ, L are optimized by minimizing the loss function MTL (θ) is the total loss function, θ is the model parameter, L class (θ) is the loss function for the classification task, L loc (θ) is the loss function of the localization task; In order to optimize the loss function L MTL , the gradient descent method is used to minimize the loss function. In each round of training, the gradient of each parameter is calculated using the following formula and the parameters are updated; Where η is the learning rate, is the loss function L MTL (θ) Gradient of parameter θ; After training, the model outputs the classification probability and positioning coordinates and The defects are finally classified and located. The classification task determines the type of defect by the maximum probability value output. The expression is as follows: Where Cpred is the predicted category label of the final output of the model, according to the classification probability of the model Determine the predicted category by taking the maximum probability value; The accuracy of the position is evaluated by calculating the error between the predicted coordinates and the true coordinates. The following indicators are used to evaluate the positioning accuracy; Where Position Error represents the error between the predicted defect position and the actual position.

6. The intelligent method for electronic circuit board defect detection based on RMT deep learning model according to claim 1 is characterized in that: Based on the deep learning model, the model is iteratively optimized to improve the accuracy and robustness of defect detection. The specific steps are as follows: In the optimization process, the parameters of the deep learning model are first initialized, and the high-dimensional features processed by RMT are used as input data. The input features of the model are set as Where m is the total number of samples, d is the feature dimension of each sample, and after the deep learning model extracts the features, the parameters in the model will affect the final prediction results. By optimizing the parameters, the output of the model is more in line with the real label. The expression is as follows: f(X, W, b) = XW + b, where f(X, W, b) is the predicted output of the model, X is the feature input matrix after RMT processing, and W and b are the weight and bias parameters of the model respectively; In order to optimize the parameters of the model, a loss function is defined to measure the difference between the model output and the true label. An improved loss function is used. Combined with the characteristics of image defect detection, a noise suppression term is added. The standard loss function is set to mean square error. To solve the noise interference, a regularization term λR(W) based on RMT is introduced, where R(W) represents the norm of the feature matrix extracted by RMT analysis. The final loss function formula is as follows: Where L(W, b) is the sum of the losses on the entire training set, and f(X p , W, b) is the prediction output of the model, which represents the model's prediction for the pth sample, X p is the input feature of the pth sample, Y p is the true label of the p-th sample, λR(W) is the regularization term, which is used to control the influence of the regularization term on the loss function; Next, the gradient descent method is used to minimize the loss function, and these parameters are updated by calculating the gradient of the loss function with respect to the model parameters W and b. Specifically, the gradients of the weights and biases are obtained by calculating the partial derivatives of the loss function with respect to the parameters. The calculation expression is as follows: The update rules are as follows: Where λ is the regularization coefficient, Y is the true label matrix with a size of m·d, d is the feature dimension of each sample, and X T is the transpose of matrix X, W (t+1) is the weight at the t+1th iteration, b (t+1) is the bias at the t+1th iteration, η is the learning rate, W (t) is the weight at the tth iteration, b (t) is the bias at the tth iteration; In order to improve the efficiency of the optimization process, the adaptive optimization algorithm Adam optimizer is introduced. The Adam optimizer combines the ideas of momentum and adaptive learning rate adjustment. At each update, the Adam optimizer adjusts the learning rate of each parameter according to the mean and variance of the past gradients to further improve the speed and stability of parameter updates. The update formula of Adam is as follows; In the formula, represents the mean gradient of weight W at the tth iteration, β1 is the momentum decay coefficient, represents the mean gradient of the previous iteration, represents the gradient of the loss function L(W, b) with respect to the weight W, represents the mean squared gradient of the weight W at the tth iteration, β2 is the squared gradient attenuation coefficient, represents the mean squared gradient of the previous iteration, represents the bias-corrected gradient mean after the tth iteration, It represents the bias-corrected mean squared gradient after the tth iteration, and ∈ is a small constant used to prevent division by zero errors and ensure stability.

Citation Information

Patent Citations

  • Improved deep learning titanium alloy processing equipment fault detection method

    CN115018020A

  • Float glass defect detection system and detection method based on machine learning

    CN116542963A

  • Structure defect detection using machine learning algorithms

    US20200175352A1

  • System and method for denoising in magnetic resonance imaging using a transform domain local low rank technique

    US20240385270A1

Cited By

  • High-frequency multi-scale inverse proportional weighted and lightweight adaptive retraining method for electronic product texture defect detection

    CN122530648A