Efficient convolutional neural network model training method based on semi-supervised learning
By using the Teacher-Student model structure and iterative training strategy, high-quality pseudo-labels are generated, which solves the dependence on labeled data in the training of convolutional neural networks, improves model accuracy and reduces costs, and is suitable for tasks such as image classification and object detection.
Patent Information
- Application Number
- CN202511705267.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2026-03-03
AI Technical Summary
Traditional convolutional neural network training requires a large amount of labeled data, and existing pseudo-label generation methods cannot fully utilize the knowledge between different models, resulting in limited improvement in model accuracy under resource-constrained environments.
We adopt a Teacher-Student model structure and an iterative training strategy. We train the Teacher model with labeled data to generate pseudo-labels, and then train the Student model with synthetic datasets to gradually optimize the quality of pseudo-labels and achieve iterative improvement of the model.
It significantly reduces reliance on labeled data, improves model accuracy, and lowers the cost and time of manual annotation, making it suitable for a variety of deep learning tasks.
Smart Images

Figure CN121599031A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a training method for convolutional neural network (CNN) models based on semi-supervised learning. Specifically, it is a method that significantly improves the accuracy of CNN models through pseudo-label generation and iterative training strategies. This method solves the problem of requiring large amounts of labeled data in traditional CNN training by intelligently generating pseudo-labels and continuously optimizing the training process, even in the absence of a large amount of labeled data. It has high engineering application value. Background Technology
[0002] Convolutional Neural Networks (CNNs) have been widely used in various fields such as image classification, object detection, and speech recognition. Training a high-precision CNN model typically requires a large amount of labeled data. However, obtaining labeled data often involves high costs, significant time consumption, and expert dependence, making it difficult to obtain sufficient labeled data in many application scenarios. Furthermore, in resource-constrained environments, how to improve model accuracy with less labeled data has become a hot research topic.
[0003] To reduce reliance on labeled data, semi-supervised learning and pseudo-labeling methods have emerged as effective solutions in recent years. Semi-supervised learning generates pseudo-labels using unlabeled data and uses them as auxiliary training data, improving model performance even with insufficient labeled data. Traditional pseudo-label generation methods mostly rely on a single model for labeling and often fail to fully utilize the knowledge shared between different models. How to further improve the quality of pseudo-labels through iteration, thereby further improving training accuracy, remains a challenge in this field. Summary of the Invention
[0004] This invention provides a semi-supervised learning-based convolutional neural network (CNN) model training method. By introducing a Teacher-Student model structure and an iterative training strategy, the model training accuracy is significantly improved. The specific implementation method is as follows:
[0005] Step S1: Train the convolutional neural network model using the labeled dataset A to obtain an initial Teacher model; after training, the Teacher model is used in subsequent steps to infer pseudo-labels for unlabeled data.
[0006] Step S2: Use the trained Teacher model to perform pseudo-label inference on the unlabeled dataset B; the Teacher model predicts each data point in dataset B and takes the class with the highest confidence in the prediction results as the hard label of the data point; these hard labels are pseudo-labels, which are used in the subsequent training process.
[0007] Step S3: Merge dataset A and unlabeled dataset B obtained through pseudo-label inference to obtain a synthetic dataset; train a new Student model using this synthetic dataset; the trained Student model becomes the new Teacher model and enters the next iteration.
[0008] Step S4: After each Student model is trained, it becomes a new Teacher model. It continues to perform pseudo-label inference on new unlabeled datasets, generates new pseudo-labels, and uses them to train new Student models. This process is repeated for multiple iterations to improve model accuracy.
[0009] As a preferred embodiment, the labeled dataset A and the unlabeled dataset B described in this invention have the same data types and feature spaces.
[0010] As another preferred embodiment, in step S1 of this invention, the Teacher model is trained using standard supervised learning, and the optimization objective is to minimize the loss function:
[0011]
[0012] Among them, y i p is the true label of sample i. i It is the predicted probability of the model, and N is the total number of samples in the dataset;
[0013] The Teacher model is trained using standard optimization methods, and the network parameters are updated until the Teacher model reaches the expected accuracy or converges on the labeled dataset A.
[0014] As another preferred embodiment, in step S2 of the present invention, the unlabeled dataset B is input into the trained Teacher model, and forward propagation is performed to obtain the class prediction output by the model.
[0015] For each unlabeled sample, the Teacher model generates a probability distribution representing the probability that the sample belongs to each category; the category with the highest predicted probability is selected as the pseudo-label for that sample.
[0016]
[0017] in, p represents a pseudo tag i1 It is the class probability output by the model.
[0018] As another preferred embodiment, in step S2 of the present invention, a confidence threshold is set, and only pseudo-label samples with a predicted probability higher than the threshold are selected for training.
[0019] As another preferred embodiment, in step S3 of the present invention, the samples of the synthetic dataset are randomly shuffled, and then a new CNN (convolutional neural network) model, called the Student model, is trained using batch gradient descent.
[0020] During the learning process, the Student model continuously optimizes its parameters through gradient descent, with the optimization objective being to minimize the loss function:
[0021]
[0022] in, p is a pseudo tag i2 This represents the predicted probability of the Student model.
[0023] Secondly, in step S4 of this invention, the new pseudo-labels are merged with the labeled dataset A to obtain a new synthetic dataset, and the synthetic dataset is used to train a new Student model. This process is an iterative process, and each iteration generates a higher quality Teacher model, which is then used to generate more accurate pseudo-labels, thereby improving the model's accuracy.
[0024] In addition, in step S4 of the present invention, the model accuracy is improved through three rounds of iteration; when the change in accuracy on the validation set is less than the set threshold, the model is considered to have converged and the iteration stops.
[0025] Beneficial effects of the invention
[0026] This invention solves the problem of requiring a large amount of labeled data in the training of traditional deep learning models by introducing a Teacher-Student model structure and a pseudo-label generation mechanism. Specifically, the beneficial effects are as follows:
[0027] Reduced reliance on labeled data: By generating pseudo-labels, this invention significantly reduces the need for large-scale labeled datasets, enabling the effective training of high-precision models even when labeled data is insufficient.
[0028] Improving model accuracy: Through iterative Teacher-Student training, the quality of pseudo-labels is gradually optimized, ultimately resulting in a high-performance model. Each iteration generates more accurate pseudo-labels using a new Teacher model, effectively improving model accuracy.
[0029] Reduced human intervention and costs: The pseudo-label generation process significantly reduces reliance on manual annotation, reduces the time and cost of collecting labeled data, and improves data utilization efficiency.
[0030] Adaptable to a variety of application scenarios: The method of this invention is not only applicable to image classification tasks, but also to other types of deep learning tasks, such as object detection and speech recognition, and has broad application prospects. Attached Figure Description
[0031] The present patent will be further described in detail below with reference to the accompanying drawings and embodiments:
[0032] Figure 1 The flowchart of the convolutional neural network training method of the present invention illustrates the overall process of Teacher model training, pseudo-label generation, Student model training, and iteration. Detailed Implementation
[0033] The technical solution of the present invention will be further described in detail below.
[0034] The technical solution provided by this invention is: an efficient convolutional neural network (CNN) model training method based on semi-supervised learning, comprising the following steps:
[0035] S1: Data Preparation and Creation of Labeled Dataset A. Before implementing the training method of this invention, two datasets need to be prepared:
[0036] Labeled Dataset A: This dataset contains training samples with pre-labeled category information, typically labeled manually or semi-automatically. Labeled Dataset A forms the basis for training the Teacher model, providing initial supervision signals for subsequent pseudo-label inference.
[0037] Unlabeled Dataset B: This dataset contains unlabeled training samples. Unlabeled Dataset B is typically collected from networks, sensors, or other data sources, covering diverse data related to the task to be identified.
[0038] In many real-world applications, the amount of unlabeled dataset B is often far greater than that of labeled dataset A, and acquiring labeled data is very expensive or time-consuming. Therefore, the semi-supervised learning method of this invention can effectively utilize this unlabeled data for model training.
[0039] S2: Training the Teacher Model. After obtaining dataset A, a convolutional neural network (CNN) model is first trained using this dataset to obtain the Teacher model. This Teacher model is the initial model to be trained. Although its performance cannot reach the final optimal accuracy, its predictive ability is sufficient to generate pseudo-labels.
[0040] Specifically, the steps include the following:
[0041] S21: Choose a convolutional neural network architecture suitable for the task, such as VGG, ResNet, EfficientNet, etc.
[0042] S22: For the labeled dataset A, train the Teacher model using standard supervised learning training methods, with the optimization objective being to minimize the loss function (such as cross-entropy loss):
[0043]
[0044] Among them, y i p is the true label of sample i. i It is the predicted probability of the model, and N is the total number of samples in the dataset;
[0045] S23: Use standard optimization methods such as Adam and SGD to train the model and update the network parameters until the model reaches the expected accuracy or converges on the labeled dataset A.
[0046] S3: Pseudo-label generation. Once the Teacher model has been trained and achieved initial convergence, it can be used to generate pseudo-labels. Pseudo-labels are labels generated by the Teacher model predicting samples in the unlabeled dataset B. Since the unlabeled dataset B has no real labels, the Teacher model's predictions are used as "soft labels." Based on state S1 received in S2, in the first round, the server closest to the terminal is selected as the initial unloading target according to the DRL network. Subsequent rounds will then autonomously select the target based on the DRL network. Specific details include the following:
[0047] S31: Input the unlabeled dataset B into the trained Teacher model, perform forward propagation, and obtain the class prediction output by the model;
[0048] S32: For each unlabeled sample, the Teacher model generates a probability distribution representing the probability that the sample belongs to each category;
[0049] S33: Select the class with the highest predicted probability as the pseudo-label (hard label) for this sample:
[0050]
[0051] in, p represents a pseudo tag i1 It is the class probability output by the model;
[0052] S34: Since the Teacher model is not perfect, pseudo-labels may contain incorrect labels. To reduce the impact of such errors, a confidence threshold can be set, and only pseudo-labeled samples with predicted probabilities higher than the threshold can be selected for training. This ensures the quality of the pseudo-labels.
[0053] S4: Generate a synthetic dataset and train the Student model. Merge the labeled dataset A with the generated pseudo-label dataset B to form a synthetic dataset. The synthetic dataset includes real labels from the labeled dataset A and pseudo labels from the unlabeled dataset B. Use this synthetic dataset to begin training the new Student model. Specifically, it includes the following:
[0054] S41: Training using a synthetic dataset. The samples in the synthetic dataset can be randomly shuffled, and then a new CNN model, called the Student model, can be trained using standard training methods (such as batch gradient descent).
[0055] S42: During the learning process, the Student model continuously optimizes its parameters through gradient descent to improve its performance on synthetic datasets. The optimization objective remains minimizing the loss function.
[0056]
[0057] in, p is a pseudo tag i2 The predicted probability for the Student model;
[0058] S5: Iterative Training and Teacher Model Update. Once the Student model is trained, it becomes the new Teacher model, continuing to infer pseudo-labels on the unlabeled dataset and generating new pseudo-labels. Next, the new pseudo-labels are merged with the labeled dataset A to generate a new synthetic dataset, which is then used to train the new Student model. Specifically, this includes the following:
[0059] S51: After each training of the Student model, use it as the new Teacher model, and perform pseudo-label inference on the new unlabeled dataset again to generate new pseudo-labels;
[0060] S52: Merge the new pseudo-labels with the labeled dataset A to obtain a new synthetic dataset, and use the synthetic dataset to train a new Student model;
[0061] S53: This process is an iterative process. Each iteration generates a higher quality Teacher model and uses it to generate more accurate pseudo-labels, thereby gradually improving the accuracy of the model.
[0062] S6: Number of Iterations and Termination Condition. Typically, the model's accuracy will significantly improve after three iterations. During each iteration, the model's performance continuously improves, ultimately resulting in a highly accurate convolutional neural network model. In practical applications, a termination condition can be set based on the changes in model accuracy during training. For example, when the change in accuracy on the validation set is less than a set threshold, the model can be considered to have converged, and iteration can stop.
[0063] S7: The final model, obtained after multiple iterations, can be deployed in practical applications. For example, in image classification tasks, the final trained CNN model can be used to classify new images. This model can not only handle large amounts of unlabeled data, but also maintain high accuracy even when labeled data is scarce.
[0064] In summary, the CNN model training method based on semi-supervised learning proposed in this invention, where both the Teacher and Student models are convolutional neural network (CNN) models, significantly improves the training accuracy of the model in situations lacking a large amount of labeled data through an iterative training strategy of the Teacher-Student model. This method effectively reduces the dependence on labeled data, continuously optimizes model performance through pseudo-label generation and iterative model training, and has broad application prospects in many practical applications, especially suitable for fields such as medical imaging and industrial quality inspection where labeled data is scarce and labeling costs are high.
[0065] Example
[0066] S1: Train the Teacher model using the labeled dataset A.
[0067] S11: Data preparation: Select a labeled photovoltaic panel crack defect dataset A, which contains images of various crack types and their corresponding labels (e.g., crack bounding boxes and crack type labels).
[0068] S12: Training the Teacher Model: The YOLOv8 defect detection model is trained using dataset A. This process employs standard supervised learning methods, utilizing the cross-entropy loss function for optimization, to train a preliminary Teacher model.
[0069] S13: Obtain a preliminary Teacher model: After training, a preliminary Teacher model is obtained, which can identify the basic characteristics of photovoltaic panel crack defects in dataset A.
[0070] S2: Pseudo-label inference.
[0071] S21: Select Unlabeled Dataset B: Select an unlabeled photovoltaic panel crack dataset B. Dataset B contains a large number of photovoltaic panel images, but the images are not labeled with cracks. The images in dataset B are similar in origin to those in dataset A, but are not labeled.
[0072] S22: Inference using the Teacher model: Use the trained Teacher model to make predictions for each image in dataset B. The Teacher model will generate a crack detection category prediction and its confidence level for each image.
[0073] S23: Generate pseudo-labels: For each unlabeled data point, select the category with the highest confidence in the prediction results as the pseudo-label for that data point. These pseudo-labels will serve as the target labels in subsequent training processes.
[0074] S3: Synthetic dataset and training the Student model.
[0075] S31: Synthetic Dataset: Merge dataset A (labeled dataset) and dataset B (pseudo-labeled dataset) to obtain a new synthetic dataset. The synthetic dataset contains the real labeled data from dataset A and the pseudo-labeled data inferred through the Teacher model.
[0076] S32: Training the Student Model: Train the YOLOv8 model using a synthetic dataset to obtain a new Student model. During training, optimize the cross-entropy loss function by combining labeled and pseudo-labeled data.
[0077] S33: Save the trained Student model: After training, a new Student model is obtained, which combines real labeled data and pseudo-labeled data, thereby improving the model's ability to identify crack defects.
[0078] S4: Iterative training.
[0079] S41: Update the Teacher model: After each training cycle, the new Student model will be used as the new Teacher model for the next round of training.
[0080] S42: Perform pseudo-label inference on new unlabeled data: Use the new Teacher model to perform pseudo-label inference on more unlabeled datasets B and generate new pseudo-labels.
[0081] S43: Train a new Student model: Continue training a new Student model using the updated synthetic dataset (including new pseudo-label data).
[0082] S44: Iterative Repetition: This process involves multiple iterations, typically three, which significantly improves the model's accuracy. In each iteration, the model's performance is gradually optimized, ultimately resulting in a highly accurate YOLOv8 model capable of more precisely identifying cracks and defects in photovoltaic panels.
[0083] Table 1 shows the impact of the number of semi-supervised learning iterations on performance.
[0084] Table 2 shows the performance comparison of different models.
[0085] In scenarios where labeled data is scarce, multiple iterations significantly improve the accuracy of CNN models. Experimental data shows an accuracy improvement of over 10%. The two bolded data points in Table 1 show 0.808 and 0.907.
[0086]
[0087]
[0088] Table 1. Impact of the number of semi-supervised learning iterations on model performance
[0089] Model Enter image dimensions mAP@0.5 FPS YOLOv3 640×640 0.806 256.41 YOLOv5 640×640 0.792 175.44 YOLOv6 640×640 0.586 35.36 YOLOv7 640×640 0.795 36.29 YOLOv8 640×640 0.808 128.21 Semi-supervised training YOLOv8 640×640 0.907 94.34
[0090] Table 2 Performance comparison of different models.
Claims
1. A method for training an efficient convolutional neural network model based on semi-supervised learning, characterized in that... Includes the following steps: Step S1: Train the convolutional neural network model using the labeled dataset A to obtain an initial Teacher model; after training, the Teacher model is used in subsequent steps to infer pseudo-labels for unlabeled data. Step S2: Use the trained Teacher model to perform pseudo-label inference on the unlabeled dataset B; the Teacher model predicts each data point in dataset B and takes the class with the highest confidence in the prediction results as the hard label of the data point; these hard labels are pseudo-labels, which are used in the subsequent training process. Step S3: Merge dataset A and unlabeled dataset B obtained through pseudo-label inference to obtain a synthetic dataset; train a new Student model using this synthetic dataset; the trained Student model becomes the new Teacher model and enters the next iteration. Step S4: After each Student model is trained, it becomes a new Teacher model. It continues to perform pseudo-label inference on new unlabeled datasets, generates new pseudo-labels, and uses them to train new Student models. This process is repeated for multiple iterations to improve model accuracy.
2. The efficient convolutional neural network model training method based on semi-supervised learning according to claim 1, characterized in that... The labeled dataset A and the unlabeled dataset B have the same data types and feature spaces.
3. The efficient convolutional neural network model training method based on semi-supervised learning according to claim 1, characterized in that... In step S1, the Teacher model is trained using standard supervised learning, and the optimization objective is to minimize the loss function: Among them, y i p is the true label of sample i. i It is the predicted probability of the model, and N is the total number of samples in the dataset; The Teacher model is trained using standard optimization methods, and the network parameters are updated until the Teacher model reaches the expected accuracy or converges on the labeled dataset A.
4. The efficient convolutional neural network model training method based on semi-supervised learning according to claim 1, characterized in that... In step S2, the unlabeled dataset B is input into the trained Teacher model for forward propagation to obtain the class prediction output by the model. For each unlabeled sample, the Teacher model generates a probability distribution representing the probability that the sample belongs to each category; Choose the category with the highest predicted probability as the pseudo-label for the sample: in, p represents a pseudo tag i1 It is the class probability output by the model.
5. The efficient convolutional neural network model training method based on semi-supervised learning according to claim 1, characterized in that... In step S2, a confidence threshold is set, and only pseudo-label samples with a predicted probability higher than the threshold are selected for training.
6. The efficient convolutional neural network model training method based on semi-supervised learning according to claim 1, characterized in that... In step S3, the samples of the synthetic dataset are randomly shuffled, and then a new CNN model, called the Student model, is trained using batch gradient descent. During the learning process, the Student model continuously optimizes its parameters through gradient descent, with the optimization objective being to minimize the loss function: in, p is a pseudo tag i2 This represents the predicted probability of the Student model.
7. The efficient convolutional neural network model training method based on semi-supervised learning according to claim 1, characterized in that... In step S4, the new pseudo-labels are merged with the labeled dataset A to obtain a new synthetic dataset, and the synthetic dataset is used to train a new Student model. This process is an iterative process, and each iteration generates a higher quality Teacher model, which is then used to generate more accurate pseudo-labels, thereby improving the model's accuracy.
8. The efficient convolutional neural network model training method based on semi-supervised learning according to claim 1, characterized in that... In step S4, the model accuracy is improved through three rounds of iteration; when the change in accuracy on the validation set is less than the set threshold, the model is considered to have converged and the iteration stops.