Training method and device of convolutional neural network, equipment and storage medium

By generating a target detector model with pseudo-labels through self-training, the problem of insufficient manually labeled data in the training of convolutional neural networks is solved, which improves training efficiency and detection accuracy and reduces costs.

CN115346077BActive Publication Date: 2026-04-10INST OF MICROELECTRONICS CHINESE ACAD OF SCI LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INST OF MICROELECTRONICS CHINESE ACAD OF SCI LTD
Filing Date
2021-05-14
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing convolutional neural networks require a large amount of manually labeled data during training, resulting in low training efficiency and poor detection performance when the amount of labeled data is insufficient or the data domain is mismatched.

Method used

The teaching model is trained using images with manual annotations through a self-training method, generating a target training dataset with pseudo-labels. The initial detector model is then enhanced and iteratively trained until the training constraints are met, thus generating the target detector model.

Benefits of technology

It improves the generalization ability and training efficiency of convolutional neural networks, reduces training costs, and enhances the robustness and prediction accuracy of detector models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115346077B_ABST
    Figure CN115346077B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of artificial intelligence, and particularly relates to a training method of a convolutional neural network, which comprises the following steps: model training is performed through a first training data set to obtain a teaching model, wherein the first training data set is an image carrying artificial annotation; each training data in a second training data set is annotated by using the teaching model to obtain a target training data set, wherein each training data in the second training data set is a to-be-recognized image, and each training data in the target training data set carries a predicted label; the first training data set and the target training data set are subjected to enhancement processing to obtain a third training data set after enhancement; and an initial detector model is iteratively trained according to the third training data set, and when the iterated detector model meets a training constraint condition, the iterated detector model meeting the training constraint condition is determined as a target detector model. The method improves the generalization ability and training efficiency of the convolutional neural network.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and in particular to a convolutional neural network training method and device, equipment and a storage medium. BACKGROUND

[0002] In recent years, deep learning methods have achieved outstanding results in image target recognition. Applying convolutional neural network models to production and life is a major trend today. Currently, applying convolutional neural network models to complete target recognition tasks mainly relies on full supervision learning, that is, a large amount of manually annotated data is needed to train the network during the training process, and the annotated data needs to include target bounding boxes that annotate the positioning target. When there is insufficient annotated data, or the training data and test data belong to different fields, the detection effect of the convolutional neural network model will be poor. Data set annotation is a time-consuming and laborious task. Accurate sample annotation of complex and diverse visual targets requires a large amount of manual labor and low training efficiency. SUMMARY

[0003] The present application provides a convolutional neural network training method, device, equipment and storage medium, which solves the technical problem of low training efficiency caused by the need for a large amount of target annotation in the training of the convolutional neural network in the prior art, and achieves the technical effect of fully utilizing unannotated data for convolutional neural network training, reducing the training cost of the convolutional neural network, and improving the generalization ability and training efficiency of the convolutional neural network.

[0004] In a first aspect, the present application provides a convolutional neural network training method, comprising:

[0005] Model training is performed using the acquired first training data set to obtain a teaching model, wherein the first training data set is an image carrying manual annotation;

[0006] Each training data in a second training data set is annotated using the teaching model to obtain a target training data set, wherein each training data in the second training data set is a to-be-recognized image, and each training data in the target training data set carries a predicted label;

[0007] The first training data set and the target training data set are enhanced to obtain an enhanced third training data set;

[0008] An initial detector model is iteratively trained according to the third training data set, and when the iteratively trained detector model meets a training constraint condition, the iteratively trained detector model that meets the training constraint condition is determined as a target detector model.

[0009] Preferably, the labeling each training data in the second training data set by using the teaching model to obtain a target training data set comprises:

[0010] inputting each training data in the second training data set into the teaching model for prediction to obtain a labeled training data set, wherein each training data in the labeled training data set comprises prediction box information, confidence of the prediction box, and classification information;

[0011] obtaining a target training data set from the labeled training data set, wherein the confidence of the prediction box of each training data in the target training data set is not less than a confidence threshold, and the prediction box information, the confidence of the prediction box, and the classification information of each training data generate a prediction label of each training data.

[0012] Preferably, the enhancing processing the first training data set and the target training data set to obtain an enhanced third training data set comprises:

[0013] selecting N data subsets from the first training data set and the target training data set, wherein each data subset in the N data subsets is a data set comprising at least 4 images, and N≥2;

[0014] for each data subset, combining images in the data subset to generate a combined image; wherein the combination processing is the enhancement processing;

[0015] after the above operation on each data subset, N combined images are obtained, wherein the N combined images are the third training data set.

[0016] Preferably, the iterative training the initial detector model according to the third training data set until the iterative detector model meets a training constraint condition, and determining the iterative detector model meeting the training constraint condition as a target detector model comprises:

[0017] iterative training the initial detector model according to the third training data set until a current loss function value obtained by a loss function corresponding to the iterative detector model is not greater than a loss function threshold, and determining the current detector model as the target detector model.

[0018] Preferably, the step of obtaining the current loss function value of the current detector model comprises:

[0019] obtaining a weight value updated by a loss function value of a previous detector model;

[0020] According to the weight value and the loss function, a current loss function value corresponding to the current detector is obtained.

[0021] Preferably, the initial detector model is iteratively trained according to the third training data set until an iterative detector model meets a training constraint condition, and the iterative detector model meeting the training constraint condition is determined as a target detector model.

[0022] The initial detector model is iteratively trained according to the third training data set until a number of iterations meets an iteration threshold, and a current detector meeting the iteration threshold is determined as the target detector model.

[0023] Preferably, after the iterative detector model is determined as the target detector model, the method further comprises:

[0024] The target detector model is saved in a specified text format.

[0025] Based on the same inventive concept, in a second aspect, the present application also provides a training device of a convolutional neural network, comprising:

[0026] A teaching module is configured to train a model by using a first training data set to obtain a teaching model, wherein the first training data set is an image carrying artificial annotation.

[0027] A generating module is configured to annotate each training data in a second training data set by using the teaching model to obtain a target training data set, wherein each training data in the second training data set is a to-be-recognized image, and each training data in the target training data set carries a predicted label.

[0028] An enhancing module is configured to enhance the first training data set and the target training data set to obtain an enhanced third training data set.

[0029] A processing module is configured to iteratively train an initial detector model according to the third training data set until an iterative detector model meets a training constraint condition, and the iterative detector model meeting the training constraint condition is determined as a target detector model.

[0030] Based on the same inventive concept, in a third aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the training method of the convolutional neural network.

[0031] Based on the same inventive concept, in a fourth aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the training method of the convolutional neural network.

[0032] The one or more technical solutions in the embodiments of the present application have at least the following technical effects or advantages:

[0033] In the embodiments of the present application, the training method of the convolutional neural network first trains a teaching model through a first training data set of images with artificial annotations to obtain a teaching model with reliable and stable performance and to improve the prediction accuracy of the teaching model. Then, the to-be-identified image is trained through the obtained teaching model to obtain a target training data set of images with predicted labels. Since the prediction accuracy of the teaching model is high, the accuracy of the target training data set obtained by training is also increased. Next, the first training data set and the target training data set are enhanced to obtain a third training data set. The data in the third training data set is enhanced, and any one image in the third training data set includes multiple images, which enriches the data of the third training data set. Then, the initial detector model is trained through the third training data set, which makes the obtained detector model more robust and improves the GPU processing efficiency and the training efficiency. Then, the initial detector model is iteratively trained through the third training data set until the iterative detector model meets the training constraint condition, and the iterative detector model that meets the training constraint condition is determined as the target detector model. Since the first training data set, the target training data set, the third training data set, and the teaching model have high accuracy, the accuracy of the target detector model obtained by the iterative training process of the initial detector model is also increased, and the training efficiency is also improved. In summary, the present method can infer pseudo labels for unlabeled images through self-training to fully utilize unlabeled data for network training, improve the generalization ability and training efficiency of the convolutional neural network, and reduce the training cost of the convolutional neural network. BRIEF DESCRIPTION OF DRAWINGS

[0034] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments with reference made to the accompanying drawings. The drawings are for purposes of illustration only and are not intended to be limiting in any respect. Moreover, the use of the same reference numerals in different figures indicates similar or identical components. In the drawings:

[0035] Figure 1 A step flowchart of the training method of the convolutional neural network in the embodiments of the present application is shown;

[0036] Figure 2 A structural diagram of an artificially annotated image in the embodiments of the present application is shown;

[0037] Figure 3 Fig. 1 shows a structural schematic diagram of the image in the data subset in the embodiment of the present application for enhancement processing;

[0038] Figure 4 Fig. 2 shows a module schematic diagram of the training device of the convolutional neural network in the embodiment of the present application;

[0039] Figure 5 Fig. 3 shows a structural schematic diagram of a computer device in the embodiment of the present application. DETAILED DESCRIPTION

[0040] Exemplary embodiments of the present disclosure will be described in greater detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be accurately conveyed to those skilled in the art.

[0041] Embodiment One

[0042] The first embodiment of the present application provides a training method of a convolutional neural network, as shown in Figure 1 The training method of the convolutional neural network provided in the embodiment can learn unannotated image samples through a self-training learning method to obtain a target detector model, also known as a target detection neural network model. The input of the target detector model is a picture to be recognized, and the output is a recognized picture. The detection result marks the target to be detected in the form of a prediction box and gives the classification and confidence information of each prediction box. The image to be recognized is an unannotated image, and the image to be recognized includes a single-channel grayscale picture and an RGB three-channel picture.

[0043] Next, the specific implementation steps of the training method of the convolutional neural network provided in the embodiment will be described in detail in combination with Figure 1

[0044] First, step S101 is performed to train a model through the acquired first training data set to obtain a teaching model, wherein the first training data set is an image carrying artificial annotation.

[0045] Specifically, the teaching model is trained through the image carrying artificial annotation, i.e., the first training data set. As shown in Figure 2 As shown in Figure 2 is a picture of a logistics sorting line annotated by a human being; and Figure 2 ​The black line frame represents the manually labeled frame, which represents the upper organ plate, the lower organ plate and the package. The teaching model is an existing neural network model, such as YOLO V3 network, SSD network and Faster-RCNN network, etc. In addition, the deep learning framework for training the teaching model, the training technique and the hyperparameters involved in the training can be set according to actual needs. For example, the deep learning framework for training the teaching model selects TensorFlow, Caffe, PyTorch, PaddlePaddle, etc., the training technique of the deep learning model is pre-training, warm-up training or dynamic learning rate, and the hyperparameters involved in the training are training learning rate, batch size or convolution kernel size.

[0046] Feature extraction is performed on the first training data set to obtain a first feature vector, and the first feature vector is used for model training to obtain a training model. Since the training data in the first training data set are all images with manual annotation, a set of trained images or second feature vectors are obtained after training the teaching model. Among them, a set of trained images not only carries manual annotation, but also carries annotation after the teaching model. When the annotation after the teaching model on a set of trained images is consistent with the manual annotation, or the second feature vector and the first feature vector are consistent, it means that the teaching model is well trained.

[0047] For example, the teaching model is YOLO V3 network trained by the first training data set. YOLO V3 is a One-Stage target detection network, and when training YOLO V3 network, the loss function of YOLO V3 is obtained according to the classification loss, confidence loss and bounding box loss of YOLO V3, and the specific process is as follows:

[0048] (1)

[0049] Among them, is the classification loss; represents: whether the jth anchor box of the ith grid in YOLO V3 is responsible for a certain class object, if responsible, then , otherwise, ; is the class loss coefficient;

[0050] (2)

[0051] is the confidence loss; is the confidence loss coefficient;

[0052] (3)

[0053] is a bounding box loss; is a bounding box loss coefficient;

[0054] (4)

[0055] represents a supervised loss, i.e., a loss function of YOLO V3

[0056] The purpose of this step is to train the teaching model by using the image with artificial annotation, so as to obtain the trained teaching model, ensure the accuracy of the target training data set, and improve the reliability of the target training data set.

[0057] Then, step S102 is performed, and each training data in the second training data set is labeled by using the teaching model to obtain a target training data set, wherein each training data in the second training data set is a to-be-recognized image, and each training data in the target training data set carries a predicted label.

[0058] Specifically, each training data in the second training data set is input into the teaching model for prediction to obtain a labeled training data set, wherein each training data in the labeled training data set includes predicted box information, a confidence of the predicted box, and classification information; the target training data set is obtained from the labeled training data set, wherein the confidence of the predicted box of each training data in the target training data set is not less than a confidence threshold, and the predicted box information, the confidence of the predicted box, and the classification information of each training data are generated as a predicted label of each training data.

[0059] Specifically, each training data in the second training data set is a to-be-recognized image, i.e., an image without artificial annotation, which is usually an image captured by a camera, a camera, or a drone. Each training data (each to-be-recognized image) in the second training data set is input into the teaching model, and the teaching model labels each to-be-recognized image to output a labeled training data set, i.e., to obtain a feature vector of each training data in the labeled training data set. The feature vector of each training data in the labeled training data set includes predicted box information of the image, a confidence of the predicted box, and classification information of the image, etc. The predicted box information is center point coordinate information of the predicted box and length-width information of the predicted box. The confidence of the predicted box ranges from 0 to 1. If the teaching model is a YOLO V3 network, the classification information is represented in the form of an one-hot vector.

[0060] The target training data set is obtained from the labeled training data set, and the specific obtaining process is as follows:

[0061] When the confidence of the prediction box of each training data in the labeled training data set is not less than the confidence threshold, the training data in the labeled training data set that meets the condition is taken as the training data in the target training data set, and the prediction box information, the confidence of the prediction box, and the classification information of the image of the training data in the labeled training data set that meets the condition are taken as the prediction label of the training data, that is, the feature vector of the training data in the labeled training data set that meets the condition is taken as the prediction label of the training data. The confidence threshold is usually 0.9, and its value range is 0 to 1, and it can also be set according to actual needs.

[0062] For example, after the image A is trained by the teaching model, the image B with the prediction box and the feature vector of the image B are obtained, and the feature vector includes the prediction box information of B, the confidence of the prediction box of B, and the classification information of B, etc. When the confidence of the prediction box of B is not less than the confidence threshold 0.9, B is taken as the image in the target training data set, and the feature vector of B is taken as the prediction label of B.

[0063] In this embodiment, the teaching model after training performs prediction box labeling on the image to be recognized to obtain a target training data set of images carrying pseudo labels, reliable pseudo label data is obtained, the accuracy of the data in the target training data set is guaranteed, a data basis is provided for subsequent target detector model, the labeling cost is reduced, and the labeling efficiency is improved.

[0064] Then, step S103 is performed to perform enhancement processing on the first training data set and the target training data set to obtain an enhanced third training data set.

[0065] The enhancement processing can include at least one of scaling processing, color processing, clipping processing, and arrangement processing, for example, each training data in the first training data set can be subjected to scaling processing, and each training data after scaling processing is added to the third training data set; or each training data in the second training data set can be subjected to color processing, and each training data after color processing is added to the third training data set, etc.

[0066] Specifically, N data subsets can also be selected from the first training data set and the target training data set, wherein each data subset in the N data subsets is a data set including at least 4 images, and N≥2. For each data subset, the images in the data subset are combined to generate a combined image; wherein the combination processing is the enhancement processing. After the above operation is performed on each data subset, N combined images are obtained, wherein the N combined images are taken as the third training data set.

[0067] Specifically, images are read sequentially from the first training dataset and the target training dataset to generate N data subsets, or N data subsets can be generated by randomly reading images. Each of the N data subsets includes at least 4 images. For each data subset, the images in that subset are randomly scaled, randomly cropped, randomly color-adjusted, and randomly arranged. Then, the images in that subset are stitched together to obtain a new image or an enhanced image, which is a composite image. The enhancement processing includes random scaling, random cropping, random color adjustment, and random arrangement. The order of these operations is not restricted, and some operations may be omitted, such as only random scaling, or only random scaling and random color adjustment. During the image stitching process, when the predicted bounding box or the image itself exceeds the dividing line between two images, the portion of the predicted bounding box or the image exceeding the dividing line is cropped. After performing the aforementioned operations on each data subset, a combined image is generated based on each data subset, resulting in N combined images, which constitute the third training dataset.

[0068] For example, such as Figure 3 As shown, four images are randomly selected from the first training dataset and the target training dataset, namely images a, b, c, and d, to generate a data subset, i.e., four images form a data subset. Each of the four images in the subset is rotated 180° around its center. Image a is rotated 180° around its center, and images b, c, and d are rotated in the same way. Then, the dimensions of a, b, c, and d are scaled by 0.8. Next, the brightness and contrast of a, b, c, and d are adjusted. Finally, the adjusted a, b, c, and d are stitched together in four directions: top left, bottom left, bottom right, and top right, to generate a combined image of the adjusted a, b, c, and d. During the stitching process, if part of the predicted bounding box of the adjusted c and part of the image itself exceed the dividing line, the portion of the adjusted c that exceeds the dividing line is directly truncated. The same process is applied to the other adjusted a, b, and c. It should be noted that... Figure 3 In the image, the white dashed box represents the prediction box.

[0069] In the embodiment, the first training data set and the target training data set are subjected to enhancement processing, and the enhancement processing process specifically includes the following steps: using random scaling, random cropping, random color adjustment, and random arrangement to splice the images in the data subset, thereby obtaining a new and enhanced image, and a plurality of enhanced images are obtained. Moreover, an enhanced image contains a plurality of images, which greatly enriches the data of the third training data set, and the training of the initial detector model through the third training data set can make the robustness of the obtained detector model better. At the same time, when batch normalization calculation is performed during the training using the enhancement processing, an enhanced image is calculated, which is equivalent to directly calculating the data of a plurality of images, so that the batch hyperparameter (Batch) in the training setting does not need to be very large, thereby reducing the GPU memory requirement during training, and a GPU can achieve a relatively good training effect, thereby improving the training processing efficiency and saving costs.

[0070] Finally, step S104 is performed to iteratively train the initial detector model according to the third training data set, and when the iterative detector model meets the training constraint condition, the iterative detector model that meets the training constraint condition is determined as the target detector model.

[0071] Specifically, the iterative training process of the initial detector model according to the third training data set is as follows: the initial detector model model1 is trained for the first time according to the third training data set data1, thereby obtaining an iterative detector model model2. The model2 is taken as the current detector model, and steps S102-S103 are re-executed. The third training data set data2 obtained by re-executing steps S102-S103 is used to train the model2 for the second time, thereby obtaining an iterative detector model model3. The remaining iterative process is similar. The initial detector model is an existing neural network model or a new neural network model set according to actual requirements, but the initial detector model is different from the teaching model.

[0072] During the iteration of the initial detector model, when the iterative detector model meets the training constraint condition, the iterative detector model that meets the training constraint condition is determined as the target detector model. There are two training constraint conditions, and one of the training constraint conditions is met. The specific training constraint conditions are as follows:

[0073] The first training constraint condition is that the current loss function value of the iterative detector model is not greater than the loss function threshold value. When the training constraint condition is met, the current detector model is taken as the target detector model, wherein the current loss function value of the current detector model is determined according to the supervised loss function. The loss function threshold value is usually 2, and can also be set according to actual requirements.

[0074] The specific steps of obtaining the current loss function value of the current detector model include:

[0075] obtaining the weight value of the loss function value update of the previous detector model; when the current detector model is trained, the current loss function value of the current detector is obtained according to the weight value of the loss function value update of the previous detector model and the loss function. Wherein, the loss function is obtained according to the unsupervised loss function and the supervised loss function of the teaching model.

[0076] The third training data set needs to calculate the loss function value in the iterative training process of the initial detector model. The specific process is as follows: when the initial detector model model1 is trained for the first time, the weight Q1 in the loss function is initialized. According to the third training data set data1, model1 is trained to obtain the result F1 and an iterative detector model model2. According to the result F1 and Q1, the loss function value S1 of model1 is calculated, and the weight Q2 in the loss function is updated according to the loss function value S1.

[0077] Then, according to the third training data set data2, model2 is trained to obtain the result F2 and an iterative detector model model3. According to F2 and Q2, the loss function value S2 of model2 is calculated, and the weight Q3 in the loss function is updated according to the loss function value S2. In this way.

[0078] Regarding the process of obtaining the loss function, by way of example, the classroom model selects YOLO V3 neural network, and the loss function of YOLOV3 is a supervised loss function, as shown in formula (4). The unsupervised loss function is set according to actual needs, and in this embodiment, it is defined as formula (5).

[0079] (5)

[0080] Wherein, represents unsupervised loss; A represents data enhancement processing; represents the enhanced image, that is, the third training data set; let be the frame coordinates of the prediction box in the data of the third training data set, that is, the frame coordinates of the prediction box of the combined image; is the loss function of the target detector model.

[0081] The supervised loss function is shown in formula (6).

[0082] (6)

[0083] Wherein, represent a supervised loss function, i.e., a joint loss function, a weight value of the introduced unsupervised loss function.

[0084] For example, during the initial detector model iteration process, if the current loss function value of the current detector model is less than or equal to the loss function threshold value, the current detector model is taken as the target detector model.

[0085] When the loss function threshold value is used as a training constraint condition, it can be ensured that the detector model has a lower loss function value meeting the requirements at the training cutoff, and the lower the loss function value, the better the model effect, so using this training constraint condition can ensure that the detector model has better detection capability.

[0086] The second training constraint condition is to determine the current detector when the number of iterations meets the iteration number threshold value as the target detector model. The iteration number threshold value is set according to actual requirements.

[0087] For example, the iteration number threshold value is 5 times, and according to the third training data set data1, the initial detector model model1 is trained for the first time to obtain an iterative detector model model2, and this process is recorded as the first iteration. The model2 is taken as the current detector model, and the steps S102-S103 are re-executed. The third training data set data2 obtained by re-executing the steps S102-S103 is used to train the model2 for the second time to obtain an iterative detector model model3, and this process is recorded as the second iteration. In this way, after the 5th time, the model6 is obtained, and the model6 is taken as the target detector model.

[0088] When the number of iterations is used as a training constraint condition, the training cutoff can be realized in the case where the model cannot converge, and the training time and the waste of computing resources are reduced.

[0089] After the iterative detector model is determined as the target detector model, the target detector model is saved in a specified text format, wherein the text format includes.pth or.weights.

[0090] The one or more technical solutions in the embodiments of the present application have at least the following technical effects or advantages:

[0091] In the embodiment, the training method of the convolutional neural network first trains a teaching model through a first training data set with artificially labeled images, obtains a teaching model with reliable and stable performance, and improves the prediction accuracy of the teaching model. Then, the to-be-identified image is trained through the obtained teaching model to obtain a target training data set with images with predicted labels. Since the prediction accuracy of the teaching model is high, the accuracy of the target training data set obtained by training is also increased. Then, the first training data set and the target training data set are enhanced to obtain a third training data set. The data in the third training data set is enhanced, and any one image in the third training data set includes multiple images, which enriches the data of the third training data set. Then, the initial detector model is trained through the third training data set, which makes the obtained detector model more robust, improves the GPU processing efficiency and the training efficiency. Then, the initial detector model is iteratively trained through the third training data set, and when the iterative detector model meets the training constraint condition, the iterative detector model that meets the training constraint condition is determined as the target detector model. Since the first training data set, the target training data set, the third training data set and the teaching model have high accuracy, the accuracy of the target detector model obtained by the iterative training process of the initial detector model is also increased, and the training efficiency is also improved. In summary, the method can infer pseudo labels for unlabeled images through self-training, fully utilize unlabeled data for network training, improve the generalization ability and training efficiency of the convolutional neural network, and reduce the training cost of the convolutional neural network.

[0092] Embodiment two

[0093] Based on the same inventive concept, the second embodiment of the present application also provides a training device of a convolutional neural network, as shown in the following table: Figure 4 The training device comprises:

[0094] A teaching module 201 is configured to train a model through the obtained first training data set to obtain a teaching model, wherein the first training data set is an image carrying artificial labels.

[0095] A generating module 202 is configured to label each training data in a second training data set using the teaching model to obtain a target training data set, wherein each training data in the second training data set is a to-be-identified image, and each training data in the target training data set carries a predicted label.

[0096] An enhancing module 203 is configured to enhance the first training data set and the target training data set to obtain an enhanced third training data set.

[0097] The processing module 204 is configured to iteratively train the initial detector model according to the third training data set, and determine the iterative detector model satisfying the training constraint condition as the target detector model when the iterative detector model satisfies the training constraint condition.

[0098] As an optional embodiment, the generating module 202 is further configured to:

[0099] input each training data in the second training data set into the teaching model for prediction to obtain a labeled training data set, wherein each training data in the labeled training data set comprises prediction box information, confidence of the prediction box, and classification information;

[0100] obtain a target training data set from the labeled training data set, wherein the confidence of the prediction box of each training data in the target training data set is not less than a confidence threshold, and the prediction box information, the confidence of the prediction box, and the classification information of each training data generate a prediction label of each training data.

[0101] As an optional embodiment, the enhancing module 203 is further configured to:

[0102] select N data subsets from the first training data set and the target training data set, wherein each data subset in the N data subsets is a data set comprising at least 4 images, and N≥2;

[0103] for each data subset, perform combination processing on images in the data subset to generate a combined image, wherein the combination processing is the enhancement processing;

[0104] After the above operations are performed on each data subset, N combined images are obtained, wherein the N combined images are the third training data set.

[0105] As an optional embodiment, the processing module 204 is further configured to:

[0106] iteratively train the initial detector model according to the third training data set, and determine the current detector model as the target detector model when a current loss function value obtained by a loss function corresponding to the current detector model is not greater than a loss function threshold.

[0107] As an optional embodiment, the step of obtaining the current loss function value of the current detector model comprises:

[0108] obtaining a weight value of loss function value update of a previous detector model;

[0109] Based on the weight values ​​and the loss function, the current loss function value corresponding to the current detector is obtained.

[0110] As an optional embodiment, the processing module 204 is further configured to:

[0111] The initial detector model is iteratively trained based on the third training dataset until the number of iterations meets the iteration threshold. The current detector that meets the iteration threshold is then determined as the target detector model.

[0112] As an optional embodiment, after determining the iterated detector model as the target detector model, the method further includes:

[0113] The target detector model is saved in the specified text format.

[0114] Since the convolutional neural network training device described in this embodiment is the same device used to implement the convolutional neural network training method in Embodiment 1 of this application, those skilled in the art can understand the specific implementation and various variations of the convolutional neural network training device in this embodiment based on the convolutional neural network training method described in Embodiment 1 of this application. Therefore, how this convolutional neural network training device implements the method in Embodiment 1 of this application will not be described in detail here. Any device used by those skilled in the art to implement the convolutional neural network training method in Embodiment 1 of this application falls within the scope of protection of this application.

[0115] Example 3

[0116] Based on the same inventive concept, the third embodiment of the present invention also provides a computer device, such as... Figure 5 As shown, it includes a memory 304, a processor 302, and a computer program stored in the memory 304 and executable on the processor 302. When the processor 302 executes the program, it implements the steps of any of the above-described methods for training convolutional neural networks.

[0117] Among them, Figure 5In particular embodiments, a bus architecture, represented by the bus 300, the bus 300 can include any number of interconnecting buses and bridges, the bus 300 links together various circuits such as the one or more processors represented by the processor 302 and the memory represented by the memory 304. The bus 300 can also link together various other circuits which are well described in the art, thus, no further description will be provided herein. The bus interface 306 provides an interface between the bus 300 and the receiver 301 and the transmitter 303. The receiver 301 and the transmitter 303 can be the same element, i.e., a transceiver, providing a means for communicating with various other apparatus over the transmission medium. The processor 302 is responsible for managing the bus 300 and general processing, while the memory 304 can be used for storing data used by the processor 302 in executing operational processes.

[0118] Embodiment Four

[0119] Based on the same inventive concept, the fourth embodiment of the present application also provides a computer readable storage medium, having stored thereon a computer program, which, when executed by a processor, implements the steps of any method of the training method of the convolutional neural network according to the first embodiment.

[0120] Those skilled in the art will appreciate that embodiments of the present application can be supplied as a method, a system, or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage media, etc.) embodying computer readable program code thereon.

[0121] The present application is described in reference to the flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 means for carrying out each of the one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks.

[0122] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the Figure 1 function specified in the flow or flows and / or blocks Figure 1 of the block or blocks.

[0123] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that are executed on the computer or other programmable apparatus provide steps for implementing the Figure 1 function specified in the flow or flows and / or blocks Figure 1 of the block or blocks.

[0124] While the preferred embodiments of the application have been described, additional variations and modifications can be made to the embodiments by those of skill in the art once they have the benefit of the present disclosure. Therefore, the appended claims are intended to encompass within their scope all possible variations and modifications of the preferred embodiments. 1

[0125] It is apparent that a person skilled in the art can make a variety of changes and modifications to the application without departing from the spirit and scope of the application. Thus, if these modifications and variations of the application fall within the scope of the claims and their equivalents, it is intended to include them in the application.

Claims

1. A method for training a convolutional neural network, characterized in that, The method comprises the following steps: training a model by using the obtained first training data set to obtain a teaching model, wherein the first training data set is an image carrying artificial annotation; annotating each training data in a second training data set by using the teaching model to obtain a target training data set, comprising: inputting each training data in the second training data set into the teaching model for prediction to obtain an annotated training data set, wherein each training data in the annotated training data set comprises prediction box information, prediction box confidence and classification information; obtaining a target training data set from the annotated training data set, wherein the prediction box confidence of each training data in the target training data set is not less than a confidence threshold, and the prediction box information, the prediction box confidence and the classification information of each training data are used to generate a prediction label of each training data, wherein each training data in the second training data set is a to-be-recognized image, and each training data in the target training data set carries a prediction label; performing enhancement processing on the first training data set and the target training data set to obtain a third training data set after enhancement, comprising: selecting N data subsets from the first training data set and the target training data set, wherein each data subset in the N data subsets is a data set comprising at least 4 images, and N≥2; for each data subset, combining the images in the data subset to generate a combined image; wherein the combination processing is the enhancement processing; after the above operation is performed on each data subset, N combined images are obtained, wherein the N combined images are used as the third training data set; iteratively training an initial detector model according to the third training data set until the iteratively trained detector model meets a training constraint condition, and determining the iteratively trained detector model meeting the training constraint condition as a target detector model.

2. The method of claim 1, wherein, The iteratively training an initial detector model according to the third training data set until the iteratively trained detector model meets a training constraint condition, and determining the iteratively trained detector model meeting the training constraint condition as a target detector model, comprises: iteratively training the initial detector model according to the third training data set until a current loss function value of a loss function corresponding to a current detector model is not greater than a loss function threshold, and determining the current detector model as a target detector model.

3. The method of claim 2, wherein, The step of obtaining the current loss function value of the current detector model comprises: obtaining a weight value of loss function value update of a previous detector model; obtaining the current loss function value corresponding to the current detector model according to the weight value and the loss function.

4. The method of claim 1, wherein, The iteratively training an initial detector model according to the third training data set until the iteratively trained detector model meets a training constraint condition, and determining the iteratively trained detector model meeting the training constraint condition as a target detector model, comprises: The initial detector model is iteratively trained according to the third training data set until a current detector that meets an iteration threshold when the iteration threshold is met is determined as the target detector model.

5. The method of claim 1, wherein, After the iteration detector model that meets the training constraint condition is determined as the target detector model, the method further includes: The target detector model is saved in a specified text format. 6.A device for training a convolutional neural network, characterized in that, The method includes: A teaching module is configured to train a model by using a first training data set to obtain a teaching model, wherein the first training data set is an image carrying artificial annotation; A generation module is configured to annotate each training data in a second training data set by using the teaching model to obtain a target training data set, including: inputting each training data in the second training data set into the teaching model for prediction to obtain an annotated training data set, wherein each training data in the annotated training data set includes prediction box information, confidence of the prediction box, and classification information; obtaining a target training data set from the annotated training data set, wherein the confidence of the prediction box of each training data in the target training data set is not less than a confidence threshold, and the prediction box information, the confidence of the prediction box, and the classification information of each training data are used to generate a prediction label of each training data, wherein each training data in the second training data set is an image to be recognized, and each training data in the target training data set carries a prediction label; An enhancement module is configured to perform enhancement processing on the first training data set and the target training data set to obtain a third training data set after enhancement, including: selecting N data subsets from the first training data set and the target training data set, wherein each data subset in the N data subsets is a data set including at least 4 images, and N≥2; for each data subset, combining images in the data subset to generate a combined image; wherein the combination processing is the enhancement processing; after the operation on each data subset, N combined images are obtained, wherein the N combined images are the third training data set after enhancement; A processing module is configured to iteratively train an initial detector model according to the third training data set until an iteration detector model that meets a training constraint condition is determined as a target detector model.

7. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the method steps of any one of claims 1-5.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that The program is executed by the processor to implement the method steps of any one of claims 1-5.

Citation Information

Patent Citations

  • Convolutional neural network-based target detection method and system

    CN110188720A

  • Indoor object target detection method based on improved end-to-end neural network

    CN111275082A