New material production and processing process quality inspection method and system
By collecting and classifying sample images during the production and processing of new materials, building feature extraction models and twin neural network models, the problems that are difficult to prevent and discover in the production and processing of new materials are solved, and efficient quality management and product quality control are achieved.
Patent Information
- Application Number
- CN202411905551.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-03-28
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure CN119721855A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of material quality inspection, and in particular to a new material production and processing process quality inspection method and system. Background Art
[0002] There are various quality inspection methods in the production and processing of new materials, such as confirming whether the chemical composition of raw materials meets the standards through spectral analysis (such as X-ray fluorescence spectrometer XRF), chromatography and other technologies, and ensuring that they meet the design requirements by measuring physical properties such as density, hardness, and conductivity, etc. However, for new materials, traditional methods may not be able to fully capture all potential quality problems. Sensors are installed on the production and processing lines to monitor key parameters such as temperature, pressure, and flow rate in real time to ensure stable production process conditions, and PLC (programmable logic controller) or DCS (distributed control system) is used to accurately control production equipment. Although human errors can be reduced, there will still be loopholes to a certain extent, and quality problems cannot be effectively prevented and discovered.
[0003] In view of this, how to effectively prevent and discover quality problems and ensure the consistency and reliability of product quality is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems in the prior art to a certain extent. By proposing a quality inspection method and system for the production and processing of new materials, a comprehensive quality inspection system for the production and processing of new materials is formed. For specific types of new materials, quality problems can be effectively prevented and discovered, thereby ensuring the consistency and reliability of product quality.
[0005] To achieve the above objectives, in a first aspect, the present application provides a new material production and processing process quality inspection method, comprising: Collect images of new material samples from different batches after each production stage; Classifying and labeling the new material sample images in order by batch and process as training sets; Building and training a feature extraction model for new material properties based on the training set, and obtaining feature vectors of new materials at each production stage through the feature extraction model; Constructing a twin neural network model, and obtaining the similarity between the feature vectors of the new materials at each production stage and the standard feature vectors of the new materials at each production stage through the twin neural network model; Based on the similarity results, the quality of new materials at each production stage is judged.
[0006] Furthermore, the collecting of new material sample images after processing in different batches at different production stages includes: Collect production chain information of the target processing workshop; Identify key stages of the production chain information; At each stage of production, images of new material samples are acquired.
[0007] Furthermore, the new material sample images are orderly classified and labeled by batch and process as a training set, including: Assign a unique number and production time to each production batch as the basis for image classification and labeling, and perform automatic preliminary labeling; Filter out new material sample images that are difficult to annotate, automatically identify similar features in the new material sample images and annotate them as training sets.
[0008] Furthermore, the expression for screening out the new material sample images that are difficult to annotate is: ; In the formula, is the total number of new material sample images to be annotated, i is the number of identified targets, , is a constant, among which, ; is the error value, is the maximum probability, is the second largest value in probability.
[0009] Furthermore, the feature extraction model of the new material properties includes: an input layer, an initial convolution layer, N pyramid convolution units, a multi-scale feature fusion unit, a pooling layer, and a fully connected layer; Wherein, the input layer receives a new material sample image; The initial convolution layer extracts initial low-level features of the new material sample image to obtain an initial low-level feature map; The pyramid convolution unit uses convolution kernels of different scales to extract multi-scale features from the initial low-level feature map and fuses it with the feature map of the previous level; The multi-scale feature fusion unit fuses multi-scale feature maps from different levels and outputs them after passing through the pooling layer and the fully connected layer.
[0010] Furthermore, the pyramid convolution unit introduces a SE module; Among them, the SE module consists of an extrusion part, an excitation part, and a recalibration part. The extrusion part expression is: ; In the formula, is the eigenvalue of the cth channel at position (i, j), H and W are the height and width of the multi-scale feature map respectively; The excitation part expression is: ; In the formula, is the vector obtained from the backlog, and is the weight matrix of the two fully connected layers, r is the dimensionality reduction rate; is the RELU activation function, is the Sigmoid activation function; The recalibration part expression is: ; In the formula, is the weight of the cth channel, is a multi-scale feature map, is the recalibrated multi-scale feature map, is the element-by-element multiplication symbol.
[0011] Furthermore, the twin neural network model consists of two identical sub-networks, wherein the two sub-networks share the same weights and architecture, and the shared weight calculation formula is: ; ; In the formula, , are two feature vectors of new materials at each production stage obtained through the feature extraction model, W is the weight matrix, b is the bias vector, is the Sigmoid activation function.
[0012] Furthermore, the twin neural network model is used to obtain the similarity between the feature vectors of the new materials at each production stage and the standard feature vectors of the new materials at each production stage. The calculation formula is: ; In the formula, , are two feature vectors of new materials at each production stage obtained through the feature extraction model, i represents an element, and n represents the total number of elements.
[0013] Furthermore, the twin neural network model is optimized by contrast loss function, which is expressed as: ; In the formula, is the similarity between the feature vector of the new material at each production stage and the standard feature vector of the new material at each production stage, y is the label, 1 for the same and 0 for different, and m is the marginal value.
[0014] In a second aspect, the present application further provides a new material production and processing process quality inspection system, which executes the above-mentioned new material production and processing process quality inspection method, including: Image acquisition module: collects images of new material samples processed at different production stages from different batches; Image processing module: classifying and labeling the new material sample images in order by batch and process as training sets; Feature extraction module: constructing and training a feature extraction model of new material characteristics based on the training set, and obtaining feature vectors of new materials at each production stage through the feature extraction model; Quality inspection module: constructing a twin neural network model, and obtaining the similarity between the feature vectors of new materials at each production stage and the standard feature vectors of new materials at each production stage through the twin neural network model; Output feedback module: Based on similarity results, judge the quality of new materials at each production stage.
[0015] Beneficial effects of the invention: Compared with the prior art, the invention provides a new material production and processing quality inspection method and system, which can effectively improve the quality management efficiency of the new material production and processing process, ensure that the product meets high quality standards, and quickly respond to various problems that arise in production, which can greatly improve the product quality control level, shorten the research and development cycle, and reduce production costs. At the same time, the system can also promote the development of new material technology and promote the progress of related industries. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a flow chart of the steps of the method of the present invention; Figure 2 It is a functional block diagram of the system of the present invention. DETAILED DESCRIPTION
[0017] 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.
[0018] Example 1, please refer to Figure 1 As shown, the present application provides a new material production and processing process quality inspection method, comprising: Collect images of new material samples from different batches after each production stage; Classifying and labeling the new material sample images in order by batch and process as training sets; Building and training a feature extraction model for new material properties based on the training set, and obtaining feature vectors of new materials at each production stage through the feature extraction model; Constructing a twin neural network model, and obtaining the similarity between the feature vectors of the new materials at each production stage and the standard feature vectors of the new materials at each production stage through the twin neural network model; Based on the similarity results, the quality of new materials at each production stage is judged.
[0019] In a specific implementation process, the collection of new material sample images after processing in different batches at different production stages includes: Collect production chain information of the target processing workshop; Identify key stages of the production chain information; At each stage of production, images of new material samples are acquired.
[0020] In the specific implementation process, the new material sample images are orderly classified and labeled by batch and process as a training set, including: Assign a unique number and production time to each production batch as the basis for image classification and labeling, and perform automatic preliminary labeling; Filter out new material sample images that are difficult to annotate, automatically identify similar features in the new material sample images and annotate them as training sets.
[0021] In the specific implementation process, the expression for screening out difficult-to-label new material sample images is: ; In the formula, is the total number of new material sample images to be annotated, i is the number of identified targets, , is a constant, among which, ; is the error value, is the maximum probability, is the second largest value in probability.
[0022] In the specific implementation process, the feature extraction model of the new material characteristics includes: an input layer, an initial convolution layer, N pyramid convolution units, a multi-scale feature fusion unit, a pooling layer, and a fully connected layer; Wherein, the input layer receives a sample image of a new material; ensuring that the input size is consistent; The initial convolution layer extracts initial low-level features of the new material sample image to obtain an initial low-level feature map; The pyramid convolution unit uses convolution kernels of different scales to extract multi-scale features from the initial low-level feature map and fuses it with the feature map of the previous level; The multi-scale feature fusion unit fuses multi-scale feature maps from different levels and outputs them after passing through the pooling layer and the fully connected layer.
[0023] In the specific implementation, the initial convolutional layer is used to extract the initial low-level features of the input image.
[0024] In the specific embodiment, the configuration is as follows: the convolution kernel size is K0×K0, the step size is s0, and the padding method is the same. Batch Normalization and ReLU activation function are used.
[0025] In a specific implementation, the N pyramid convolution units include a first pyramid convolution, a second pyramid convolution, ... an Nth pyramid convolution; Among them, the first pyramid convolution unit uses convolution kernels of different scales to perform multi-scale feature extraction on the initial feature map.
[0026] In the configuration of the specific embodiment: n convolution kernels of different scales are used, gradually increasing from fine granularity to coarse granularity. Each scale of the convolution kernel is followed by batch normalization and ReLU activation function. Feature fusion mechanism: The feature map extracted at each scale is element-by-element added or concatenated with the feature map of the previous level to form a fused feature map.
[0027] Specifically, the second pyramid convolution unit progressively extracts multi-scale features from the feature map and fuses them with the feature map of the previous level.
[0028] In the specific example configuration: use Convolution kernels of different scales are used, where each scale is larger than the scale of the previous convolution kernel. The feature maps extracted by the convolution kernels of each scale are fused with the feature maps of the previous level to obtain an output feature map containing multi-scale information. The attention mechanism SE module is introduced to emphasize important features and suppress irrelevant information. For the 3rd layer, the above operation is repeated until the nth layer.
[0029] In the specific implementation process, the pyramid convolution unit introduces the SE module; Among them, the SE module consists of an extrusion part, an excitation part, and a recalibration part. The extrusion part calculates the global average pooling to compress the spatial information of each channel into a scalar, which is expressed as: ; In the formula, is the eigenvalue of the cth channel at position (i, j), H and W are the height and width of the multi-scale feature map respectively; The excitation unit uses two fully connected layers to build a small subnetwork to model the relationship between channels and generate the weight of each channel, expressed as: ; In the formula, is the vector obtained from the backlog, and is the weight matrix of the two fully connected layers, r is the dimensionality reduction rate; is the RELU activation function, is the Sigmoid activation function; The recalibration unit applies the weights generated in the excitation step to the original feature map and performs channel-by-channel weighting. The expression is: ; In the formula, is the weight of the cth channel, is a multi-scale feature map, is the recalibrated multi-scale feature map, is the element-by-element multiplication symbol.
[0030] In the specific implementation process, the multi-scale feature fusion module further fuses multi-scale feature maps from different levels after all pyramid convolution units.
[0031] In the configuration of the specific embodiment: cross-layer connections are used to directly pass feature maps of different layers to subsequent layers. Global pooling is applied to capture richer context information. Combined with the channel attention mechanism, the information of important channels is selectively strengthened.
[0032] Specifically, through multiple pyramid convolution units and cross-layer connections, feature information of different scales is effectively captured and fused; the introduction of SE module and channel attention mechanism enhances the model's ability to focus on important features.
[0033] In the specific implementation process, the twin neural network model consists of two identical sub-networks, where the two sub-networks share the same weights and architecture. The shared weights ensure that the same type of features are consistently represented between different samples, thereby improving the model's sensitivity to differences between samples.
[0034] The formula for calculating the shared weight is: ; ; In the formula, , are two feature vectors of new materials at each production stage obtained through the feature extraction model, W is the weight matrix, b is the bias vector, is the Sigmoid activation function.
[0035] Due to parameter sharing, the total number of parameters that need to be trained is reduced, reducing the risk of overfitting.
[0036] Furthermore, the twin neural network model is used to obtain the similarity between the feature vectors of new materials at each production stage and the standard feature vectors of new materials at each production stage. For each newly produced material sample, the twin neural network is used to calculate the similarity between it and the known standard sample (qualified product), so as to evaluate whether the new sample meets the quality requirements. The calculation formula is: ; In the formula, , are two feature vectors of new materials at each production stage obtained through the feature extraction model, i represents an element, and n represents the total number of elements.
[0037] Specifically, a smaller distance value indicates that the two samples are more similar, while a larger distance indicates that there is a greater difference between them.
[0038] Specifically, the training process of the twin neural network model: Define the learning rate η: control the size of the step of each parameter update. Batch size B: the number of samples used in each training. Iteration number T: the total number of training iterations. Regularization parameter λ: prevent overfitting. The update rule uses the gradient descent method.
[0039] In the specific implementation process, the twin neural network model is optimized by contrast loss function, which is expressed as: ; In the formula, is the similarity between the feature vector of the new material at each production stage and the standard feature vector of the new material at each production stage, y is the label, 1 for the same and 0 for different, and m is the marginal value.
[0040] Specifically, by minimizing this loss function, the model learns how to distinguish different categories, cluster similar samples together, and push heterogeneous samples apart. Setting the margin value m can avoid the situation where all samples are mapped to the same point (i.e., "collapse") and maintain the validity of the feature space.
[0041] In a specific embodiment, a training data set is first constructed, and a feature extraction model is established and trained, wherein a large number of new material samples are collected and labeled to ensure that various quality states (qualified products and defective products) are covered. Each sample should include its corresponding category label. The constructed data set is used to train the CNN model, and hyperparameters (such as learning rate, batch size, etc.) are adjusted until the model performs well on the validation set. Then a twin neural network model is constructed and trained, and the similarity between the newly produced material sample and the standard sample is calculated by the trained twin neural network. If the similarity is lower than the set threshold, it is marked as a potential quality problem. The present invention can effectively improve the quality management efficiency in the production and processing of new materials, ensure that the products meet high quality standards, and also quickly respond to various problems arising in production. This method not only improves the speed and accuracy of quality inspection, but also provides valuable data support for the research and development of new materials.
[0042] Example 2, please refer to Figure 2 As shown, the present application also provides a new material production and processing process quality inspection system, which executes the above-mentioned new material production and processing process quality inspection method, including: Image acquisition module: collects images of new material samples processed at different production stages from different batches; Image processing module: classifying and labeling the new material sample images in order by batch and process as training sets; Feature extraction module: constructing and training a feature extraction model of new material characteristics based on the training set, and obtaining feature vectors of new materials at each production stage through the feature extraction model; Quality inspection module: constructing a twin neural network model, and obtaining the similarity between the feature vectors of new materials at each production stage and the standard feature vectors of new materials at each production stage through the twin neural network model; Output feedback module: Based on similarity results, judge the quality of new materials at each production stage.
[0043] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A new material production and processing quality inspection method, characterized in that: include: Collect images of new material samples from different batches after each production stage; Classifying and labeling the new material sample images in order by batch and process as training sets; Building and training a feature extraction model for new material properties based on the training set, and obtaining feature vectors of new materials at each production stage through the feature extraction model; Constructing a twin neural network model, and obtaining the similarity between the feature vectors of the new materials at each production stage and the standard feature vectors of the new materials at each production stage through the twin neural network model; Based on the similarity results, the quality of new materials at each production stage is judged.
2. A new material production and processing quality inspection method according to claim 1, characterized in that: The collection of new material sample images after processing in different batches and at different production stages includes: Collect production chain information of the target processing workshop; Identify key stages of the production chain information; At each stage of production, images of new material samples are acquired.
3. A new material production and processing quality inspection method according to claim 1, characterized in that: The new material sample images are orderly classified and labeled by batch and process as a training set, including: Assign a unique number and production time to each production batch as the basis for image classification and labeling, and perform automatic preliminary labeling; Filter out new material sample images that are difficult to annotate, automatically identify similar features in the new material sample images and annotate them as training sets.
4. A new material production and processing quality inspection method according to claim 3, characterized in that: The expression for screening out new material sample images that are difficult to annotate is: ; In the formula, is the total number of new material sample images to be annotated, i is the number of identified targets, , is a constant, among which, ; is the error value, is the maximum probability, is the second largest value in probability.
5. A new material production and processing quality inspection method according to claim 1, characterized in that: The feature extraction model of the new material characteristics includes: an input layer, an initial convolution layer, N pyramid convolution units, a multi-scale feature fusion unit, a pooling layer and a fully connected layer; Wherein, the input layer receives a new material sample image; The initial convolution layer extracts initial low-level features of the new material sample image to obtain an initial low-level feature map; The pyramid convolution unit uses convolution kernels of different scales to extract multi-scale features from the initial low-level feature map and fuses it with the feature map of the previous level; The multi-scale feature fusion unit fuses multi-scale feature maps from different levels and outputs them after passing through the pooling layer and the fully connected layer.
6. A new material production and processing quality inspection method according to claim 5, characterized in that: The pyramid convolution unit introduces the SE module; Among them, the SE module consists of an extrusion part, an excitation part, and a recalibration part. The extrusion part expression is: ; In the formula, is the eigenvalue of the cth channel at position (i, j), H and W are the height and width of the multi-scale feature map respectively; The excitation part expression is: ; In the formula, is the vector obtained from the backlog, and is the weight matrix of the two fully connected layers, r is the dimensionality reduction rate; is the RELU activation function, is the Sigmoid activation function; The recalibration part expression is: ; In the formula, is the weight of the cth channel, is a multi-scale feature map, is the recalibrated multi-scale feature map, is the element-by-element multiplication symbol.
7. A new material production and processing quality inspection method according to claim 1, characterized in that: The twin neural network model consists of two identical sub-networks, where the two sub-networks share the same weights and architecture, and the shared weight calculation formula is: ; ; In the formula, , are two feature vectors of new materials at each production stage obtained through the feature extraction model, W is the weight matrix, b is the bias vector, is the Sigmoid activation function.
8. A new material production and processing quality inspection method according to claim 7, characterized in that: The twin neural network model is used to obtain the similarity between the feature vectors of new materials at each production stage and the standard feature vectors of new materials at each production stage. The calculation formula is: ; In the formula, , are two feature vectors of new materials at each production stage obtained through the feature extraction model, i represents an element, and n represents the total number of elements.
9. A new material production and processing quality inspection method according to claim 7, characterized in that: The twin neural network model is optimized by contrast loss function, which is expressed as: ; In the formula, is the similarity between the feature vector of the new material at each production stage and the standard feature vector of the new material at each production stage, y is the label, 1 for the same and 0 for different, and m is the marginal value.
10. A new material production and processing quality inspection system, characterized in that: A method for quality inspection of a new material production process according to any one of claims 1 to 9, comprising: Image acquisition module: collects images of new material samples processed at different production stages from different batches; Image processing module: classifying and labeling the new material sample images in order by batch and process as training sets; Feature extraction module: constructing and training a feature extraction model of new material characteristics based on the training set, and obtaining feature vectors of new materials at each production stage through the feature extraction model; Quality inspection module: constructing a twin neural network model, and obtaining the similarity between the feature vectors of new materials at each production stage and the standard feature vectors of new materials at each production stage through the twin neural network model; Output feedback module: Based on similarity results, judge the quality of new materials at each production stage.
Citation Information
Patent Citations
Label defect detection algorithm based on twin network
CN110222792A
Low-illumination target detection method based on RPF-CAM
CN111695633A
Apple leaf disease diagnosis method based on convolutional neural network
CN114638959A
Slab production process monitoring system based on digital twinning
CN118195367A
Cited By
Hard alloy tool conformity verification method based on image comparison
CN121305126A
A method for verifying the compliance of a cemented carbide tool based on image contrast
CN121305126B
Processing control method of marinated food
CN121433141A