Self-training solid waste recognition method and device based on mask-rcnn
By using the Mask-RCNN self-training method and employing a confidence threshold screening and iterative process, unlabeled samples are transformed into samples that can be used for training. This solves the problem of difficulty in obtaining training samples in existing technologies, and achieves efficient and accurate solid waste classification and identification, as well as improved model accuracy.
Patent Information
- Application Number
- CN202310774838.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2043-06-28
AI Technical Summary
Existing solid waste classification and identification methods require a large number of labeled training samples. The manual annotation work is extensive, and it is difficult to obtain effective and accurate training samples in complex backgrounds, which prevents the methods from being widely used.
The Mask-RCNN self-training method is adopted. Solid waste samples are divided into labeled and unlabeled categories. A small number of labeled samples are used for pre-training. A confidence threshold is set to filter unlabeled samples. Through an iterative process, unlabeled samples are transformed into samples that can be used for training, thereby increasing the effective dataset and improving the sample accuracy.
It achieves efficient and accurate solid waste classification and identification, expands the effective sample set, improves the accuracy and robustness of the model, and is applicable to different solid waste sorting production lines.
Smart Images

Figure CN117194969B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of semi-supervised self-training, specifically relating to a self-trained solid waste identification method and apparatus based on Mask-RCNN. Background Technology
[0002] Solid waste classification and identification play a crucial role in environmental protection and resource recycling. Existing classification and identification methods require a large number of labeled training samples, which necessitates manual annotation, resulting in a significant workload that is both time-consuming and labor-intensive. Furthermore, with the continuous increase in the amount of solid waste and the increasing diversity of samples, coupled with the complex background of the solid waste treatment field itself, obtaining effective and accurate training samples is becoming increasingly difficult. This poses a significant challenge to solid waste classification and identification, preventing the widespread application of existing classification and identification methods in the solid waste treatment sector. Summary of the Invention
[0003] The purpose of this invention is to propose a self-trained solid waste identification method and device based on Mask-RCNN, which can achieve data augmentation of effective samples, improve the accuracy of effective samples, and thus help to achieve efficient and accurate solid waste classification and identification.
[0004] This invention is achieved through the following technical solution:
[0005] The self-trained solid waste identification method based on Mask-RCNN includes the following steps:
[0006] Step S1: Divide the collected solid waste samples into two categories: labeled and unlabeled. The labeled samples form the training set, and the unlabeled samples form the unlabeled dataset.
[0007] Step S2: Pre-train the Mask-RCNN model using the training set to obtain the recognition model;
[0008] Step S3: Randomly select a portion of unlabeled samples from the unlabeled dataset as a test set. Use the recognition model to predict the samples in the test set to obtain the confidence level of each object in each sample. If the confidence level of an object in a sample is less than the first threshold, then the object is not labeled; otherwise, the object is labeled.
[0009] Step S4: For each sample after the first threshold screening, judge again. If the confidence of each object in a sample is greater than or equal to the second threshold, then put the sample into the training set; otherwise, put the sample into the unlabeled dataset. The second threshold is greater than the first threshold.
[0010] Step S5: Proceed back to step S2, pre-train the Mask-RCNN model using the updated training set, and then proceed to step S3 again, using the trained recognition model to predict the updated unlabeled dataset, thereby updating the training set and the unlabeled dataset again, until the number of samples in the training set no longer increases.
[0011] Furthermore, in step S1, a portion of solid waste samples are randomly selected and manually labeled to obtain the labeled samples.
[0012] Furthermore, in step S3, the recognition model is used to predict the samples in the test set, and the category and location of each object in the sample can also be predicted.
[0013] Furthermore, the first threshold and the second threshold are determined through a threshold comparison test.
[0014] Furthermore, the first threshold is set to 0.4, and the second threshold is set to 0.7.
[0015] Furthermore, in step S3, if the confidence level of an object in the sample is greater than or equal to the first threshold, then the object is given a pseudo-label to achieve the labeling of the object.
[0016] Furthermore, the solid waste sample is a photograph containing multiple solid waste items.
[0017] This invention is also achieved through the following technical solutions:
[0018] The self-trained solid waste identification device based on Mask-RCNN includes the following modules:
[0019] The annotation module is used to divide the collected solid waste samples into two categories: labeled and unlabeled. The labeled samples form the training set, and the unlabeled samples form the unlabeled dataset.
[0020] Training module: Used to pre-train the Mask-RCNN model using the training set to obtain the recognition model;
[0021] The first judgment module is used to randomly select a portion of unlabeled samples from the unlabeled dataset as a test set, and use the recognition model to predict the samples in the test set to obtain the confidence level of each object in each sample. If the confidence level of an object in the sample is less than the first threshold, the object is not labeled; otherwise, the object is labeled.
[0022] The second judgment module is used to judge each sample after the first threshold screening. If the confidence of each object in a sample is greater than or equal to the second threshold, the sample is put into the training set; otherwise, the sample is put into the unlabeled dataset. The second threshold is greater than the first threshold.
[0023] Iteration module: The Mask-RCNN model is pre-trained using the updated training set, and the trained recognition model is used to predict the updated unlabeled dataset to update the training set and the unlabeled dataset again, until the number of samples in the training set no longer increases, which completes the iteration.
[0024] The present invention has the following beneficial effects:
[0025] This invention first pre-trains the Mask-RCNN model using a training set with a small number of labeled samples to obtain a recognition model. A first threshold and a second threshold are set to use the recognition model to predict and filter unlabeled samples. Ultimately, all or most of the unlabeled samples are transformed into samples usable for model training, greatly increasing the effective data set and improving the accuracy of effective samples. This helps achieve efficient and accurate solid waste classification and recognition. Furthermore, this invention not only expands the effective sample dataset but also increases the model's accuracy and robustness during iteration, making it applicable to different solid waste sorting production lines and meeting the needs of actual working conditions. Attached Figure Description
[0026] The present invention will now be described in further detail with reference to the accompanying drawings.
[0027] Figure 1 This is a flowchart of the present invention.
[0028] Figure 2 This is the overall logic diagram of the present invention. Detailed Implementation
[0029] like Figure 1 and Figure 2 As shown, the self-trained solid waste identification method based on Mask-RCNN includes the following steps:
[0030] Step S1: Divide the collected solid waste samples into two categories: labeled and unlabeled. The labeled samples form the training set, and the unlabeled samples form the unlabeled dataset.
[0031] The solid waste samples are specifically images of multiple solid wastes. A portion (e.g., 50%) of these solid waste samples is randomly selected and manually labeled to obtain the labeled samples. If x samples are selected for manual labeling, and assuming that there are m types of objects to be identified, and each type of object has at least k objects, then the training set contains at least x×m×k objects.
[0032] Step S2: Pre-train the Mask-RCNN model using the PyTorch framework to obtain the recognition model, which can learn the basic features and patterns of solid waste classification and recognition.
[0033] Step S3: Randomly select a portion of unlabeled samples from the unlabeled dataset as a test set. Use the recognition model to predict the samples in the test set to obtain the confidence score, corresponding category, and location of each object in each sample. If the confidence score of an object in the sample is less than a first threshold, the object is not labeled; otherwise, the object is labeled. The first threshold is used to determine whether an object in the sample should be labeled. More specifically, if the confidence score of an object in the sample is greater than or equal to the first threshold, the object is given a pseudo-label to achieve labeling of the object.
[0034] Step S4: Each sample after being filtered by the first threshold is judged again. If the confidence of each object in a sample is greater than or equal to the second threshold, the sample is put into the training set; otherwise, the sample is put into the unlabeled dataset. In the next iteration, the parameters of the recognition model will be further optimized. The samples that are put into the unlabeled dataset this time may be labeled and put into the training set in the next iteration. The first threshold and the second threshold are determined by threshold comparison experiments. The second threshold is greater than the first threshold. In this embodiment, the first threshold is 0.4 and the second threshold is 0.7. The function of the second threshold is to filter out samples with low quality or containing noise to ensure the reliability of the samples in the training set.
[0035] Step S5: Return to step S2 and pre-train the Mask-RCNN model using the updated training set. Then, return to step S3 and use the trained recognition model to predict the updated unlabeled dataset to update the training set and the unlabeled dataset again. The iteration ends when the number of samples in the training set stops increasing. This achieves the goal of expanding the effective data sample set. The reason why the number of samples in the training set stops increasing may be that all samples have been converted into labeled samples and put into the training set, or it may be that no more labeled samples can be found. The remaining samples are invalid samples that cannot be used for training.
[0036] Correspondingly, the self-trained solid waste identification device based on Mask-RCNN includes the following modules:
[0037] The annotation module is used to divide the collected solid waste samples into two categories: labeled and unlabeled. The labeled samples form the training set, and the unlabeled samples form the unlabeled dataset.
[0038] Training module: Used to pre-train the Mask-RCNN model using the training set to obtain the recognition model;
[0039] The first judgment module is used to randomly select a portion of unlabeled samples from the unlabeled dataset as a test set, and use the recognition model to predict the samples in the test set to obtain the confidence level of each object in each sample. If the confidence level of an object in the sample is less than the first threshold, the object is not labeled; otherwise, the object is labeled.
[0040] The second judgment module is used to judge each sample after the first threshold screening. If the confidence of each object in a sample is greater than or equal to the second threshold, the sample is put into the training set; otherwise, the sample is put into the unlabeled dataset. The second threshold is greater than the first threshold.
[0041] Iteration module: The Mask-RCNN model is pre-trained using the updated training set, and the trained recognition model is used to predict the updated unlabeled dataset to update the training set and the unlabeled dataset again, until the number of samples in the training set no longer increases, which completes the iteration.
[0042] The above description is merely a preferred embodiment of the present invention and should not be construed as limiting the scope of the present invention. All equivalent changes and modifications made in accordance with the scope of the patent application and the contents of the specification of the present invention should still fall within the scope of the patent of the present invention.
Claims
1. A self-trained solid waste identification method based on Mask-RCNN, characterized in that: Includes the following steps: Step S1: Divide the collected solid waste samples into two categories: labeled and unlabeled. The labeled samples form the training set, and the unlabeled samples form the unlabeled dataset. Step S2: Pre-train the Mask-RCNN model using the training set to obtain the recognition model; Step S3: Randomly select a portion of unlabeled samples from the unlabeled dataset as a test set. Use the recognition model to predict the samples in the test set to obtain the confidence level of each object in each sample. If the confidence level of an object in a sample is less than the first threshold, then the object is not labeled; otherwise, the object is labeled. Step S4: For each sample after the first threshold screening, judge again. If the confidence of each object in a sample is greater than or equal to the second threshold, then put the sample into the training set; otherwise, put the sample into the unlabeled dataset. The second threshold is greater than the first threshold. Step S5: Proceed back to step S2, pre-train the Mask-RCNN model using the updated training set, and then proceed to step S3 again, using the trained recognition model to predict the updated unlabeled dataset, thereby updating the training set and the unlabeled dataset again, until the number of samples in the training set no longer increases.
2. The self-trained solid waste identification method based on Mask-RCNN according to claim 1, characterized in that: In step S1, a portion of solid waste samples are randomly selected and manually labeled to obtain the labeled samples.
3. The self-trained solid waste identification method based on Mask-RCNN according to claim 1, characterized in that: In step S3, the recognition model is used to predict the samples in the test set, and the category and location of each object in the sample can also be predicted.
4. The self-trained solid waste identification method based on Mask-RCNN according to claim 1, 2, or 3, characterized in that: The first threshold and the second threshold are determined through a threshold comparison test.
5. The self-trained solid waste identification method based on Mask-RCNN according to claim 4, characterized in that: The first threshold is set to 0.4, and the second threshold is set to 0.
7.
6. The self-trained solid waste identification method based on Mask-RCNN according to claim 1, 2, or 3, characterized in that: In step S3, if the confidence level of an object in the sample is greater than or equal to the first threshold, then the object is given a pseudo-label to achieve the labeling of the object.
7. The self-trained solid waste identification method based on Mask-RCNN according to claim 1, 2, or 3, characterized in that: The solid waste sample is a photograph containing multiple solid waste items.
8. A self-trained solid waste identification device based on Mask-RCNN, characterized in that: Includes the following modules: The annotation module is used to divide the collected solid waste samples into two categories: labeled and unlabeled. The labeled samples form the training set, and the unlabeled samples form the unlabeled dataset. Training module: Used to pre-train the Mask-RCNN model using the training set to obtain the recognition model; The first judgment module is used to randomly select some unlabeled samples from the unlabeled dataset as a test set, and use the recognition model to predict the samples in the test set to obtain the confidence of each object in each sample. If the confidence of an object in the sample is less than the first threshold, the object is not labeled; otherwise, the object is labeled. The second judgment module is used to judge each sample after the first threshold screening. If the confidence of each object in a sample is greater than or equal to the second threshold, the sample is put into the training set; otherwise, the sample is put into the unlabeled dataset. The second threshold is greater than the first threshold. Iteration module: The Mask-RCNN model is pre-trained using the updated training set, and the trained recognition model is used to predict the updated unlabeled dataset to update the training set and the unlabeled dataset again, until the number of samples in the training set no longer increases, which completes the iteration.
Citation Information
Patent Citations
Model iterative training method and system based on automatic labeling
CN112001407A
Semi-automatic labeling method and device for instance segmentation data set and readable medium
CN113554068A