One kind is based on the interactive facial image attribute labeling methods of MFCTechnical field
The present invention relates to technical field of face recognition, more particularly to based on MFC (Microsoft FoundationClasses, Microsoft Foundation class libraries) interactive facial image attribute labeling method.
Background technology
Face character identification include sex, age, whether wear glasses, whether fuzzy etc. more and more to apply to face moreTask recognition, and the mark of these attributes is all marked from manpower manual, the development of face technology is increasingly mature, face characterResource is magnanimity with the demand for describing text, and current face character mark is substantially manually marked, complex operation, speedDegree is slow, efficiency is low.Accordingly, it would be desirable to a kind of friendly interface, simple to operate, efficient face character mask method, so as to being peopleFace multi-task learning provides a large amount of accurate description texts, Speeding up development cycle.
The content of the invention
Text demand described for the accurate face character of magnanimity, the present invention propose it is a kind of based on all mouse operating based onMFC interactive mode facial image attribute labeling methods, to improve efficiency and precision that task is marked to face character, so as to accelerateThe construction cycle of face recognition products, the MFC that the present invention is provided using Microsoft realizes interface display and man-machine interaction, itsFriendly interface, is all mouse operating, easily left-hand seat.
One kind of the present invention is based on the interactive facial image attribute labeling methods of MFC, comprises the following steps:
Step a:Face datection step, facial image is loaded into, and using human-face detector, the Face datection in image is gone outCome, and preserve face location;
Step b:The face detected in default label generation step, the step a shown successively to display interface, generates peopleThe default label of each attribute of face, and be shown on interface;
Step c:Labelling step is corrected, after the default label generation of each attribute, some of shown face are being foundIn the case of attribute and default label are incongruent, the tag entry met is selected in the drop-down menu of incongruent label;
Step d:Missing inspection face annotation step, in the case where finding to have missing inspection face, chooses the face for needing to mend mark,And the label for selecting to meet by step c;With
Step e:Markup information preserves step, and the face image data for having marked attribute is preserved.
Preferably, in step a, being loaded into by operation interface button has image path and the description text of title, and system willThe facial image in text is loaded into successively, automatically detects the face in image.
Preferably, each attribute of face includes:Sex, age, whether wear glasses, it is whether fuzzy and whether wear masks.
Preferably, the default label of each attribute of face is generated according to statistical rules, according to statistical rules that face is eachIn property distribution the attribute of maximum probability as the attribute default label.
Preferably, initial default label sets and included:Sex:Man, age:Middle age, if wear glasses:It is no, if mouldPaste:It is no, if to wear masks:It is no.
Preferably, in step d, the action for choosing the face for mending mark is:Mark is mended to needs by mobile cursor of mouseFace on, left mouse button is pressed, and is slided from face upper left corner the to the lower right corner, draws a rectangle.
Preferably, in step e, next width button is clicked on by mouse, display interface will jump to next width facial image,Upper piece image data are to be saved.
Preferably, the human-face detector supports the Face detection under multiple dimensioned, multi-angle, multiracial, many illumination conditions.
The beneficial effects of the invention are as follows:
What the present invention was provided can be dropped significantly based on all mouse operating based on the interactive facial image attribute labeling methods of MFCLow face character marks difficulty, reduces the construction cycle of face recognition products, is effectively prevented from because single attribute marks band respectivelyThe complex text operation come.The present invention provide based on all mouse operating based on the interactive facial image attribute labeling sides of MFCMethod, it is simple and easy to apply with operating process due to detecting, can easier it promote the use of on other image attributes labeling systems, such asVehicle, pedestrian etc., can be as a kind of basic image labeling instrument, with very strong practicality.
Brief description of the drawings
Fig. 1 is the flow chart based on the interactive facial image attribute labeling methods of MFC of the invention.
Fig. 2 is the schematic diagram of the text with picture pathname of the present invention.
Fig. 3 is the display interface schematic diagram of the example of the face character annotation results of the present invention.
Fig. 4 (a) is the detection pedestrian of the present invention and generates the display interface schematic diagram of default label, and Fig. 4 (b) is the present inventionFig. 4 (a) correct label after display interface schematic diagram.
Embodiment
Below by embodiment, the invention will be further described, and its purpose is only that the research for more fully understanding the present inventionThe protection domain that content is not intended to limit the present invention.
As shown in figure 1, the present invention's comprises the following steps a~e based on the interactive facial image attribute labeling methods of MFC:
Step a:Face datection step, facial image is loaded into, and using human-face detector, the Face datection in image is gone outCome, and preserve face location.Specifically, being loaded into by operation interface button has image path and description text (such as Fig. 2 of titleIt is shown), the facial image that system will be loaded into text successively automatically detects the face in image.Here, the Face datectionDevice, can quickly and accurately detect the face inputted in image to be marked, the multiple dimensioned, multi-angle of detector support,Face detection under multiracial, many illumination conditions.
Step b:The face detected in acquiescence mark generation step, the step a shown successively to display interface, generates peopleThe default label of each attribute of face, and be shown on interface.
The generation of default label includes following two kinds of situations in this step:
(1) before not integrated face identification functions, the label of each attribute of face is generated according to statistical rules:Statistics is existingThe attribute information of (such as 1000) faces multiple in real field scape, Sex distribution (man:S1, female S2), age distribution is (old:A1,In:A2, children:A3) etc., if S1>S2, then it is assumed that the probability of male's face is more than women, it is regular by 1000 faces according to thisThe attribute of maximum probability annotation results (default label) by default in each property distribution.According to statistical result, initial acquiescenceLabel could be arranged to include:Sex:Man, age:Middle age, if wear glasses:It is no, if fuzzy:It is no, if to wear masks:It is noDeng.In the present invention, face character can increase according to actual conditions, for example, can also include:Facial angle, national, expression, skinColor etc..
(2) in the labeling system of integrated face character identification, a large amount of faces with markup information are used for deep learningTraining, can recognize the attribute of unknown face, if the average recognition result of face character is better than with the obtained model of trainingResult of generation in (1) is stated, the workload artificially marked is smaller, then the result that recognizes face character (the i.e. high mould of discriminationType) label by default.
In the present invention, acquiescence marks property distribution of the generation step according to face in real world images, with reference to a large amount of face figuresAs the statistical result of attribute, designing few operation just can be correctly completed the default label of mark, and the step can greatly speed up listThe time that width facial image mark is completed.
Step c:Labelling step is corrected, after the label generation that each attribute is given tacit consent to, face is some as shown in findingAttribute is not met with default label, and the tag entry met is selected in the drop-down menu of incongruent label.In this step, pass throughDrop-down menu mode in MFC controls is obtained rather than input through keyboard is obtained, and greatly improves mark speed.
Step d:Missing inspection face annotation step, is mended on the face of mark, left mouse button by mobile cursor of mouse to needsPress, slided from face upper left corner the to the lower right corner, draw a rectangle, as choose face, and by the suitable mark of step c selectionsLabel.
By step d, the present invention considers missing inspection face, and missing inspection face often has more rare face character, such as wornThe rare attributes such as glasses, band mouth mask, by marking missing inspection face, can improve ratio of the rare attribute in sample space, andImprove the accuracy of mark.
Step e:Markup information preserves step, clicks on next width button by mouse, display interface will jump to next widthFacial image, upper piece image data will be saved.
It is illustrated in figure 3 the display interface schematic diagram of the example of the face character annotation results of the present invention.Such as Fig. 3 (a) institutesShow, by Loading Image for this law, detect face, generation acquiescence annotation results are marked after face character, people according to actual conditionsFace annotation results are:Whether wear masks:It is no;Whether wear glasses:It is no;It is whether very fuzzy, it is no;Sex:Man;Age:25-40.Such asShown in Fig. 3 (b), face annotation results are:Whether wear masks:It is no;Whether wear glasses:It is;It is whether very fuzzy, it is no;Sex:Man;Age:25-40.
The present invention based on the interactive facial image attribute labeling methods of MFC, by being loaded into facial image, detecting peopleFace, and generate the acquiescence mark of each attribute, operating personnel, which will detect to pass through with the face of spill tag successively, corrects or mends mark stepSuddenly be depicted with correct label come, system will automatically save annotation results, and labeling system friendly interface is all mouse operating,Easy to get started, easy to use, mark speed is fast.
Further, the inventive method application is convenient, and scalability is strong, can add face character identification module, be used as baseIn the labeling system of face character identification module., also can be by derivation side because system is realized using the MFC codes of object-orientedFormula, realizes the attribute labeling method or system of other image categories, such as vehicle, pedestrian's attribute labeling quickly.Fig. 4 is this hairBright detection pedestrian and the display interface schematic diagram for generating default label.The default label includes:Whether it is branded as:It is no;WhetherKnapsack:It is no;Sex:Man;The range of age:In;Hair style:It is short;Upper body color:It is black;Lower part of the body color;It is blue;It is whether effective:It is.Fig. 4(b) it is the display interface schematic diagram after Fig. 4 (a) of present invention correction label.Attribute labeling result after correction is:Whether wearCap:It is no;Whether knapsack:It is;Sex:Female;The range of age:In;Hair style:It is long;Upper body color:Pattern;Lower part of the body color;It is black;It isIt is no effective:It is.
Obviously, those of ordinary skill in the art is it should be appreciated that the embodiment of the above is intended merely to explanation originallyInvention, and be not used as limitation of the invention, as long as in the spirit of the present invention, to embodiment described aboveChange, modification will all fall in the range of claims of the present invention.