Electronic component classification method based on deep denoising sparse autoencoder and issvm
By combining a deep denoising sparse autoencoder and an incremental learning support vector machine classification algorithm, the problems of accuracy and speed in electronic component classification are solved, achieving efficient classification of components with similar appearances. It is applicable to the automatic classification of resistors, inductors, capacitors, diodes, and integrated circuits.
Patent Information
- Application Number
- CN202211247511.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-12
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2042-10-12
AI Technical Summary
Existing technologies struggle to improve the classification accuracy of electronic components without compromising classification speed, especially for similar-looking components such as small surface-mount capacitors and resistors.
We employ a hybrid approach based on Deep Denoising Sparse Autoencoder (DDSA) and Incremental Learning Support Vector Machine (ISSVM) classification algorithm. By combining feature extraction and classification models, we utilize DDSA for feature dimensionality reduction and denoising feature extraction, and combine it with ISSVM for classification.
It achieves high-precision classification of electronic components such as resistors, inductors, capacitors, diodes, and integrated circuits. The classification speed is fast and efficient, and the classification accuracy can reach 92%, making it suitable for large-scale electronic component identification and detection.
Smart Images

Figure CN115565009B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic component classification technology, specifically to an electronic component classification method based on Deep Denoising Sparse Autoencoder (DDSA) and ISSVM. Background Technology
[0002] Electronic components are crucial parts of electronic devices, used for signal amplification, power transmission, and Boolean operations, and are widely used in smartphones, laptops, and other electronic products. In the electronics manufacturing field, with technological advancements, electronic components are becoming increasingly smaller, making rapid component differentiation increasingly difficult. Developing methods for quickly and accurately classifying electronic components would significantly save manpower and time across various sectors. Furthermore, electronic component classification helps strengthen the management of commonly used, highly functional, and valuable electronic components within electronic devices. As technology advances, the research and development cycle for electronic products is shortening, leading to faster product iteration and the creation of electronic waste. Many components in this electronic waste remain intact and contain valuable materials for electronic product manufacturing. However, due to the vast variety of electronic products, collecting and classifying them is an extremely time-consuming and labor-intensive process. Therefore, researching automated electronic component classification methods can help better manage electronic waste and facilitate its effective recycling.
[0003] Currently, the classification of electronic components mainly relies on experienced personnel. However, some electronic components look very similar, such as small surface-mount capacitors and resistors. Even experienced personnel find it difficult to effectively classify similar parts, which is not only time-consuming but also labor-intensive, requiring a high level of skill. Based on this situation, there is an urgent need to develop intelligent classification methods to improve the probability and efficiency of electronic component classification. Among intelligent classification methods, deep learning algorithms have become the preferred approach. Deep learning algorithms are a branch of machine learning that use defined data and make decisions based on predictions, enabling high-precision image classification. However, most deep learning methods require a large number of samples to train the model, and the form of the training samples directly affects its classification accuracy and speed.
[0004] How to improve classification accuracy without affecting classification speed is a problem that urgently needs to be solved by those skilled in the art.
[0005] Therefore, this patent proposes a classification method based on Deep Denoising Sparse Autoencoder (DDSA) and ISSVM, and applies it to the classification of electronic components. Experimental results show that the proposed method can achieve high-precision classification under diverse sample conditions, improve the classification accuracy of electronic components with similar appearances, improve the classification quality of electronic components, and greatly improve the classification speed and efficiency, thereby contributing to industrial research and the recycling and production of large electronic devices. Summary of the Invention
[0006] Purpose of the invention: To address the problem that the collection and classification of electronic products is extremely time-consuming and laborious due to the large variety of electronic products, this invention provides an electronic component classification method based on deep denoising sparse autoencoder and ISSVM, and applies it to the classification of electronic components such as resistors, inductors, capacitors, diodes, and integrated circuits. While maintaining classification accuracy, it can also achieve a fast classification speed.
[0007] Technical solution: This invention provides an electronic component classification method based on deep denoising sparse autoencoder and ISSVM, comprising the following steps:
[0008] Step 1: Preprocess the images of electronic components;
[0009] Step 2: Construct a deep denoising sparse autoencoder (DDSA) and complete feature extraction; use the autoencoder to reduce the dimensionality of the original features, stack the sparse autoencoders together, and adopt a greedy training layer strategy to form a robust model of deep stacked sparse autoencoders; construct a denoising encoder, and reconstruct the original input through training by inputting partially damaged noise data samples to complete the denoising feature extraction based on the autoencoder.
[0010] Step 3: Propose the incremental learning support vector machine classification algorithm ISSVM, apply the KT condition to the original training dataset, add additional data points, and use incremental learning to realize the nonlinear SVM training scheme.
[0011] Step 4: Form a hybrid classification model that combines Deep Denoising Sparse Autoencoder (DDSA) and ISSVM. DDSA is responsible for feature dimensionality reduction and extraction, while ISSVM is responsible for classification. Apply this model to the classification and testing of electronic components.
[0012] Furthermore, in step 1, image augmentation and expansion are performed using image flipping, rotation, blurring, and mirroring methods. The images are preprocessed, and the original data of each element are randomly allocated to the test sample set and training sample set in a 7:3 ratio, and stored in the database. The specific preprocessing operations are as follows:
[0013] Step 1.1: Apply the Viola and Jones (VJ) integrated electronic component detector to detect and locate the bounding box around the electronic component;
[0014] Step 1.2: Locate the electronic component markers. After the initial detection of the electronic component images, the robust Constrained Local Neural Network (CLNF) model is used to detect the markers of each electronic component, and the device is rotated and aligned by obtaining the coordinates of the first pin of the electronic component.
[0015] Step 1.3: Normalize the electronic component image data. The electronic component image is normalized using affine transformation, including alignment processing of the affine transformation and normalization of the image data.
[0016] 3. The electronic component classification method based on deep denoising sparse autoencoder and ISSVM according to claim 2, characterized in that the normalization in step 1.3 specifically includes:
[0017] (1) The initial alignment process is completed by rotating, scaling, distorting and cropping the affine transformation of the component; where the center point of the component is the coordinate of the first pin obtained by the landmark detection, and the angle and ratio of the image rotation are determined by the distance between the center pins of the component, so as to complete the affine distortion; after distortion, the component image is cropped so that the center pin is centered in the component image. The cropping area is also determined by the center pin, which involves the edge parameter of the center pin. This parameter is usually between 0.15 and 0.2.
[0018] (2) Normalize the lighting information by using grayscale information; that is, divide each pixel by 255, rescale each pixel to [0, 1], and subtract the average value to center the pixel value in the electronic component image.
[0019] Furthermore, in step 2, a deep denoising sparse autoencoder (DDSA) is constructed and feature extraction is completed. The specific steps are as follows:
[0020] Step 2.1: Construct a multi-hidden-layer denoising encoder
[0021] Data sample of a damaged input section of an automatic encoder This process yields good representational information. Finally, the original input is reconstructed through training, thus completing the denoising feature extraction based on the autoencoder. θ={w,b} maps the input to the output z∈[0,1]. d' Given the encoding, where w is the weight matrix and b is the bias vector, then:
[0022]
[0023] Where σ(·) is the nonlinear activation function of the encoder, and either the sigmoid function or the tanh function can be selected.
[0024] Step 2.2: Build the decoder
[0025] The decoding process involves mapping z and reconstructing the vector x'∈[0,1] d As shown below:
[0026] x'=g θ' (z)=σ'(w'z+b')
[0027] Where σ'(·) is the non-linear activation function of the decoder, θ'={w',b'} is the code that maps the output to the input, w' is the weight matrix, and b' is the bias vector; during the reconstruction process, all hidden layers use the ReLU activation function, and all output layers use the sigmoid activation function;
[0028] Step 2.3: Initialize the number of layers and weights, determine the parameter hidden layers and the number of nodes, and use the L2 regularization term (also known as the weight decay term) to adjust the weights;
[0029] Step 2.4: Optimize the autoencoder
[0030] The optimization process of the autoencoder is completed by minimizing the average reconstruction error. The optimization conditions are as follows:
[0031]
[0032] Where, x i It is the input data, x 'i It's about reconstructing data, g θ (h) is the decoder output, h = f θ (x) is the encoder output, θ contains the weight w and the offset b, and m is the number of data;
[0033] The mean squared error is used as the loss function l1(x,x'):
[0034]
[0035] Additionally, the cross-entropy loss function l2(x,x') of the autoencoder is defined as follows:
[0036]
[0037] The mean squared error loss function l1(x,x') is used for the pre-training of the autoencoder, and the cross-entropy function l2(x,x') is used for the final training of the stacked autoencoder. A softmax layer is added on top of the stacked autoencoder as a classification layer to train the classification model.
[0038] Step 2.5: Define the regularization term, i.e., the weight decay term.
[0039] The sum of squares over the weights w is then added to the loss function, as shown in the following equation:
[0040]
[0041] Where λ is the regularization strength control parameter, L is the number of hidden layers, and N is the number of hidden layers. l It is the number of neurons in the layer;
[0042] Step 2.6: Set the sparsity specification for the sparse autoencoder
[0043] The sparsity specification of autoencoders is achieved by adding sparsity constraints to neurons, through a data structure built by limiting the number of hidden units and placing constraints on the network. The average activation value of the j-th hidden unit:
[0044]
[0045] Apply approximate constraints Here, ρ is a sparsity parameter. An additional penalty term is added to the optimization objective, namely, a KL penalty term based on the Kullback–Leibler divergence, as detailed below:
[0046]
[0047] Then according to Obtain the sparsity penalty term J S Its definition is as follows:
[0048]
[0049] Where β is the sparse weight and N is the number of hidden layer units. If it is the Kullback–Leibler divergence, then the total cost function J C It can be written as:
[0050] J C =l(x,x')+J w +J S
[0051] Where l(x,x') is the loss function, J w It is a regularization term, J S This is a sparsity penalty term;
[0052] Step 2.7: Stack the denoising and sparse autoencoders together to form a robust model of the Deep Stacked Denoising Sparse Autoencoder (DDSA), and train the deep model using a greedy hierarchical approach.
[0053] Furthermore, the specific operation of using the greedy layering method to train the deep model in step 2.7 is as follows: each autoencoder obtains input from the previous layer and performs pre-training independently. The goal of the training is to place the parameters of all layers in the parameter space region layer by layer.
[0054] First, an unsupervised learning algorithm is used to train the lower layers of the model. This algorithm generates the initial parameters of the first layer of the network, and then uses the obtained output as the input of the next layer for similar training. The initial parameters of the next layer are obtained, and then the output of the next layer is used as the input of the next layer, until the parameters of each layer are initialized. After the stacked unsupervised pre-training stage, the entire network enters the supervised learning stage. At this time, the entire network is then fine-tuned in the opposite direction using the backpropagation algorithm. The total output of the network is the final activation vector. Thus, the stacked autoencoder extracts useful features through a series of learning processes.
[0055] Furthermore, in step 3, the incremental learning support vector machine classification algorithm ISSVM applies the KT condition to the original training dataset and adds additional data points, utilizing incremental learning to achieve a simple and effective nonlinear SVM training scheme. The specific steps are as follows:
[0056] Step 3.1: Solve for the symmetric positive definite kernel matrix Q ij
[0057] For a given classification problem, suppose the training dataset is D and the training vectors are x. i The output label is y i = ±1, the optimal separating function is simplified to a linear combination of kernel functions K defined on the training data, as shown below:
[0058]
[0059] Where α is the Lagrange multiplier, b is the offset, and y j Is input x j The output label is defined by the kernel function K as the dot product of the feature space φ:
[0060] K(x j ,x)=φ(x j )·φ(x)
[0061] The "·" operator is the dot product, φ(x) is the nonlinear eigenvector of vector x; then the symmetric positive definite kernel matrix Q ij The definition is as follows:
[0062] Q ij =y i y j K(x i ,x j )
[0063] Step 3.2: Construct the objective function W
[0064] Solving the dual optimization problem does not require calculating the feature map φ; it only requires calculating the kernel function K, which is accomplished by minimizing the quadratic objective function W under given constraints, as follows:
[0065]
[0066] Among them, y j Is input x j The output label is C, where C is a constant, α is the Lagrange multiplier, b is the offset, and Q is the output label. ij It is a symmetric positive definite kernel matrix;
[0067] Step 3.3: Solve the KT equation g of the objective function i And obtain the classification coefficient {α} i ,b i}
[0068] The first derivative of the objective function W simplifies to the Kuhn-Tucker (KT) equation, as shown below:
[0069]
[0070] Based on the above formula, using the training dataset D and the coefficients {α} i ,b i}, i=1,2,…l, the target task can be divided into three categories: marginal support vectors S, error support vector set E, and residual set R, which is the unused vector set within the given boundary;
[0071] Step 3.4: Add a new data point c, and solve for the increment Δg according to the KT conditions. i
[0072] The KT condition is defined as follows:
[0073]
[0074]
[0075] Where, α c y is the increment coefficient, y is the output label of the input x, Q is the kernel matrix, c is the new data point, and b is the offset.
[0076] Step 3.5: Solve for the Jacobian matrix Ω
[0077] For the edge support vector set {S1,S2,…,S…} l}, when g i When = 0, changes to the coefficient set must satisfy the following conditions:
[0078]
[0079] Ω is a symmetric but non-positive definite Jacobian matrix, specifically defined as follows:
[0080]
[0081] Step 3.6: Solve for the changes in classification coefficients {Δα, Δb}
[0082] In equilibrium, we have:
[0083] Δb=βΔα c
[0084]
[0085] Where β is the sensitivity coefficient, defined as:
[0086]
[0087] P is the solution for the extended matrix. For all sets outside S, j, P = Ω. -1 ,β j =0, its margin is calculated as follows:
[0088]
[0089] Boundary sensitivity γ i Defined as:
[0090]
[0091] Assuming Δα is small enough that none of the elements of the incremental phase set D appear in the marginal support vector S, the error support vector set E, and the residue set R, when candidate point c is added to the working marginal support vector S, the expanded matrix set P will expand as follows:
[0092]
[0093] Step 3.7: Solve for the final classification coefficient {α} i ,b i}, to obtain the optimal classification function
[0094] Final given solution Defined as the current solution b l The current Jacobian inverse matrix P and candidate values (x) c ,y c The function, thus, by adding test point c to set D:D l+1 =D l ∪{c}, the incremental process completes the transformation from l to l+1;
[0095] Step 3.8: Determine if the data points have been added. If not, proceed with the calculation of the next new data point. If the addition is complete, the electronic component classification task is finished.
[0096] Furthermore, the electronic components include resistors, inductors, capacitors, diodes, and integrated circuits.
[0097] Beneficial effects:
[0098] This invention utilizes Deep Denoising Sparse Autoencoder (DDSA) and ISSVM methods to achieve automatic and effective classification of electronic components such as resistors, inductors, capacitors, diodes, and integrated circuits. Specifically, in fault feature extraction, a robust model of Deep Denoising Sparse Autoencoder (DDSA) is proposed. Firstly, the autoencoder is used to reduce the dimensionality of the original features, thereby mitigating the curse of dimensionality caused by excessive features. Secondly, sparse autoencoders are stacked together and a greedy hierarchical training strategy is adopted. Thirdly, a denoising encoder is constructed, and by inputting partially damaged noisy data samples, the original input is reconstructed through training, effectively obtaining robust feature parameters of electronic component images, thus completing denoising feature extraction based on the autoencoder and improving the network's generalization performance. Regarding the classification model, an Incremental Learning Support Vector Machine (ISSVM) classification algorithm is proposed, applying the KT condition to the original training dataset and adding additional data points to improve the algorithm's training speed and classification accuracy, and effectively applying it to the classification task of electronic components.
[0099] Experiments show that the method proposed in this invention achieves both high classification accuracy and fast classification speed, successfully completing the classification and testing of five types of electronic components. Experimental data demonstrates that this method is significantly faster than manual detection and classification, greatly reducing computational costs, while maintaining comparable classification accuracy (up to 92%). It exhibits strong robustness, making it well-suited for large-scale electronic component identification and detection. Furthermore, it can be applied to training datasets of varying sizes, dimensions, shapes, and configurations, and can be extended to other recognition tasks, showing promising application prospects. Attached Figure Description
[0100] Figure 1 It is an electronic component classification model based on Deep Denoising Sparse Autoencoder (DDSA) and ISSVM;
[0101] Figure 2 It is a division of the test sample data of electronic components;
[0102] Figure 3 It is a feature extraction and classification process based on a hybrid classification model of DDSA and ISSVM;
[0103] Figure 4 It is a first-level denoising sparse autoencoder structure (learning from the original input data to obtain first-level features h). (1) );
[0104] Figure 5 It is a second-level denoising sparse autoencoder structure (learning h) (1) Obtain secondary feature h (2) );
[0105] Figure 6 It is a classification layer structure (learning h) (2) (Get component category labels);
[0106] Figure 7 It is an integrated, deep denoising stacked autoencoder structure;
[0107] Figure 8 This is a flowchart of the Incremental Learning Support Vector Machine (ISSVM) classification algorithm;
[0108] Figure 9 These are classification results from different classifiers;
[0109] Figure 10 This is a comparison chart of training errors for Support Vector Machine (SVM), Backpropagation (BP), and RBF. Detailed Implementation
[0110] To better explain and facilitate understanding of the present invention, the technical solution of the present invention is described in detail below. The following embodiments are illustrative of the present invention, but the present invention is not limited to the following embodiments.
[0111] To address the challenge of effectively classifying the diverse range of electronic products using manual methods, this invention proposes an electronic component classification method based on Deep Denoising Sparse Autoencoder (DDSA) and ISSVM. First, images of electronic components are acquired and preprocessed for data augmentation. Then, DDSA is used for feature extraction, employing autoencoders to reduce the dimensionality of the original features and mitigate the curse of dimensionality caused by excessive features. A denoising encoder is constructed by inputting partially corrupted, noisy data samples and reconstructing the original input through training. The sparse autoencoders are stacked together, and a greedy training layer strategy is used to form a robust model of deep stacked sparse autoencoders, thus completing the denoising feature extraction based on the autoencoder. Finally, an incremental learning support vector machine classification algorithm (ISSVM) is proposed. The KT condition is applied to the original training dataset, and additional data points are added, utilizing incremental learning to achieve a simple and effective nonlinear SVM training scheme.
[0112] The electronic component classification system based on Deep Denoising Sparse Autoencoder (DDSA) and ISSVM consists of three modules: electronic component image preprocessing, feature extraction, and electronic component classification.
[0113] Figure 1 The figure shown is an electronic component classification model in an embodiment of the present invention.
[0114] Combination Figure 1 This invention discloses an electronic component classification method based on Deep Denoising Sparse Autoencoder (DDSA) and ISSVM, comprising the following steps:
[0115] Step 1: Acquire and preprocess images of electronic components.
[0116] (1) Acquisition of image samples of electronic components
[0117] During the implementation process, a total of 695 electronic component images were collected and stored in an open database. The electronic component image data consisted of five categories: resistors, inductors, capacitors, diodes, and integrated circuits.
[0118] The distribution of test samples for each electronic component is as follows: Figure 2 As shown.
[0119] (2) Preprocessing of electronic component images
[0120] Electronic component image preprocessing includes electronic component image detection, electronic component image marker localization, and electronic component image normalization.
[0121] a. Electronic component image detection
[0122] Electronic component detection determines the presence of electronic components in a given image and returns the coordinates of the electronic components upon detection. In the proposed system, as a preprocessing step for feature extraction and electronic component image classification, the Viola and Jones integrated electronic component detector is applied to detect and locate the bounding boxes around the electronic components. The Viola and Jones (VJ) detector is a method for frontal 2D detection involving an exhaustive search of the entire electronic component image, and at each pixel, multi-scale exploration using Haar rectangle features to enhance classification performance. VJ is characterized by slow training speed but fast classification speed. Based on the high speed and accuracy of the VJ detector in frontal image detection applications, this patent uses the VJ method to complete the initial detection of electronic component images.
[0123] b. Electronic component marking and positioning
[0124] Electronic component marker localization (feature detection) is used to detect the position of feature markers of electronic components, such as pin positions, contours, and shapes. After the initial detection of the electronic component image, the next step is to align the component image with the average component shape using the component markers. At this point, estimation errors in the marker localization will lead to alignment errors. This patent uses a robust constrained local neural field (CLNF) model to detect the markers of each electronic component and rotates and aligns the device by obtaining the coordinates of the first pin of the electronic component. CLNF is an undirected graphical model that can perform conditional probability modeling of continuous Y vectors based on the pixel intensity values in continuous X support regions. The main model principle is as follows:
[0125] Given a set of input observation variables X = {x1, x2, ... x n}, Y = {y1, y2, ... y n} represents the output variable to be predicted, x i ∈R m The vectorized pixel intensity in the region represented by expert support, y i Let ∈R be the scalar prediction at position i. Then, for a specific observation set, the CLNF model has the following conditional probability distribution:
[0126]
[0127] in, ψ is the normalization function, and ψ is the potential function.
[0128] The CLNF model can be established using equation (1).
[0129] c. Electronic component normalization
[0130] The orientation, position, and lighting of electronic components play a crucial role in distinguishing individual components. The goal of electronic component normalization is to minimize the differences in orientation, position, and lighting, including details beyond the component itself such as the background, thereby reducing the impact of these differences and the external environment on the classification results. This patent employs affine transformation to normalize electronic component images, including alignment processing and image data normalization.
[0131] The first step involves preliminary alignment processing through affine transformations such as rotation, scaling, distortion, and cropping of the components. The center point of the component is determined by the coordinates of pin number one obtained from boundary detection. The distance between the center pins is used to determine the angle and proportion of image rotation, thus completing the affine distortion. After distortion, the component image is cropped to center the center pin within the image. The cropping area is also determined by the center pin, primarily involving its edge parameters, which are typically between 0.15 and 0.2. The height and width of the cropping area are manually determined. In the specific implementation involving electronic component classification, 0.2 is chosen as the edge parameter, and the width and height parameters are 32×32.
[0132] The second step, after the alignment process based on affine transformation, is to normalize the image luminance by using grayscale information to normalize the illumination information. This involves dividing each pixel by 255, rescaling each pixel to [0, 1], and subtracting the average value to center the pixels in the electronic component image.
[0133] The image data after the above alignment and normalization processes are input into a matrix and saved as a MAT file, which is used as standardized data for electronic component images.
[0134] (3) Data expansion
[0135] In the classification process, insufficient datasets can lead to poor classification results in deep learning models. To create the best deep learning model with minimal available data and thus improve model performance, image augmentation is necessary. In this implementation, the patent uses image flipping, rotation, blurring, and mirroring methods for data augmentation. After augmentation, the dataset contains a total of 1390 images. Furthermore, color processing is required before training the network; this involves removing the average values of G, R, B, and grayscale from the mean to ensure all images have the same number of colors, preventing errors during training.
[0136] (4) Creation of test and training sample sets
[0137] Test and training sample sets were selected, and the original datasets for each component were randomly allocated in a 7:3 ratio. 70% of the image data was used for training, and 30% for testing and validation. The class with the least data was integrated circuits, initialized with 60 data points, while inductors had the most, with 140 data points. See Table 1 for details. When allocating data proportionally, it was ensured that each type included components of different types, sizes, and orientations from electronic devices. Finally, the trained model was used to classify the test data.
[0138] Table 1. Division of Image Datasets
[0139]
[0140] Step 2: Construct a deep denoising sparse autoencoder (DDSA) and complete feature extraction.
[0141] Feature extraction is the core of electronic component classification systems. Electronic components are identified by significant features that effectively reflect individual differences between components. However, during classification, too many features can lead to the curse of dimensionality. Therefore, this patent proposes a feature selection mechanism that selects only a subset of features that significantly contribute to electronic component classification as input to the classifier, thereby reducing the number of features and accelerating the classification process. Since autoencoders can reduce dimensionality in high-dimensional data detection and extract local features simultaneously, this patent proposes a Deep Denoising Sparse Autoencoder (DDSA) to extract component features from normalized images, achieving feature selection and dimensionality reduction, and effectively obtaining robust feature parameters for electronic component images. After representing the original component image in low dimension using a sparse autoencoder, it is then input into an Incremental Learning Support Vector Machine (ISSVM) classifier model to achieve component classification. This results in a hybrid classification model combining DDSA and ISSVM, where DDSA handles feature dimensionality reduction and extraction, and ISSVM handles classification.
[0142] The feature extraction and classification process based on the hybrid classification model of DDSA and ISSVM is as follows: Figure 3 .
[0143] The main steps of feature extraction are as follows:
[0144] Step (2)a: Construct a multi-hidden-layer denoising encoder
[0145] In deep model learning, including all features of the target object can clutter the inter-layer computations of the algorithm. Therefore, in autoencoders, unsupervised learning algorithms are used to compress features and then recover them separately, thereby reducing the number of input features and ensuring that clustering algorithms produce more efficient results.
[0146] In a traditional autoencoder, let x∈[0,1] d Let θ = {w, b} be the input vector of the autoencoder, and let θ = {w, b} be the vector that maps the input to the output z ∈ [0, 1]. d' Given the encoding, where w is the weight matrix and b is the bias vector, then:
[0147] z∈f θ (x)=σ(wx+b) (2)
[0148] Where σ(·) is the nonlinear activation function of the encoder, and either the sigmoid function or the tanh function can be selected.
[0149] In this patent, the autoencoder no longer inputs the original x-value, but instead inputs a partially damaged data sample. This yields good representation information, and the original input is reconstructed through the training process, thus completing the denoising feature extraction based on the autoencoder. The above equation can be rewritten as:
[0150]
[0151] In practice, the input is corrupted in various ways. This patent uses a method of setting a certain percentage of random pixels to zero and adding random Gaussian noise to these pixels to add corrupted samples. This percentage is the corruption level, which is usually chosen between 0 and 0.5, thereby constructing a denoising encoder. Experiments show that the denoising autoencoder can improve the generalization performance of the network.
[0152] In practice, the ReLU activation function is used in both the input and hidden layers. Meanwhile, sparse regularization is applied to extract discriminative features in all hidden layers, and L2 regularization is used to constrain the weights of the encoder.
[0153] Step (2)b: Construct the decoder
[0154] The decoding process involves mapping z and reconstructing the vector x'∈[0,1] d For example, equation (4):
[0155] x'=g θ' (z)=σ'(w'z+b') (4)
[0156] Where σ'(·) is the nonlinear activation function of the decoder, θ'={w',b'} is the code that maps the output to the input, w' is the weight matrix, and b' is the bias vector.
[0157] During reconstruction, all hidden layers use the ReLU activation function, all output layers use the sigmoid activation function, and L2 regularization is used to constrain the weights of the decoder.
[0158] Step (2)c: Initialize the number of layers and weights
[0159] Based on specific experimental results, the parameters, hidden layers, and number of nodes are determined by the best evaluation results from testing. On the other hand, optimizing the autoencoder weights is also a challenging task. Large initial weights can lead to getting trapped in local minima, while small initial weights can make deep models unusable. Furthermore, during training, overfitting occurs when a high-capacity model fits data noise rather than its internal mapping relationships. To prevent overfitting, this invention proposes an L2 regularization term (also known as a weight decay term) to adjust the weights and prevent overfitting.
[0160] Step (2)d: Optimize the autoencoder
[0161] The optimization process of the autoencoder is completed by minimizing the average reconstruction error as the optimization condition, as follows:
[0162]
[0163] Where, x i It is the input data, x 'i It's about reconstructing data, g θ (h) is the decoder output, h = f θ (x) is the encoder output, θ contains the weight w and the offset b, and m is the number of data.
[0164] The mean squared error is used as the loss function l1(x,x'):
[0165]
[0166] Additionally, the cross-entropy loss function l2(x,x') of the autoencoder is defined as follows:
[0167]
[0168] The mean squared error loss function l1(x,x') is used for pre-training of the autoencoder, and the cross-entropy function l2(x,x') is used for training the final stacked autoencoder. A softmax layer is added on top of the stacked autoencoder as a classification layer to train the classification model.
[0169] Step (2)e: Define the regularization term (weight decay term)
[0170] The most common form of regularization to prevent overfitting is L2 regularization. That is, the sum of squares of the weights w is taken and added to the objective (loss function), as follows:
[0171]
[0172] Where λ is the regularization strength control parameter, L is the number of hidden layers, and N is the number of hidden layers. l It is the number of neurons in the layer.
[0173] Step (2)f: Set the sparsity specification of the sparse autoencoder
[0174] When learning feature functions, even with a large number of hidden units, autoencoders can still discover effective data structures by imposing sparsity constraints on the hidden units. In this study, the data structure is built by limiting the number of hidden units and placing constraint terms on the network. That is, the sparsity specification of the autoencoder is achieved by adding sparsity constraints to neurons, defined as follows: is the average activation value of the j-th hidden unit.
[0175]
[0176] Apply approximate constraints Here, ρ is a sparsity parameter, typically a small value close to zero. To achieve this, an additional penalty term is added to the optimization objective, namely, a KL penalty term based on the Kullback–Leibler divergence, as follows:
[0177]
[0178] Then according to Obtain the sparsity penalty term J S Its definition is as follows:
[0179]
[0180] Where β is the sparse weight and N is the number of hidden layer units. It is the Kullback–Leibler divergence.
[0181] Then the total cost function J C It can be written as:
[0182] J C =l(x,x')+J w +J S (13)
[0183] Where l(x,x') is the loss function, J w It is a regularization term, J S This is a sparsity penalty term.
[0184] Step (2)g: Form a robust model of a deep stacked denoised sparse autoencoder (DDSA) and train the deep model using a greedy hierarchical approach.
[0185] Denoising and sparse autoencoders are stacked together to form a robust model of Deep Stacked Denoising Sparse Autoencoder (DDSA). The training of the stacked autoencoder follows a greedy layering strategy, where each autoencoder takes input from the previous layer and is pre-trained independently. The goal of the training is to place the parameters of all layers layer by layer in the parameter space region.
[0186] First, an unsupervised learning algorithm is used to train the lower layers of the model. This algorithm generates the initial parameters for the first layer of the network, and then uses the output of the first layer as the input for the next layer. This process is repeated until the parameters of each layer are initialized. After this stacked unsupervised pre-training, the entire network enters the supervised learning phase. At this point, the entire network is fine-tuned in the opposite direction using backpropagation. The total output of the network is the final activation vector. Thus, the stacked autoencoder extracts useful features through a series of learning processes.
[0187] Figures 4-7 The structure diagram of the Deep Denoising Stacked Autoencoder (DDSA) is shown (2 pre-trained autoencoders, 3 output classes).
[0188] Step 3: Propose an incremental learning support vector machine classification algorithm (ISSVM, which utilizes incremental learning to achieve a simple and effective nonlinear SVM training scheme;
[0189] Support Vector Machines (SVMs) are edge-based supervised machine learning methods commonly used for various classification tasks. However, for large datasets and high-dimensional classification problems, memory requirements are generally high, and the convergence speed of SVM classifiers is slow. In such cases, it's crucial to precisely select the dataset based on the specific classification task. That is, during training, new data is added to the initial training dataset based on different classification tasks. However, when training SVMs on the newly added datasets, considering only the support vectors from the previous datasets will only yield approximate solutions. To address this problem, this invention proposes an Incremental Learning Support Vector Machine Classification Algorithm (ISSVM), which achieves a simple and effective nonlinear SVM training scheme through incremental learning. Its main idea is to apply the Kuhn-Tucker (KT) conditions to the previously used training dataset and add additional data points. The coefficients of the marginal support vectors S are controlled to alternately change values in each incremental step, and then a recursive approach is used to obtain an exact solution, thus maintaining the balance of elements in the training dataset D and completing the online adjustment of data during training. This algorithm is well-suited for training datasets with varying sizes, dimensions, shapes, and configurations. It can accelerate training on datasets with different configurations, improving the algorithm's versatility, convergence speed, and classification accuracy. Furthermore, this precise method of adding training data allows for the augmentation and evaluation of sample generalization. The specific implementation steps are as follows:
[0190] Step (3)a: Solve for the symmetric positive definite kernel matrix Q ij
[0191] Typically, an SVM classifier finds the optimal separating hyperplane among two or more hyperplanes and maximizes the boundary around the separating hyperplane. The final classification decision is determined by a subset of the training samples used to build up the support vectors. For a given classification problem, suppose the training dataset is D and the training vectors are x. i The output label is y i = ±1, the optimal separating function is simplified to a linear combination of kernel functions K defined on the training data, as shown in formula (14):
[0192]
[0193] Where α is the Lagrange multiplier, b is the offset, and y j Is input x j The output label is given by the kernel function K, which is defined as the dot product of the feature space φ, as shown in equation (15):
[0194] K(x j ,x)=φ(x j )·φ(x) (15)
[0195] The "·" operator is the dot product, and φ(x) is the nonlinear eigenvector of vector x. In other words, linear operations in the feature space are equivalent to nonlinear operations in the input space.
[0196] Then the symmetric positive definite kernel matrix Q ij Defined as equation (16):
[0197] Q ij =y i y j K(x i ,x j (16)
[0198] Step (3)b: Construct the objective function W
[0199] Solving the dual optimization problem does not require calculating the feature map φ, but only the kernel function K, which is accomplished by minimizing the quadratic objective function W under given constraints, as shown in equation (17):
[0200]
[0201] Among them, y j Is input x j The output label is C, where C is a constant, α is the Lagrange multiplier, b is the offset, and Q is the output label. ij It is a symmetric positive definite kernel matrix.
[0202] Step (3)c: Solve the KT equation g of the objective function. i And obtain the classification coefficient {α} i ,b i}
[0203] The first derivative of the objective function W simplifies to the Kuhn-Tucker (KT) equation, as shown below:
[0204]
[0205] Based on the above formula, using the training dataset D and the coefficients {α} i ,b i}, i=1,2,…l, the target task can be divided into three categories: marginal support vectors S, error support vector set E, and residual set R (i.e., the unused vector set within the given boundary).
[0206] Step (3)d: Add a new data point c, and solve for the increment Δg according to the KT conditions. i
[0207] During classification, new datasets need to be added according to different task requirements. When training on the new datasets, only considering the support vectors of the previous datasets will only yield approximate solutions. Incremental learning can recursively obtain accurate solutions. The main idea is to apply the Kuhn-Tucker (KT) conditions to all previously used training datasets and add additional data points. In this case, the coefficients of the marginal support vectors S will alternately change their values in each incremental step to keep the elements in D balanced. The KT conditions are defined as follows:
[0208]
[0209] Where, α c y is the increment coefficient, y is the output label of the input x, Q is the kernel matrix, c is the newly added data point, and b is the offset.
[0210] Step (3)e: Solve for the Jacobian matrix Ω
[0211] For the edge support vector set {S1,S2,…,S…} l}, when g i When = 0, changes to the coefficient set must satisfy the following conditions:
[0212]
[0213] Ω is a symmetric but non-positive definite Jacobian matrix, specifically defined as follows:
[0214]
[0215] Step (3)f: Solve for the change in classification coefficients {Δα, Δb}
[0216] In equilibrium, we have:
[0217] Δb=βΔα c (twenty four)
[0218]
[0219] Where β is the sensitivity coefficient, defined as:
[0220]
[0221] P is the solution for the extended matrix. For all sets outside S, j, P = Ω. -1 ,β j =0, its margin is calculated as follows:
[0222]
[0223] Boundary sensitivity γ i Defined as:
[0224]
[0225] Assuming Δα is small enough that none of the elements of the incremental phase set D appear in the marginal support vector S, the error support vector set E, and the residue set R, when candidate point c is added to the working marginal support vector S, the expanded matrix set P will expand as follows:
[0226]
[0227] Step (3)g: Solve for the final classification coefficient {α} i ,b i}, to obtain the optimal classification function
[0228] Final given solution Defined as the current solution b l The current Jacobian inverse matrix P and candidate values (x) c ,y c The function is defined as follows. Therefore, by adding test point c to set D:D l+1 =D l ∪{c}, the incremental process completes the transformation from l to l+1.
[0229] Step (3)h: Determine whether the data points have been added. If not, proceed with the calculation of the next new data. If the addition is complete, the electronic component classification task is completed.
[0230] The specific process of the incremental learning support vector machine classification algorithm (ISSVM) is as follows: Figure 8 As shown.
[0231] Step (4): Based on the above techniques, the MATLAB Neural Network Toolbox was selected as the implementation tool to build an experimental platform and form a hybrid classification model combining sparse autoencoder DDSA and ISSVM to complete the specific implementation of electronic component classification. The following test experiments were mainly completed:
[0232] (1) Comparison of classification performance of different classification algorithms
[0233] For ease of comparison, common classification algorithms (Support Vector Machine (SVM) and Backpropagation (BP) classification algorithms are compared with the Incremental Learning Support Vector Machine (ISSVM) classification algorithm proposed in this invention. Thirty test samples are randomly selected from each sample as test objects. The training and validation accuracy of each deep learning model are shown in Table 2. Figure 9 As shown.
[0234] Table 2 Training and Validation Accuracy
[0235] Model Training accuracy Verification accuracy SVM 99% 95.5% ISSVM 97% 92.8% BP 96% 90.8%
[0236] Furthermore, the training errors of Support Vector Machine (SVM), Backpropagation (BP), and ISSVM are obtained, specifically as follows: Figure 10 As shown:
[0237] As can be seen, in terms of classification accuracy, SVM and BP classification models have lower accuracy compared to ISSVM. Furthermore, the training error graph shows that the incremental learning algorithm ISSVM achieves a faster training speed while maintaining classification accuracy. In summary, the experimental results clearly demonstrate that the ISSVM algorithm has significant advantages in electronic component classification, significantly outperforming conventional machine learning methods.
[0238] (2) Comparison of manual classification methods and deep learning classification methods
[0239] The second implementation scheme compared the manual classification method with the deep learning classification method (ISSVM). The testers were technicians from an electronic component manufacturing plant (with one year of work experience). An average of 20 test samples were randomly selected from each sample in the component library. The classification results are shown in Table 3.
[0240] Table 3 Comparison results of classification methods using artificial and deep learning algorithms
[0241]
[0242]
[0243] Analysis of the test results shown in Table 3 reveals that the ISSVM deep classification algorithm is significantly faster than manual classification, while maintaining a classification accuracy very close to that of manual methods. Therefore, the ISSVM deep classification algorithm demonstrates higher implementation efficiency, meets design requirements, and is well-suited for mass production of electronic components. It can greatly improve classification efficiency and shows promising application prospects.
[0244] The above embodiments are only for illustrating the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent transformations or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A method for classifying electronic components based on a deep denoising sparse autoencoder and ISSVM, characterized in that, Includes the following steps: Step 1: Preprocess the images of electronic components; Step 2: Construct a deep denoising sparse autoencoder (DDSA) and complete feature extraction; The original features are reduced in dimensionality using an autoencoder. Sparse autoencoders are stacked together and a greedy training layer strategy is adopted to form a robust model of deep stacked sparse autoencoders. A denoising encoder is constructed. By inputting partially damaged noise data samples, the original input is reconstructed through training to complete the denoising feature extraction based on the autoencoder. Step 3: Propose the incremental learning support vector machine classification algorithm ISSVM, apply the KT condition to the original training dataset, add additional data points, and use incremental learning to realize the nonlinear SVM training scheme. Step 4: Form a hybrid classification model that combines Deep Denoising Sparse Autoencoder (DDSA) and ISSVM. DDSA is responsible for feature dimensionality reduction and extraction, while ISSVM is responsible for classification. Apply this model to the classification and testing of electronic components.
2. The electronic component classification method based on deep denoising sparse autoencoder and ISSVM according to claim 1, characterized in that, In step 1, image augmentation is performed using image flipping, rotation, blurring, and mirroring methods. The image is preprocessed, and the original data of each element are randomly allocated to the test sample set and training sample set in a 7:3 ratio, and stored in the database. The specific preprocessing operations are as follows: Step 1.1: Apply the Viola and Jones (VJ) integrated electronic component detector to detect and locate the bounding box around the electronic component; Step 1.2: Locate the electronic component markers. After the initial detection of the electronic component images, the robust Constrained Local Neural Network (CLNF) model is used to detect the markers of each electronic component, and the device is rotated and aligned by obtaining the coordinates of the first pin of the electronic component. Step 1.3: Normalize the electronic component image data. The electronic component image is normalized using affine transformation, including alignment processing of the affine transformation and normalization of the image data.
3. The electronic component classification method based on deep denoising sparse autoencoder and ISSVM according to claim 2, characterized in that, The normalization in step 1.3 specifically includes: (1) The initial alignment process is completed by rotating, scaling, distorting and cropping the affine transformation of the component; where the center point of the component is the coordinate of the first pin obtained by the landmark detection, and the angle and ratio of the image rotation are determined by the distance between the center pins of the component, so as to complete the affine distortion; after distortion, the component image is cropped so that the center pin is centered in the component image. The cropping area is also determined by the center pin, which involves the edge parameter of the center pin. This parameter is usually between 0.15 and 0.
2. (2) Normalize the lighting information by using grayscale information; that is, divide each pixel by 255, rescale each pixel to [0, 1], and subtract the average value to center the pixel value in the electronic component image.
4. The electronic component classification method based on deep denoising sparse autoencoder and ISSVM according to claim 1, characterized in that, In step 2, a deep denoising sparse autoencoder (DDSA) is constructed and feature extraction is completed. The specific steps are as follows: Step 2.1: Construct a multi-hidden-layer denoising encoder Data sample of a damaged input section of an automatic encoder This process yields good representational information. Finally, the original input is reconstructed through training, thus completing the denoising feature extraction based on the autoencoder. θ={w,b} maps the input to the output z∈[0,1]. d' Given the encoding, where w is the weight matrix and b is the bias vector, then: Where σ(·) is the nonlinear activation function of the encoder, and either the sigmoid function or the tanh function can be selected. Step 2.2: Build the decoder The decoding process involves mapping z and reconstructing the vector x'∈[0,1] d As shown below: x'=g θ' (z)=σ'(w'z+b') Where σ'(·) is the non-linear activation function of the decoder, θ'={w',b'} is the code that maps the output to the input, w' is the weight matrix, and b' is the bias vector; during the reconstruction process, all hidden layers use the ReLU activation function, and all output layers use the sigmoid activation function; Step 2.3: Initialize the number of layers and weights, determine the parameter hidden layers and the number of nodes, and use the L2 regularization term (also known as the weight decay term) to adjust the weights; Step 2.4: Optimize the autoencoder The optimization process of the autoencoder is completed by minimizing the average reconstruction error. The optimization conditions are as follows: Where, x i It is the input data, x 'i It's about reconstructing data, g θ (h) is the decoder output, h = f θ (x) is the encoder output, θ contains the weight w and the offset b, and m is the number of data; Using mean squared error as the loss function Additionally, define the cross-entropy loss function for the autoencoder. Wherein, mean square error loss function Cross-entropy function for pre-training of autoencoders Used for training the final stacked autoencoder, on top of which a softmax layer is added as a classification layer to train the classification model; Step 2.5: Define the regularization term, i.e., the weight decay term. The sum of squares over the weights w is then added to the loss function, as shown in the following equation: Where λ is the regularization strength control parameter, L is the number of hidden layers, and N is the number of hidden layers. l It is the number of neurons in the layer; Step 2.6: Set the sparsity specification for the sparse autoencoder The sparsity specification of autoencoders is achieved by adding sparsity constraints to neurons, through a data structure built by limiting the number of hidden units and placing constraints on the network. The average activation value of the j-th hidden unit: Apply approximate constraints Here, ρ is a sparsity parameter. An additional penalty term is added to the optimization objective, namely, a KL penalty term based on the Kullback–Leibler divergence, as detailed below: Then according to Obtain the sparsity penalty term J S Its definition is as follows: Where β is the sparse weight and N is the number of hidden layer units. It is the Kullback–Leibler divergence; Then the total cost function J C It can be written as: in, It is the loss function, J w It is a regularization term, J S This is a sparsity penalty term; Step 2.7: Stack the denoising and sparse autoencoders together to form a robust model of the Deep Stacked Denoising Sparse Autoencoder (DDSA), and train the deep model using a greedy hierarchical approach.
5. The electronic component classification method based on deep denoising sparse autoencoder and ISSVM according to claim 4, characterized in that, The specific operation of using the greedy layering method to train the deep model in step 2.7 is as follows: each autoencoder obtains input from the previous layer and performs pre-training independently. The goal of training is to place the parameters of all layers in the parameter space region layer by layer. First, an unsupervised learning algorithm is used to train the lower layers of the model. This algorithm generates the initial parameters of the first layer of the network, and then uses the obtained output as the input of the next layer for similar training. The initial parameters of the next layer are obtained, and then the output of the next layer is used as the input of the next layer, until the parameters of each layer are initialized. After the stacked unsupervised pre-training stage, the entire network enters the supervised learning stage. At this time, the entire network is then fine-tuned in the opposite direction using the backpropagation algorithm. The total output of the network is the final activation vector. Thus, the stacked autoencoder extracts useful features through a series of learning processes.
6. The electronic component classification method based on deep denoising sparse autoencoder and ISSVM according to claim 1, characterized in that, In step 3, the incremental learning support vector machine classification algorithm ISSVM applies the KT condition to the original training dataset and adds additional data points, using incremental learning to achieve a simple and effective nonlinear SVM training scheme. The specific steps are as follows: Step 3.1: Solve for the symmetric positive definite kernel matrix Q ij For a given classification problem, suppose the training dataset is D and the training vectors are x. i The output label is y i = ±1, the optimal separating function is simplified to a linear combination of kernel functions K defined on the training data, as shown below: Where α is the Lagrange multiplier, b is the offset, and y j Is input x j The output label is defined by the kernel function K as the dot product of the feature space φ: K(x j ,x)=φ(x j )·φ(x) The "·" operator is the dot product, φ(x) is the nonlinear eigenvector of vector x; then the symmetric positive definite kernel matrix Q ij The definition is as follows: Q ij =y i y j K(x i ,x j ) Step 3.2: Construct the objective function W Solving the dual optimization problem does not require calculating the feature map φ; it only requires calculating the kernel function K, which is accomplished by minimizing the quadratic objective function W under given constraints, as follows: Among them, y j Is input x j The output label is C, where C is a constant, α is the Lagrange multiplier, b is the offset, and Q is the output label. ij It is a symmetric positive definite kernel matrix; Step 3.3: Solve the KT equation g of the objective function i And obtain the classification coefficient {α} i ,b i } The first derivative of the objective function W simplifies to the Kuhn-Tucker (KT) equation, as shown below: Based on the above formula, using the training dataset D and the coefficients {α} i ,b i }, i=1,2,…l, the target task can be divided into three categories: marginal support vectors S, error support vector set E, and residual set R, which is the unused vector set within the given boundary; Step 3.4: Add a new data point c, and solve for the increment Δg according to the KT conditions. i The KT condition is defined as follows: Where, α c y is the increment coefficient, y is the output label of the input x, Q is the kernel matrix, c is the new data point, and b is the offset. Step 3.5: Solve for the Jacobian matrix Ω For the edge support vector set {S1,S2,…,S…} l }, when g i When = 0, changes to the coefficient set must satisfy the following conditions: Ω is a symmetric but non-positive definite Jacobian matrix, specifically defined as follows: Step 3.6: Solve for the changes in classification coefficients {Δα, Δb} In equilibrium, we have: Δb=βΔa c Where β is the sensitivity coefficient, defined as: P is the solution for the extended matrix. For all sets outside S, j, P = Ω. -1 ,β j =0, its margin is calculated as follows: Boundary sensitivity γ i Defined as: Assuming Δα is small enough that none of the elements of the incremental phase set D appear in the marginal support vector S, the error support vector set E, and the residue set R, when candidate point c is added to the working marginal support vector S, the expanded matrix set P will expand as follows: Step 3.7: Solve for the final classification coefficient {α} i ,b i }, to obtain the optimal classification function Final given solution Defined as the current solution b l The current Jacobian inverse matrix P and candidate values (x) c ,y c The function, thus, by adding test point c to set D:D l+1 =D l ∪{c}, the incremental process completes the transformation from l to l+1; Step 3.8: Determine if the data points have been added. If not, proceed with the calculation of the next new data point. If the addition is complete, the electronic component classification task is finished.
7. The electronic component classification method based on deep denoising sparse autoencoder and ISSVM according to any one of claims 1 to 6, characterized in that, The electronic components include resistors, inductors, capacitors, diodes, and integrated circuits.
Citation Information
Patent Citations
Abnormal power consumption behavior identification method based on improved deep self-encoding network
CN110929843A
Image identification apparatus, image identification method, and recording medium
US20200074238A1