An image automatic labeling method, system and electronic device
By improving the Faster RCNN model and combining feature extraction, region proposal, data augmentation network and detector, efficient automatic image annotation is achieved, which solves the problems of insufficient generalization ability of deep learning models and low efficiency of manual annotation, and improves the ability to detect occluded objects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2026-03-17
AI Technical Summary
In existing technologies, deep learning models have poor generalization ability, requiring retraining based on actual application scenarios. Furthermore, manual image annotation is inefficient and presents numerous challenges when dealing with a large number of images.
An automatic image annotation method based on Faster RCNN is adopted. By combining feature extraction network, region proposal network, interest region pooling layer, data augmentation network and detector, a data-driven strategy is used to improve annotation efficiency and the detection capability of occluded objects.
It improves the efficiency and accuracy of image annotation, especially in the performance of occluded object detection, and reduces the reliance on manual annotation.
Smart Images

Figure CN116580232B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image annotation, and in particular to an automatic image annotation method, system, and electronic device based on Adversarial Faster RCNN. Background Technology
[0002] With the development of deep learning, the detection performance of object detection algorithms is getting higher and higher, and the application scenarios of object detection algorithms are becoming more and more extensive. From simple recognition tasks such as handwritten font recognition and object category detection at the beginning, they have developed into many fields such as robot navigation, intelligent video surveillance, industrial inspection, and aerospace.
[0003] However, deep learning models have poor generalization ability and are usually only applicable to a certain specific detection task. Therefore, in order to use object detection algorithms to solve practical problems, in many cases it is necessary to collect data and retrain the algorithm model according to the actual application scenario in order to improve the detection effect of the model in the actual scenario.
[0004] Traditional image annotation methods involve manual annotation. When the number of images is small, manual annotation can be used to process the data, ensuring accuracy without taking too much time. However, when the number of images reaches tens of thousands or even hundreds of thousands, manually annotating each image is extremely difficult and not conducive to personalized training of the model.
[0005] Therefore, a new image annotation method is urgently needed to improve annotation efficiency and enhance the detection capabilities of the model. Summary of the Invention
[0006] The purpose of this invention is to provide an automatic image annotation method, system, and electronic device that can improve the efficiency of image annotation and the ability to detect occluded objects.
[0007] To achieve the above objectives, the present invention provides the following solution:
[0008] An automatic image annotation method, comprising:
[0009] Obtain the image to be labeled;
[0010] The image to be labeled is labeled based on a pre-trained labeling model to determine the target location and target category in the image. The labeling model includes a feature extraction network, a region proposal network, a region of interest pooling layer, a data augmentation network, and a detector connected in sequence. The feature extraction network is used to extract features from the image to be labeled to obtain a feature map. The region proposal network is used to determine preliminary candidate regions in the feature map. The region of interest pooling layer is used to filter the preliminary candidate regions in the feature map to obtain final candidate regions. The data augmentation network is used to generate mask regions based on the final candidate regions. The detector is used to perform classification regression on the mask regions to obtain the target location and target category in the image to be labeled.
[0011] Optionally, the training method for the labeled model includes:
[0012] Obtain a training sample set; the training sample set includes multiple sample images, target location labels and target category labels for each sample image;
[0013] The parameters of Faster RCNN are initialized based on the ImageNet classification model to obtain the initial Faster RCNN network;
[0014] The initial Faster R-CNN network is trained using the training sample set to obtain a trained Faster R-CNN network. The trained Faster R-CNN network includes a feature extraction network, a region proposal network, an interest region pooling layer, and a detector connected in sequence.
[0015] The parameters of the data augmentation network are initialized based on the trained Faster RCNN network to obtain the initial data augmentation network;
[0016] The feature extraction network, region proposal network, and interest region pooling layer of the trained Faster RCNN network are used to sequentially extract features, extract candidate regions, and filter candidate regions for each sample image to obtain the final candidate regions for each sample image.
[0017] For any final candidate region of any sample image, a mask is superimposed on the final candidate region to obtain the mask region corresponding to the final candidate region;
[0018] The initial data augmentation network is trained based on the final candidate regions of each sample image and the corresponding mask regions of each final candidate region to obtain a trained data augmentation network.
[0019] An initial labeled model is constructed based on the trained data augmentation network and the trained Faster RCNN network;
[0020] The initial annotation model is trained using the training sample set to obtain a trained annotation model.
[0021] Optionally, the parameters of Faster R-CNN are initialized based on the ImageNet classification model to obtain the initial Faster R-CNN network, specifically including:
[0022] The parameters of the region proposal network are initialized based on the ImageNet classification model to obtain the initial region proposal network;
[0023] The initial region proposal network is trained using the training sample set to obtain a trained region proposal network;
[0024] The parameters of the Fast R-CNN network are initialized based on the ImageNet classification model to obtain the initial Fast R-CNN network;
[0025] The selective search algorithm in the initial Fast R-CNN network is replaced with a trained region proposal network to obtain the initial Faster R-CNN network.
[0026] Optionally, the parameters of the region proposal network are initialized based on the ImageNet classification model, specifically including:
[0027] Set the parameters of the region proposal network to the network parameters of the ImageNet classification model.
[0028] Optionally, the parameters of the data augmentation network are initialized based on the trained Faster RCNN network to obtain the initial data augmentation network, specifically including:
[0029] The convolutional and pooling layer parameters of the trained Faster RCNN network are shared with the data augmentation network.
[0030] Optionally, a mask is superimposed on the final candidate region to obtain a mask region corresponding to the final candidate region, specifically including:
[0031] The final candidate region is divided into a 3×3 grid to generate 9 different masks;
[0032] Nine different masks are superimposed on the final candidate region to obtain the mask region corresponding to the final candidate region.
[0033] Optionally, the image to be labeled is a face image collected during face detection; the target in the image to be labeled is a face; the target location is the position of the face in the image to be labeled; and the target category is 0 or 1, where 0 indicates that it is not a face and 1 indicates that it is a face.
[0034] To achieve the above objectives, the present invention also provides the following solution:
[0035] An automatic image annotation system, comprising:
[0036] The image acquisition module is used to acquire images to be labeled.
[0037] The annotation module, connected to the image acquisition module, is used to annotate the image to be annotated based on a pre-trained annotation model to determine the target location and target category in the image to be annotated. The annotation model includes a feature extraction network, a region proposal network, an interest region pooling layer, a data augmentation network, and a detector connected in sequence. The feature extraction network is used to extract features from the image to be annotated to obtain a feature map. The region proposal network is used to determine preliminary candidate regions in the feature map. The interest region pooling layer is used to filter the preliminary candidate regions in the feature map to obtain final candidate regions. The data augmentation network is used to generate mask regions based on the final candidate regions. The detector is used to perform classification regression on the mask regions to obtain the target location and target category in the image to be annotated.
[0038] To achieve the above objectives, the present invention also provides the following solution:
[0039] An electronic device includes a memory and a processor, the memory storing a computer program and the processor running the computer program to enable the electronic device to perform the above-described automatic image annotation method.
[0040] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0041] This invention utilizes object detection algorithms to replace manual image annotation, improving annotation efficiency. It also improves upon Faster R-CNN to obtain an annotation model comprising a feature extraction network, a region proposal network, an interest region pooling layer, a data augmentation network, and a detector, connected sequentially. The feature extraction network extracts features from the image to be annotated, obtaining a feature map. The region proposal network determines preliminary candidate regions within the feature map. The interest region pooling layer filters these preliminary candidate regions, obtaining final candidate regions. The data augmentation network generates mask regions based on the final candidate regions. The detector performs classification and regression on the mask regions to determine the target location and category in the image to be annotated. Employing a data-driven strategy, the data augmentation network is integrated into Faster R-CNN, enhancing the model's ability to detect occluded objects. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is a flowchart of the automatic image annotation method of the present invention;
[0044] Figure 2 This is a schematic diagram of the labeled model;
[0045] Figure 3 A flowchart of the training process for the labeled model;
[0046] Figure 4 This is a schematic diagram of the modules of the automatic image annotation system of the present invention.
[0047] Symbol explanation:
[0048] Image acquisition module-1, annotation module-2, sample acquisition module-3, first initialization module-4, first training module-5, second initialization module-6, candidate extraction module-7, mask overlay module-8, second training module-9, model construction module-10, third training module-11. Detailed Implementation
[0049] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0050] The purpose of this invention is to provide an automatic image annotation method, system, and electronic device, which improves the detection performance of the Faster R-CNN algorithm in occluded scenes and applies it to the automatic image annotation process suitable for target detection, resulting in high annotation speed, accuracy, and feasibility.
[0051] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0052] Example 1
[0053] like Figure 1 As shown, this embodiment provides an automatic image annotation method, including:
[0054] Step 100: Obtain the image to be labeled.
[0055] In one specific implementation, the image to be labeled is a face image acquired during face detection. The target in the image to be labeled is a face. The target location is the position of the face in the image to be labeled, and the target category is 0 or 1, where 0 indicates it is not a face and 1 indicates it is a face. This can assist in personnel detection from surveillance video.
[0056] In addition, the images to be labeled can also be acquired vehicle images, in which case the target is the vehicle or license plate number, to assist in vehicle type identification or traffic violation inquiries. Furthermore, the images to be labeled can also be images acquired during robot navigation, where the location and type of obstacles in the image are labeled. The images to be labeled can also be images of industrial products acquired during industrial inspection, where the location and type of the products in the image are labeled, and so on.
[0057] This invention can be applied to any target detection scenario; the image to be labeled and the target type can be appropriately changed for different application scenarios.
[0058] Step 200: Label the image to be labeled based on the pre-trained labeling model to determine the target location and target category in the image to be labeled.
[0059] The annotation model comprises a feature extraction network, a region proposal network, an interest region pooling layer, a data augmentation network, and a detector, connected in sequence. The feature extraction network extracts features from the image to be annotated to obtain a feature map. The region proposal network determines preliminary candidate regions within the feature map. The interest region pooling layer filters the preliminary candidate regions in the feature map to obtain final candidate regions. The data augmentation network generates mask regions based on the final candidate regions. The detector performs classification regression on the mask regions to obtain the target location and target category in the image to be annotated. Figure 2 The diagram shown is a structural schematic of the annotation model.
[0060] In this embodiment, the annotation model is an improvement on Faster R-CNN, that is, a data augmentation network is added between the interest region pooling layer and the detector of Faster R-CNN, the feature extraction network uses the feature extraction part of the VGG16 network, and the detector is the detector in Faster R-CNN.
[0061] This method generates occlusion regions on the image output by the pooling layer in the region of interest, thereby improving the ability of the labeled model to detect occluded objects.
[0062] Furthermore, the training method for the labeled model in step 200 includes:
[0063] Step 201: Obtain the training sample set. The training sample set includes multiple sample images, target location labels and target category labels for each sample image.
[0064] Step 202: Initialize the parameters of Faster RCNN based on the ImageNet classification model to obtain the initial Faster RCNN network.
[0065] Specifically, (1) the parameters of the region proposal network are initialized based on the ImageNet classification model to obtain the initial region proposal network. Specifically, the parameters of the region proposal network are set to the network parameters of the ImageNet classification model. Wherein, the ImageNet classification model is a pre-trained ImageNet classification model that has been publicly disclosed in the prior art.
[0066] (2) The initial region proposal network is trained using the training sample set to obtain a trained region proposal network.
[0067] (3) Initialize the parameters of the Fast RCNN network based on the ImageNet classification model to obtain the initial Fast RCNN network.
[0068] (4) The selective search algorithm in the initial Fast R-CNN network is replaced with a trained Region Proposal Network (RPN) to obtain the initial Faster R-CNN network. Specifically, after replacing the selective search algorithm in the initial Fast R-CNN network with a trained RPN, the replaced Fast R-CNN is trained. The RPN is re-initialized using the pre-trained Fast R-CNN model, and then the RPN is retrained. The convolutional layer parameters are fixed, and only the network layers specific to the RPN are fine-tuned. The retrained RPN and Fast R-CNN are jointly trained to obtain the Faster R-CNN pre-trained model. The Faster R-CNN network is initialized using the Faster R-CNN pre-trained model to obtain the initial Faster R-CNN network.
[0069] Step 203: Train the initial Faster R-CNN network using the training sample set to obtain a trained Faster R-CNN network. The trained Faster R-CNN network includes a feature extraction network, a region proposal network, an interest region pooling layer, and a detector connected in sequence. Steps 202 and 203 are the existing Faster R-CNN training process.
[0070] Step 204: Initialize the parameters of the data augmentation network based on the trained Faster R-CNN network to obtain the initial data augmentation network. Specifically, the convolutional layer parameters and pooling layer parameters of the trained Faster R-CNN network are shared with the data augmentation network.
[0071] Step 205: The feature extraction network, region proposal network and interest region pooling layer of the trained Faster RCNN network are used to sequentially extract features, extract candidate regions and filter candidate regions for each sample image to obtain the final candidate regions for each sample image.
[0072] Step 206: For any final candidate region of any sample image, overlay a mask on the final candidate region to obtain the mask region corresponding to the final candidate region.
[0073] Specifically, the final candidate region is divided into a 3×3 grid to generate 9 different masks. The 9 different masks are then superimposed on the final candidate region to obtain the mask region corresponding to the final candidate region.
[0074] Step 207: Train the initial data augmentation network based on the final candidate regions of each sample image and the corresponding mask regions of each final candidate region to obtain the trained data augmentation network.
[0075] Specifically, candidate regions with different masks are detected, and the mask region with the largest loss function value is selected as the data sample. The candidate region and the mask region form a data-sample pair, which is used to train the data augmentation network to obtain the trained data augmentation network.
[0076] Step 208: Construct the initial annotation model based on the trained data augmentation network and the trained Faster R-CNN network. Specifically, add the trained data augmentation network between the interest region pooling layer and the detector of the trained Faster R-CNN network.
[0077] Step 209: Train the initial annotation model using the training sample set to obtain a trained annotation model. For example... Figure 3 The diagram shows the training process of the labeled model.
[0078] During training, candidate regions output from the region-of-interest pooling layer are fed into a data augmentation network. This network predicts a mask that has the greatest impact on the detector based on the features of the candidate regions and then overlays the mask onto the candidate regions. The masked candidate regions are then sent to the detector for classification and regression. Because the candidate regions are partially obscured, the detector typically struggles to identify the target object within that region. Therefore, the network continuously performs backpropagation, adjusting its parameters to help the detector learn to recognize occluded objects. This improves the labeled model's ability to detect occluded objects without increasing the number of training samples.
[0079] Furthermore, step 200 also includes: testing the trained labeled model using a test set.
[0080] This invention utilizes object detection algorithms to replace manual annotation of image data, solving the problem of low efficiency in manual annotation. At the same time, it improves Faster R-CNN by adopting a data-driven strategy and integrating a data augmentation network on the basis of Faster R-CNN, thereby improving the model's ability to detect occluded objects.
[0081] Example 2
[0082] In order to implement the method corresponding to Embodiment 1 above and achieve the corresponding functions and technical effects, an automatic image annotation system is provided below.
[0083] like Figure 4 As shown, the automatic image annotation system provided in this embodiment includes: an image acquisition module 1 and an annotation module 2.
[0084] Among them, the image acquisition module 1 is used to acquire the image to be labeled.
[0085] The annotation module 2 is connected to the image acquisition module 1, and the annotation module 3 is used to annotate the image to be annotated based on a pre-trained annotation model to determine the target location and target category in the image to be annotated. The annotation model includes a feature extraction network, a region proposal network, a region of interest pooling layer, a data augmentation network, and a detector connected in sequence; the feature extraction network is used to extract features from the image to be annotated to obtain a feature map; the region proposal network is used to determine preliminary candidate regions in the feature map; the region of interest pooling layer is used to filter the preliminary candidate regions in the feature map to obtain final candidate regions; the data augmentation network is used to generate mask regions based on the final candidate regions; and the detector is used to perform classification regression on the mask regions to obtain the target location and target category in the image to be annotated.
[0086] Furthermore, in terms of training the annotation model, the automatic image annotation system also includes: a sample acquisition module 3, a first initialization module 4, a first training module 5, a second initialization module 6, a candidate extraction module 7, a mask overlay module 8, a second training module 9, a model construction module 10, and a third training module 11.
[0087] The sample acquisition module 3 is used to acquire a training sample set. The training sample set includes multiple sample images, target location labels for each sample image, and target category labels.
[0088] The first initialization module 4 is used to initialize the parameters of Faster RCNN based on the ImageNet classification model, so as to obtain the initial Faster RCNN network.
[0089] The first training module 5 is connected to both the sample acquisition module 3 and the first initialization module 4. The first training module 5 is used to train the initial Faster R-CNN network using the training sample set to obtain a trained Faster R-CNN network. The trained Faster R-CNN network includes a feature extraction network, a region proposal network, an interest region pooling layer, and a detector connected in sequence.
[0090] The second initialization module 6 is connected to the first training module 5. The second initialization module 6 is used to initialize the parameters of the data augmentation network based on the trained Faster RCNN network to obtain the initial data augmentation network.
[0091] The candidate extraction module 7 is connected to the first training module 5. The candidate extraction module 7 is used to sequentially extract features, extract candidate regions, and filter candidate regions for each sample image through the feature extraction network, region proposal network, and interest region pooling layer of the trained Faster RCNN network, so as to obtain the final candidate regions for each sample image.
[0092] The mask overlay module 8 is connected to the candidate extraction module 7. The mask overlay module 8 is used to overlay a mask on any final candidate region of any sample image to obtain a mask region corresponding to the final candidate region.
[0093] The second training module 9 is connected to the mask overlay module 8 and the second initialization module 6 respectively. The second training module 9 is used to train the initial data augmentation network according to each final candidate region of each sample image and the corresponding mask region of each final candidate region, so as to obtain the trained data augmentation network.
[0094] The model building module 10 is connected to the first training module 5 and the second training module 9 respectively. The model building module is used to build an initial labeled model based on the trained data augmentation network and the trained Faster RCNN network.
[0095] The third training module 11 is connected to the sample acquisition module 3, the model construction module 10 and the annotation module 2 respectively. The third training module 11 is used to train the initial annotation model using the training sample set to obtain the trained annotation model.
[0096] As one specific implementation, the automatic image annotation system includes: a front-end interaction module, a back-end service module, a data management module, an annotation module, and a testing module.
[0097] The front-end interaction module is used to provide users with a visual UI (User Interface) interface to simplify user operation logic.
[0098] The backend service module is used to respond to frontend page requests, process user-uploaded datasets, load algorithm models, perform data annotation, and handle data storage and retrieval.
[0099] The data management module is used to respond to requests from the backend service module and perform CRUD operations on user data and labeled data.
[0100] The testing module is used to test the labeled model based on the test set.
[0101] Compared to existing technologies, the automatic image annotation system provided in this embodiment has the same beneficial effects as the automatic image annotation method provided in Embodiment 1, and will not be repeated here.
[0102] Example 3
[0103] This embodiment provides an electronic device, including a memory and a processor. The memory is used to store computer programs, and the processor runs the computer programs to enable the electronic device to perform the automatic image annotation method of Embodiment 1.
[0104] Alternatively, the aforementioned electronic device may be a server.
[0105] In addition, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the automatic image annotation method of Embodiment 1.
[0106] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0107] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. An image automatic labeling method, characterized by, The image automatic labeling method comprises: acquiring a to-be-labeled image; labeling the to-be-labeled image based on a pre-trained labeling model to determine a target position and a target category in the to-be-labeled image; the labeling model comprises a feature extraction network, a region proposal network, an interest domain pooling layer, a data enhancement network and a detector connected in sequence; the feature extraction network is used to extract features of the to-be-labeled image to obtain a feature map; the region proposal network is used to determine preliminary candidate regions in the feature map; the interest domain pooling layer is used to screen the preliminary candidate regions in the feature map to obtain final candidate regions; the data enhancement network is used to generate mask regions according to the final candidate regions; and the detector is used to perform classification regression on the mask regions to obtain the target position and the target category in the to-be-labeled image; a training method of the labeling model comprises: acquiring a training sample set; the training sample set comprises a plurality of sample images, target position labels and target category labels of the sample images; initializing parameters of the region proposal network based on an ImageNet classification model to obtain an initial region proposal network; training the initial region proposal network using the training sample set to obtain a trained region proposal network; initializing parameters of a Fast RCNN network based on the ImageNet classification model to obtain an initial Fast RCNN network; replacing a selective search algorithm in the initial Fast RCNN network with the trained region proposal network to obtain an initial Faster RCNN network; training the initial Faster RCNN network using the training sample set to obtain a trained Faster RCNN network; the trained Faster RCNN network comprises the feature extraction network, the region proposal network, the interest domain pooling layer and the detector connected in sequence; initializing parameters of the data enhancement network based on the trained Faster RCNN network to obtain an initial data enhancement network; extracting features, extracting candidate regions and screening candidate regions from the sample images in sequence through the feature extraction network, the region proposal network and the interest domain pooling layer of the trained Faster RCNN network to obtain final candidate regions of the sample images; dividing any final candidate region of any sample image into 3x3 squares to generate nine different masks; and superimposing the nine different masks in the final candidate region to obtain a mask region corresponding to the final candidate region; training the initial data enhancement network according to the final candidate regions of the sample images and the mask regions corresponding to the final candidate regions to obtain a trained data enhancement network; constructing an initial labeling model according to the trained data enhancement network and the trained Faster RCNN network; training the initial labeling model using the training sample set to obtain a trained labeling model.
2. The image automatic labeling method of claim 1, wherein, initializing parameters of the region proposal network based on the ImageNet classification model, specifically comprising: The parameters of the region proposal network are set as network parameters of an ImageNet classification model.
3. The image automatic labeling method of claim 1, wherein, The parameters of the data enhancement network are initialized based on the trained Faster RCNN network to obtain an initial data enhancement network, and the initial data enhancement network comprises the following steps: The convolutional layer parameters and the pooling layer parameters of the trained Faster RCNN network are shared with the data enhancement network.
4. The image automatic labeling method of claim 1, wherein, The to-be-labeled image is a face image collected in a face detection process; the target in the to-be-labeled image is a face; the target position is the position of the face in the to-be-labeled image, and the target category is 0 or 1, 0 indicating that the face is not a face and 1 indicating that the face is a face.
5. An image automatic labeling system characterized by comprising: The image automatic labeling system comprises: An image acquisition module configured to acquire a to-be-labeled image; An annotation module connected with the image acquisition module and configured to label the to-be-labeled image based on a pre-trained annotation model to determine a target position and a target category in the to-be-labeled image; the annotation model comprises a feature extraction network, a region proposal network, an interest domain pooling layer, a data enhancement network and a detector connected in sequence; the feature extraction network is configured to extract features of the to-be-labeled image to obtain a feature map; the region proposal network is configured to determine preliminary candidate regions in the feature map; the interest domain pooling layer is configured to filter the preliminary candidate regions in the feature map to obtain final candidate regions; the data enhancement network is configured to generate mask regions according to the final candidate regions; and the detector is configured to perform classification regression on the mask regions to obtain the target position and the target category in the to-be-labeled image; A sample acquisition module configured to acquire a training sample set; the training sample set comprises a plurality of sample images, target position labels and target category labels of the sample images; A first initialization module configured to initialize parameters of a Faster RCNN based on an ImageNet classification model to obtain an initial Faster RCNN network; specifically, parameters of a region proposal network are initialized based on the ImageNet classification model to obtain an initial region proposal network; the initial region proposal network is trained using the training sample set to obtain a trained region proposal network; parameters of a Fast RCNN network are initialized based on the ImageNet classification model to obtain an initial Fast RCNN network; the selective search algorithm in the initial Fast RCNN network is replaced with the trained region proposal network to obtain the initial Faster RCNN network; A first training module connected with the sample acquisition module and the first initialization module and configured to train the initial Faster RCNN network using the training sample set to obtain a trained Faster RCNN network; the trained Faster RCNN network comprises a feature extraction network, a region proposal network, an interest domain pooling layer and a detector connected in sequence; A second initialization module connected with the first training module and configured to initialize parameters of a data enhancement network based on the trained Faster RCNN network to obtain an initial data enhancement network. The candidate extraction module is connected with the first training module, and is configured to sequentially perform feature extraction, candidate region extraction and candidate region screening on each sample image by using a feature extraction network, a region proposal network and an interest domain pooling layer of the trained Faster RCNN network, to obtain final candidate regions of the sample image. The mask superposition module is connected with the candidate extraction module, and is configured to superpose a mask on each final candidate region of each sample image to obtain a mask region corresponding to the final candidate region; specifically, the final candidate region is divided into 3*3 squares to generate nine different masks; and the nine different masks are superposed in the final candidate region to obtain the mask region corresponding to the final candidate region. The second training module is connected with the mask superposition module and the second initialization module, respectively, and is configured to train the initial data enhancement network according to the final candidate regions of each sample image and the mask regions corresponding to the final candidate regions, to obtain a trained data enhancement network. The model construction module is connected with the first training module and the second training module, respectively, and is configured to construct an initial labeling model according to the trained data enhancement network and the trained Faster RCNN network. The third training module is connected with the sample acquisition module, the model construction module and the labeling module, respectively, and is configured to train the initial labeling model by using the training sample set to obtain a trained labeling model.
6. An electronic device, comprising: The electronic device includes a memory and a processor, the memory is configured to store a computer program, and the processor is configured to run the computer program to enable the electronic device to perform the image automatic labeling method in any one of claims 1 to 4.
Citation Information
Patent Citations
An object detection method based on occlusion type prediction
CN109522930A
Self-adaptive rapid target detection method based on Fast-RCNN
CN110705544A