Seatbelt fabric defect classification method based on weight ratio transfer

Through weight proportion migration and data set retraining methods, the problem of small number of defect samples and uneven distribution of seat belt fabrics is solved, and the accuracy of defect classification and training efficiency are improved.

CN115761338BActive Publication Date: 2025-08-26OPPERMANN WEBBING KUSN
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211447309.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-18
Publication Date
2025-08-26
Estimated Expiration
2042-11-18

AI Technical Summary

Technical Problem

The number of defect samples of seat belt fabrics is small and unevenly distributed, resulting in low classification accuracy of neural network models.

Method used

The weight proportional migration method is used to migrate the weights of the pre-trained AlexNet network to the new model, and retrain and parameter fine-tune are used to use common defect data sets for retraining and parameter fine-tuning. Then, new proportional weights are assigned to the fully connected layer, and secondary fine-tuning is used to use rare defect data sets to build a defect classification model.

Benefits of technology

It improves the accuracy of defect classification, reduces the data sample size requirement, improves training efficiency, solves the problem of uneven distribution of defect samples, and achieves better classification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115761338B_ABST
    Figure CN115761338B_ABST
Patent Text Reader

Abstract

This application proposes a method for classifying seat belt fabric defects based on weight proportional migration, which combines the AlexNet deep convolutional neural network with transfer learning. First, the weights of the convolutional layer and pooling layer before the fully connected layer in the AlexNet network are frozen and migrated, so that the improved AlexNet network retains the same feature extraction capability as the original model, and the fully connected layer is reconstructed to adapt it to the field of seat belt fabric defect classification. The common defect data set is used for retraining and parameter fine-tuning, so that better classification results are obtained with a relatively small amount of data samples, and the training efficiency is also greatly improved. Then, the fully connected layer in the AlexNet network retrained on the common defect data set is given a new proportional weight, and a rare defect data set is used for secondary fine-tuning to reduce the negative impact of the incomplete similarity between the common defect data set and the rare defect data set, solve the problem of uneven distribution of common defect data samples and rare defect data samples, and improve the overall classification accuracy of defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of computer vision and artificial intelligence technology, and specifically to a method for classifying seat belt fabric defects based on weighted ratio migration. Background Art

[0002] In recent years, computer vision object detection methods based on deep learning have been widely used in the field of defect classification and identification, demonstrating significant performance advantages over traditional image processing algorithms. To achieve high classification accuracy, deep neural network training requires a large amount of labeled data. However, the current high yield rate of seat belt fabric production leads to a lack of defect sample data, making it difficult to train large networks. Furthermore, the available defect samples are unevenly distributed, with some defect categories having relatively more samples and others having very few. These factors severely limit the accuracy of detection model training and practical applications. Summary of the Invention

[0003] The present application provides a safety belt fabric defect classification method based on weight ratio migration, which solves the problem of low classification accuracy of the neural network model caused by the small number of safety belt fabric defect samples and uneven sample distribution.

[0004] The technical solution adopted by the present application to solve the technical problem is: a method for classifying seat belt fabric defects based on weight ratio migration, comprising:

[0005] S1: Acquire the image of the seat belt fabric defect to be classified;

[0006] S2: Obtain a sample set of seat belt fabric defect images, and obtain a common defect dataset and a rare defect dataset based on the sample set of seat belt fabric defect images;

[0007] S3: Use the common defect dataset to train the pre-trained AlexNet network model after weight transfer;

[0008] S4: Assign new proportional weights to the fully connected layers of the AlexNet network model trained with the common defect dataset;

[0009] S5: The defect classification model is obtained by training the AlexNet network model with the fully connected layer assigned new proportional weights using the rare defect dataset.

[0010] S6: Inputting the seat belt fabric defect image to be classified into the defect classification model to obtain the defect classification.

[0011] This seat belt fabric defect classification method combines the AlexNet deep convolutional neural network with transfer learning. The weight transfer method is used to migrate the pre-trained AlexNet network, and a common defect dataset is used for retraining and parameter fine-tuning. Good classification results are obtained with a relatively small amount of data samples. At the same time, training efficiency is also greatly improved. New proportional weights are assigned to the fully connected layers in the AlexNet network trained on the common defect dataset, and secondary fine-tuning is performed using the rare defect dataset to reduce the negative impact of the incomplete similarity between the common defect dataset and the rare defect dataset, solve the problem of uneven distribution of common defect data samples and rare defect data samples, and improve the overall classification accuracy of defects.

[0012] As a preference,

[0013] S2 includes: obtaining and classifying a sample set of seat belt fabric defect images, combining them with flawless images to construct a common defect dataset and a rare defect dataset;

[0014] S3 includes: using a preset image data set to train a first AlexNet network model, and saving a weight value set W1 of a convolutional layer and a pooling layer of the first AlexNet network model;

[0015] Modify the fully connected layer of the first AlexNet network model using a preset method to obtain a second AlexNet network model;

[0016] Migrating the weight value set W1 to the second AlexNet network model to obtain a third AlexNet network model;

[0017] Using the common defect dataset to train the third AlexNet network model to obtain a fourth AlexNet network model, and saving the weight value set W2 of the fully connected layer of the fourth AlexNet network model;

[0018] S4 includes: assigning a new weight value to the fully connected layer of the fourth AlexNet network model according to the proportional coefficient to obtain a fifth AlexNet network model;

[0019] S5 includes: using a rare defect dataset to train the fifth AlexNet network model to obtain a defect classification model.

[0020] As a preferred method, a sample set of seat belt fabric defect images is obtained and classified and annotated, and combined with the defect-free images to jointly construct a common defect dataset and a rare defect dataset, including:

[0021] Obtain a sample set of seat belt fabric defect images, where the defect categories with a percentage exceeding a threshold Th1 are defined as common defects, and the others are defined as rare defects.

[0022] Select a certain number of defect-free images and common defect images to form a common defect dataset;

[0023] A certain number of defect-free images and rare defect images are selected to form a rare defect dataset.

[0024] Preferably, using a preset image data set to train the first AlexNet network model includes: using the ImageNet public data set to train the first AlexNet network model, the first AlexNet network model includes 8 layers, of which layers 1-5 are conventional convolution layers, the first convolution kernel is 11*11, the second convolution kernel is 5*5, the 3rd-5th convolution kernel is 3*3, and layers 6-8 are fully connected layers with dimensional sizes of 1*1*4096, 1*1*4096, and 1*1*1000.

[0025] Preferably, a preset method is used to modify the fully connected layer of the first AlexNet network model, including: retaining layers 1-5 in the first AlexNet network model, and modifying the dimension sizes of the 6-8 fully connected layers to 1*1*4096, 1*1*4096, and 1*1*(m+1), where m is the number of defect types that need to be classified.

[0026] Preferably, the weight value set W1 is migrated to the second AlexNet network model to obtain a third AlexNet network model, including: freezing the weight value set W1 of the convolution layer and the pooling layer of the first AlexNet network model, and directly migrating the weight value set W1 to the second AlexNet network model to obtain the third AlexNet network model.

[0027] Preferably, a common defect data set is used to train a third AlexNet network model to obtain a fourth AlexNet network model, including: dividing the common defect data set into: a common defect data set training set and a common defect data set test set, using the common defect data set training set to train the third AlexNet network model to obtain a fourth AlexNet network model, using the Adam optimizer for training, using 0.0002 as the initial learning rate, and selecting the cross entropy loss function to avoid the problem of gradually decreasing learning rate caused by the mean square error.

[0028] Preferably, using the common defect data set training set to train the third AlexNet network model includes: using the common defect data set training set, taking the weight value set of the fully connected layer of the third AlexNet network model as the optimization object, and using the stochastic gradient method to train the third AlexNet network model.

[0029] Preferably, the fifth AlexNet network model is obtained by assigning a new weight value to the fully connected layer of the fourth AlexNet network model according to the proportional coefficient, including: multiplying the weight value set W2 of the fully connected layer of the fourth AlexNet network model by the proportional weight coefficient a to obtain the fifth AlexNet network model, the fully connected layer weight value set of the fifth AlexNet network model is aW2, and the initial value of the proportional weight coefficient a is randomly selected in (0,1].

[0030] Preferably, the method of using a rare defect dataset to train the fifth AlexNet network model to obtain a defect classification model includes: dividing the rare defect dataset into a rare defect dataset training set and a rare defect dataset test set, using the rare defect dataset training set to train the fifth AlexNet network model, taking the proportional weight coefficient a as the optimization object, and using the gradient descent method to train the fifth AlexNet network model to obtain the defect classification model.

[0031] The substantial effect of the present application is as follows: the present invention proposes a method for classifying seat belt fabric defects based on weight proportional migration, which combines the AlexNet deep convolutional neural network with transfer learning. In the first stage, the weights of the convolutional layer and pooling layer before the fully connected layer in the AlexNet network are frozen and migrated, so that the improved AlexNet network retains the same feature extraction capability as the original model, and the fully connected layer is reconstructed to adapt to the field of seat belt fabric defect classification. The method is retrained and parameter fine-tuned using a common defect dataset, so that better classification results are obtained with a relatively small amount of data samples, and the training efficiency is also greatly improved. In the second stage, the fully connected layer in the AlexNet network retrained on the common defect dataset is assigned a new proportional weight, and the proportional coefficient is used as the optimization object. The method is fine-tuned twice using the rare defect dataset to reduce the negative impact of the incomplete similarity between the common defect dataset and the rare defect dataset, solve the problem of uneven distribution of common defect data samples and rare defect data samples, and improve the overall classification accuracy of defects. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a flowchart of the steps of embodiment 1. DETAILED DESCRIPTION

[0033] The technical solution of the present application is further described below through specific embodiments.

[0034] Example 1

[0035] like Figure 1 As shown, a safety belt fabric defect classification method based on weight ratio migration includes:

[0036] S1: Obtain images of seat belt fabric defects to be classified; S2: Obtain a sample set of seat belt fabric defect images, and obtain a common defect dataset and a rare defect dataset based on the sample set of seat belt fabric defect images; S3: Use the common defect dataset to train the pre-trained AlexNet network model after weight transfer; S4: Assign new proportional weights to the fully connected layer of the AlexNet network model trained with the common defect dataset; S5: Use the rare defect dataset to train the AlexNet network model with the fully connected layer assigned with the new proportional weights to obtain a defect classification model; S6: Input the seat belt fabric defect images to be classified into the defect classification model to obtain the defect classification.

[0037] This seat belt fabric defect classification method divides seat belt fabric defect images into common defect datasets and rare defect datasets. It combines the AlexNet deep convolutional neural network with transfer learning. The weight transfer method is first used to migrate the pre-trained AlexNet network. Then, the common defect dataset is used for retraining and parameter fine-tuning. In this way, better classification results are obtained with a relatively small amount of data samples. At the same time, the training efficiency is also greatly improved. Then, new proportional weights are assigned to the fully connected layers in the AlexNet network trained on the common defect dataset. Then, the rare defect dataset is used to perform secondary fine-tuning on the AlexNet network trained on the common defect dataset. This reduces the negative impact of the incomplete similarity between the common defect dataset and the rare defect dataset, solves the problem of uneven distribution of common defect data samples and rare defect data samples, and improves the overall classification accuracy of defects.

[0038] Example 2

[0039] When using this weighted ratio transfer-based seat belt fabric defect classification method to classify seat belt fabric defects, first obtain the seat belt fabric defect image to be classified, input it into the defect classification model, and obtain the defect classification. The defect classification model used in this method is established as follows:

[0040] First, a sample set of seat belt fabric defect images is obtained. The defect categories with defect images accounting for more than 10% of the sample set are defined as common defects, and the others are defined as rare defects. The sample set of seat belt fabric defect images is composed of seat belt fabric defect images accumulated during the production process. In this embodiment, a total of 8 categories of defects are collected, of which 5 categories are common defects and 3 categories are rare defects. 100 defect-free images and 85 common defect images are selected to form the common defect dataset, and 20 defect-free images and 15 rare defect images are selected to form the rare defect dataset. Im The first AlexNet network model is obtained by training the ageNet public dataset, and the weight value set W1 of the convolutional layer and pooling layer of the first AlexNet network model is saved. The weight value set W1 is used for subsequent model migration. The first AlexNet network model consists of 8 layers, of which layers 1-5 are regular convolutional layers, the first layer convolution kernel is 11*11, the second layer convolution kernel is 5*5, the 3-5 layer convolution kernel is 3*3, and the 6-8 layers are fully connected layers with dimension sizes of 1*1*4096, 1*1*4096, and 1*1*1000;

[0041] Then, keep layers 1-5 of the first AlexNet network model unchanged, and modify the dimensions of the fully connected layers 6-8 of the first AlexNet network model to 1*1*4096, 1*1*4096, and 1*1*9, where 9 is the number of defect types that need to be classified, including 1 type of no defect, 5 types of common defects, and 3 types of rare defects. This results in a second AlexNet network model. The output of the second AlexNet network model uses a Softmax classifier, and the dimension of the output number is 9;

[0042] Freeze the weight value set W1 of the convolution layer and the pooling layer of the first AlexNet network model, and directly migrate the weight value set W1 to the second AlexNet network model to obtain a third AlexNet network model;

[0043] After preprocessing the 185 images in the common defect dataset, 130 images were randomly selected as the common defect dataset training set, and the remaining 55 images were used as the common defect dataset test set. The common defect dataset was used to optimize the weight value set of the fully connected layer of the third AlexNet network model. The third AlexNet network model was trained using the stochastic gradient method. The network parameters of the third AlexNet network model were fine-tuned to obtain the fourth AlexNet network model. The Adam optimizer was used for training, with an initial learning rate of 0.0002 and a cross-entropy loss function to avoid the problem of gradually decreasing learning rate caused by the mean square error. The weight value set W2 of the fully connected layer of the fourth AlexNet network model was then saved.

[0044] After multiplying W2 by the proportional weight coefficient a, the weight value set of the fully connected layer of the fifth AlexNet network model is obtained as aW2, and the proportional weight coefficient a is randomly selected as 0.2; then, after preprocessing the 35 images of the rare defect dataset, 25 images are randomly selected as the rare defect dataset training set, and the remaining 10 images are used as the rare defect dataset test set. The rare defect dataset training set is used, and the proportional weight coefficient a is used as the optimization object. The fifth AlexNet network model is trained using the gradient descent method, and the network parameters are fine-tuned twice to obtain a defect classification model.

[0045] It should be further explained that, during the development of this method, when the defect classification model was established, after obtaining the third AlexNet network model, the third AlexNet network model was directly trained using the training set consisting of the combined common defect dataset training set and the rare defect dataset training set to obtain a single-transfer defect classification model. The model was then tested using the common defect dataset test set, the rare defect dataset test set, and the combined common defect dataset test set and the rare defect dataset test set test set. The classification success rate of the single-transfer defect classification model is shown in the following table.

[0046] The defect classification model of this method was then tested using a common defect dataset test set and a rare defect dataset test set. The classification success rates are shown in the table below. It can be seen that the defect classification model using this method has a classification accuracy for common defects that is basically equivalent to that of the one-time transfer defect classification model. However, it can significantly improve the classification success rate for rare defects and also significantly improve the overall classification success rate for all defects.

[0047] Only 155 images were used to complete the defect classification model training of this method, which greatly reduced the requirement for the amount of training data.

[0048]

[0049] Example 3

[0050] A method for establishing a defect classification model of a seat belt fabric defect classification method based on weight ratio migration is as follows: first, a sample set of seat belt fabric defect images is obtained and classified and labeled, and a common defect dataset and a rare defect dataset are jointly constructed in combination with the defect-free images. The total ratio of defect-free images to defective images in the common defect dataset and the rare defect dataset is not higher than 2:1. A preset image dataset is used to train a first AlexNet network model, and a weight value set W1 of the convolution layer and the pooling layer of the first AlexNet network model is saved. The preset image dataset can use a large dataset such as ImageNet or a large-scale public industrial defect image dataset. Then, layers 1-5 in the first AlexNet network model are retained, and the dimension size of the 6-8 fully connected layers is modified to 1*1*40 96, 1*1*4096, 1*1*9, where 9 is the number of defect types that need to be classified, including 1 type of no defect, 5 types of common defects, and 3 types of rare defects; the output uses a Softmax classifier, and the dimension of the output number is 9. The weight value set W1 is transferred to the second AlexNet network model to obtain a third AlexNet network model. The third AlexNet network model is trained using the common defect dataset to obtain a fourth AlexNet network model. The weight value set W2 of the fully connected layer of the fourth AlexNet network model is saved. The fully connected layer of the fourth AlexNet network model is assigned a new weight value according to the proportional coefficient to obtain a fifth AlexNet network model. The fifth AlexNet network model is trained using the rare defect dataset to obtain a defect classification model.

[0051] The embodiment described above is only a preferred solution of the present application and does not limit the present application in any form. There are other variations and modifications without exceeding the technical solution described in the claims.

Claims

1. A safety belt fabric defect classification method based on weight ratio migration, characterized in that: include: S1: Acquire the image of the seat belt fabric defect to be classified; S2: Obtain a sample set of seat belt fabric defect images, and obtain a common defect dataset and a rare defect dataset based on the sample set of seat belt fabric defect images; S3: Use the common defect dataset to train the pre-trained AlexNet network model after weight transfer; S4: Assign new proportional weights to the fully connected layers of the AlexNet network model trained with the common defect dataset; S5: The defect classification model is obtained by training the AlexNet network model with the fully connected layer assigned new proportional weights using the rare defect dataset. S6: Inputting the seat belt fabric defect image to be classified into the defect classification model to obtain the defect classification; S2 includes: obtaining and classifying a sample set of seat belt fabric defect images, combining them with flawless images to construct a common defect dataset and a rare defect dataset; S3 includes: using a preset image data set to train a first AlexNet network model, and saving a weight value set W1 of a convolutional layer and a pooling layer of the first AlexNet network model; Modify the fully connected layer of the first AlexNet network model using a preset method to obtain a second AlexNet network model; Migrating the weight value set W1 to the second AlexNet network model to obtain a third AlexNet network model; Using the common defect dataset to train the third AlexNet network model to obtain a fourth AlexNet network model, and saving the weight value set W2 of the fully connected layer of the fourth AlexNet network model; S4 includes: assigning a new weight value to the fully connected layer of the fourth AlexNet network model according to the proportional coefficient to obtain a fifth AlexNet network model; S5 includes: using a rare defect dataset to train the fifth AlexNet network model to obtain a defect classification model; After assigning a new weight value to the fully connected layer of the fourth AlexNet network model according to the proportional coefficient, a fifth AlexNet network model is obtained, including: multiplying the weight value set W2 of the fully connected layer of the fourth AlexNet network model by the proportional weight coefficient a to obtain the fifth AlexNet network model, the weight value set of the fully connected layer of the fifth AlexNet network model is aW2, and the initial value of the proportional weight coefficient a is randomly selected in (0,1].

2. The safety belt fabric defect classification method based on weight ratio migration according to claim 1 is characterized in that: Obtain and classify a sample set of seat belt fabric defect images, combine them with flawless images to construct a common defect dataset and a rare defect dataset, including: Obtain a sample set of seat belt fabric defect images, where the defect categories with a percentage exceeding a threshold Th1 are defined as common defects, and the others are defined as rare defects. Select a certain number of defect-free images and common defect images to form a common defect dataset; A certain number of defect-free images and rare defect images are selected to form a rare defect dataset.

3. The safety belt fabric defect classification method based on weight ratio migration according to claim 1 is characterized in that: The first AlexNet network model is trained using a preset image dataset, including: using the ImageNet public dataset to train the first AlexNet network model, the first AlexNet network model includes 8 layers, of which layers 1-5 are regular convolution layers, the first convolution kernel is 11*11, the second convolution kernel is 5*5, the 3rd-5th layers have convolution kernels of 3*3, and layers 6-8 are fully connected layers with dimension sizes of 1*1*4096, 1*1*4096, and 1*1*1000.

4. The safety belt fabric defect classification method based on weight ratio migration according to claim 3 is characterized in that: Modifying the fully connected layer of the first AlexNet network model using a preset method includes: retaining layers 1-5 in the first AlexNet network model, and modifying the dimensions of the 6-8 fully connected layers to 1*1*4096, 1*1*4096, and 1*1*(m+1), where m is the number of defect types that need to be classified.

5. The safety belt fabric defect classification method based on weight ratio migration according to claim 1 is characterized in that: Migrating the weight value set W1 to the second AlexNet network model to obtain a third AlexNet network model, including: freezing the weight value set W1 of the convolution layer and the pooling layer of the first AlexNet network model, and directly migrating the weight value set W1 to the second AlexNet network model to obtain the third AlexNet network model.

6. The safety belt fabric defect classification method based on weight ratio migration according to claim 1, characterized in that: A common defect dataset is used to train a third AlexNet network model to obtain a fourth AlexNet network model, including: dividing the common defect dataset into a common defect dataset training set and a common defect dataset test set, using the common defect dataset training set to train the third AlexNet network model to obtain a fourth AlexNet network model, using the Adam optimizer for training, using 0.0002 as the initial learning rate, and selecting the cross entropy loss function to avoid the problem of gradually decreasing learning rate caused by the mean square error.

7. The safety belt fabric defect classification method based on weight ratio migration according to claim 6, characterized in that: Using the common defect data set training set to train the third AlexNet network model includes: using the common defect data set training set, taking the weight value set of the fully connected layer of the third AlexNet network model as the optimization object, and using the stochastic gradient method to train the third AlexNet network model.

Citation Information

Patent Citations

  • Convolutional neural network-based yarn dyed fabric defect detection method

    CN107169956A