CN112070094A - Method and device for screening training data, electronic equipment and storage medium - Google Patents

Method and device for screening training data, electronic equipment and storage medium Download PDF

Info

Publication number
CN112070094A
CN112070094A CN202011253325.2A CN202011253325A CN112070094A CN 112070094 A CN112070094 A CN 112070094A CN 202011253325 A CN202011253325 A CN 202011253325A CN 112070094 A CN112070094 A CN 112070094A
Authority
CN
China
Prior art keywords
image
recognized
segmentation
training data
area
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.)
Granted
Application number
CN202011253325.2A
Other languages
Chinese (zh)
Other versions
CN112070094B (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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202011253325.2A priority Critical patent/CN112070094B/en
Publication of CN112070094A publication Critical patent/CN112070094A/en
Application granted granted Critical
Publication of CN112070094B publication Critical patent/CN112070094B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • 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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)

Abstract

The disclosure relates to a method and a device for screening training data, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring training data; the training data comprises a plurality of images to be recognized; inputting each image to be recognized into an image segmentation model to obtain a prediction segmentation area of each image to be recognized; determining the intersection ratio and the area of the segmentation region of each image to be recognized according to the marked segmentation region and the prediction segmentation region of each image to be recognized; determining the average cross-over ratio of the training data according to the cross-over ratio of each image to be recognized; determining the average segmentation area of the training data according to the segmentation area of each image to be recognized; and respectively inputting the intersection ratio, the segmentation region area, the average intersection ratio and the average segmentation region area of each image to be recognized into a data discrimination model to obtain an evaluation value of each image to be recognized, and determining an error marking image according to the evaluation value. By adopting the method, the identification accuracy of the error marked image is improved.

Description

Method and device for screening training data, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of image recognition technologies, and in particular, to a method and an apparatus for screening training data, an electronic device, and a storage medium.
Background
With the development of image recognition technology, specific regions such as nail regions, hair regions, face regions and the like can be segmented through an image segmentation model; however, in order to train a satisfactory image segmentation model, a large number of labeled images are required; however, there may be false labeled images in the large number of labeled images, which would directly degrade the accuracy of the model trained therewith. Thus, identifying them efficiently may further improve the quality of the model.
In the related art, a method for identifying an image with an error label generally comprises the steps of training a relatively robust image segmentation model under the condition that a large number of label images are correctly labeled, predicting a relatively correct segmentation result on the image with the image segmentation model, so that the image with a relatively low IOU (Intersection over Unit) of the image segmentation model on the image is identified as the image with the error label; however, the image with a lower IOU ratio is more complicated, and the prediction capability of the image segmentation model is insufficient, so that the error marked image may not be a real error marked image, and the accuracy of identifying the error marked image may be low.
Disclosure of Invention
The present disclosure provides a method and an apparatus for screening training data, an electronic device, and a storage medium, so as to at least solve the problem of low recognition accuracy of an error marked image in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a method for screening training data, including:
acquiring training data; the training data comprises a plurality of images to be recognized and mark segmentation areas corresponding to the images to be recognized;
inputting each image to be recognized into a pre-trained image segmentation model respectively to obtain a prediction segmentation region corresponding to each image to be recognized;
determining the intersection ratio and the area of the segmentation region of each image to be recognized according to the marked segmentation region and the prediction segmentation region corresponding to each image to be recognized;
determining the average cross-over ratio of the training data according to the cross-over ratio of each image to be recognized;
determining the average segmentation area of the training data according to the segmentation area of each image to be recognized;
and respectively inputting the intersection ratio, the segmentation region area, the average intersection ratio and the average segmentation region area of each image to be recognized into a pre-constructed data discrimination model to obtain an evaluation value of each image to be recognized, and determining an error marking image according to the evaluation value.
In an exemplary embodiment, the determining, according to the marked segmentation region and the predicted segmentation region corresponding to each of the images to be recognized, an intersection ratio and a segmentation region area of each of the images to be recognized includes:
determining a first weight corresponding to the mark segmentation region of each image to be identified and a second weight corresponding to the prediction segmentation region; the sum of the first weight and the second weight is constantly equal to 1;
and performing weighted summation on the mark segmentation region and the prediction segmentation region of each image to be identified according to the first weight and the second weight respectively to obtain the area of the segmentation region of each image to be identified.
In an exemplary embodiment, the determining an average cross-over ratio of the training data according to the cross-over ratio of each image to be recognized includes:
respectively acquiring a third product of the cross-over ratio of each image to be identified and a third weight corresponding to the cross-over ratio;
and adding the third products corresponding to the images to be recognized to obtain the average cross-over ratio of the training data.
In an exemplary embodiment, the determining an average segmentation area of the training data according to the segmentation area of each image to be recognized includes:
respectively obtaining a fourth product of the area of the segmentation region of each image to be identified and a fourth weight corresponding to the area of the segmentation region;
and adding the fourth products corresponding to the images to be recognized to obtain the average segmentation area of the training data.
In an exemplary embodiment, the evaluation value of each of the images to be recognized is obtained by:
acquiring a difference value between the intersection ratio of each image to be recognized and the average intersection ratio, and a ratio of the area of the segmentation region of each image to be recognized to the average segmentation region;
and determining the evaluation value of each image to be recognized according to the product of the difference value and the ratio.
In an exemplary embodiment, after the merging ratio, the dividing region area, the average merging ratio, and the average dividing region area of each image to be recognized are respectively input into a pre-constructed data discrimination model to obtain an evaluation value of each image to be recognized, and an error marker image is determined according to the evaluation value, the method further includes:
rejecting the error marked images in the training data to obtain residual training data;
training the image segmentation model to be trained according to the residual training data to obtain a trained first image segmentation model;
and updating the pre-trained image segmentation model into the first image segmentation model.
In an exemplary embodiment, after the merging ratio, the dividing region area, the average merging ratio, and the average dividing region area of each image to be recognized are respectively input into a pre-constructed data discrimination model to obtain an evaluation value of each image to be recognized, and an error marker image is determined according to the evaluation value, the method further includes:
re-acquiring the mark segmentation area of the error mark image in the training data to obtain new training data;
training the image segmentation model to be trained according to the new training data to obtain a trained second image segmentation model;
and updating the pre-trained image segmentation model into the second image segmentation model.
According to a second aspect of the embodiments of the present disclosure, there is provided a training data screening apparatus, including:
a training data acquisition unit configured to perform acquisition of training data; the training data comprises a plurality of images to be recognized and mark segmentation areas corresponding to the images to be recognized;
the prediction segmentation region determining unit is configured to input each image to be recognized into a pre-trained image segmentation model respectively to obtain a prediction segmentation region corresponding to each image to be recognized;
a segmentation region area determination unit configured to perform determination of an intersection ratio and a segmentation region area of each image to be recognized according to a marked segmentation region and a predicted segmentation region corresponding to each image to be recognized;
an average intersection ratio determining unit configured to perform determination of an average intersection ratio of the training data according to an intersection ratio of each of the images to be recognized;
an average segmentation region area determination unit configured to perform determination of an average segmentation region area of the training data from segmentation region areas of the respective images to be recognized;
and the error mark image determining unit is configured to input the intersection ratio, the dividing region area, the average intersection ratio and the average dividing region area of each image to be recognized into a pre-constructed data discrimination model respectively, obtain an evaluation value of each image to be recognized, and determine an error mark image according to the evaluation value.
In an exemplary embodiment, the segmentation area determination unit is further configured to perform determining a first weight corresponding to a marker segmentation area of each of the images to be recognized and a second weight corresponding to a prediction segmentation area; the sum of the first weight and the second weight is constantly equal to 1; and performing weighted summation on the mark segmentation region and the prediction segmentation region of each image to be identified according to the first weight and the second weight respectively to obtain the area of the segmentation region of each image to be identified.
In an exemplary embodiment, the average intersection ratio determining unit is further configured to perform a third process of respectively obtaining an intersection ratio of each image to be identified and a third weight corresponding to the intersection ratio; and adding the third products corresponding to the images to be recognized to obtain the average cross-over ratio of the training data.
In an exemplary embodiment, the average segmentation region area determination unit is further configured to perform obtaining a fourth product of the segmentation region area of each image to be identified and a fourth weight corresponding to the segmentation region area; and adding the fourth products corresponding to the images to be recognized to obtain the average segmentation area of the training data.
In an exemplary embodiment, the error mark image determination unit is further configured to perform obtaining a difference between the intersection ratio of each of the images to be identified and the average intersection ratio, and a ratio between the segmented region area of each of the images to be identified and the average segmented region area; and determining the evaluation value of each image to be recognized according to the product of the difference value and the ratio.
In an exemplary embodiment, the apparatus further includes a first model updating unit configured to perform rejecting the error marked image in the training data to obtain remaining training data; training the image segmentation model to be trained according to the residual training data to obtain a trained first image segmentation model; and updating the pre-trained image segmentation model into the first image segmentation model.
In an exemplary embodiment, the apparatus further includes a second model updating unit configured to perform reacquiring a marker segmentation region of the error marker image in the training data, resulting in new training data; training the image segmentation model to be trained according to the new training data to obtain a trained second image segmentation model; and updating the pre-trained image segmentation model into the second image segmentation model.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method of screening of training data as described in any embodiment of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium including: the instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of screening of training data as described in any one of the embodiments of the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product, the program product comprising a computer program, the computer program being stored in a readable storage medium, from which the at least one processor of the apparatus reads and executes the computer program, so that the apparatus performs the method of screening of training data as described in any one of the embodiments of the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
acquiring training data; the training data comprises a plurality of images to be recognized and mark segmentation areas corresponding to the images to be recognized; respectively inputting each image to be recognized into a pre-trained image segmentation model to obtain a prediction segmentation region corresponding to each image to be recognized; then determining the intersection ratio and the area of the segmentation region of each image to be recognized according to the marked segmentation region and the prediction segmentation region corresponding to each image to be recognized; then determining the average cross-over ratio of the training data according to the cross-over ratio of each image to be recognized; finally, determining the average segmentation area of the training data according to the segmentation area of each image to be recognized; respectively inputting the intersection ratio, the segmentation region area, the average intersection ratio and the average segmentation region area of each image to be recognized into a pre-constructed data discrimination model to obtain an evaluation value of each image to be recognized, and determining an error marking image according to the evaluation value; the method and the device achieve the purpose of determining whether the image to be recognized is the error marked image according to the intersection ratio, the segmentation area, the average intersection ratio and the average segmentation area of the image to be recognized, comprehensively consider the intersection ratio, the segmentation area, the average intersection ratio and the average segmentation area of the image to be recognized, are beneficial to improving the recognition accuracy of the error marked image, and avoid the defect of low recognition accuracy of the error marked image caused by only considering the intersection ratio of the image to be recognized.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a diagram illustrating an application environment of a method for screening training data according to an exemplary embodiment.
FIG. 2 is a flow chart illustrating a method of screening of training data in accordance with an exemplary embodiment.
FIG. 3A is a graph illustrating recognition effectiveness of a data discrimination model according to an exemplary embodiment.
FIG. 3B is a graph illustrating IOU-based recognition effects, according to an example embodiment.
FIG. 4 is a flowchart illustrating the steps of updating an image segmentation model according to an exemplary embodiment.
FIG. 5 is a flow chart illustrating another method of screening training data in accordance with an exemplary embodiment.
FIG. 6 is a block diagram illustrating a screening apparatus for training data in accordance with an exemplary embodiment.
Fig. 7 is an internal block diagram of an electronic device shown in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure.
The screening method of the training data provided by the present disclosure can be applied to the application environment shown in fig. 1. Referring to fig. 1, the application environment diagram includes a terminal 110. The terminal 110 is an electronic device with a training data filtering function, and the electronic device may be a smart phone, a tablet computer, a personal computer, or the like. Referring to fig. 1, a terminal 110 acquires training data; the training data comprises a plurality of images to be recognized and mark segmentation areas corresponding to the images to be recognized; inputting each image to be recognized into a pre-trained image segmentation model respectively to obtain a prediction segmentation region corresponding to each image to be recognized; determining the intersection ratio and the area of the segmentation region of each image to be recognized according to the marked segmentation region and the prediction segmentation region corresponding to each image to be recognized; determining the average cross-over ratio of the training data according to the cross-over ratio of each image to be recognized; determining the average segmentation area of the training data according to the segmentation area of each image to be recognized; and respectively inputting the intersection ratio, the segmentation region area, the average intersection ratio and the average segmentation region area of each image to be recognized into a pre-constructed data discrimination model to obtain an evaluation value of each image to be recognized, and determining an error marking image according to the evaluation value.
It should be noted that the screening method of the training data of the present disclosure may also be applied to a server, and may also be applied to a system including a terminal and a server, and is implemented through interaction between the terminal and the server. For convenience of explanation, in the following exemplary embodiments, the present disclosure is mainly explained taking a terminal as an example.
Fig. 2 is a flowchart illustrating a training data screening method according to an exemplary embodiment, where as shown in fig. 2, the training data screening method is used in the terminal shown in fig. 1, and includes the following steps:
in step S210, training data is acquired; the training data comprises a plurality of images to be recognized and mark segmentation areas corresponding to the images to be recognized.
The image to be recognized is a marked image used for training an image segmentation model and is provided with a corresponding marked segmentation region; the marked segmentation region refers to a target region in the image to be recognized, which is marked manually, and the target region refers to a region of interest segmented from the image to be recognized, which may be a hair region, a nail region, a face region, and the like, and is determined specifically according to an actual scene, and is not specifically limited herein.
In step S220, each image to be recognized is input into the pre-trained image segmentation model, so as to obtain a prediction segmentation region corresponding to each image to be recognized.
The prediction segmentation region refers to a target region in the image to be recognized, which is predicted by the image segmentation model; the pre-trained image segmentation model is a deep neural network model, such as a hair segmentation model, a nail segmentation model, etc., capable of segmenting a target region (such as a hair region) from an image.
Specifically, the terminal respectively inputs each image to be recognized into a pre-trained image segmentation model, and the pre-trained image segmentation model is used for respectively carrying out segmentation processing on each image to be recognized to obtain a prediction segmentation area of each image to be recognized; the pre-trained image segmentation model is obtained by training based on the image segmentation model to be trained according to each image to be recognized and the corresponding mark segmentation region, and the image segmentation model to be trained refers to a deep neural network.
Further, the pre-trained image segmentation model can be trained by: the terminal respectively inputs each image to be recognized into the image segmentation model to be trained to obtain a prediction segmentation area of each image to be recognized; according to the difference value between the prediction segmentation region and the mark segmentation region of each image to be recognized, combining a loss function to obtain a loss value of the image segmentation model to be trained; and adjusting network parameters of the image segmentation model to be trained according to the loss value until the loss value is lower than a first preset threshold value, and taking the trained image segmentation model as a pre-trained image segmentation model.
For example, the terminal inputs an image to be recognized into an image segmentation model to be trained, and obtains a prediction segmentation region output by the image segmentation model to be trained; comparing the prediction segmentation region and the mark segmentation region of the image to be recognized to obtain a loss function, and training and optimizing the model parameters of the image segmentation model to be trained; after the image segmentation model to be trained is optimized through a large amount of training data, the IOU of the image segmentation model is measured according to the data of the test data set and serves as a standard for the accuracy of the image segmentation model.
In step S230, the intersection ratio and the area of the segmentation region of each image to be recognized are determined according to the marked segmentation region and the predicted segmentation region corresponding to each image to be recognized.
The merging ratio refers to an IOU (Intersection over Unit), and can be determined by a marked segmentation region and a predicted segmentation region corresponding to an image to be recognized, and is used for measuring the accuracy of segmenting a target region from the image to be recognized; in an actual scene, the intersection ratio specifically refers to a ratio of "an intersection between the marker divided region and the prediction divided region" to "a union between the marker divided region and the prediction divided region".
The area of the segmentation region is the area occupied by a marked segmentation region or a predicted segmentation region corresponding to the image to be identified, and can be determined by the number of pixel points in the marked segmentation region or the predicted segmentation region; of course, the area of the segmentation region may also be determined by combining the area occupied by the marker segmentation region corresponding to the image to be recognized and the area occupied by the prediction segmentation region.
Specifically, the terminal acquires an intersection and a union between a mark segmentation region and a prediction segmentation region corresponding to each image to be recognized, and counts a ratio between the intersection and the union between the mark segmentation region and the prediction segmentation region corresponding to each image to be recognized as an intersection and union ratio of each image to be recognized; and acquiring the area occupied by the marked segmentation region or the prediction segmentation region corresponding to each image to be identified as the segmentation region area of each image to be identified.
In step S240, an average cross-over ratio of the training data is determined according to the cross-over ratio of each image to be recognized.
The average intersection ratio may be an average value of the intersection ratios corresponding to the images to be recognized, or may be a weighted sum of the intersection ratios corresponding to the images to be recognized; in a practical scenario, the average cross-over ratio refers to the average IOU of the training data.
In step S250, an average segmented region area of the training data is determined according to the segmented region area of each image to be recognized.
The average divided area may be an average of the divided areas corresponding to the images to be recognized, or may be a weighted sum of the divided areas corresponding to the images to be recognized.
In step S260, the merging ratio, the divided region area, the average merging ratio, and the average divided region area of each image to be recognized are input into a pre-constructed data discrimination model, so as to obtain an evaluation value of each image to be recognized, and an error marking image is determined according to the evaluation value.
The pre-constructed data discrimination model is a marked bad data discriminator which can output the evaluation value of the image to be recognized according to the input intersection ratio, the segmentation region area, the average intersection ratio and the average segmentation region area of the image to be recognized.
The evaluation value of the image to be recognized is used for measuring whether the image to be recognized is marked wrongly, and generally, the higher the evaluation value is, the higher the possibility that the image to be recognized is marked wrongly is shown; for example, if the evaluation value of the image to be recognized is greater than a preset threshold (e.g., 2.5), it indicates that the image to be recognized is marked incorrectly, i.e., the image to be recognized is a wrong marked image.
The error marking image is an image to be recognized with a wrong mark of the target area, and specifically is an image to be recognized with an evaluation value larger than a preset threshold value.
Specifically, the terminal acquires a pre-constructed data discrimination model, then inputs the intersection ratio, the segmentation region area, the average intersection ratio and the average segmentation region area of each image to be recognized into the pre-constructed data discrimination model, and outputs the error marking degree of each image to be recognized through the pre-constructed data discrimination model; and taking the image to be recognized with the evaluation value larger than a preset threshold value as an error marking image from the images to be recognized. Therefore, the cross-over ratio, the segmentation area, the average cross-over ratio and the average segmentation area of each image to be identified are comprehensively considered, the identification accuracy of the error marked image is favorably improved, and the defect that the identification accuracy of the error marked image is low due to the fact that only the cross-over ratio of the images to be identified is considered is avoided.
For example, the terminal compares the evaluation value of each image to be recognized with a preset threshold (such as 2.5) to obtain a comparison result; and screening the images to be recognized with evaluation values larger than a preset threshold value from the images to be recognized according to the comparison result to serve as error marking images. It should be noted that the preset threshold may be adjusted according to actual situations, and is not specifically limited herein. Therefore, the purpose of determining whether the image to be recognized is the error marked image or not according to the evaluation value of the image to be recognized is achieved, manual recheck is not needed, a large amount of labor cost is saved, the recognition efficiency of the error marked image is improved, and the error marked image can be removed conveniently.
Furthermore, the terminal can also send the determined error marked image to the corresponding auditing terminal, and the received error marked image is displayed through a terminal interface of the auditing terminal, so that a user can know which images are the error marked images in time.
In addition, the terminal can also eliminate error marked images in the training data to obtain the rest training data, and train the image segmentation model to be trained again according to the rest training data; therefore, the method is beneficial to improving the model precision of the image segmentation model obtained by training.
In the method for screening the training data, the training data is obtained; the training data comprises a plurality of images to be recognized and mark segmentation areas corresponding to the images to be recognized; respectively inputting each image to be recognized into a pre-trained image segmentation model to obtain a prediction segmentation region corresponding to each image to be recognized; then determining the intersection ratio and the area of the segmentation region of each image to be recognized according to the marked segmentation region and the prediction segmentation region corresponding to each image to be recognized; then determining the average cross-over ratio of the training data according to the cross-over ratio of each image to be recognized; finally, determining the average segmentation area of the training data according to the segmentation area of each image to be recognized; respectively inputting the intersection ratio, the segmentation region area, the average intersection ratio and the average segmentation region area of each image to be recognized into a pre-constructed data discrimination model to obtain an evaluation value of each image to be recognized, and determining an error marking image according to the evaluation value; the method and the device achieve the purpose of determining whether the image to be recognized is the error marked image according to the intersection ratio, the segmentation area, the average intersection ratio and the average segmentation area of the image to be recognized, comprehensively consider the intersection ratio, the segmentation area, the average intersection ratio and the average segmentation area of the image to be recognized, are beneficial to improving the recognition accuracy of the error marked image, and avoid the defect of low recognition accuracy of the error marked image caused by only considering the intersection ratio of the image to be recognized.
In an exemplary embodiment, in step S230, determining the intersection ratio and the area of the segmentation region of each image to be recognized according to the marked segmentation region and the predicted segmentation region corresponding to each image to be recognized includes: determining a first weight corresponding to a mark segmentation region of each image to be identified and a second weight corresponding to a prediction segmentation region; the sum of the first weight and the second weight is constantly equal to 1; and carrying out weighted summation on the mark segmentation region and the prediction segmentation region of each image to be identified according to the first weight and the second weight respectively to obtain the segmentation region area of each image to be identified.
Specifically, the terminal determines a first weight corresponding to a mark segmentation region and a second weight corresponding to a prediction segmentation region of each image to be identified; respectively obtaining a first product of the area occupied by the mark segmentation region of each image to be identified and a first weight corresponding to the mark segmentation region, and a second product of the area occupied by the prediction segmentation region of each image to be identified and a second weight corresponding to the prediction segmentation region; and respectively adding the first product and the second product corresponding to each image to be identified to obtain the area of the image marking area of each image to be identified.
For example, the terminal calculates a single image to be recognized first
Figure 692256DEST_PATH_IMAGE001
Cross-over ratio of (a):
Figure 249140DEST_PATH_IMAGE002
wherein,
Figure 250594DEST_PATH_IMAGE003
is referred to as
Figure 183915DEST_PATH_IMAGE004
The image to be identified is displayed on a screen,
Figure 321635DEST_PATH_IMAGE005
refers to an image to be recognized
Figure 314999DEST_PATH_IMAGE001
The cross-over-cross-over ratio of (c),
Figure 803749DEST_PATH_IMAGE006
refers to an image to be recognized
Figure 275182DEST_PATH_IMAGE007
Is marked with a division areaA domain;
Figure 267408DEST_PATH_IMAGE008
refers to an image to be recognized
Figure 431673DEST_PATH_IMAGE003
By a pre-trained image segmentation model
Figure 142140DEST_PATH_IMAGE009
Obtaining:
Figure 417264DEST_PATH_IMAGE010
with reference to the above method, the cross-over ratio of each image to be recognized can be obtained.
Then, the server calculates a single image to be identified
Figure 795156DEST_PATH_IMAGE003
Area of divided region (2):
Figure 864743DEST_PATH_IMAGE011
wherein,
Figure 328085DEST_PATH_IMAGE012
representing an image to be recognized
Figure 141320DEST_PATH_IMAGE003
The area of the divided region(s) of (c),
Figure 373719DEST_PATH_IMAGE013
representing traversal of the image to be recognized
Figure 348628DEST_PATH_IMAGE001
Each of the plurality of pixel points in (2),
Figure 299266DEST_PATH_IMAGE014
a first weight is represented that is a function of,
Figure 916193DEST_PATH_IMAGE015
representing a second weight; when in use
Figure 3097DEST_PATH_IMAGE016
Representing the image to be recognized
Figure 680066DEST_PATH_IMAGE001
Area of the divided region of
Figure 852422DEST_PATH_IMAGE012
Equaling the image to be recognized
Figure 7459DEST_PATH_IMAGE007
Is marked with a dividing region
Figure 948871DEST_PATH_IMAGE006
Occupied area; when in use
Figure 531162DEST_PATH_IMAGE017
Representing the image to be recognized
Figure 193743DEST_PATH_IMAGE003
Area of the divided region of
Figure 152472DEST_PATH_IMAGE012
Equaling the image to be recognized
Figure 213968DEST_PATH_IMAGE001
Is predicted to divide the region
Figure 232740DEST_PATH_IMAGE018
Occupied area; when in use
Figure 379688DEST_PATH_IMAGE019
Representing the image to be recognized
Figure 876528DEST_PATH_IMAGE003
Area of the divided region of
Figure 526952DEST_PATH_IMAGE012
Equaling the image to be recognized
Figure 716625DEST_PATH_IMAGE001
Is marked with a dividing region
Figure 350869DEST_PATH_IMAGE006
Occupied area and prediction partition area
Figure 651400DEST_PATH_IMAGE020
Average of the occupied area; of course
Figure 421910DEST_PATH_IMAGE014
The value of (c) can also be adjusted according to the actual situation.
According to the technical scheme provided by the embodiment of the disclosure, the area of the segmentation region of the image to be recognized is determined through the weighted sum of the marked segmentation region and the predicted segmentation region of the image to be recognized, the marked segmentation region and the predicted segmentation region of the image to be recognized are comprehensively considered, and the determination accuracy of the area of the segmentation region of the image to be recognized is favorably improved.
In an exemplary embodiment, in step S240, determining an average cross-over ratio of the training data according to the cross-over ratio of each image to be recognized includes: respectively acquiring a third product of the cross-over ratio of each image to be identified and a third weight corresponding to the cross-over ratio; and adding the third products corresponding to the images to be recognized to obtain the average cross-over ratio of the training data.
For example, the terminal counts the average cross-over ratio of the training data by the following calculation formula:
Figure 782484DEST_PATH_IMAGE021
wherein,
Figure 904024DEST_PATH_IMAGE022
refers to the average cross-over ratio of the training data,
Figure 742667DEST_PATH_IMAGE023
is referred to as
Figure 367683DEST_PATH_IMAGE004
Image to be recognized
Figure 899159DEST_PATH_IMAGE001
Cross-over ratio of
Figure 242415DEST_PATH_IMAGE005
A corresponding third weight; if for all images to be identified (in total)
Figure 150329DEST_PATH_IMAGE024
A sheet of paper),
Figure 895431DEST_PATH_IMAGE023
are all the same, then
Figure 332228DEST_PATH_IMAGE023
Is equal to
Figure 162781DEST_PATH_IMAGE025
According to the technical scheme provided by the embodiment of the disclosure, the average intersection ratio of the training data is obtained, so that the intersection ratio, the segmentation region area, the average intersection ratio and the average segmentation region area of each image to be recognized are respectively input into a pre-constructed data discrimination model to obtain the evaluation value of each image to be recognized, and then the error marked image can be directly determined according to the evaluation value without manual rechecking, so that the recognition efficiency of the error marked image is improved.
In an exemplary embodiment, in step S250, determining an average segmentation area of the training data according to the segmentation area of each image to be recognized includes: respectively obtaining a fourth product of the area of the segmentation region of each image to be identified and a fourth weight corresponding to the area of the segmentation region; and adding the fourth products corresponding to the images to be recognized to obtain the average segmentation area of the training data.
For example, the terminal counts the average segmentation area of the training data according to the following calculation formula:
Figure 343227DEST_PATH_IMAGE026
wherein,
Figure 208414DEST_PATH_IMAGE027
refers to the average segmented region area of the training data,
Figure 81693DEST_PATH_IMAGE028
is referred to as
Figure 399541DEST_PATH_IMAGE004
Image to be recognized
Figure 383678DEST_PATH_IMAGE001
Area of the divided region of
Figure 103372DEST_PATH_IMAGE012
A corresponding fourth weight; if for all images to be identified (in total)
Figure 147552DEST_PATH_IMAGE024
A sheet of paper),
Figure 952697DEST_PATH_IMAGE029
are all the same, then
Figure 472015DEST_PATH_IMAGE028
Is equal to
Figure 46216DEST_PATH_IMAGE025
According to the technical scheme provided by the embodiment of the disclosure, the average segmentation area of the training data is acquired, so that the intersection ratio, the segmentation area, the average intersection ratio and the average segmentation area of each image to be recognized are respectively input into the pre-constructed data discrimination model to obtain the evaluation value of each image to be recognized, and then the error marked image can be directly determined according to the evaluation value, so that the defect that the recognition accuracy of the error marked image is low due to the fact that only the intersection ratio of the images to be recognized is considered is avoided.
In an exemplary embodiment, in step S260, the evaluation value of each image to be recognized is obtained by: acquiring a difference value between the intersection ratio and the average intersection ratio of each image to be recognized and a ratio value between the area of the segmentation region of each image to be recognized and the average area of the segmentation region; and determining the evaluation value of each image to be recognized according to the product of the difference value and the ratio.
Specifically, the terminal determines the evaluation value of each image to be recognized through the following calculation formula;
Figure 261297DEST_PATH_IMAGE030
wherein,
Figure 288158DEST_PATH_IMAGE031
refers to an image to be recognized
Figure 879677DEST_PATH_IMAGE003
The evaluation value of (a) of (b),
Figure 308384DEST_PATH_IMAGE005
refers to an image to be recognized
Figure 694366DEST_PATH_IMAGE001
The cross-over-cross-over ratio of (c),
Figure 208524DEST_PATH_IMAGE032
it is meant the average cross-over ratio,
Figure 338154DEST_PATH_IMAGE012
representing an image to be recognized
Figure 621368DEST_PATH_IMAGE003
The area of the divided region(s) of (c),
Figure 443830DEST_PATH_IMAGE027
refers to the average divided region area.
Further, the terminal may also construct a corresponding data discrimination model according to a product of "a difference between the intersection ratio and the average intersection ratio of the image to be recognized" and "a ratio between the area of the segmented region of the image to be recognized and the average segmented region", for example
Figure 445284DEST_PATH_IMAGE033
As a pre-constructed data discrimination model; then respectively inputting the intersection ratio, the area of the segmentation region, the average intersection ratio and the average segmentation region area of each image to be identified into a pre-constructed data discrimination model
Figure 113026DEST_PATH_IMAGE034
And obtaining the evaluation value of each image to be recognized.
It should be noted that, the mathematical form of the above formula can be changed according to the actual situation; or after the data is reviewed manually again, the bad label is used as input to train a discriminant mathematical form based on machine learning. It should be noted that the above formula integrates the general accuracy of the model and the accuracy of the model on the image to be recognized, and is in direct proportion to the target segmentation area; that is, when the IOU of an image segmentation model is much lower than the model on the dataset, there are two possibilities: the image to be recognized is inherently challenging; the labeling of the image to be recognized has problems. We find that most of the first type of challenging images to be recognized have small proportion of segmentation objects in the images and are inconsistent with the distribution of a data set, so that the image segmentation model is difficult to judge accurately. In this case, the target segmentation area is small, so the first case is avoided by the segmentation area ratio in the formula, and the image to be identified with the real annotation problem is screened out, so the formula effectively integrates different challenges of segmentation tasks to better depict the annotation quality.
Further, comparing and testing a pre-constructed data discrimination model by artificially adding error labels; we tried a more significant error-rotating 1% of the data markers by 30-60 degrees as training and test set data; then, comparing precision and recall (the proportion of errors in error markers identified by the precision corresponding to the low IOU and the proportion found in error markers corresponding to the recall) of the pre-constructed data discrimination model, as shown in fig. 3A and 3B specifically; by comparison, when the bad value is greater than 2.5, F1 approaches the peak value, and the optimal balance between precision and recall is achieved. The false detection rate in samples found by low IOU is relatively high-this wastes useful (and difficult to learn) data and increases the workload of manual review. Moreover, in experiments, the threshold of 2.5 is found to be stable, and the basic criterion of the IOU is related to the data quality and the labeling difficulty; it should be noted that F1 refers to F1 score, which is an index used in statistics to measure the accuracy of the two-class model, and F1=2 × [ (precision × detail)/(precision + detail) ].
In addition, after error data are cleaned through the current data discrimination model, the defect that the image segmentation model is over-fitted on the error data can be avoided. For model accuracy, the test results after automatically cleaning out the error data are as follows: results of training on data with error markers: 83.76%, results of training on data without false marks: 84.04 percent; therefore, the wrong data labeling can affect the model training to a certain extent, the data labeling needs to be eliminated in the data acquisition and model training processes, and the data discrimination model can automatically complete the task.
According to the technical scheme provided by the embodiment of the disclosure, the intersection ratio, the dividing region area, the average intersection ratio and the average dividing region area of each image to be recognized are comprehensively considered, so that the evaluation value of each image to be recognized is favorably obtained, the error marked image can be directly determined according to the evaluation value without manual examination, the recognition process of the error marked image is simplified, a large amount of labor cost is saved, and the recognition efficiency of the error marked image is further improved.
In an exemplary embodiment, as shown in fig. 4, in step S260, after the merging ratio, the divided region area, the average merging ratio, and the average divided region area of each image to be recognized are respectively input into a pre-constructed data discrimination model, an evaluation value of each image to be recognized is obtained, and an error marking image is determined according to the evaluation value, the method further includes the following steps:
in step S410, the error marked images in the training data are removed to obtain the remaining training data.
In step S420, the image segmentation model to be trained is trained according to the remaining training data, so as to obtain a trained first image segmentation model.
In step S430, the pre-trained image segmentation model is updated to the first image segmentation model.
For example, after determining the error marked image according to the evaluation value, the terminal may further filter the error marked image from each image to be recognized to obtain a remaining image; inputting the residual images into an image segmentation model to be trained to obtain prediction segmentation areas of the residual images; obtaining a loss value of the image segmentation model to be trained according to a difference value between the prediction segmentation region and the mark segmentation region of the residual image and by combining a loss function, adjusting model parameters of the image segmentation model to be trained according to the loss value, and taking the image segmentation model with the adjusted model parameters as a trained first image segmentation model when the loss value is lower than a second preset threshold; and updating the pre-trained image segmentation model into a first image segmentation model.
Further, after obtaining the first image segmentation model, the terminal may further input the image to be recognized into the first image segmentation model in response to a recognition request for the image to be recognized, obtaining a predicted segmentation region of the image to be recognized.
According to the technical scheme provided by the embodiment of the disclosure, the residual training data is obtained by eliminating the error marked images in the training data, so that the data quality of the training data is improved; meanwhile, the image segmentation model to be trained is trained according to the rest training data, so that the model precision of the image segmentation model is improved, and the prediction segmentation region output by the image segmentation model is more accurate.
In an exemplary embodiment, in step S260, after inputting the union ratio, the divided region area, the average union ratio, and the average divided region area of each image to be recognized into the pre-constructed data discrimination model, obtaining the evaluation value of each image to be recognized, and determining the error flag image according to the evaluation value, the method further includes: re-acquiring the mark segmentation area of the error mark image in the training data to obtain new training data; training the image segmentation model to be trained according to the new training data to obtain a trained second image segmentation model; and updating the pre-trained image segmentation model into a second image segmentation model.
For example, after determining the error marked image according to the evaluation value, the terminal may further display the error marked image through a terminal interface, and the auditor re-marks the error marked image on the terminal interface to determine a real target area of the error marked image; the terminal responds to the marking operation of the auditor on the terminal interface to obtain target area information which is marked again on the error marked image and is used as a marked segmentation area of the error marked image; replacing the mark segmentation area of the error mark image in the training data according to the re-determined mark segmentation area of the error mark image to obtain new training data; inputting each image to be recognized in the new training data into an image segmentation model to be trained to obtain a prediction segmentation region of each image to be recognized; obtaining a loss value of the image segmentation model to be trained according to a difference value between the prediction segmentation region and the mark segmentation region of each image to be recognized and a loss function, adjusting model parameters of the image segmentation model to be trained according to the loss value, and taking the image segmentation model with the adjusted model parameters as a second image segmentation model after training when the loss value is lower than a third preset threshold value; and updating the pre-trained image segmentation model into a second image segmentation model.
Further, after obtaining the updated second image segmentation model, the terminal may further input the image to be recognized into the second image segmentation model in response to a recognition request for the image to be recognized, obtaining a predicted segmentation region of the image to be recognized. According to the technical scheme provided by the embodiment of the disclosure, the marking segmentation area of the error marking image is obtained again, so that the data quality of the training data is improved; meanwhile, the image segmentation model to be trained is trained according to the new training data, and the improvement of the model precision of the image segmentation model is facilitated, so that the prediction segmentation region output by the image segmentation model is more accurate, and the accuracy of image segmentation is improved.
Fig. 5 is a flowchart illustrating another training data screening method according to an exemplary embodiment, where as shown in fig. 5, the training data screening method is used in the terminal shown in fig. 1, and includes the following steps:
in step S510, training data is acquired; the training data comprises a plurality of images to be recognized and mark segmentation areas corresponding to the images to be recognized.
In step S520, each image to be recognized is input into the pre-trained image segmentation model, so as to obtain a prediction segmentation region corresponding to each image to be recognized.
In step S530, an intersection and a union between the marker segmentation region and the prediction segmentation region corresponding to each image to be recognized are obtained, and a ratio between the intersection and the union between the marker segmentation region and the prediction segmentation region corresponding to each image to be recognized is counted as an intersection and a union ratio of each image to be recognized.
In step S540, a first weight corresponding to the marked segmentation region and a second weight corresponding to the predicted segmentation region of each image to be recognized are determined; the sum of the first weight and the second weight is constantly equal to 1; and carrying out weighted summation on the mark segmentation region and the prediction segmentation region of each image to be identified according to the first weight and the second weight respectively to obtain the segmentation region area of each image to be identified.
In step S550, a third product of the cross-over ratio of each image to be recognized and a third weight corresponding to the cross-over ratio is obtained; and adding the third products corresponding to the images to be recognized to obtain the average cross-over ratio of the training data.
In step S560, a fourth product of the area of the segmentation region of each image to be recognized and a fourth weight corresponding to the area of the segmentation region is obtained; and adding the fourth products corresponding to the images to be recognized to obtain the average segmentation area of the training data.
In step S570, obtaining a difference between the intersection ratio and the average intersection ratio of each image to be recognized, and a ratio between the area of the segmentation region of each image to be recognized and the average area of the segmentation region; and determining the evaluation value of each image to be recognized according to the product of the difference value and the ratio.
In step S580, from among the respective images to be recognized, an image to be recognized having an evaluation value larger than a preset threshold value is taken as an error marker image.
In step S590, the error marked images in the training data are removed to obtain the remaining training data; training the image segmentation model to be trained according to the rest training data to obtain a trained first image segmentation model; and updating the pre-trained image segmentation model into a first image segmentation model.
According to the screening method of the training data, the cross-over ratio, the segmentation area, the average cross-over ratio and the average segmentation area of the image to be recognized are comprehensively considered, so that the recognition accuracy of the error marked image is improved, and the defect that the recognition accuracy of the error marked image is low due to the fact that only the cross-over ratio of the image to be recognized is considered is avoided; the purpose of determining whether the image to be identified is the error marked image or not according to the intersection ratio, the segmentation region area, the average intersection ratio and the average segmentation region area of the image to be identified is achieved, manual rechecking is not needed, and therefore the identification efficiency of the error marked image is improved; meanwhile, the image segmentation model to be trained is retrained according to the residual training data with the error marked images removed, so that the image segmentation accuracy of the image segmentation model is improved.
It should be understood that although the steps in the flowcharts of fig. 2, 4 and 5 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2, 4, and 5 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least some of the other steps or stages.
FIG. 6 is a block diagram illustrating a screening apparatus for training data in accordance with an exemplary embodiment. Referring to fig. 6, the apparatus includes a training data acquisition unit 610, a predicted divided region determination unit 620, a divided region area determination unit 630, an average intersection ratio determination unit 640, an average divided region area determination unit 650, and an error marker image determination unit 660.
A training data acquisition unit 610 configured to perform acquisition of training data; the training data comprises a plurality of images to be recognized and mark segmentation areas corresponding to the images to be recognized.
And a prediction segmentation region determination unit 620 configured to perform input of each image to be recognized into a pre-trained image segmentation model, so as to obtain a prediction segmentation region corresponding to each image to be recognized.
And a segmentation region area determination unit 630 configured to perform determining an intersection ratio and a segmentation region area of each image to be recognized according to the marked segmentation region and the predicted segmentation region corresponding to each image to be recognized.
And an average cross-over ratio determining unit 640 configured to determine an average cross-over ratio of the training data according to the cross-over ratios of the images to be recognized.
An average segmentation area determination unit 650 configured to perform determining an average segmentation area of the training data from the segmentation area of each image to be recognized.
An error marker image determination unit 660 configured to perform input of the union ratio, the divided region area, the average union ratio, and the average divided region area of each image to be recognized into a data discrimination model constructed in advance, respectively, obtain an evaluation value of each image to be recognized, and determine an error marker image according to the evaluation value.
In an exemplary embodiment, the segmentation area determination unit 630 is further configured to perform determining a first weight corresponding to the marked segmentation area and a second weight corresponding to the predicted segmentation area of each image to be identified; the sum of the first weight and the second weight is constantly equal to 1; and carrying out weighted summation on the mark segmentation region and the prediction segmentation region of each image to be identified according to the first weight and the second weight respectively to obtain the segmentation region area of each image to be identified.
In an exemplary embodiment, the average cross-over ratio determining unit 640 is further configured to perform a third process of respectively obtaining a third product of the cross-over ratio of each image to be recognized and a third weight corresponding to the cross-over ratio; and adding the third products corresponding to the images to be recognized to obtain the average cross-over ratio of the training data.
In an exemplary embodiment, the average segmentation area determination unit 650 is further configured to perform obtaining a fourth product of the segmentation area of each image to be identified and a fourth weight corresponding to the segmentation area; and adding the fourth products corresponding to the images to be recognized to obtain the average segmentation area of the training data.
In an exemplary embodiment, the error marker image determining unit 660 is further configured to perform obtaining a difference between the intersection ratio and the average intersection ratio of each image to be identified, and a ratio between the segmented region area and the average segmented region area of each image to be identified; and determining the evaluation value of each image to be recognized according to the product of the difference value and the ratio.
In an exemplary embodiment, the screening apparatus for training data provided by the present disclosure further includes a first model updating unit, configured to perform rejecting error marked images in the training data to obtain remaining training data; training the image segmentation model to be trained according to the rest training data to obtain a trained first image segmentation model; and updating the pre-trained image segmentation model into a first image segmentation model.
In an exemplary embodiment, the screening apparatus for training data provided by the present disclosure further includes a second model updating unit, configured to perform reacquiring of the labeled segmentation region of the error labeled image in the training data, resulting in new training data; training the image segmentation model to be trained according to the new training data to obtain a trained second image segmentation model; and updating the pre-trained image segmentation model into a second image segmentation model.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 7 is a block diagram illustrating an electronic device 700 for performing the above-described training data filtering method according to an example embodiment. For example, the electronic device 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a gaming console, a tablet device, a medical device, an exercise device, a personal digital assistant, and so forth.
Referring to fig. 7, electronic device 700 may include one or more of the following components: processing component 702, memory 704, power component 706, multimedia component 708, audio component 710, input/output (I/O) interface 712, sensor component 714, and communication component 716.
The processing component 702 generally controls overall operation of the electronic device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 702 may include one or more processors 720 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 702 may include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operations at the electronic device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 704 may be implemented by any type or combination of volatile or non-volatile storage devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 706 provides power to the various components of the electronic device 700. The power components 706 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 700.
The multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 700 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 710 is configured to output and/or input audio signals. For example, the audio component 710 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 704 or transmitted via the communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the electronic device 700. For example, the sensor assembly 714 may detect an open/closed state of the electronic device 700, the relative positioning of components, such as a display and keypad of the electronic device 700, the sensor assembly 714 may also detect a change in the position of the electronic device 700 or a component of the electronic device 700, the presence or absence of user contact with the electronic device 700, orientation or acceleration/deceleration of the electronic device 700, and a change in the temperature of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate wired or wireless communication between the electronic device 700 and other devices. The electronic device 700 may access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G, or 5G), or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 704 comprising instructions, executable by the processor 720 of the electronic device 700 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, the present disclosure also provides a computer program product, which includes a computer program, the computer program being stored in a readable storage medium, from which at least one processor of an electronic device reads and executes the computer program, so that the electronic device performs the method for screening of training data described in any one of the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (16)

1. A method for screening training data, comprising:
acquiring training data; the training data comprises a plurality of images to be recognized and mark segmentation areas corresponding to the images to be recognized;
inputting each image to be recognized into a pre-trained image segmentation model respectively to obtain a prediction segmentation region corresponding to each image to be recognized;
determining the intersection ratio and the area of the segmentation region of each image to be recognized according to the marked segmentation region and the prediction segmentation region corresponding to each image to be recognized;
determining the average cross-over ratio of the training data according to the cross-over ratio of each image to be recognized;
determining the average segmentation area of the training data according to the segmentation area of each image to be recognized;
and respectively inputting the intersection ratio, the segmentation region area, the average intersection ratio and the average segmentation region area of each image to be recognized into a pre-constructed data discrimination model to obtain an evaluation value of each image to be recognized, and determining an error marking image according to the evaluation value.
2. The method for screening training data according to claim 1, wherein the determining the intersection ratio and the area of the segmentation region of each image to be recognized according to the labeled segmentation region and the predicted segmentation region corresponding to each image to be recognized comprises:
determining a first weight corresponding to the mark segmentation region of each image to be identified and a second weight corresponding to the prediction segmentation region; the sum of the first weight and the second weight is constantly equal to 1;
and performing weighted summation on the mark segmentation region and the prediction segmentation region of each image to be identified according to the first weight and the second weight respectively to obtain the area of the segmentation region of each image to be identified.
3. The method for screening training data according to claim 1, wherein the determining an average cross-over ratio of the training data according to the cross-over ratio of each image to be recognized comprises:
respectively acquiring a third product of the cross-over ratio of each image to be identified and a third weight corresponding to the cross-over ratio;
and adding the third products corresponding to the images to be recognized to obtain the average cross-over ratio of the training data.
4. The method for screening training data according to claim 1, wherein the determining an average segmentation area of the training data according to the segmentation area of each image to be recognized comprises:
respectively obtaining a fourth product of the area of the segmentation region of each image to be identified and a fourth weight corresponding to the area of the segmentation region;
and adding the fourth products corresponding to the images to be recognized to obtain the average segmentation area of the training data.
5. The method for screening training data according to claim 1, wherein the evaluation value of each of the images to be recognized is obtained by:
acquiring a difference value between the intersection ratio of each image to be recognized and the average intersection ratio, and a ratio of the area of the segmentation region of each image to be recognized to the average segmentation region;
and determining the evaluation value of each image to be recognized according to the product of the difference value and the ratio.
6. The method for screening training data according to any one of claims 1 to 5, wherein after the intersection ratio, the segmented region area, the average intersection ratio, and the average segmented region area of each of the images to be recognized are input to a pre-constructed data discrimination model to obtain an evaluation value of each of the images to be recognized, and an error labeling image is determined according to the evaluation value, the method further comprises:
rejecting the error marked images in the training data to obtain residual training data;
training the image segmentation model to be trained according to the residual training data to obtain a trained first image segmentation model; and updating the pre-trained image segmentation model into the first image segmentation model.
7. The method for screening training data according to any one of claims 1 to 5, wherein after the intersection ratio, the segmented region area, the average intersection ratio, and the average segmented region area of each of the images to be recognized are input to a pre-constructed data discrimination model to obtain an evaluation value of each of the images to be recognized, and an error labeling image is determined according to the evaluation value, the method further comprises:
re-acquiring the mark segmentation area of the error mark image in the training data to obtain new training data;
training the image segmentation model to be trained according to the new training data to obtain a trained second image segmentation model;
and updating the pre-trained image segmentation model into the second image segmentation model.
8. An apparatus for screening training data, comprising:
a training data acquisition unit configured to perform acquisition of training data; the training data comprises a plurality of images to be recognized and mark segmentation areas corresponding to the images to be recognized;
the prediction segmentation region determining unit is configured to input each image to be recognized into a pre-trained image segmentation model respectively to obtain a prediction segmentation region corresponding to each image to be recognized;
a segmentation region area determination unit configured to perform determination of an intersection ratio and a segmentation region area of each image to be recognized according to a marked segmentation region and a predicted segmentation region corresponding to each image to be recognized;
an average intersection ratio determining unit configured to perform determination of an average intersection ratio of the training data according to an intersection ratio of each of the images to be recognized;
an average segmentation region area determination unit configured to perform determination of an average segmentation region area of the training data from segmentation region areas of the respective images to be recognized;
and the error mark image determining unit is configured to input the intersection ratio, the dividing region area, the average intersection ratio and the average dividing region area of each image to be recognized into a pre-constructed data discrimination model respectively, obtain an evaluation value of each image to be recognized, and determine an error mark image according to the evaluation value.
9. The screening apparatus of training data according to claim 8, wherein the segmentation area determination unit is further configured to perform determining a first weight corresponding to a labeled segmentation area of each of the images to be recognized and a second weight corresponding to a predicted segmentation area; the sum of the first weight and the second weight is constantly equal to 1; and performing weighted summation on the mark segmentation region and the prediction segmentation region of each image to be identified according to the first weight and the second weight respectively to obtain the area of the segmentation region of each image to be identified.
10. The screening apparatus of training data according to claim 8, wherein the average cross-over ratio determining unit is further configured to perform a third product of a cross-over ratio of each of the images to be recognized and a third weight corresponding to the cross-over ratio; and adding the third products corresponding to the images to be recognized to obtain the average cross-over ratio of the training data.
11. The screening apparatus of training data according to claim 8, wherein the average segmented region area determining unit is further configured to perform obtaining a fourth product of the segmented region area of each of the images to be recognized and a fourth weight corresponding to the segmented region area, respectively; and adding the fourth products corresponding to the images to be recognized to obtain the average segmentation area of the training data.
12. The training data screening apparatus according to claim 8, wherein the error labeling image determination unit is further configured to perform obtaining a difference between the intersection ratio of each of the images to be recognized and the average intersection ratio, and a ratio between a segmented region area of each of the images to be recognized and the average segmented region area; and determining the evaluation value of each image to be recognized according to the product of the difference value and the ratio.
13. The apparatus for screening training data according to any one of claims 8 to 12, wherein the apparatus further comprises a first model updating unit configured to perform rejecting the error labeled image in the training data to obtain remaining training data; training the image segmentation model to be trained according to the residual training data to obtain a trained first image segmentation model; and updating the pre-trained image segmentation model into the first image segmentation model.
14. The apparatus for screening training data according to any one of claims 8 to 12, wherein the apparatus further comprises a second model updating unit configured to perform re-acquiring the labeled segmentation region of the error labeled image in the training data, resulting in new training data; training the image segmentation model to be trained according to the new training data to obtain a trained second image segmentation model; and updating the pre-trained image segmentation model into the second image segmentation model.
15. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of screening of training data according to any one of claims 1 to 7.
16. A storage medium in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform a method of screening of training data as claimed in any one of claims 1 to 7.
CN202011253325.2A 2020-11-11 2020-11-11 Method and device for screening training data, electronic equipment and storage medium Active CN112070094B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011253325.2A CN112070094B (en) 2020-11-11 2020-11-11 Method and device for screening training data, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011253325.2A CN112070094B (en) 2020-11-11 2020-11-11 Method and device for screening training data, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112070094A true CN112070094A (en) 2020-12-11
CN112070094B CN112070094B (en) 2021-04-27

Family

ID=73655027

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011253325.2A Active CN112070094B (en) 2020-11-11 2020-11-11 Method and device for screening training data, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112070094B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732187A (en) * 2021-01-06 2021-04-30 章伟 Big data storage processing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108345887A (en) * 2018-01-29 2018-07-31 清华大学深圳研究生院 The training method and image, semantic dividing method of image, semantic parted pattern
US20180225828A1 (en) * 2016-05-09 2018-08-09 Tencent Technology (Shenzhen) Company Limited Image processing method and processing system
CN111260619A (en) * 2020-01-14 2020-06-09 浙江中医药大学 Tongue body automatic segmentation method based on U-net model

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180225828A1 (en) * 2016-05-09 2018-08-09 Tencent Technology (Shenzhen) Company Limited Image processing method and processing system
CN108345887A (en) * 2018-01-29 2018-07-31 清华大学深圳研究生院 The training method and image, semantic dividing method of image, semantic parted pattern
CN111260619A (en) * 2020-01-14 2020-06-09 浙江中医药大学 Tongue body automatic segmentation method based on U-net model

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SXLSTUDY: "语义分割常见评价指标", 《HTTP://WWW.SXLWORK.TOP/2020/06/21/2020-6-21-语义分割常见评价指标 *
梁新宇等: "基于深度学习的图像语义分割技术研究进展", 《计算机工程与应用》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732187A (en) * 2021-01-06 2021-04-30 章伟 Big data storage processing method and device

Also Published As

Publication number Publication date
CN112070094B (en) 2021-04-27

Similar Documents

Publication Publication Date Title
CN106651955B (en) Method and device for positioning target object in picture
CN110782468B (en) Training method and device of image segmentation model and image segmentation method and device
RU2577188C1 (en) Method, apparatus and device for image segmentation
CN111539443B (en) Image recognition model training method and device and storage medium
US20210374447A1 (en) Method and device for processing image, electronic equipment, and storage medium
CN105138962A (en) Image display method and image display device
CN109670077B (en) Video recommendation method and device and computer-readable storage medium
CN110717399A (en) Face recognition method and electronic terminal equipment
US20210295827A1 (en) Method and device for evaluating quality of content, electronic equipment, and storage medium
CN105357425A (en) Image shooting method and image shooting device
CN106384348B (en) The method for detecting abnormality and device of monitoring image
CN105574857A (en) Image analysis method and device
CN115100472A (en) Training method and device for display object recognition model and electronic equipment
CN106203306A (en) The Forecasting Methodology at age, device and terminal
CN112115894A (en) Training method and device for hand key point detection model and electronic equipment
CN112464083A (en) Model training method, work pushing method, device, electronic equipment and storage medium
CN114760339A (en) Fault prediction method, apparatus, device, medium, and product
CN112070094B (en) Method and device for screening training data, electronic equipment and storage medium
CN111881740A (en) Face recognition method, face recognition device, electronic equipment and medium
CN111614990A (en) Method and device for acquiring loading duration and electronic equipment
CN107845094A (en) Pictograph detection method, device and computer-readable recording medium
CN111062401A (en) Stacked object identification method and device, electronic device and storage medium
CN111046927A (en) Method and device for processing labeled data, electronic equipment and storage medium
CN113779257A (en) Method, device, equipment, medium and product for analyzing text classification model
CN111428806B (en) Image tag determining 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