CN113269215B - Training set construction method, device, equipment and storage medium - Google Patents

Training set construction method, device, equipment and storage medium Download PDF

Info

Publication number
CN113269215B
CN113269215B CN202010096392.1A CN202010096392A CN113269215B CN 113269215 B CN113269215 B CN 113269215B CN 202010096392 A CN202010096392 A CN 202010096392A CN 113269215 B CN113269215 B CN 113269215B
Authority
CN
China
Prior art keywords
image
training set
category
categories
images
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010096392.1A
Other languages
Chinese (zh)
Other versions
CN113269215A (en
Inventor
梁隆恺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202010096392.1A priority Critical patent/CN113269215B/en
Publication of CN113269215A publication Critical patent/CN113269215A/en
Application granted granted Critical
Publication of CN113269215B publication Critical patent/CN113269215B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches

Abstract

The application discloses a training set construction method, device, equipment and storage medium, and relates to the technical field of machine learning. The specific implementation scheme is as follows: acquiring a training set, wherein the training set comprises a plurality of marked first images; training a classification model by adopting a training set, and classifying an unlabeled second image by adopting the trained classification model to obtain the category of the second image; labeling the second image according to the category and the image characteristics of the second image; the annotated second image is added to the training set. The embodiment can efficiently construct a high-precision training set without manual participation, and labor cost is saved.

Description

Training set construction method, device, equipment and storage medium
Technical Field
The present application relates to computer technology, and in particular, to the field of machine learning technology.
Background
In the fields of machine learning, pattern recognition, etc., it is generally necessary to divide a sample into three independent parts: training set (train set), validation set (validation set) and test set (test set). Wherein the training set is used to train the model.
In an application scenario of training an image classification model by adopting a training set, the number of images and the accuracy of labeling influence the training accuracy of the classification model. In the prior art, the category to which each image belongs is marked manually, so that the labor cost is high, the time consumption is long, and the accuracy of manual marking is difficult to guarantee.
Disclosure of Invention
The embodiment of the application provides a training set construction method, device, equipment and storage medium, so that a high-precision training set is constructed efficiently, and labor cost is saved.
In a first aspect, an embodiment of the present application provides a method for constructing a training set, including:
acquiring a training set, wherein the training set comprises a plurality of marked first images;
training a classification model by adopting a training set, and classifying an unlabeled second image by adopting the trained classification model to obtain the category of the second image;
labeling the second image according to the category and the image characteristics of the second image;
the noted second image is added to the training set.
The method and the device are suitable for the condition that the number of the marked first images is relatively small, and the classification model with limited accuracy is trained through a plurality of marked first images; classifying the unlabeled second image through a classification model with limited precision, and assisting by adopting image features to obtain more accurate labeling; and then add the second image of accurate mark to training set, high-efficient construction high accuracy training set need not artifical the participation, uses manpower sparingly cost.
Optionally, labeling the second image according to the category and the image feature of the second image includes:
extracting image features of the second image;
judging whether the image characteristics of the second image meet the image characteristic conditions corresponding to the categories;
and if the image characteristics of the second image do not meet the image characteristic conditions corresponding to the categories, correcting the categories of the second image, and marking the second image by adopting the corrected categories.
In an optional implementation manner in the above application, the category obtained according to the classification model has a corresponding relationship with the image feature condition, that is, an image of a certain category should have the image feature corresponding to the category. If the classification model has limited precision and can have images with wrong classification, if the image features of the second image do not meet the image feature conditions corresponding to the categories, the categories of the second image are corrected, and the second image with accurate labels is obtained.
Optionally, the image features include: at least one of image edge energy, image high frequency energy, image gradient energy, and image entropy.
In an optional implementation manner in the above application, the image edge energy, the image high-frequency energy, the image gradient energy and the image entropy can reflect the detail abundance of the image, and for the case that the images of different categories have details of different abundance, at least one of the image edge energy, the image high-frequency energy, the image gradient energy and the image entropy can be adopted to judge whether the classification category of the classification model is accurate, so that the classification category can be corrected accurately.
Optionally, the determining whether the image feature of the second image meets the image feature condition corresponding to the category includes:
sorting the plurality of second images according to the image characteristic values of the plurality of second images in the same category;
judging whether the ordering positions of the second images are located in the ordering position range corresponding to the same category;
and if the image characteristics of the second image do not meet the image characteristic conditions corresponding to the categories, correcting the categories of the second image, including:
and if the sorting position of the second image is not in the sorting position range, correcting the category of the second image into the category corresponding to the image characteristic value.
In an optional implementation manner in the above application, the classification category of the classification model has a corresponding relationship with the ordering position range of the image feature values. If the sorting position of the second image is not in the range of the sorting position, indicating that the category of the second image is wrong; and correcting the category of the second image into the category corresponding to the image characteristic value according to the image characteristic value. In the embodiment, the second images with wrong categories are accurately extracted through the sorting positions, and the categories of the second images can be accurately corrected through the image characteristics.
Optionally, determining whether the image feature of the second image meets the image feature condition corresponding to the category includes:
judging whether the image characteristic value of the second image is in the range corresponding to the category;
and if the image characteristics of the second image do not meet the image characteristic conditions corresponding to the categories, correcting the categories of the second image, including:
and if the image characteristic value of the second image is not in the range corresponding to the category, correcting the category of the second image into the category corresponding to the range in which the image characteristic value is located.
In an optional embodiment of the foregoing application, a classification category of the classification model has a correspondence with a range of image feature values. If the image characteristic value of the second image is not in the range corresponding to the category, indicating that the category of the second image is wrong; and correcting the category of the second image to be the category corresponding to the range in which the image characteristic value is located. In the embodiment, the second image with the wrong category is accurately extracted through the range of the image characteristic value, and the category of the second image can be accurately corrected through the range of the image characteristic value.
Optionally, after the adding the noted second image to the training set, the method further includes:
and returning to the operation of training the classification model by adopting the training set until the precision of the classification model reaches a preset value or the number of images in the training set reaches a preset number.
In an optional implementation manner in the above application, along with gradual expansion of the training set, the accuracy of the classification model is gradually improved, so that a more accurate classification result can be obtained, and more accurate labeling is facilitated.
Optionally, the image is a satellite image of a geographic area; the categories include: map element removed category and map element not removed category.
An optional implementation manner in the above application is suitable for the situation of constructing the training set of the satellite image of the geographic area, and does not need a large amount of manual labeling of the satellite image; the satellite images are classified into a map element removed category and a map element non-removed category by the classification model trained by the training set, and the two categories have a corresponding relation with image features, particularly the detail richness of the images. Therefore, accurate labeling can be obtained through the two categories and the image characteristics.
In a second aspect, an embodiment of the present application further provides a device for constructing a training set, including:
the acquisition module is used for acquiring a training set, wherein the training set comprises a plurality of marked first images;
the classification module is used for training the classification model by adopting a training set, and classifying the unlabeled second image by adopting the trained classification model to obtain the category of the second image;
the labeling module is used for labeling the second image according to the category and the image characteristics of the second image;
and the adding module is used for adding the marked second image into the training set.
In a third aspect, an embodiment of the present application further provides an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method of constructing a training set as provided by the embodiments of the first aspect.
In a fourth aspect, embodiments of the present application also provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform a method of constructing a training set as provided by the embodiments of the first aspect.
Other effects of the above alternative will be described below in connection with specific embodiments.
Drawings
The drawings are for better understanding of the present solution and do not constitute a limitation of the present application. Wherein:
FIG. 1 is a flow chart of a method of constructing a training set in accordance with a first embodiment of the present application;
FIG. 2 is a flowchart of a method for constructing a training set in a second embodiment of the present application;
fig. 3 is a block diagram of a training set constructing apparatus in the third embodiment of the present application;
fig. 4 is a block diagram of an electronic device for implementing a method of constructing a training set in accordance with an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Example 1
Fig. 1 is a flowchart of a method for constructing a training set in a first embodiment of the present application, where the embodiment of the present application is applicable to a case where the training set includes only a small number of labeled images, and the method is performed by a device for constructing a training set, where the device is implemented by software and/or hardware, and is specifically configured in an electronic device having a certain data computing capability.
The method for constructing the training set shown in fig. 1 comprises the following steps:
s101, acquiring a training set, wherein the training set comprises a plurality of marked first images.
In this embodiment, the training set is used to train the classification model, including a plurality of images of labeled classes. The number of categories is at least two, such as cat category, dog category, etc. For convenience of description and distinction, the original annotated image in the training set is referred to as the first image.
Alternatively, the first image is a manually annotated image, which is relatively small in number, e.g. 100 sheets. Obviously, a small number of first images is not enough to train a high-precision classification model, and a new annotated image needs to be added in the training set.
According to the embodiment, the classification model and the image features are adopted, unlabeled images are automatically labeled in a combined mode, and a high-precision training set is constructed efficiently.
S102, training a classification model by using a training set, and classifying the unlabeled second image by using the trained classification model to obtain the category of the second image.
Specifically, the marked first image is input into a classification model to be trained to obtain a classification result output by the classification model, parameters of the classification model are iterated continuously, the classification result approximates to the marking of the input image, and the classification model with certain classification precision is obtained.
Next, a plurality of unlabeled images are acquired. For convenience of description and distinction, the unlabeled image is referred to as a second image. And inputting the unlabeled second image into the trained classification model to obtain the category of the second image.
And S103, labeling the second image according to the category and the image characteristics of the second image.
The classification of the second image may be incorrect or correct due to the limited classification accuracy of the classification model, and the accurate classification needs to be further determined according to the image features of the second image.
In this embodiment, the image features are features associated with categories, and images of different categories have different image features. Optionally, the image features include image pixel features, image depth features, and the like. For example, most of the pixels in images of the white cloud class are white in color, and the depth features of images of the cat class are the local detail features of the cat.
Optionally, extracting the image features of the second image, and if the category of the second image obtained by the classification model is consistent with the category associated with the image features, labeling the second image by adopting the category. If the category of the second image obtained by the classification model is inconsistent with the category associated with the image feature, the category needs to be corrected so that the corrected category is consistent with the category associated with the image feature, and the corrected category is adopted to label the second image.
S104, adding the marked second image into the training set.
Based on the method, the training set comprises the original marked first image and the subsequent marked second image, and expansion of the training set is achieved.
The method and the device are suitable for the condition that the number of the marked first images is relatively small, and the classification model with limited accuracy is trained through a plurality of marked first images; classifying the unlabeled second image through a classification model with limited precision, and assisting by adopting image features to obtain more accurate labeling; and then add the second image of accurate mark to training set, high-efficient construction high accuracy training set need not artifical the participation, uses manpower sparingly cost.
Example two
Fig. 2 is a flowchart of a training set constructing method in a second embodiment of the present application, where the embodiment of the present application is optimized and improved based on the technical solutions of the foregoing embodiments.
Further, the operation of labeling the second image according to the category and the image characteristics of the second image is thinned to extract the image characteristics of the second image; judging whether the image features of the second image meet the image feature conditions corresponding to the categories; and if the image characteristics of the second image do not meet the image characteristic conditions corresponding to the categories, correcting the categories of the second image, and marking the second image by adopting the corrected categories, so that the accurately marked second image is obtained.
Further, the operation of "adding the labeled second image to the training set" followed by the additional operation "returns to the operation of training the classification model using the training set until the accuracy of the classification model reaches a preset value or the number of images in the training set reaches a preset number", which is favorable for obtaining more accurate labels.
The method for constructing the training set shown in fig. 2 comprises the following steps:
s201, acquiring a training set, wherein the training set comprises a plurality of marked first images.
S202, training a classification model by using a training set, and classifying the unlabeled second image by using the trained classification model to obtain the category of the second image.
S201 and S202 are detailed in the description of the above embodiments, and are not repeated here.
S203, extracting image features of the second image.
Optionally, the image features include: at least one of image edge energy, image high frequency energy, image gradient energy, and image entropy.
And for the image edge energy, extracting the edge of the image by using a Laplacian operator, and then summing the edge pixel values of the image or obtaining the square sum to obtain the image edge energy. The image edge energy can reflect the richness and the definition degree of the edge, and highlights the region with severe gray level change. If the image gray level changes drastically, i.e. the detail texture is much and complex, the resulting edge energy value is large.
For image high-frequency energy, a frequency domain function can be used to take the high-frequency energy in the fourier transform of the image. The edges are represented as large rises and falls in gray in the spatial domain and are reflected as high frequency energy in the frequency domain, i.e., the edges of the image concentrate the high frequency energy of the image. If the detail texture of the image is much and complex, the resulting high frequency energy value is large.
For image gradient energy, gradient energy functions are used to obtain the gradient energy of the image. The gradient energy function takes the difference value of adjacent pixels in the image as an evaluation function, and if the detail textures of the image are more and more complex, the obtained gradient value is larger.
For image entropy, an entropy function is used to calculate the image entropy. When the edge details are richer, a larger amount of information is provided, and the entropy of the obtained image is also larger.
The image edge energy, the image high-frequency energy, the image gradient energy and the image entropy can reflect the detail richness of the image, and for the situation that the images of different categories have the detail of different richness, at least one of the image edge energy, the image high-frequency energy, the image gradient energy and the image entropy can be adopted to judge whether the classification category of the classification model is accurate or not, so that the classification category can be accurately corrected.
S204, judging whether the image features of the second image meet the image feature conditions corresponding to the categories. If yes, S205 is performed, and if no, S206 is performed.
S205, labeling the second image by adopting the category obtained by the classification model. S207 is continued.
S206, correcting the category of the second image, and marking the second image by adopting the corrected category. S207 is continued.
In this embodiment, the image features and the categories are associated by image feature conditions. Specifically, a corresponding image feature condition is configured for each category. And when the image characteristics of the second image meet the image characteristic conditions corresponding to a certain category, judging that the second image belongs to the category. By setting the image feature conditions, the corresponding relation between each image feature and the category does not need to be set, so that the category judgment on the second image batch is facilitated.
In an alternative embodiment, the plurality of second images are ranked according to image feature values of the plurality of second images of the same category, for example, from large to small or from small to large. Then, whether the ordering positions of the second images are located in the ordering position range corresponding to the same category is judged. The category has a correspondence with the ordering location range. For example, class a images are rich in detail texture and image edge energy values are high. When sorting is performed according to the image edge energy value from large to small, the sorting position range corresponding to the class A comprises the first preset number of positions of the sequence; for example, the B class image has poor detail texture and low image edge energy value. When the images are sorted from large to small according to the image edge energy values, the sorting position range corresponding to the class B comprises a preset number of positions after the sequence.
And judging that if the sorting position of the second image is within the sorting position range, indicating that the second image belongs to the category, and marking the second image by adopting the category obtained by the classification model. If the sorting position of the second image is not in the sorting position range, the second image is not in the category, and the category of the second image is further corrected to the category corresponding to the image characteristic value. Next, in the above example, if the sorting position of the second image classified as the a category is not the previous preset number of positions, the category B corresponding to the image edge energy value of the second image is determined, and the second image is labeled as the category B. In the embodiment, the second images with wrong categories are accurately extracted through the sorting positions, and the categories of the second images can be accurately corrected through the image characteristics.
In another alternative embodiment, it is determined whether the image feature value of the second image is within a range corresponding to the category. The category has a corresponding relation with the image characteristic value range, for example, the image detail texture of category A is rich, and the image edge energy value range is more than 500; for example, the B class image has a lack of detail texture, and the image edge energy range is below 500.
And judging that if the image characteristic value of the second image is in the image characteristic range corresponding to the category, indicating that the second image belongs to the category, and marking the second image by adopting the category obtained by the classification model. If the image characteristic value of the second image is not in the range corresponding to the category, the second image is not in the category, and the category of the second image is further corrected to be the category corresponding to the range in which the image characteristic value is located. Next, in the above example, if the image edge energy value of the second image classified as the a category is 400, that is, 500 or less, the category B corresponding to the image edge energy value of the second image is determined, and the second image is labeled as the category B. In the embodiment, the second image with the wrong category is accurately extracted through the range of the image characteristic value, and the category of the second image can be accurately corrected through the range of the image characteristic value.
S207, adding the marked second image into the training set.
S208, judging whether the precision of the classification model reaches a preset value, if not, continuing to execute S209; if so, S210 is performed.
S209, judging whether the number of images in the training set reaches a preset number, if so, jumping to S210; if not, go to S202.
A test set comprising a plurality of images is constructed in advance, and the accuracy test is carried out on the classification model on the test set. If the precision of the classification model reaches a preset value, the current training set is proved to be capable of training to obtain a high-precision classification model, and the training set is output. If the accuracy of the classification model does not reach the preset value, further judging whether the number of images in the training set reaches the preset number or not is needed.
If the number of images in the training set reaches the preset number, outputting the training set; and if the number of the images in the training set does not reach the preset number, returning to the training operation of executing the classification model so as to continuously label the new second image and enlarge the training set. The preset value can be set autonomously according to the accuracy requirement of the classification model. The preset number can be set autonomously according to the sample number requirements.
It should be noted that, when the training operation of the classification model is performed in return, the accuracy of the classification model obtained by training is improved due to an increase in the number of images of the training set, and the number of images of erroneous classification is reduced. Then, when determining whether the image feature of the second image satisfies the image feature condition corresponding to the category, the image feature condition needs to be adjusted according to the accuracy or the number of cycles of the classification model. For example, when the precision is 90% or within 5 cycles, the ordering position range is 90% before or after the sequence; when the precision is 95% or the cycle is 5-10 times, the sequencing position range is 95% before or after the sequence.
It should be noted that, the present embodiment executes S209 first and then S210, but is not limited thereto, and S210 may be executed first and then S209 may be executed.
S210, outputting the training set, and ending the operation.
In this embodiment, the classification model has a correspondence between the classification model and the image feature condition, that is, an image of a certain classification should have an image feature corresponding to the classification. If the classification model has limited precision and can have images with wrong classification, if the image features of the second image do not meet the image feature conditions corresponding to the categories, the categories of the second image are corrected, and the second image with accurate labels is obtained.
According to the embodiment, the operation of training the classification model by adopting the training set is returned until the precision of the classification model reaches a preset value or the number of images in the training set reaches a preset number, and along with gradual expansion of the training set, the accuracy of the classification model is gradually improved, a more accurate classification result can be obtained, and more accurate labeling is facilitated.
The method for constructing the training set provided in this embodiment is described in detail below in a specific application scenario.
In the application scene, the image is a satellite image of a geographic area. The geographic region includes a relocation region and a non-relocation region. Since points of interest (Point of Interest, POIs) of buildings, roads, super-providers, hospitals, etc. covered by the removed areas are removed, satellite images including the removed areas should be labeled as map element removal categories. The non-migrating region includes a large number of POIs and the satellite image including the non-migrating region should be labeled as a map element non-removed category.
Because the removed area is mainly empty or bare land covered with green cloth, the detail richness of satellite images comprising the removed area is low, and the energy value of the image edges is low. The non-migrating region includes a large number of POIs, and the detail richness of the satellite image including the non-migrating region is high, so that the image edge energy value is high. Thus, image edge energy is employed as an image feature.
The first step: and acquiring a plurality of satellite images obtained by shooting the geographic area. And (3) performing manual category labeling on part of the satellite images (namely the first image), wherein the manual category labeling comprises a map element removal category and a map element non-removal category, and obtaining a training set A. Then, the unlabeled satellite image is calculated by using the Laplacian operator, and an image edge energy value is obtained.
And a second step of: and training a classification model T by adopting the training set A, and classifying part of unlabeled satellite images (namely second images) by adopting the trained classification model T to obtain an image set L1 of the map element removal category and an image set L2 of the map element non-removal category.
And a third step of: the images in the image set L1 are ordered in order of the image edge energy value from large to small. Taking the part with the preset proportion and ranked at the front, such as 3%, and correcting and marking as 'map element is not removed'. The image set L1 is added to the training set a. The images in the image set L2 are ordered in order of the image edge energy value from small to large. Taking the front-ordered part of the preset proportion, such as 3%, and correcting and marking as 'map element removal'. The image set L2 is added to the training set a.
It should be noted that, when the third step is performed in a loop, the preset ratio needs to be adjusted according to the accuracy of the classification model or the number of loops.
And repeating the second step and the third step until the precision of the classification model reaches a preset value or the number of images in the training set A reaches a preset number.
Example III
Fig. 3 is a block diagram of a training set constructing apparatus in a third embodiment of the present application, where the embodiment of the present application is applicable to a case where the training set includes only a small number of labeled images, and the training set is effectively and accurately enlarged, and the apparatus is implemented by using software and/or hardware, and is specifically configured in an electronic device having a certain data computing capability.
A training set constructing apparatus 300 as shown in fig. 3, comprising: the system comprises an acquisition module 301, a classification module 302, a labeling module 303 and an adding module 304; wherein, the liquid crystal display device comprises a liquid crystal display device,
an obtaining module 301, configured to obtain a training set, where the training set includes a plurality of marked first images;
the classification module 302 is configured to train the classification model by using a training set, and classify the unlabeled second image by using the trained classification model to obtain a class of the second image;
the labeling module 303 is configured to label the second image according to the category and the image feature of the second image;
an adding module 304 is configured to add the second image that has been annotated to the training set.
The method and the device are suitable for the condition that the number of the marked first images is relatively small, and the classification model with limited accuracy is trained through a plurality of marked first images; classifying the unlabeled second image through a classification model with limited precision, and assisting by adopting image features to obtain more accurate labeling; and then add the second image of accurate mark to training set, high-efficient construction high accuracy training set need not artifical the participation, uses manpower sparingly cost.
Further, the labeling module 303 is specifically configured to: extracting image features of the second image; judging whether the image features of the second image meet the image feature conditions corresponding to the categories; and if the image characteristics of the second image do not meet the image characteristic conditions corresponding to the categories, correcting the categories of the second image, and marking the second image by adopting the corrected categories.
Further, the image features include: at least one of image edge energy, image high frequency energy, image gradient energy, and image entropy.
Further, when determining whether the image feature of the second image meets the image feature condition corresponding to the category, the labeling module 303 is specifically configured to: sorting the plurality of second images according to the image characteristic values of the plurality of second images in the same category; and judging whether the ordering positions of the second images are positioned in the ordering position range corresponding to the same category. The labeling module 303 is specifically configured to, when the image feature of the second image does not meet the image feature condition corresponding to the category, correct the category of the second image: and if the sorting position of the second image is not in the sorting position range, correcting the category of the second image into the category corresponding to the image characteristic value.
Further, when determining whether the image feature of the second image meets the image feature condition corresponding to the category, the labeling module 303 is specifically configured to: and judging whether the image characteristic value of the second image is in the range corresponding to the category. The labeling module 303 is specifically configured to, when the image feature of the second image does not meet the image feature condition corresponding to the category, correct the category of the second image: and if the image characteristic value of the second image is not in the range corresponding to the category, correcting the category of the second image into the category corresponding to the range in which the image characteristic value is located.
Further, the device further comprises: and the return module is used for returning to the operation of training the classification model by adopting the training set after the marked second image is added into the training set until the precision of the classification model reaches a preset value or the number of images in the training set reaches a preset number.
Further, the image is a satellite image of a geographic area; the categories include: map element removed category and map element not removed category.
The training set constructing device can execute the training set constructing method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of executing the training set constructing method.
Example IV
According to embodiments of the present application, an electronic device and a readable storage medium are also provided.
As shown in fig. 4, a block diagram of an electronic device implementing a method for constructing a training set according to an embodiment of the present application is shown. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the application described and/or claimed herein.
As shown in fig. 4, the electronic device includes: one or more processors 401, memory 402, and interfaces for connecting the components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the electronic device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In other embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple electronic devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 401 is illustrated in fig. 4.
Memory 402 is a non-transitory computer-readable storage medium provided herein. The memory stores instructions executable by the at least one processor to cause the at least one processor to perform the training set construction methods provided herein. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the method of constructing a training set provided herein.
The memory 402 is used as a non-transitory computer readable storage medium, and may be used to store a non-transitory software program, a non-transitory computer executable program, and modules, such as program instructions/modules corresponding to a method for constructing a training set in an embodiment of the present application (e.g., including the acquisition module 301, the classification module 302 labeling module 303, and the addition module 304 shown in fig. 3). The processor 401 executes various functional applications of the server and data processing, i.e. a method of implementing the construction of the training set in the above-described method embodiments, by running non-transitory software programs, instructions and modules stored in the memory 402.
Memory 402 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created by use of an electronic device implementing the construction method of the training set, and the like. In addition, memory 402 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 402 may optionally include memory remotely located with respect to processor 401, which may be connected via a network to an electronic device performing the method of constructing the training set. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device performing the training set constructing method may further include: an input device 403 and an output device 404. The processor 401, memory 402, input device 403, and output device 404 may be connected by a bus or otherwise, for example in fig. 4.
The input device 403 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device performing the method of constructing the training set, such as input devices for a touch screen, a keypad, a mouse, a track pad, a touch pad, a joystick, one or more mouse buttons, a track ball, a joystick, etc. The output device 404 may include a display apparatus, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device may be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASIC (application specific integrated circuit), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
These computing programs (also referred to as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented in a high-level procedural and/or object-oriented programming language, and/or in assembly/machine language. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
The method and the device are suitable for the condition that the number of the marked first images is relatively small, and the classification model with limited accuracy is trained through a plurality of marked first images; classifying the unlabeled second image through a classification model with limited precision, and assisting by adopting image features to obtain more accurate labeling; and then add the second image of accurate mark to training set, high-efficient construction high accuracy training set need not artifical the participation, uses manpower sparingly cost.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions disclosed in the present application can be achieved, and are not limited herein.
The above embodiments do not limit the scope of the application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application are intended to be included within the scope of the present application.

Claims (9)

1. A method for constructing a training set, comprising:
acquiring a training set, wherein the training set comprises a plurality of marked first images;
training a classification model by adopting the training set, and classifying unlabeled second images by adopting the trained classification model to obtain the categories of the second images;
extracting image features of the second image;
judging whether the image characteristics of the second image meet the image characteristic conditions corresponding to the categories;
if the image characteristics of the second image do not meet the image characteristic conditions corresponding to the categories, correcting the categories of the second image, and marking the second image by adopting the corrected categories;
the annotated second image is added to the training set.
2. The method of claim 1, wherein the image features comprise: at least one of image edge energy, image high frequency energy, image gradient energy, and image entropy.
3. The method of claim 1, wherein determining whether the image feature of the second image satisfies the image feature condition corresponding to the category comprises:
sorting the plurality of second images according to the image characteristic values of the plurality of second images in the same category;
judging whether the ordering positions of the second images are located in the ordering position range corresponding to the same category;
and if the image characteristics of the second image do not meet the image characteristic conditions corresponding to the categories, correcting the categories of the second image, including:
and if the sorting position of the second image is not in the sorting position range, correcting the category of the second image into the category corresponding to the image characteristic value.
4. The method of claim 1, wherein determining whether the image feature of the second image satisfies the image feature condition corresponding to the category comprises:
judging whether the image characteristic value of the second image is in the range corresponding to the category;
and if the image characteristics of the second image do not meet the image characteristic conditions corresponding to the categories, correcting the categories of the second image, including:
and if the image characteristic value of the second image is not in the range corresponding to the category, correcting the category of the second image into the category corresponding to the range in which the image characteristic value is located.
5. The method of any of claims 1-4, further comprising, after the adding the annotated second image to the training set:
and returning to the operation of training the classification model by adopting the training set until the precision of the classification model reaches a preset value or the number of images in the training set reaches a preset number.
6. The method according to any one of claim 1 to 4, wherein,
the image is a satellite image of a geographic area;
the categories include: map element removed category and map element not removed category.
7. A training set constructing apparatus, comprising:
the acquisition module is used for acquiring a training set, wherein the training set comprises a plurality of marked first images;
the classification module is used for training a classification model by adopting the training set and classifying the unlabeled second image by adopting the trained classification model to obtain the category of the second image;
the labeling module is used for extracting image characteristics of the second image; judging whether the image features of the second image meet the image feature conditions corresponding to the categories; if the image characteristics of the second image do not meet the image characteristic conditions corresponding to the categories, correcting the categories of the second image, and marking the second image by adopting the corrected categories;
and the adding module is used for adding the marked second image into the training set.
8. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method of constructing a training set according to any one of claims 1-6.
9. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform a method of constructing a training set according to any one of claims 1-6.
CN202010096392.1A 2020-02-17 2020-02-17 Training set construction method, device, equipment and storage medium Active CN113269215B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010096392.1A CN113269215B (en) 2020-02-17 2020-02-17 Training set construction method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010096392.1A CN113269215B (en) 2020-02-17 2020-02-17 Training set construction method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113269215A CN113269215A (en) 2021-08-17
CN113269215B true CN113269215B (en) 2023-08-01

Family

ID=77227503

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010096392.1A Active CN113269215B (en) 2020-02-17 2020-02-17 Training set construction method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113269215B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108470185A (en) * 2018-02-12 2018-08-31 北京佳格天地科技有限公司 The atural object annotation equipment and method of satellite image
CN108764372A (en) * 2018-06-08 2018-11-06 Oppo广东移动通信有限公司 Construction method and device, mobile terminal, the readable storage medium storing program for executing of data set
CN109543713A (en) * 2018-10-16 2019-03-29 北京奇艺世纪科技有限公司 The modification method and device of training set
CN109840531A (en) * 2017-11-24 2019-06-04 华为技术有限公司 The method and apparatus of training multi-tag disaggregated model

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11113599B2 (en) * 2017-06-22 2021-09-07 Adobe Inc. Image captioning utilizing semantic text modeling and adversarial learning

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109840531A (en) * 2017-11-24 2019-06-04 华为技术有限公司 The method and apparatus of training multi-tag disaggregated model
CN108470185A (en) * 2018-02-12 2018-08-31 北京佳格天地科技有限公司 The atural object annotation equipment and method of satellite image
CN108764372A (en) * 2018-06-08 2018-11-06 Oppo广东移动通信有限公司 Construction method and device, mobile terminal, the readable storage medium storing program for executing of data set
CN109543713A (en) * 2018-10-16 2019-03-29 北京奇艺世纪科技有限公司 The modification method and device of training set

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Fine-tuning Convolutional Neural Networks for Biomedical Image Analysis: Actively and Incrementally;Zongwei Zhou等;CVPR2017;第7340-7349页 *
基于卷积神经网络的多标签图像自动标注;黎健成;袁春;宋友;;计算机科学(第07期);第41-45页 *

Also Published As

Publication number Publication date
CN113269215A (en) 2021-08-17

Similar Documents

Publication Publication Date Title
CN111582453B (en) Method and device for generating neural network model
EP3926526A2 (en) Optical character recognition method and apparatus, electronic device and storage medium
CN111881908B (en) Target detection model correction method, detection device, equipment and medium
US20220027705A1 (en) Building positioning method, electronic device, storage medium and terminal device
EP3886045A1 (en) Three-dimensional reconstruction method, three-dimensional reconstruction apparatus and storage medium
CN112241716B (en) Training sample generation method and device
US11423650B2 (en) Visual positioning method and apparatus, and computer-readable storage medium
CN111310840A (en) Data fusion processing method, device, equipment and storage medium
CN111709428B (en) Method and device for identifying positions of key points in image, electronic equipment and medium
CN111597287B (en) Map generation method, device and equipment
CN115359308A (en) Model training method, apparatus, device, storage medium, and program for identifying difficult cases
CN113971723B (en) Method, device, equipment and storage medium for constructing three-dimensional map in high-precision map
CN112581533B (en) Positioning method, positioning device, electronic equipment and storage medium
CN111966925B (en) Building interest point weight judging method and device, electronic equipment and storage medium
CN113762109A (en) Training method of character positioning model and character positioning method
CN113361303B (en) Temporary traffic sign board identification method, device and equipment
CN111275827B (en) Edge-based augmented reality three-dimensional tracking registration method and device and electronic equipment
CN113269215B (en) Training set construction method, device, equipment and storage medium
CN111104418B (en) Text description processing method and device and electronic equipment
CN112488126A (en) Feature map processing method, device, equipment and storage medium
CN112883127B (en) Road data processing method and device, electronic equipment and medium
CN111597987B (en) Method, apparatus, device and storage medium for generating information
CN112381877B (en) Positioning fusion and indoor positioning method, device, equipment and medium
CN113269213B (en) Training set acquisition method and device and electronic equipment
CN112288696B (en) Auxiliary quality inspection method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant