CN-121982284-A - Small sample target detection method and device based on semi-supervised learning
Abstract
The application provides a small sample target detection method and device based on semi-supervised learning, belonging to the field of target detection, wherein the method comprises the steps of acquiring first image data and second image data, wherein the first image data comprises a label; the method comprises the steps of generating a first prediction result by using a first deep learning model, generating a second prediction result by using a second deep learning model, calculating consistency loss by using the first prediction result and the second prediction result, calculating supervision loss by using a label of the first image and the first prediction result, optimizing weight parameters of the first deep learning model by using the consistency loss and the supervision loss, optimizing weight parameters of the second deep learning model by using the weight parameters of the first deep learning model, and performing target detection by using the second deep learning model with the optimized weight parameters. The application can effectively improve the detection precision of the small sample target.
Inventors
- ZHANG TONG
- WANG SHIQIANG
- ZHANG DONGFANG
Assignees
- 北京遥感设备研究所
Dates
- Publication Date
- 20260505
- Application Date
- 20251230
Claims (10)
- 1. The small sample target detection method based on semi-supervised learning is characterized by comprising the following steps of: the method comprises the steps of obtaining a training data set corresponding to a target to be detected, wherein the training data set comprises first image data and second image data, and the first image data comprises a label; and for the training data set, the following training steps are circularly executed until a preset training condition is reached, so that a second deep learning model with optimized weight parameters is obtained: selecting a first image from the first image data, selecting a second image consistent with the first image type from the second image data, generating a first prediction result of the first image by using a first deep learning model, and generating a second prediction result of the second image by using a second deep learning model, wherein the weight parameters and the network structure of the second deep learning model and the first deep learning model are the same before the training step is executed; Calculating a consistency loss between the first deep learning model and the second deep learning model using the first prediction result and the second prediction result; Calculating the supervision loss of the first deep learning model by using the label of the first image and the first prediction result; Optimizing the weight parameters of the first deep learning model by utilizing the consistency loss and the supervision loss, and optimizing the weight parameters of the second deep learning model by utilizing the weight parameters of the first deep learning model; and performing target detection by using the second deep learning model with the optimized weight parameters.
- 2. The semi-supervised learning based small sample target detection method as set forth in claim 1, wherein the generating the second prediction result of the second image using the second deep learning model includes: predicting bounding boxes and class probabilities of the second image using a second deep learning model; And taking the boundary box with the category probability larger than the preset probability as a second prediction result corresponding to the second image.
- 3. The semi-supervised learning based small sample target detection method as set forth in claim 2, wherein the training a target deep learning model using the first image data includes: When the training round of the target deep learning model is smaller than or equal to a preset round, keeping the weight parameters of a backbone network in the target deep learning model unchanged, and updating the weight parameters of a detection head of the target deep learning model by using the first image data; when the training round of the target deep learning model is larger than the preset round, the weight parameters of the backbone network of the target deep learning model and the weight parameters of the detection head are updated simultaneously by utilizing the first image data until the training round reaches the preset maximum round; and determining the target deep learning model with the training round reaching the maximum round as a target deep learning model with the training completed.
- 4. The semi-supervised learning based small sample target detection method as recited in claim 2, further comprising: Initializing the first and second deep learning models with the target deep learning model.
- 5. The semi-supervised learning based small sample objective detection method as recited in claim 1, wherein optimizing the weight parameters of the first deep learning model with the consistency loss and the supervised loss includes: calculating total loss through a first formula, and optimizing the weight parameters of the first deep learning model by using the total loss, wherein the first formula is as follows: L total =L sup +λ(t)L cons Where L total is the total loss, L sup is the consistency loss, L cons is the supervision loss, and λ (t) is a weight function that varies with the number of training steps or training rounds.
- 6. The semi-supervised learning based small sample target detection method as set forth in claim 5, wherein λ (t) is positively correlated with the number of training steps or training runs.
- 7. The semi-supervised learning based small sample target detection method as set forth in claim 1, wherein the semi-supervised learning based small sample target detection method further includes, prior to generating the first prediction result of the first image with a first deep learning model and generating the second prediction result of the second image with a second deep learning model: performing strong enhancement processing on the first image; And carrying out weak enhancement processing on the second image.
- 8. The semi-supervised learning based small sample objective detection method as recited in claim 1, wherein the optimizing the weight parameters of the second deep learning model with the weight parameters of the first deep learning model includes: And carrying out exponential moving average on the weight parameters of the first deep learning model to obtain the weight parameters of the second deep learning model.
- 9. The semi-supervised learning based small sample target detection method as recited in any one of claims 1 to 8, wherein the first and second deep learning models are each YOLOv's 11 model.
- 10. A small sample target detection device based on semi-supervised learning, comprising: The sample determining module is used for acquiring a training data set corresponding to a target to be detected, wherein the training data set comprises first image data and second image data, and the first image data comprises a label; The model training module is used for circularly executing the following training steps aiming at the sample image of the training data set until a preset training condition is reached, so as to obtain a second deep learning model with optimized weight parameters: selecting a first image from the first image data, selecting a second image consistent with the first image type from the second image data, generating a first prediction result of the first image by using a first deep learning model, and generating a second prediction result of the second image by using a second deep learning model, wherein the weight parameters and the network structure of the second deep learning model and the first deep learning model are the same before the training step is executed; Calculating a consistency loss between the first deep learning model and the second deep learning model using the first prediction result and the second prediction result; Calculating the supervision loss of the first deep learning model by using the label of the first image and the first prediction result; Optimizing the weight parameters of the first deep learning model by utilizing the consistency loss and the supervision loss, and optimizing the weight parameters of the second deep learning model by utilizing the weight parameters of the first deep learning model; and the target detection module is used for carrying out target detection by using the second deep learning model with the optimized weight parameters.
Description
Small sample target detection method and device based on semi-supervised learning Technical Field The application belongs to the technical field of target detection, and particularly relates to a small sample target detection method and device based on semi-supervised learning. Background In the related art, a deep learning model is mostly adopted for target detection, but the situation that the deep learning model cannot be effectively trained due to fewer labeling sample images of the target often occurs. In order to improve the accuracy of small sample target detection, a more efficient target detection scheme is needed. Disclosure of Invention The application aims to provide a small sample target detection method and device based on semi-supervised learning so as to improve the accuracy of small sample target detection. In a first aspect of the embodiment of the present application, a small sample target detection method based on semi-supervised learning is provided, including: the method comprises the steps of obtaining a training data set corresponding to a target to be detected, wherein the training data set comprises first image data and second image data, and the first image data comprises a label; For sample images of the training data set, the following training steps are circularly executed until a preset training condition is reached, and a second deep learning model with optimized weight parameters is obtained: Selecting a first image from the first image data, selecting a second image consistent with the first image type from the second image data, generating a first prediction result of the first image by using a first deep learning model, and generating a second prediction result of the second image by using a second deep learning model, wherein the weight parameters and the network structure of the second deep learning model and the first deep learning model are the same before the training step is executed; calculating a consistency loss between the first deep learning model and the second deep learning model by using the first prediction result and the second prediction result; calculating supervision loss of the first deep learning model by using the label of the first image and the first prediction result; optimizing the weight parameters of the first deep learning model by using the consistency loss and the supervision loss, and optimizing the weight parameters of the second deep learning model by using the weight parameters of the first deep learning model; and performing target detection by using the second deep learning model with the optimized weight parameters. In a second aspect of the embodiments of the present application, there is provided a small sample target detection device based on semi-supervised learning, including: The system comprises a sample determining module, a sample detecting module and a detecting module, wherein the sample determining module is used for acquiring a training data set corresponding to a target to be detected, the training data set comprises first image data and second image data, and the first image data comprises a label; The model training module is used for circularly executing the following training steps aiming at the sample image of the training data set until a preset training condition is reached, so as to obtain a second deep learning model with optimized weight parameters: Selecting a first image from the first image data, selecting a second image consistent with the first image type from the second image data, generating a first prediction result of the first image by using a first deep learning model, and generating a second prediction result of the second image by using a second deep learning model, wherein the weight parameters and the network structure of the second deep learning model and the first deep learning model are the same before the training step is executed; calculating a consistency loss between the first deep learning model and the second deep learning model by using the first prediction result and the second prediction result; calculating supervision loss of the first deep learning model by using the label of the first image and the first prediction result; optimizing the weight parameters of the first deep learning model by using the consistency loss and the supervision loss, and optimizing the weight parameters of the second deep learning model by using the weight parameters of the first deep learning model; and the target detection module is used for carrying out target detection by using the second deep learning model with the optimized weight parameters. In a third aspect of the embodiments of the present application, there is provided an electronic device including a memory, a processor, and a computer program stored in the memory and running on the processor, the processor implementing the steps of the small sample object detection method based on semi-supervised learning as described above when the computer