An Automatic Identification Method for Metallographic Test Pictures Based on VGG16

Through the automatic metallographic test picture recognition method based on VGG16, the problem of relying on expert experience is solved, efficient automatic identification and classification is achieved, production efficiency is improved, and the model has high accuracy and stability.

CN116645544BActive Publication Date: 2025-08-01BEIJING HANGTIAN XINFENG MECHANICAL EQUIP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310476060.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-28
Publication Date
2025-08-01
Estimated Expiration
2043-04-28

AI Technical Summary

Technical Problem

In the prior art, the identification of metallographic test pictures relies on expert experience, which consumes time and effort, hinders the digital and intelligent development of the aerospace manufacturing field.

Method used

The automatic recognition method of metallographic experimental image based on VGG16 is adopted, including data preprocessing, model training and real-time application stages, feature extraction is used using the VGG16 network model, and overfitting is prevented through the BN generalization layer, and automatic recognition is achieved in combination with the softmax classification layer.

Benefits of technology

Automatic recognition without expert experience is achieved, production efficiency is improved, the model has high accuracy and stability, and can adaptively extract spatial features to prevent overfitting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116645544B_ABST
    Figure CN116645544B_ABST
Patent Text Reader

Abstract

The present invention is an automatic recognition method for metallographic test pictures based on VGG16, which includes three stages, namely, the data preprocessing stage, the model training stage, and the real-time application stage; specifically as follows, the data preprocessing stage: Step 1, use an electron microscope to collect pictures of different states in the metallographic grinding test during the industrial process; Step 2, picture preprocessing: perform unified pixel processing on all sample pictures; Step 3, then classify and add labels to all sample pictures, dividing them into two categories of "qualified" and "unqualified", and adding labels: qualified is 1, unqualified is 0; construct a labeled data set (X, Y); The beneficial effect of the present invention is that it can free technicians from heavy manual recognition work and realize automatic recognition of metallographic test pictures without relying on human experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image classification, and particularly relates to an automatic recognition method for metallographic test pictures based on VGG16, which can be used for picture recognition tasks in the metallographic test process. Background Art

[0002] The metallographic test is one of the important criteria for judging whether the crimping of the connector manufacturing process of cable products in the aerospace field is qualified. However, due to technical limitations, at present, technicians still need to rely on expert experience to identify whether the pictures of the metallographic test meet the requirements. This not only takes time and effort, restricts the development of productivity, but also hinders the digital and intelligent development of the aerospace manufacturing field.

[0003] However, with the maturity of technologies such as the Internet of Things, big data analysis and storage, and artificial intelligence, the artificial intelligence picture recognition method based on big data analysis already has the relevant theoretical and technical basis. The intelligent recognition method can directly give the result, thus effectively solving the problem that technicians lack theoretical and experience bases. Therefore, the present invention proposes an automatic recognition method for metallographic test pictures. This method does not need to rely on expert experience and can automatically judge whether the pictures meet the requirements, greatly improving the production efficiency.

[0004] Through the retrieval of public patent documents, no public patent documents related to the application of the present invention have been found. Summary of the Invention

[0005] The present invention proposes an automatic recognition method for metallographic test pictures based on VGG16, which can automatically recognize and classify without expert experience to overcome the defects of the prior art.

[0006] An automatic recognition method for metallographic test pictures based on VGG16 includes three stages, namely, the data preprocessing stage, the model training stage, and the real-time application stage; specifically as follows,

[0007] Data Preprocessing Stage:

[0008] Step 1: Use an electron microscope to collect pictures of different states in the metallographic grinding test in the industrial process;

[0009] Step 2: Picture preprocessing: Perform unified pixel processing on all sample pictures;

[0010] Step 3: Then classify and add labels to all sample pictures, dividing them into two categories: "qualified" and "unqualified", and adding labels: 1 for qualified and 0 for unqualified; construct a labeled data set (X, Y);

[0011] Model Training Stage:

[0012] Step 4: Divide the training set and the test set according to a set ratio;

[0013] Step 5. Build a network model based on VGG16:

[0014] 1) Network pre-training: Use VGG16 to train the network on the ImageNet large-scale natural image dataset and save the trained weights;

[0015] 2) Selection of key network nodes: We use different layers of the VGG16 network to extract features from the dataset, and add a batch normalization (BN) generalization layer to prevent overfitting.

[0016] 3) After that, add the fully connected layer and the softmax classification layer to form a new network;

[0017] Step 6: Use the training set to train the model to obtain a model with trained parameters; use the test set to test the trained model and calculate the model accuracy; model training is completed;

[0018] Real-time application stage:

[0019] Step 7. Practical application: Preprocess the real-time images collected during the industrial process and unify them into images with the same pixels as in step 2. Then input them into the model trained in step 6 to obtain the result of whether the metallographic test image is qualified or not.

[0020] The output value of the BN generalization layer is calculated by the following formula:

[0021] y i =γx i '+β

[0022]

[0023]

[0024]

[0025] Where x is the input vector, x∈R m , μ B is x i The mean of is x i The variance of , ε is a very small constant, and γ and β are parameters learned in the model.

[0026] The calculation formula of the softmax layer probability is as follows:

[0027]

[0028] in, K is the number of labels, θIt is a parameter of the softmax layer.

[0029] In step 4, the training set and the test set are divided according to a set ratio; the set ratio is between 2:1 and 5:1.

[0030] In step 4, the training set and the test set are divided according to a set ratio; the set ratio is between 3:1 and 4:1.

[0031] The present invention relates to a method for automatically identifying metallographic test pictures based on VGG16, including data preprocessing: using an electron microscope to take metallographic test pictures and classify them, uniformly processing the pixel values of all sample pictures, and classifying and labeling the obtained picture samples; dividing the samples into a training set and a test set; inputting the training set into the constructed model for learning and training, the model consists of a VGG16 feature extraction layer, a BN generalization layer, a fully connected layer, and a softmax classification layer; finally, inputting the test set into the trained diagnostic model, and taking the accuracy of image classification as the performance index for testing the model, the numerical value of which characterizes the generalization performance of the model, that is, the online recognition ability of pictures; the effectiveness of the present invention is verified through experiments.

[0032] The beneficial effect of the present invention is that it can free technicians from heavy manual recognition work and realize automatic recognition of metallographic test pictures without relying on human experience. The advantages of the present invention also include:

[0033] (1) The constructed model can adaptively extract spatial features without expert experience and domain knowledge.

[0034] (6) The presence of the BN layer can accelerate the convergence of the model and prevent overfitting. Description of the Drawings

[0035] Figure 1 It is a flowchart of the fault diagnosis method;

[0036] Figure 2 It is a schematic diagram of the proposed model;

[0037] Figure 3 It is a sample example of the dataset used in the present invention;

[0038] Figure 4 It is a detection result diagram of the application of the method of the present invention in an embodiment. Detailed Embodiments

[0039] A method for automatically identifying metallographic test pictures based on VGG16, characterized in that it is carried out according to the following specific steps:

[0040] Step 1: Use an electron microscope to collect pictures of different states in the industrial process;

[0041] Step 2: Image preprocessing: Perform unified pixel processing on all sample images;

[0042] Step 3: Then classify and add labels to construct a labeled dataset (X, Y);

[0043] Step 4: Divide the training set and the test set in a ratio of 3:1;

[0044] Step 5: Construction of a network model based on VGG16:

[0045] 1) Network pre-training: Use VGG16 to perform network training on the ImageNet large natural image dataset and save the weights after training;

[0046] 2) Selection of network key nodes: Use different layers of the VGG16 network to extract features on the dataset, and add a BN generalization layer to prevent overfitting;

[0047] 3) Then add a fully connected layer and a softmax classification layer to form a new network;

[0048] Step 6: Use the training set to train the model to obtain a model with trained parameters; use the test set to detect the trained model and calculate the model accuracy;

[0049] Step 7: Collect real-time data in the industrial process, preprocess it and input it into the trained model to obtain the result of whether the metallographic test image is qualified or not.

[0050] 2. According to the automatic recognition method for metallographic test images based on VGG16 described in claim 1, the output of the BN layer can be calculated by the following formula:

[0051] y i = γx i '+ β

[0052]

[0053]

[0054]

[0055] where x is the input vector, x ∈ R m and μ B is the mean of x i and is the variance of x i ε is a very small constant, and γ and β are parameters learned in the model.

[0056] Example 1:

[0057] One. AsFigure 1 The following is a schematic flow diagram of the automatic recognition method for the crimping metallographic test pictures of the present invention, and the specific steps are as follows:

[0058] Step 1: Use an electron microscope to collect 1730 photos of different states during the crimping metallographic grinding test in the industrial field production process;

[0059] Step 2: Process all sample pictures to a unified pixel size (1536*2048);

[0060] Step 3: Classify the pictures in different states into two categories: "qualified" and "unqualified", and add labels: 1 for qualified and 0 for unqualified; construct a labeled data set (X, Y), where X is the image data: a three-dimensional vector containing pixel and color information, and Y is the label;

[0061] Step 4: Divide the training set and the test set. The training set contains 1421 images, and the test set contains 309 pictures;

[0062] Step 5: Build a network model based on VGG16. The schematic diagram of the model is shown in Figure 2 :

[0063] 1) Network pre-training: Use VGG16 to perform network training on the ImageNet large natural image data set, and save the weights after training;

[0064] 2) Selection of network key nodes: Use different layers of the VGG16 network to extract features on the data set, and add a BN generalization layer to prevent overfitting;

[0065] 3) After that, add a fully connected layer to form a feature vector;

[0066] 4) The softmax classification layer is divided into two categories: "qualified" and "unqualified";

[0067] Step 6: Use the training set to train the model, set the learning rate to 10 -6 , the loss function is the cross-entropy function, and the number of iterations is 30 times to obtain a model with trained parameters. The model parameters are: Kernel_size = 3, stride = 1; use the test set to detect the trained model and calculate the model accuracy;

[0068] Step 7: Collect real-time pictures in the industrial process, preprocess them and input them into the trained model to obtain the result of whether the metallographic test picture is qualified or not.

[0069] II. Example verification

[0070] To verify the effectiveness of this method, metallographic test pictures are selected for example verification. The metallographic pictures are as shown in Figure 3As shown, the first three are qualified photos and the last three are unqualified photos.

[0071] The pictures are standardized, and the samples are randomly divided into a training set and a test set. According to the known situation, the training set and the test set are further divided into two categories: qualified and unqualified. The training set is put into the constructed model for training. The accuracy rate of this model is averaged over 10 times, and the average accuracy rate of the model is 98.56%.

[0072] From Figure 4 It can be seen that the accuracy rates of the model in 10 tests are all above 97.9%, thus proving the stability and reliability of the model constructed in this paper.

[0073] The advantages of the present invention also lie in:

[0074] (1) The constructed model can adaptively extract spatial features without expert experience and domain knowledge.

[0075] (6) The existence of the BN layer can accelerate the convergence of the model and prevent overfitting.

[0076] The above description is only a preferred embodiment of the present invention, and does not impose any form of limitation on the present invention. Any simple modification, equivalent change and modification made to the above embodiment based on the technical essence of the present invention shall fall within the scope of the technical solution of the present invention.

[0077] Embodiment 2:

[0078] Technical solution: To achieve the above object, the automatic recognition method for metallographic test pictures based on VGG16 of the present invention includes the following steps:

[0079] Data preprocessing stage:

[0080] Step 1: Use an electron microscope to collect pictures of different states in the industrial process;

[0081] Step 2: Picture preprocessing: Perform unified pixel processing on all sample pictures;

[0082] Step 3: Classify and add labels to the processed pictures to construct a labeled data set (X, Y);

[0083] Model training stage:

[0084] Step 4: Divide the training set and the test set in a ratio of approximately 4:1;

[0085] Step 5: Build a network model based on VGG16:

[0086] 1) Network pre-training: Use VGG16 to perform network training on the ImageNet large natural image data set and save the weights after training;

[0087] 2) Selection of network key nodes: Different layers of the VGG16 network are used to extract features on the dataset, and a BN generalization layer is added to prevent overfitting.

[0088] 3) After that, a fully connected layer is added to connect the extracted features into one-dimensional linear features.

[0089] 4) Add a softmax classification layer to form a new network.

[0090] Step 6: Use the training set to train the model to obtain a model with trained parameters; use the test set to detect the trained model and calculate the model accuracy.

[0091] Real-time application stage:

[0092] Step 7: Collect real-time data in the industrial process, preprocess it and then input it into the trained model to obtain the result of whether the metallographic test picture is qualified.

[0093] Furthermore, for the automatic recognition method of metallographic test pictures based on VGG16 described in claim 1, the output of the BN layer can be calculated by the following formula:

[0094] y i = γx i '+ β

[0095]

[0096]

[0097]

[0098] where x is the input vector, x ∈ R m μ B is the mean of x i , is the variance of x i ε is a very small constant, and γ and β are parameters learned in the model.

[0099] Furthermore, for the automatic recognition method of metallographic test pictures based on VGG16 described in claim 1, the calculation formula of the softmax layer is as follows:

[0100]

[0101] where K is the number of labels, θ is the parameter of the softmax layer.

[0102] The present invention relates to an automatic recognition method for metallographic test pictures based on VGG16, including data preprocessing: taking metallographic test pictures with an electron microscope and classifying them, performing unified pixel processing on all sample pictures, and classifying and labeling the obtained picture samples; dividing the samples into a training set and a test set; inputting the training set into the constructed model for learning and training, the model consists of a VGG16 feature extraction layer, a BN generalization layer, a fully connected layer, and a softmax classification layer; finally, inputting the test set into the trained diagnostic model, using the accuracy of image classification as the performance index for testing the model, and its numerical value characterizes the generalization performance of the model, that is, the online recognition ability for pictures; the effectiveness of the present invention is verified through experiments. The beneficial effect of the present invention is that it can liberate technicians from heavy manual recognition work and realize automatic recognition of metallographic test pictures without relying on human experience.

Claims

1. An automatic recognition method for metallographic test pictures based on VGG16 includes three stages, namely, data preprocessing stage, model training stage and real-time application stage; specifically as follows, Data preprocessing stage: Step 1: Use an electron microscope to collect pictures of different states in the metallographic grinding test during the industrial process; Step 2: Picture preprocessing: Perform unified pixel processing on all sample pictures; Step 3: Then classify and add labels to all sample pictures, dividing them into two categories: "qualified" and "unqualified", and adding labels: qualified is 1, unqualified is 0; construct a labeled data set (X, Y); Model training stage: Step 4: Divide the training set and test set according to a set ratio; Step 5: Network model construction based on VGG16: 1) Network pre-training: Use VGG16 to perform network training on the ImageNet large natural image data set, and save the weights after training; 2) Selection of network key nodes: Use different layers of the VGG16 network to extract features on the data set, and at the same time add a BN generalization layer to prevent overfitting; 3) After that, add a fully connected layer and a softmax classification layer to form a new network; Step 6: Use the training set to train the model to obtain a model with trained parameters; use the test set to detect the trained model and calculate the model accuracy; the model training is completed; Real-time application stage: Step 7: Actual application: Preprocess the real-time pictures collected during the industrial process, unify the real-time pictures into pictures with the same pixels as in Step 2, and then input them into the model trained in Step 6 to obtain the result of whether the metallographic test pictures are qualified or not.

2. The automatic recognition method for metallographic test pictures based on VGG16 according to claim 1, characterized in that The output result value of the said BN generalization layer is calculated by the following formula: y i = γx i '+ β Among them, x is the input vector, x ∈ R m , μ B is the mean of x i , is the variance of x i , ε is a very small constant, and γ and β are parameters learned in the model.

3. The automatic recognition method for metallographic test pictures based on VGG16 according to claim 1, wherein, The calculation formula of the probability of the said softmax layer is as follows: Among them, K is the number of labels, and θ is the parameter of the softmax layer.

4. The automatic recognition method of metallographic test pictures based on VGG16 according to claim 1, wherein, The said Step 4 divides the training set and test set according to a set ratio; The set ratio is between 2:l and 5:

1.

5. The automatic recognition method of metallographic test pictures based on VGG16 according to claim 4, wherein, The said Step 4 divides the training set and test set according to a set ratio; The set ratio is between 3:l and 4:1.

Citation Information

Patent Citations

  • Label defect detection algorithm based on twin network

    CN110222792A

  • Eye fundus photo classification method and eye fundus image processing method and system

    CN114693961A