Industrial part defect classification method based on deep cross entropy integration
Through the deep cross-entropy integration method, multiple neural networks are constructed to calculate cross-entropy losses in parallel, and model parameters are optimized, which solves the problems of classification accuracy and low efficiency in industrial parts defect detection, and achieves more efficient defect detection effects.
Patent Information
- Application Number
- CN202410566800.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-09
- Publication Date
- 2024-12-13
AI Technical Summary
The existing industrial parts defect detection algorithm has poor classification accuracy and low efficiency under harsh environments and diversity labels, making it difficult to take into account both inspection accuracy and efficiency.
Design a deep cross-entropy integration industrial parts defect classification method, calculate cross-entropy loss in parallel by constructing multiple neural networks, adopting the ensemble learning idea to assign different weights to each sub-model, and optimize model parameters through backpropagation until the loss The function converges and obtains the final classification result.
It effectively improves the accuracy of defective parts classification results under various parts categories, and improves the accuracy and efficiency of industrial parts defect detection.
Smart Images

Figure CN119131447A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial detection technology, and in particular to an industrial parts defect classification method based on deep cross entropy integration. Background Art
[0002] With the progress of the country's economic development level, industrial manufacturing capabilities are also rapidly improving. Industrial parts defect detection technology is an important factor affecting the level of industrial manufacturing, and manual detection methods are gradually being eliminated due to their high false detection rate, low efficiency and high cost. At present, defect detection of industrial parts is mainly based on computer vision, and the target detection algorithms used are mainly divided into two categories: traditional target detection algorithms and deep learning target detection algorithms. However, due to objective conditions such as harsh working environments and diverse type labels, the existing target detection algorithms have poor classification accuracy.
[0003] In summary, the reasons why intelligent detection of workpiece defects is difficult include internal and external factors. The internal factors are the variety of workpiece types and the variety of defects; the external factors are the complex production environment and high requirements for photography technology. Therefore, in response to these existing problems, how to design a target detection algorithm that takes into account detection accuracy and efficiency at the same time is an issue that we urgently need to solve. Summary of the invention
[0004] The present invention provides a deep cross entropy integrated industrial parts defect classification method to improve the accuracy of parts defect detection. The method designs multiple neural networks to calculate the cross entropy loss in parallel, and through the idea of ensemble learning, gives different weights to each sub-model and combines them together. At the same time, each parameter of the model is optimized through back propagation until the loss function converges to obtain the final classification result.
[0005] To achieve the above object, the present invention provides the following technical solution: an industrial parts defect classification method based on deep cross entropy integration, comprising the following steps:
[0006] S1: Model parameter training. The neural network uses the convolutional neural network and the fully connected network in the deep learning framework to construct K neural networks, and each network is assigned a weight.
[0007] S2: The obtained weights are combined with the cross entropy calculated by each neural network to obtain an integrated result, and then the parameters are continuously updated through back propagation.
[0008] S3: Part defect classification detection, obtaining the image data of the parts to be inspected through the camera.
[0009] S4: Based on the optimal parameters obtained through training in S2, the final part defect classification result is obtained.
[0010] Preferably, each neural network in S1 is assigned a weight π k (k=1,2,…,K), satisfying
[0011] Preferably, each neural network in S1 calculates the cross entropy loss independently, and the final output result is generated by weighting each neural network involved in the integration.
[0012] Preferably, the specific steps of the part defect classification detection in S3 are: inputting the image data into a convolutional neural network, and extracting the feature values of the parts through a feature extractor.
[0013] Compared with the prior art, the present invention has the following beneficial effects:
[0014] 1. This industrial parts defect classification method based on deep cross entropy integration designs multiple neural networks to calculate the cross entropy loss in parallel. Through the idea of ensemble learning, different weights are given to each sub-model and combined together. At the same time, the various parameters of the model are optimized through back propagation until the loss function converges to obtain the final classification result.
[0015] 2. This industrial parts defect classification method based on deep cross entropy integration uses the idea of ensemble learning to assign different weights to the output of each sub-model and combine them together for training; it optimizes the various parameters of the model through back propagation until the loss function converges to obtain the final classification result, and unifies the cross entropy classification losses of multiple neural networks into the overall classification loss, effectively improving the defective parts classification results under various parts categories. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0017] Figure 1 This is a flow chart of industrial parts defect classification according to the present invention. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0019] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0020] See also Figure 1 The present invention provides a technical solution: an industrial parts defect classification method based on deep cross entropy integration,
[0021] Step 1: Model parameter training. The neural network uses the convolutional neural network and the fully connected network in the deep learning framework to construct K neural networks, and each network is given a weight π k (k=1,2,…,K), satisfying Each neural network calculates the cross entropy loss independently, and the final output is generated by the weights of the neural networks involved in the ensemble. In order to avoid the same degree of smoothness for each base classifier, we will k Convert to π k r The deep cross entropy ensemble model is as follows:
[0022]
[0023] st
[0024] Among them, K is the number of base classifiers, π k is the weight of each sub-model, y i is the true label of the sample, w j,k is the weight of the fully connected network.
[0025] We need to solve w in equation (1) j,k ,π k parameter:
[0026] A. Adding constraints to equation (1) yields:
[0027]
[0028] B. Back propagation to solve w j,k .
[0029] For the parameter w in formula (2), j,k Taking partial derivatives we get:
[0030] w of the kth network j,k gradient:
[0031]
[0032] C. Solving for weight π k .
[0033] For the parameter π in equation (2), k Taking partial derivatives we get:
[0034]
[0035] The obtained π k The result of the integration is obtained by combining the cross entropy calculated by each neural network. Then the parameters are continuously updated through back propagation. The training is stopped when the loss function of formula (1) converges.
[0036] Step 2: Part defect classification detection. Obtain the image data of the part to be inspected through the camera. Input the image data into the convolutional neural network and extract the feature value of the part through the feature extractor.
[0037] According to the optimal parameters obtained through training in step 1, the final part defect classification result is obtained.
[0038] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0039] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for industrial parts defect classification based on deep cross entropy integration, It is characterized in that The following steps are involved: S1: Model parameter training. The neural network uses the convolutional neural network and the fully connected network in the deep learning framework to construct K neural networks, and each network is given a weight; S2: The obtained weights are combined with the cross entropy calculated by each neural network to obtain the integrated result, and then the parameters are continuously updated through back propagation; S3: Part defect classification detection, obtaining the image data of the parts to be inspected through the camera; S4: Based on the optimal parameters obtained through training in S2, the final part defect classification result is obtained.
2. According to claim 1, a method for industrial parts defect classification based on deep cross entropy integration, Features: Each neural network in S1 is assigned a weight π k (k=1,2,…,K), satisfying 3. According to claim 1, a method for industrial parts defect classification based on deep cross entropy integration, Features: Each neural network in S1 calculates the cross entropy loss independently, and the final output result is generated by weighting each neural network involved in the integration.
4. According to claim 1, a method for industrial parts defect classification based on deep cross entropy integration, Features: The specific steps of the part defect classification detection in S3 are: inputting the image data into the convolutional neural network, and extracting the feature values of the parts through the feature extractor.
Citation Information
Patent Citations
Industrial part defect detection method based on deep learning
CN113392915A
Cited By
Geometric invariant three-dimensional model classification algorithm based on smooth secondary loss
CN120375068A
