CN111259698A - Method and device for acquiring image - Google Patents

Method and device for acquiring image Download PDF

Info

Publication number
CN111259698A
CN111259698A CN201811460029.2A CN201811460029A CN111259698A CN 111259698 A CN111259698 A CN 111259698A CN 201811460029 A CN201811460029 A CN 201811460029A CN 111259698 A CN111259698 A CN 111259698A
Authority
CN
China
Prior art keywords
face
sample
matching model
description information
feature
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
CN201811460029.2A
Other languages
Chinese (zh)
Other versions
CN111259698B (en
Inventor
朱祥祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201811460029.2A priority Critical patent/CN111259698B/en
Publication of CN111259698A publication Critical patent/CN111259698A/en
Application granted granted Critical
Publication of CN111259698B publication Critical patent/CN111259698B/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
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the application discloses a method and a device for acquiring an image. One embodiment of the method comprises: obtaining at least one piece of face description information, wherein the face description information is used for describing face features; for the face description information in the at least one piece of face description information, obtaining a feature label corresponding to the face description information, wherein the feature label is used for identifying the classification of the face features; and importing at least one feature label corresponding to the at least one piece of face description information into a pre-trained face matching model to obtain at least one face image corresponding to the at least one piece of face description information, wherein the face matching model is used for representing the corresponding relation between the feature label and the face image in a face image library. The embodiment improves the efficiency and accuracy of acquiring the face image.

Description

Method and device for acquiring image
Technical Field
The embodiment of the application relates to the technical field of pattern recognition, in particular to a method and a device for acquiring an image.
Background
Face recognition is a biometric technique for identifying an identity based on facial feature information of a person. A series of related technologies, also commonly called face recognition and face recognition, are used to collect images or video streams containing faces by using a camera or a video camera, automatically detect and track the faces in the images, and then perform face recognition on the detected faces. Face recognition technology is widely used in practice.
Disclosure of Invention
The embodiment of the application provides a method and a device for acquiring an image.
In a first aspect, an embodiment of the present application provides a method for acquiring an image, where the method includes: obtaining at least one piece of face description information, wherein the face description information is used for describing face features; for the face description information in the at least one piece of face description information, obtaining a feature label corresponding to the face description information, wherein the feature label is used for identifying the classification of the face features; and importing at least one feature label corresponding to the at least one piece of face description information into a pre-trained face matching model to obtain at least one face image corresponding to the at least one piece of face description information, wherein the face matching model is used for representing the corresponding relation between the feature label and the face image in a face image library.
In some embodiments, the obtaining the feature tag corresponding to the face description information includes: extracting face feature words and limiting words corresponding to the face feature words from the face description information, wherein the face feature words comprise any one of the following items: eyes, eyebrows, ears, nose, mouth, said qualifiers including at least one of: big, small, high, low, normal, oblique; and combining the face feature words and the limiting words to form a feature tag of the face description information.
In some embodiments, the face matching model is constructed by: obtaining a plurality of sample face images and a sample feature label corresponding to each sample face image in the plurality of sample face images; and taking each sample face image in the plurality of sample face images as input, taking the sample feature label of each sample face image in the plurality of sample face images as output, and training to obtain a face matching model.
In some embodiments, the training of the face matching model by using each of the plurality of sample face images as an input and using the sample feature label of each of the plurality of sample face images as an output includes: the following training steps are performed: sequentially inputting each sample face image in the plurality of sample face images into an initial face matching model to obtain a prediction feature label corresponding to each sample face image in the plurality of sample face images, comparing the prediction feature label corresponding to each sample face image in the plurality of sample face images with the sample feature label corresponding to the sample face image to obtain the prediction accuracy of the initial face matching model, determining whether the prediction accuracy is greater than a preset accuracy threshold, and if so, taking the initial face matching model as the trained face matching model.
In some embodiments, the training of the face matching model by using each of the plurality of sample face images as an input and using the sample feature label of each of the plurality of sample face images as an output includes: and responding to the condition that the accuracy is not greater than the preset accuracy threshold, adjusting the parameters of the initial face matching model, and continuing to execute the training step.
In a second aspect, an embodiment of the present application provides an apparatus for acquiring an image, the apparatus including: a face description information acquisition unit configured to acquire at least one piece of face description information, the face description information being used for describing a face feature; a feature tag obtaining unit, configured to obtain, for face description information in the at least one piece of face description information, a feature tag corresponding to the face description information, where the feature tag is used to identify a classification of a face feature; and the face image acquisition unit is configured to import at least one feature label corresponding to the at least one piece of face description information into a pre-trained face matching model to obtain at least one face image corresponding to the at least one piece of face description information, wherein the face matching model is used for representing the corresponding relation between the feature label and the face image in the face image library.
In some embodiments, the feature tag obtaining unit includes: an information extraction subunit configured to extract, from the face description information, a face feature word and a qualifier corresponding to the face feature word, where the face feature word includes any one of: eyes, eyebrows, ears, nose, mouth, said qualifiers including at least one of: big, small, high, low, normal, oblique; and the characteristic label acquiring subunit is configured to combine the human face characteristic words and the qualifier words to form the characteristic labels of the human face description information.
In some embodiments, the apparatus further comprises a face matching model construction unit configured to construct a face matching model, the face matching model construction unit comprising: a sample acquiring subunit configured to acquire a plurality of sample face images and a sample feature label corresponding to each of the plurality of sample face images; and the face matching model constructing subunit is configured to take each sample face image in the plurality of sample face images as input, take the sample feature label of each sample face image in the plurality of sample face images as output, and train to obtain the face matching model.
In some embodiments, the face matching model constructing subunit includes: a face matching model building module configured to sequentially input each of the plurality of sample face images to an initial face matching model to obtain a predicted feature label corresponding to each of the plurality of sample face images, compare the predicted feature label corresponding to each of the plurality of sample face images with the sample feature label corresponding to the sample face image to obtain a predicted accuracy of the initial face matching model, determine whether the predicted accuracy is greater than a preset accuracy threshold, and if so, take the initial face matching model as a trained face matching model.
In some embodiments, the face matching model constructing subunit includes: and the parameter adjusting module is used for responding to the condition that the accuracy rate is not greater than the preset accuracy rate threshold value, adjusting the parameters of the initial face matching model and continuously executing the training step.
In a third aspect, an embodiment of the present application provides a server, including: one or more processors; a memory having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to perform the method for acquiring an image of the first aspect.
In a fourth aspect, the present application provides a computer-readable medium, on which a computer program is stored, where the computer program is used to implement the method for acquiring an image of the first aspect when executed by a processor.
The method and the device for acquiring the image, provided by the embodiment of the application, firstly acquire at least one piece of face description information, wherein the face description information is used for describing the face characteristics; then inquiring a feature label corresponding to the face description information, wherein the feature label is used for identifying the classification of the face features; and finally, importing at least one feature label corresponding to the at least one piece of face description information into a pre-trained face matching model to obtain at least one face image corresponding to the at least one piece of face description information. According to the technical scheme, the face image is obtained by leading the face description information into the face matching model, so that the efficiency and the accuracy of obtaining the face image are improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for acquiring an image according to the present application;
FIG. 3 is a schematic illustration of an application scenario of a method for acquiring an image according to the present application;
FIG. 4 is a flow diagram of one embodiment of a face matching model construction method according to the present application;
FIG. 5 is a schematic block diagram of one embodiment of an apparatus for acquiring images according to the present application;
FIG. 6 is a schematic block diagram of a computer system suitable for use in implementing a server according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 shows an exemplary system architecture 100 to which the method for acquiring an image or the apparatus for acquiring an image of embodiments of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various information processing applications, such as an audio capture application, a text input application, a search-type application, an image processing tool, an image display application, and the like.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices having a display screen and supporting information acquisition, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as a plurality of software or software modules (for example, for providing distributed services), or as a single software or software module, which is not specifically limited herein.
The server 105 may be a server that provides various services, such as a server that performs data processing on face description information transmitted from the terminal apparatuses 101, 102, 103. The server can analyze and process data such as the face description information and feed back a processing result (such as a face image) to the terminal equipment.
It should be noted that the method for acquiring an image provided in the embodiment of the present application may be executed by the terminal devices 101, 102, and 103 individually, or may also be executed by the terminal devices 101, 102, and 103 and the server 105 together. Accordingly, the means for acquiring the image may be provided in the terminal devices 101, 102, 103, or in the server 105.
The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules (for example, to provide distributed services), or may be implemented as a single software or software module, and is not limited specifically herein.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for acquiring an image in accordance with the present application is shown. The method for acquiring an image comprises the following steps:
step 201, at least one piece of face description information is obtained.
In this embodiment, an execution subject of the method for acquiring an image (for example, the terminal devices 101, 102, 103 or the server 105 shown in fig. 1) may acquire at least one piece of face description information by a wired connection manner or a wireless connection manner. The face description information can be acquired by performing voice recognition on the acquired audio by an execution subject; or the text information acquired by the execution main body. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a uwb (ultra wideband) connection, and other wireless connection means now known or developed in the future.
In general, face recognition requires acquisition of a face image to recognize a face. In some situations where it is difficult to acquire a face image in practice, the face recognition technology cannot be applied. For example, a person sees the face of a designated person when passing through an incident, but does not take a picture of the face of the designated person in time. Therefore, the search for the face of the designated person cannot be realized by the existing face recognition technology.
The execution subject of the present application may first obtain at least one piece of face description information. The face description information can be used for describing the face features. The facial features may be eyes, ears, nose, mouth, moles, etc. The face description information may be, for example: "his eyes are small", "his nose bridge is high", etc. The face description information may also be other contents, which is determined according to the actual situation.
Step 202, for the face description information in the at least one piece of face description information, querying a feature tag corresponding to the face description information.
The execution subject may acquire at least one piece of face description information. For each piece of face description information, the content of the face description information is usually a common term, and is not information that can be directly applied to face recognition. Therefore, the execution subject of the application can query the feature tag corresponding to the face description information. Wherein the feature labels can be used to identify a classification of the facial features.
In some optional implementation manners of this embodiment, the obtaining of the feature tag corresponding to the face description information may include the following steps:
firstly, extracting face characteristic words and limiting words corresponding to the face characteristic words from the face description information.
As can be seen from the above description, the face description information is usually a sentence. In order to facilitate the query of the corresponding face image, the execution main body of the application can extract the face feature words and the limiting words corresponding to the face feature words from the face description information. The face feature words may include any one of the following items: eyes, eyebrows, ears, nose, mouth, moles, spots, scars, and the like. Correspondingly, the qualifier may include at least one of: big, small, high, low, normal, oblique. For example, the face description information is: if "his eyes are small", the face feature word may be "eyes" and the qualifier may be "small".
And secondly, combining the face feature words and the qualifiers to form feature labels of the face description information.
After the face feature words and the qualifiers are obtained, the execution subject can combine the face feature words and the qualifiers to form feature labels. For example, if the face feature word is "eye" and the qualifier is "small," then the feature label may be { eye; small }. The feature tag may also be in other expression forms, which are not described in detail herein.
Step 203, importing at least one feature label corresponding to the at least one piece of face description information into a pre-trained face matching model to obtain at least one face image corresponding to the at least one piece of face description information.
Each piece of face description information can obtain a corresponding feature label. The executive may import these into a pre-trained face matching model. The face matching model may query the face images in the face image library to find face images corresponding to the feature labels. And all the face images in the face image library have corresponding feature labels. The face matching model can be used for representing the corresponding relation between the feature labels and the face images in the face image library. For a certain face feature word in the face image library, the limiting word can be various. For example, when the facial feature word is "eyes", the corresponding qualifiers may be: "big", "small", "double eyelid", "single eyelid". The feature label corresponding to "eye" may be: { an eye; big, small, double eyelid, single eyelid }. When the face feature word is 'eyebrow', the corresponding qualifier may be: "thick", "thin", "long", "short", "thick", "thin", and the like. The feature label corresponding to "eyebrow" may be: { eyebrow; coarse, fine, long, short, dense, light }. According to practical situations, the qualifier may be of other types, and is not described in detail here. When a qualifier in the feature tag received by the face matching model belongs to one of qualifiers in the feature tag corresponding to a face image in the face image library, the feature tag received by the face matching model may be considered to correspond to the face image in the face image library. For example: the feature label received by the face matching model is { eye; small, the feature label corresponding to the face image in the face image library is { eye; big, small, double eyelid, single eyelid }. The feature tag received by the face matching model has a corresponding relationship with the face image. When the face matching model detects that the feature labels corresponding to some face images in the face image library are the same as or similar to the feature labels currently received by the face matching model, the face image can be used as the face image corresponding to the at least one piece of face description information. It should be noted that the more feature labels received by the face matching model, the more accurately the face matching model can query the corresponding face image.
In some optional implementation manners of this embodiment, importing at least one feature label corresponding to the at least one piece of face description information into a pre-trained face matching model, and obtaining at least one face image corresponding to the at least one piece of face description information includes:
and predicting at least one face image corresponding to the at least one piece of face description information according to the at least one feature mark.
In practice, there is also a possibility. When the face image library does not actually contain the real face image corresponding to the face description information, what the real face image should be can be predicted according to the face matching model. For example, when a person sees a side face feature of a given person in dim light conditions. Although the face image library does not have the face image of the designated person, the face matching model may predict possible real face features of the designated person according to at least one face image in the face image library, which has face features similar to the side face features of the designated person, to obtain a predicted face image closer to the real face of the designated person. The efficiency and the accuracy rate of obtaining the face image through the face description information are further improved.
In some optional implementation manners of this embodiment, the face matching model is constructed by the following steps:
the method comprises the steps of firstly, obtaining a plurality of sample face images and sample feature labels corresponding to each sample face image in the plurality of sample face images.
When a face matching model is constructed, an execution subject of the application can obtain a plurality of sample face images. The skilled person can configure a corresponding sample feature tag for each face feature contained in each sample face image according to experience or quantization standard. For example, for a certain sample face image, the corresponding sample feature labels may be: { an eye; large }, { nose; small }, { mouth; small }, { ear; large }.
And secondly, taking each sample face image in the plurality of sample face images as input, taking a sample feature label of each sample face image in the plurality of sample face images as output, and training to obtain a face matching model.
The execution subject may take each of the plurality of sample face images as an input, take a sample feature tag of each of the plurality of sample face images as an output, and train to obtain a face matching model. The human face matching model can be an artificial neural network, abstracts a human brain neuron network from the information processing angle, establishes a certain simple model, and forms different networks according to different connection modes. An artificial neural network is generally composed of a large number of nodes (or neurons) interconnected with each other, each node representing a specific output function, called an excitation function. The connection between each two nodes represents a weighted value, called weight (also called parameter), for the signal passing through the connection, and the output of the network varies according to the connection mode, the weight value and the excitation function of the network. The face matching model generally includes a plurality of layers, each layer includes a plurality of nodes, and generally, the weights of the nodes of the same layer may be the same, the weights of the nodes of different layers may be different, and the parameters of the plurality of layers of the face matching model may also be different.
With continued reference to fig. 3, fig. 3 is a schematic view of an application scenario of the method for acquiring an image according to the present embodiment. In the application scenario of fig. 3, the user sends the face description information to the server 105 through the terminal device 102 and the network 104: "the eyes of the designated person are large and there are black nevus on the face". After the server 105 receives the face description information, the feature tag corresponding to the acquired face description information may be: { an eye; large }, { nevus; black }. Finally, the executive subject may combine { eye; large }, { nevus; black, importing a face matching model to obtain at least a face image.
The method provided by the above embodiment of the application firstly obtains at least one piece of face description information, wherein the face description information is used for describing face features; then inquiring a feature label corresponding to the face description information, wherein the feature label is used for identifying the classification of the face features; and finally, importing at least one feature label corresponding to the at least one piece of face description information into a pre-trained face matching model to obtain at least one face image corresponding to the at least one piece of face description information. According to the technical scheme, the face image is obtained by leading the face description information into the face matching model, so that the efficiency and the accuracy of obtaining the face image are improved.
With further reference to FIG. 4, a flow 400 of yet another embodiment of a face matching model construction method is shown. The process 400 of the face matching model construction method includes the following steps:
step 401, obtaining a plurality of sample face images and a sample feature label corresponding to each sample face image in the plurality of sample face images.
In this embodiment, an execution subject (for example, the server 105 shown in fig. 1) on which the face matching model construction method operates may obtain a plurality of sample face images and a sample feature tag corresponding to each sample face image in the plurality of sample face images in a wired connection manner or a wireless connection manner.
Step 402, sequentially inputting each sample face image in the plurality of sample face images into an initial face matching model, and obtaining a prediction feature label corresponding to each sample face image in the plurality of sample face images.
In this embodiment, the execution subject may sequentially input each sample face image of the plurality of sample face images to the initial face matching model, so as to obtain a predicted feature tag corresponding to each sample face image of the plurality of sample face images. Here, the execution subject may input each sample face image from an input side of the initial face matching model, sequentially perform processing on parameters of each layer in the initial face matching model, and output the sample face image from an output side of the initial face matching model, where information output by the output side is a prediction feature label corresponding to the sample face image. The initial face matching model can be an untrained face matching model or an untrained face matching model, each layer of the initial face matching model is provided with initialization parameters, and the initialization parameters can be continuously adjusted in the training process of the face matching model.
Step 403, comparing the prediction feature label corresponding to each sample face image in the plurality of sample face images with the sample feature label corresponding to the sample face image, so as to obtain the prediction accuracy of the initial face matching model.
In this embodiment, based on the predicted feature label corresponding to each sample face image in the multiple sample face images obtained in step 402, the execution subject may compare the predicted feature label corresponding to each sample face image in the multiple sample face images with the sample feature label corresponding to the sample face image, so as to obtain the prediction accuracy of the initial face matching model. Specifically, if the predicted feature label corresponding to a sample face image is the same as or similar to the sample feature label corresponding to the sample face image, the initial face matching model is predicted correctly; if the prediction feature label corresponding to one sample face image is different from or not close to the sample feature label corresponding to the sample face image, the initial face matching model is wrong in prediction. Here, the execution subject may calculate a ratio of the number of prediction correctness to the total number of samples, and take the ratio as the prediction accuracy of the initial face matching model.
Step 404, determining whether the prediction accuracy is greater than a preset accuracy threshold.
In this embodiment, based on the prediction accuracy of the initial face matching model obtained in step 403, the execution subject may compare the prediction accuracy of the initial face matching model with a preset accuracy threshold. If the accuracy is greater than the preset accuracy threshold, go to step 405; if not, go to step 406.
And 405, taking the initial face matching model as a trained face matching model.
In this embodiment, when the prediction accuracy of the initial face matching model is greater than the preset accuracy threshold, it indicates that the face matching model training is completed. At this time, the execution subject may use the initial face matching model as a trained face matching model.
Step 406, adjusting parameters of the initial face matching model.
In this embodiment, under the condition that the prediction accuracy of the initial face matching model is not greater than the preset accuracy threshold, the execution subject may adjust parameters of the initial face matching model, and return to the execution step 402 until a face matching model capable of characterizing the correspondence between the feature labels and the face images is trained.
With further reference to fig. 5, as an implementation of the methods shown in the above-mentioned figures, the present application provides an embodiment of an apparatus for acquiring an image, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable in various electronic devices.
As shown in fig. 5, the apparatus 500 for acquiring an image of the present embodiment may include: a face description information acquisition unit 501, a feature label acquisition unit 502, and a face image acquisition unit 503. The face description information acquiring unit 501 is configured to acquire at least one piece of face description information, where the face description information is used for describing features of a face; a feature label obtaining unit 502, configured to, for face description information in the at least one piece of face description information, obtain a feature label corresponding to the face description information, where the feature label is used to identify a classification of a face feature; the face image obtaining unit 503 is configured to import at least one feature label corresponding to the at least one piece of face description information into a pre-trained face matching model, so as to obtain at least one face image corresponding to the at least one piece of face description information, where the face matching model is used to represent a corresponding relationship between the feature label and a face image in a face image library.
In some optional implementations of this embodiment, the feature tag obtaining unit 502 may include: an information extraction sub-unit (not shown in the figure) and a feature tag acquisition sub-unit (not shown in the figure). The information extraction subunit is configured to extract, from the face description information, a face feature word and a qualifier corresponding to the face feature word, where the face feature word includes any one of: eyes, eyebrows, ears, nose, mouth, said qualifiers including at least one of: big, small, high, low, normal, oblique; the feature label acquiring subunit is configured to combine the above-mentioned face feature words and qualifiers to constitute the feature labels of the face description information.
In some optional implementations of the present embodiment, the apparatus 500 for acquiring an image may further include a face matching model construction unit (not shown in the figure) configured to construct a face matching model. The face matching model construction unit comprises: a sample acquisition subunit (not shown in the figure) and a face matching model construction subunit (not shown in the figure). Wherein the sample acquiring subunit is configured to acquire a plurality of sample face images and a sample feature label corresponding to each of the plurality of sample face images; the face matching model constructing subunit is configured to take each of the plurality of sample face images as an input, take a sample feature label of each of the plurality of sample face images as an output, and train to obtain a face matching model.
In some optional implementation manners of this embodiment, the face matching model constructing subunit may include: a face matching model building module (not shown in the figure) configured to sequentially input each of the plurality of sample face images to an initial face matching model, obtain a predicted feature label corresponding to each of the plurality of sample face images, compare the predicted feature label corresponding to each of the plurality of sample face images with the sample feature label corresponding to the sample face image, obtain a predicted accuracy of the initial face matching model, determine whether the predicted accuracy is greater than a preset accuracy threshold, and if so, take the initial face matching model as a trained face matching model.
In some optional implementation manners of this embodiment, the face matching model constructing subunit may include: a parameter adjusting module (not shown in the figure), in response to the accuracy not being greater than the preset accuracy threshold, is configured to adjust parameters of the initial face matching model, and continue to perform the training step.
The present embodiment further provides a server, including: one or more processors; a memory having one or more programs stored thereon that, when executed by the one or more processors, cause the one or more processors to perform the method for acquiring an image described above.
The present embodiment also provides a computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the above-mentioned method for acquiring an image.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use in implementing a server (e.g., server 105 of FIG. 1) of an embodiment of the present application is shown. The server shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium mentioned above in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a face description information acquisition unit, a feature tag acquisition unit, and a face image acquisition unit. The names of these units do not in some cases constitute a limitation to the unit itself, and for example, the face image acquisition unit may also be described as a "unit for acquiring a face image by a face matching model".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: obtaining at least one piece of face description information, wherein the face description information is used for describing face features; for the face description information in the at least one piece of face description information, obtaining a feature label corresponding to the face description information, wherein the feature label is used for identifying the classification of the face features; and importing at least one feature label corresponding to the at least one piece of face description information into a pre-trained face matching model to obtain at least one face image corresponding to the at least one piece of face description information, wherein the face matching model is used for representing the corresponding relation between the feature label and the face image in a face image library.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (12)

1. A method for acquiring an image, comprising:
obtaining at least one piece of face description information, wherein the face description information is used for describing face features;
for the face description information in the at least one piece of face description information, obtaining a feature label corresponding to the face description information, wherein the feature label is used for identifying the classification of the face features;
and importing at least one feature label corresponding to the at least one piece of face description information into a pre-trained face matching model to obtain at least one face image corresponding to the at least one piece of face description information, wherein the face matching model is used for representing the corresponding relation between the feature label and the face image in a face image library.
2. The method of claim 1, wherein the obtaining of the feature label corresponding to the face description information comprises:
extracting face feature words and limiting words corresponding to the face feature words from the face description information, wherein the face feature words comprise any one of the following items: eyes, eyebrows, ears, nose, mouth, the qualifier comprising at least one of: big, small, high, low, normal, oblique;
and combining the face feature words and the limiting words to form a feature tag of the face description information.
3. The method of claim 1, wherein the face matching model is constructed by:
obtaining a plurality of sample face images and a sample feature label corresponding to each sample face image in the plurality of sample face images;
and taking each sample face image in the plurality of sample face images as input, taking the sample feature label of each sample face image in the plurality of sample face images as output, and training to obtain a face matching model.
4. The method of claim 3, wherein training a face matching model using each of the plurality of sample face images as an input and a sample feature label of each of the plurality of sample face images as an output comprises:
the following training steps are performed: sequentially inputting each sample face image in the plurality of sample face images into an initial face matching model to obtain a prediction feature label corresponding to each sample face image in the plurality of sample face images, comparing the prediction feature label corresponding to each sample face image in the plurality of sample face images with the sample feature label corresponding to the sample face image to obtain the prediction accuracy of the initial face matching model, determining whether the prediction accuracy is greater than a preset accuracy threshold, and if so, taking the initial face matching model as the trained face matching model.
5. The method of claim 4, wherein training a face matching model using each of the plurality of sample face images as an input and a sample feature label of each of the plurality of sample face images as an output comprises:
and responding to the condition that the accuracy is not larger than the preset accuracy threshold, adjusting parameters of the initial face matching model, and continuing to execute the training step.
6. An apparatus for acquiring an image, comprising:
a face description information acquisition unit configured to acquire at least one piece of face description information, the face description information being used for describing a face feature;
a feature tag obtaining unit, configured to obtain, for face description information in the at least one piece of face description information, a feature tag corresponding to the face description information, where the feature tag is used to identify a classification of a face feature;
and the face image acquisition unit is configured to import at least one feature label corresponding to the at least one piece of face description information into a pre-trained face matching model to obtain at least one face image corresponding to the at least one piece of face description information, and the face matching model is used for representing the corresponding relation between the feature label and the face image in the face image library.
7. The apparatus of claim 6, wherein the feature tag obtaining unit comprises:
an information extraction subunit configured to extract, from the face description information, a face feature word and a qualifier corresponding to the face feature word, the face feature word including any one of: eyes, eyebrows, ears, nose, mouth, the qualifier comprising at least one of: big, small, high, low, normal, oblique;
and the characteristic label acquisition subunit is configured to combine the human face characteristic words and the qualified words to form the characteristic label of the human face description information.
8. The apparatus of claim 6, wherein the apparatus further comprises a face matching model construction unit configured to construct a face matching model, the face matching model construction unit comprising:
a sample acquiring subunit configured to acquire a plurality of sample face images and a sample feature label corresponding to each of the plurality of sample face images;
and the face matching model constructing subunit is configured to take each sample face image in the plurality of sample face images as input, take the sample feature label of each sample face image in the plurality of sample face images as output, and train to obtain the face matching model.
9. The apparatus of claim 8, wherein the face matching model building subunit comprises:
a face matching model construction module configured to sequentially input each of the plurality of sample face images to an initial face matching model to obtain a predicted feature label corresponding to each of the plurality of sample face images, compare the predicted feature label corresponding to each of the plurality of sample face images with a sample feature label corresponding to the sample face image to obtain a predicted accuracy of the initial face matching model, determine whether the predicted accuracy is greater than a preset accuracy threshold, and if so, take the initial face matching model as a trained face matching model.
10. The apparatus of claim 9, wherein the face matching model constructing subunit comprises:
a parameter adjustment module, responsive to not being greater than the preset accuracy threshold, configured to adjust parameters of the initial face matching model and continue to perform the training step.
11. A server, comprising:
one or more processors;
a memory having one or more programs stored thereon,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-5.
12. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 5.
CN201811460029.2A 2018-11-30 2018-11-30 Method and device for acquiring image Active CN111259698B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811460029.2A CN111259698B (en) 2018-11-30 2018-11-30 Method and device for acquiring image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811460029.2A CN111259698B (en) 2018-11-30 2018-11-30 Method and device for acquiring image

Publications (2)

Publication Number Publication Date
CN111259698A true CN111259698A (en) 2020-06-09
CN111259698B CN111259698B (en) 2023-10-13

Family

ID=70948345

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811460029.2A Active CN111259698B (en) 2018-11-30 2018-11-30 Method and device for acquiring image

Country Status (1)

Country Link
CN (1) CN111259698B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115155058A (en) * 2022-09-06 2022-10-11 北京澜舟科技有限公司 Face pinching method, face pinching system and storage medium
CN116110099A (en) * 2023-01-19 2023-05-12 北京百度网讯科技有限公司 Head portrait generating method and head portrait replacing method

Citations (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011007216A1 (en) * 2009-07-17 2011-01-20 Sony Ericsson Mobile Communications Ab System and method for automatic tagging of a digital image
CN102096934A (en) * 2011-01-27 2011-06-15 电子科技大学 Human face cartoon generating method based on machine learning
WO2013131407A1 (en) * 2012-03-08 2013-09-12 无锡中科奥森科技有限公司 Double verification face anti-counterfeiting method and device
WO2013159722A1 (en) * 2012-04-25 2013-10-31 Tencent Technology (Shenzhen) Company Limited Systems and methods for obtaining information based on an image
WO2015165365A1 (en) * 2014-04-29 2015-11-05 华为技术有限公司 Facial recognition method and system
CN105718914A (en) * 2016-01-27 2016-06-29 中国石油大学(华东) Face coding and identification method
CN107103218A (en) * 2016-10-24 2017-08-29 阿里巴巴集团控股有限公司 A kind of service implementation method and device
WO2017181769A1 (en) * 2016-04-21 2017-10-26 腾讯科技(深圳)有限公司 Facial recognition method, apparatus and system, device, and storage medium
CN107316346A (en) * 2016-04-27 2017-11-03 阿里巴巴集团控股有限公司 The method and apparatus of getting tickets of electronic bill
CN107423678A (en) * 2017-05-27 2017-12-01 电子科技大学 A kind of training method and face identification method of the convolutional neural networks for extracting feature
WO2017219679A1 (en) * 2016-06-20 2017-12-28 杭州海康威视数字技术股份有限公司 Method and device for establishing correspondence between rfid tags and persons, and method and device for trajectory tracking
CN107578034A (en) * 2017-09-29 2018-01-12 百度在线网络技术(北京)有限公司 information generating method and device
WO2018054283A1 (en) * 2016-09-23 2018-03-29 北京眼神科技有限公司 Face model training method and device, and face authentication method and device
CN107909065A (en) * 2017-12-29 2018-04-13 百度在线网络技术(北京)有限公司 The method and device blocked for detecting face
CN108171207A (en) * 2018-01-17 2018-06-15 百度在线网络技术(北京)有限公司 Face identification method and device based on video sequence
CN108416310A (en) * 2018-03-14 2018-08-17 百度在线网络技术(北京)有限公司 Method and apparatus for generating information
CN108416326A (en) * 2018-03-27 2018-08-17 百度在线网络技术(北京)有限公司 Face identification method and device
CN108416317A (en) * 2018-03-19 2018-08-17 百度在线网络技术(北京)有限公司 Method and device for obtaining information
CN108446385A (en) * 2018-03-21 2018-08-24 百度在线网络技术(北京)有限公司 Method and apparatus for generating information
CN108509915A (en) * 2018-04-03 2018-09-07 百度在线网络技术(北京)有限公司 The generation method and device of human face recognition model
CN108549848A (en) * 2018-03-27 2018-09-18 百度在线网络技术(北京)有限公司 Method and apparatus for output information
CN108595628A (en) * 2018-04-24 2018-09-28 百度在线网络技术(北京)有限公司 Method and apparatus for pushed information
CN108875638A (en) * 2018-06-20 2018-11-23 北京京东金融科技控股有限公司 Face matching test method and device and system

Patent Citations (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011007216A1 (en) * 2009-07-17 2011-01-20 Sony Ericsson Mobile Communications Ab System and method for automatic tagging of a digital image
CN102096934A (en) * 2011-01-27 2011-06-15 电子科技大学 Human face cartoon generating method based on machine learning
WO2013131407A1 (en) * 2012-03-08 2013-09-12 无锡中科奥森科技有限公司 Double verification face anti-counterfeiting method and device
WO2013159722A1 (en) * 2012-04-25 2013-10-31 Tencent Technology (Shenzhen) Company Limited Systems and methods for obtaining information based on an image
WO2015165365A1 (en) * 2014-04-29 2015-11-05 华为技术有限公司 Facial recognition method and system
CN105718914A (en) * 2016-01-27 2016-06-29 中国石油大学(华东) Face coding and identification method
WO2017181769A1 (en) * 2016-04-21 2017-10-26 腾讯科技(深圳)有限公司 Facial recognition method, apparatus and system, device, and storage medium
CN107316346A (en) * 2016-04-27 2017-11-03 阿里巴巴集团控股有限公司 The method and apparatus of getting tickets of electronic bill
WO2017219679A1 (en) * 2016-06-20 2017-12-28 杭州海康威视数字技术股份有限公司 Method and device for establishing correspondence between rfid tags and persons, and method and device for trajectory tracking
WO2018054283A1 (en) * 2016-09-23 2018-03-29 北京眼神科技有限公司 Face model training method and device, and face authentication method and device
CN107103218A (en) * 2016-10-24 2017-08-29 阿里巴巴集团控股有限公司 A kind of service implementation method and device
CN107423678A (en) * 2017-05-27 2017-12-01 电子科技大学 A kind of training method and face identification method of the convolutional neural networks for extracting feature
CN107578034A (en) * 2017-09-29 2018-01-12 百度在线网络技术(北京)有限公司 information generating method and device
CN107909065A (en) * 2017-12-29 2018-04-13 百度在线网络技术(北京)有限公司 The method and device blocked for detecting face
CN108171207A (en) * 2018-01-17 2018-06-15 百度在线网络技术(北京)有限公司 Face identification method and device based on video sequence
CN108416310A (en) * 2018-03-14 2018-08-17 百度在线网络技术(北京)有限公司 Method and apparatus for generating information
CN108416317A (en) * 2018-03-19 2018-08-17 百度在线网络技术(北京)有限公司 Method and device for obtaining information
CN108446385A (en) * 2018-03-21 2018-08-24 百度在线网络技术(北京)有限公司 Method and apparatus for generating information
CN108416326A (en) * 2018-03-27 2018-08-17 百度在线网络技术(北京)有限公司 Face identification method and device
CN108549848A (en) * 2018-03-27 2018-09-18 百度在线网络技术(北京)有限公司 Method and apparatus for output information
CN108509915A (en) * 2018-04-03 2018-09-07 百度在线网络技术(北京)有限公司 The generation method and device of human face recognition model
CN108595628A (en) * 2018-04-24 2018-09-28 百度在线网络技术(北京)有限公司 Method and apparatus for pushed information
CN108875638A (en) * 2018-06-20 2018-11-23 北京京东金融科技控股有限公司 Face matching test method and device and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HUANG, DI等: "3-D face recognition using eLBP-based facial description and local feature hybrid matching", 《IEEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY》, vol. 7, no. 5, pages 1551 - 1565, XP011470260, DOI: 10.1109/TIFS.2012.2206807 *
杨巨成等: "基于深度学习的人脸识别方法研究综述", 《天津科技大学学报》, vol. 31, no. 6, pages 1 - 10 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115155058A (en) * 2022-09-06 2022-10-11 北京澜舟科技有限公司 Face pinching method, face pinching system and storage medium
CN116110099A (en) * 2023-01-19 2023-05-12 北京百度网讯科技有限公司 Head portrait generating method and head portrait replacing method

Also Published As

Publication number Publication date
CN111259698B (en) 2023-10-13

Similar Documents

Publication Publication Date Title
CN107909065B (en) Method and device for detecting face occlusion
US10936919B2 (en) Method and apparatus for detecting human face
EP3477519B1 (en) Identity authentication method, terminal device, and computer-readable storage medium
CN111860573B (en) Model training method, image category detection method and device and electronic equipment
CN108830235B (en) Method and apparatus for generating information
US10691928B2 (en) Method and apparatus for facial recognition
CN108416323B (en) Method and device for recognizing human face
CN111523640B (en) Training method and device for neural network model
CN108229376B (en) Method and device for detecting blinking
CN109034069B (en) Method and apparatus for generating information
CN108197592B (en) Information acquisition method and device
KR20190081243A (en) Method and apparatus of recognizing facial expression based on normalized expressiveness and learning method of recognizing facial expression
CN108491823B (en) Method and device for generating human eye recognition model
CN108549848B (en) Method and apparatus for outputting information
US11645561B2 (en) Question answering system influenced by user behavior and text metadata generation
CN108491808B (en) Method and device for acquiring information
US20170185913A1 (en) System and method for comparing training data with test data
CN111539903B (en) Method and device for training face image synthesis model
CN109214501B (en) Method and apparatus for identifying information
CN110084317B (en) Method and device for recognizing images
CN108509994B (en) Method and device for clustering character images
CN110288085A (en) A kind of data processing method, device, system and storage medium
US11659181B2 (en) Method and apparatus for determining region of interest
CN108399401B (en) Method and device for detecting face image
CN108038473B (en) Method and apparatus for outputting information

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