CN111259698B - Method and device for acquiring image - Google Patents

Method and device for acquiring image Download PDF

Info

Publication number
CN111259698B
CN111259698B CN201811460029.2A CN201811460029A CN111259698B CN 111259698 B CN111259698 B CN 111259698B CN 201811460029 A CN201811460029 A CN 201811460029A CN 111259698 B CN111259698 B CN 111259698B
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.)
Active
Application number
CN201811460029.2A
Other languages
Chinese (zh)
Other versions
CN111259698A (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

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 the following steps: acquiring at least one piece of face description information, wherein the face description information is used for describing face characteristics; for the face description information in the at least one piece of face description information, acquiring a feature tag corresponding to the face description information, wherein the feature tag is used for identifying the classification of the face features; at least one characteristic label corresponding to the at least one piece of face description information is imported 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 characteristic label and the face image in the face image library. According to the embodiment, the efficiency and the accuracy of acquiring the face image are improved.

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 images.
Background
Face recognition is a biological recognition technology for carrying out identity recognition based on facial feature information of people. A series of related technologies, commonly referred to as image recognition and face recognition, are used to capture images or video streams containing faces with a camera or cameras, and automatically detect and track the faces in the images, thereby performing 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, the method including: acquiring at least one piece of face description information, wherein the face description information is used for describing face characteristics; for the face description information in the at least one piece of face description information, acquiring a feature tag corresponding to the face description information, wherein the feature tag is used for identifying the classification of the face features; at least one characteristic label corresponding to the at least one piece of face description information is imported 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 characteristic label and the face image in the face image library.
In some embodiments, the obtaining the feature tag corresponding to the face description information includes: extracting face feature words and definition words corresponding to the face feature words from the face description information, wherein the face feature words comprise any one of the following: eyes, eyebrows, ears, nose, mouth, the aforementioned qualifiers include at least one of: big, small, high, low, normal, oblique; and combining the face feature words and the limiting words to form the feature tag of the face description information.
In some embodiments, the face matching model is constructed by: acquiring a plurality of sample face images and sample feature labels 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 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.
In some embodiments, the training to obtain the face matching model includes: the following training steps are performed: and 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, using the initial face matching model as a trained face matching model.
In some embodiments, the training to obtain the face matching model includes: and adjusting parameters of the initial face matching model in response to the fact that the initial face matching model is not larger than the preset accuracy threshold, 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 comprising: the facial feature information acquisition unit is configured to acquire at least one piece of facial feature information, wherein the facial feature information is used for describing facial features; a feature tag obtaining unit, configured to obtain feature tags corresponding to the face description information, for the face description information in the at least one piece of face description information, where the feature tags are used for identifying classification of face features; the facial image acquisition unit is configured to import at least one feature tag corresponding to the at least one piece of facial description information into a pre-trained facial matching model to obtain at least one facial image corresponding to the at least one piece of facial description information, wherein the facial matching model is used for representing the corresponding relation between the feature tag and the facial image in the facial 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, the face feature word including any one of: eyes, eyebrows, ears, nose, mouth, the aforementioned qualifiers include at least one of: big, small, high, low, normal, oblique; and the feature tag acquisition subunit is configured to combine the face feature words and the limiting words to form the feature tag of the face description information.
In some embodiments, the apparatus further includes a face matching model construction unit configured to construct a face matching model, the face matching model construction unit including: a sample acquisition subunit configured to acquire a plurality of sample face images and a sample feature tag corresponding to each of the plurality of sample face images; the face matching model construction subunit is configured to take each of the plurality of sample face images as input, take a sample feature tag of each of the plurality of sample face images as output, and train to obtain a face matching model.
In some embodiments, the face matching model building subunit includes: the face matching model construction module is configured to sequentially input 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, compare 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, determine whether the prediction 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 building subunit includes: and the parameter adjustment module is used for responding to the fact that the parameter is not larger than the preset accuracy threshold value, is configured to adjust the parameters of the initial face matching model, and continues to execute the training step.
In a third aspect, an embodiment of the present application provides a server, including: one or more processors; and 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, an embodiment of the present application provides a computer readable medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements the method for acquiring an image of the first aspect described above.
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 feature labels corresponding to the face description information, wherein the feature labels are used for identifying the classification of the face features; and finally, importing at least one characteristic 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 description information is imported into the face matching model to obtain the face image, so that the efficiency and 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 detailed description of non-limiting embodiments, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which an embodiment of the present application may be applied;
FIG. 2 is a flow chart 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 chart of one embodiment of a face matching model construction method according to the present application;
FIG. 5 is a schematic diagram of an embodiment of an apparatus for acquiring images in accordance with the present application;
FIG. 6 is a schematic diagram of a computer system suitable for use with a server implementing an embodiment of the application.
Detailed Description
The application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be noted that, for convenience of description, only the portions related to the present application are shown in the drawings.
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 for a method for acquiring an image or an apparatus for acquiring an image to which embodiments of the present application may be applied.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various information processing applications such as an audio collection application, a text input application, a search class application, an image processing tool, an image display application, and the like may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 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 smartphones, tablet computers, laptop and desktop computers, and the like. When the terminal devices 101, 102, 103 are software, they can be installed in the above-listed electronic devices. Which may be implemented as multiple software or software modules (e.g., to provide distributed services), or as a single software or software module, without limitation.
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 devices 101, 102, 103. The server may analyze and process the data such as the face description information, and feed back the processing result (e.g., the face image) to the terminal device.
It should be noted that the method for acquiring an image provided by the embodiment of the present application may be executed by the terminal devices 101, 102, 103 alone or may be executed by the terminal devices 101, 102, 103 and the server 105 together. Accordingly, the means for acquiring images 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, the server may be implemented as a distributed server cluster formed by a plurality of 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 a distributed service), or may be implemented as a single software or software module, which is not specifically limited 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 steps of:
step 201, at least one piece of face description information is acquired.
In the present embodiment, the 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 may be obtained by the execution body through performing voice recognition on the collected audio; or the text information acquired by the execution body. It should be noted that the wireless connection may include, but is not limited to, 3G/4G connections, wiFi connections, bluetooth connections, wiMAX connections, zigbee connections, UWB (ultra wideband) connections, and other now known or later developed wireless connection means.
Generally, face recognition requires that a face image be acquired to recognize a face. For some situations in practice, the face image is not easy to acquire, the face recognition technology cannot be applied. For example, a person sees a face of a specified person while passing through a venue, but does not take a photograph of the face of the specified person in time. Therefore, the face of the appointed person cannot be searched by the existing face recognition technology.
The execution subject of the present application may first acquire at least one piece of face description information. Wherein, the face description information can be used for describing the face characteristics. The facial features may be eyes, ears, nose, mouth, moles, etc. The face description information may be, for example: "his eyes are small", "his bridge of the nose is high", etc. The face description information can also be other contents, and the specific situation is determined according to the actual situation.
Step 202, for the face description information in the at least one piece of face description information, inquiring a feature tag corresponding to the face description information.
The execution body 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 generally a common term, and is not information that can be directly applied to face recognition. Therefore, the execution subject of the application can inquire the feature tag corresponding to the face description information. Wherein the feature labels may be used to identify classifications of facial features.
In some optional implementations of this embodiment, the acquiring the feature tag corresponding to the face description information may include the following steps:
first, extracting face feature words and definition words corresponding to the face feature words from the face description information.
As can be seen from the above description, the face description information is typically a sentence. In order to facilitate the inquiry of the corresponding face image, the execution subject of the application can extract the face feature words and the qualifiers corresponding to the face feature words from the face description information. The face feature words may include any one of the following: eyes, eyebrows, ears, nose, mouth, moles, spots, scars, etc. Correspondingly, the qualifier may include at least one of: big, small, high, low, normal, oblique. For example, the face description information is: "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 limiting words to form feature labels of the face description information.
After the face feature words and the qualifiers are obtained, the execution main body can combine the face feature words and the qualifiers to form feature labels. For example, the face feature word is "eyes", the qualifier is "small", then the feature tag may be { eyes; small }. The feature labels may also be in other forms of expression and will not be described in detail herein.
Step 203, importing at least one feature tag 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 characteristic label. The executing subject may import these into a pre-trained face matching model. The face matching model may query face images in a face image library to find face images corresponding to the feature tags. The face images in the face image library all have corresponding feature labels. The face matching model can be used for representing the corresponding relation between the feature tag and the face image in the face image library. For a certain face feature word in the face images in the face image library, the definition word can be various. For example, when the face feature word is "eyes", the corresponding qualifier may be: "Large", "small", "double eyelid", "single eyelid". The signature label corresponding to "eye" may be: { eyes; large, small, double eyelid, single eyelid }. When the face feature word is "eyebrow", the corresponding qualifier may be: "thick", "thin", "long", "short", "thick", "thin", etc. The signature label corresponding to "eyebrow" may be: { eyebrow; thick, thin, long, short, thick, thin }. The qualifiers may also be of other types according to the actual situation, and will not be described in detail here. When the qualifier in the feature tag received by the face matching model belongs to one of the qualifiers in the feature tag corresponding to the face image in the face image library, the feature tag received by the face matching model can be considered to correspond to the face image in the face image library. For example: the feature labels received by the face matching model are { eyes; small }, the corresponding feature labels of the face images in the face image library are { eyes }; large, small, double eyelid, single eyelid }. The feature tag received by the face matching model has a correspondence 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 tags received by the face matching model, the more accurate the face matching model can query the corresponding face image.
In some optional implementations of this embodiment, importing at least one feature tag corresponding to the at least one piece of face description information into a pre-trained face matching model, 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, the real face image can be predicted according to the face matching model. For example, when a person sees a facial feature of a specified person in a dim light condition. Although the face image library does not have the face image of the appointed person, the face matching model can predict the possible real face characteristics of the appointed person according to at least one face image which is similar to the face characteristics of the side face part of the appointed person in the face image library, so as to obtain a predicted face image which is closer to the real face of the appointed person. The efficiency and the accuracy of acquiring the face image through the face description information are further improved.
In some optional implementations of this embodiment, the face matching model is constructed by:
the method comprises the steps of 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 the face matching model is constructed, the execution subject of the application can acquire a plurality of sample face images. The technician may configure a corresponding sample feature tag for each face feature contained in each sample face image based on experience or quantization criteria. For example, for a sample face image, the corresponding sample feature label may be: { eyes; large, { nose; small }, { mouth; small, { ear; large }.
And secondly, taking each of the plurality of sample face images as input, taking a sample feature tag of each of the plurality of sample face images as output, and training to obtain a face matching model.
The execution body may take each of the plurality of sample face images as input, take a sample feature tag of each of the plurality of sample face images as output, and train to obtain a face matching model. The face matching model of the application can be an artificial neural network, which abstracts the human brain neural network from the angle of information processing, builds a certain simple model and forms different networks according to different connection modes. Artificial neural networks are typically made up of a large number of nodes (or neurons) interconnected, each node representing a particular output function, called an excitation function. The connection between each two nodes represents a weight, called a weight (also called a parameter), for the signal passing through the connection, and the output of the network varies according to the connection mode, the weight 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 in general, the weights of the nodes of the same layer may be the same, and the weights of the nodes of different layers may be different, so that 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 diagram 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 face description information to the server 105 through the terminal device 102 and the network 104: "appointed person has large eyes, has a face with a black mole". After receiving the face description information, the server 105 may obtain the feature tag corresponding to the face description information as follows: { eyes; big }, { nevi; black }. Finally, the executing body may be the { eye; big }, { nevi; and (5) black is imported into the face matching model to obtain at least a face image.
The method provided by the embodiment of the application firstly obtains at least one piece of face description information, wherein the face description information is used for describing the face characteristics; then inquiring feature labels corresponding to the face description information, wherein the feature labels are used for identifying the classification of the face features; and finally, importing at least one characteristic 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 description information is imported into the face matching model to obtain the face image, so that the efficiency and 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, acquiring a plurality of sample face images and sample feature labels corresponding to each of the plurality of sample face images.
In this embodiment, an execution body (for example, the server 105 shown in fig. 1) on which the face matching model construction method operates may acquire a plurality of sample face images and sample feature tags corresponding to each of the plurality of sample face images through a wired connection manner or a wireless connection manner.
Step 402, sequentially inputting each of the plurality of sample face images into an initial face matching model to obtain a predictive feature label corresponding to each of the plurality of sample face images.
In this embodiment, the execution subject may sequentially input each of the plurality of sample face images to the initial face matching model, so as to obtain a prediction feature tag corresponding to each of the plurality of sample face images. Here, the execution subject may input each sample face image from the 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 the output side of the initial face matching model, where the information output from the output side is the prediction feature label corresponding to the sample face image. The initial face matching model may be an untrained face matching model or an untrained face matching model, and each layer of the initial face matching model is provided with an initialization parameter, and the initialization parameters may be continuously adjusted in the training process of the face matching model.
Step 403, comparing the prediction feature label corresponding to each of 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 prediction feature label corresponding to each of the plurality of sample face images obtained in step 402, the execution subject may compare the prediction feature label corresponding to each of 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. Specifically, if a prediction feature label corresponding to one sample face image is the same as or similar to a 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 or not similar to the sample feature label corresponding to the sample face image, the initial face matching model is mispredicted. Here, the execution body 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, step 405 is executed; if not, step 406 is performed.
And step 405, using the initial face matching model as a face matching model after training.
In this embodiment, when the prediction accuracy of the initial face matching model is greater than the preset accuracy threshold, it is indicated that the training of the face matching model is completed. At this time, the execution subject may use the initial face matching model as the face matching model after training is completed.
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 executing body may adjust parameters of the initial face matching model, and return to the executing step 402 until the face matching model capable of representing the corresponding relationship between the feature tag and the face image is trained.
With further reference to fig. 5, as an implementation of the method shown in the above 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 to 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 tag acquisition unit 502, and a face image acquisition unit 503. The face description information obtaining unit 501 is configured to obtain at least one piece of face description information, where the face description information is used to describe a face feature; a feature tag obtaining unit 502, 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 classification of face features; the face image obtaining unit 503 is configured to import at least one feature tag 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 for representing a corresponding relationship between the feature tag and the face image in the face image library.
In some optional implementations of this embodiment, the feature tag obtaining unit 502 may include: an information extraction subunit (not shown) and a feature tag acquisition subunit (not shown). The information extraction subunit is configured to extract a face feature word and a qualifier corresponding to the face feature word from the face description information, wherein the face feature word comprises any one of the following: eyes, eyebrows, ears, nose, mouth, the aforementioned qualifiers include at least one of: big, small, high, low, normal, oblique; the feature tag acquisition subunit is configured to combine the face feature words and the definition words to form a feature tag 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) and a face matching model construction subunit (not shown). The sample acquisition subunit is configured to acquire a plurality of sample face images and sample feature labels corresponding to each of the plurality of sample face images; the face matching model construction subunit is configured to take each of the plurality of sample face images as input, take a sample feature tag of each of the plurality of sample face images as output, and train to obtain a face matching model.
In some optional implementations of this embodiment, the face matching model building subunit may include: a face matching model construction module (not shown in the figure) configured to sequentially input each of the plurality of sample face images into an initial face matching model to obtain a prediction feature label corresponding to each of the plurality of sample face images, compare the prediction 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 prediction accuracy of the initial face matching model, determine whether the prediction accuracy is greater than a preset accuracy threshold, and if so, use the initial face matching model as a trained face matching model.
In some optional implementations of this embodiment, the face matching model building subunit may include: a parameter adjustment module (not shown in the figure) is configured to adjust parameters of the initial face matching model in response to not being greater than the preset accuracy threshold, and to continue the training step.
The embodiment also provides a server, including: one or more processors; and 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 images described above.
The present embodiment also provides a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements the above-described method for acquiring an image.
Referring now to FIG. 6, there is illustrated a schematic diagram of a computer system 600 suitable for use with a server (e.g., server 105 of FIG. 1) for implementing an embodiment of the present application. The server illustrated in fig. 6 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU) 601, which 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 required for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other through 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, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; 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 drive 610 is also connected to the I/O interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on drive 610 so that a computer program read therefrom is installed as needed into storage section 608.
In particular, according to embodiments of the present disclosure, the processes described above with reference to 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 shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611. The above-described functions defined in the method of the present application are performed when the computer program is executed by a Central Processing Unit (CPU) 601.
The computer readable medium of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 context of this document, 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 the present application, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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 flowcharts 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 involved in the embodiments of the present application may be implemented in software or in hardware. The described units may also be provided in a processor, for example, 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 constitute limitations on the unit itself in some cases, 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 that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: acquiring at least one piece of face description information, wherein the face description information is used for describing face characteristics; for the face description information in the at least one piece of face description information, acquiring a feature tag corresponding to the face description information, wherein the feature tag is used for identifying the classification of the face features; at least one characteristic label corresponding to the at least one piece of face description information is imported 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 characteristic label and the face image in the face image library.
The above description is only illustrative of the preferred embodiments of the present application and of the principles of the technology employed. It will be appreciated by persons skilled in the art that the scope of the application referred to in the present application is not limited to the specific combinations of the technical features described above, but also covers other technical features formed by any combination of the technical features described above or their equivalents without departing from the inventive concept described above. Such as the above-mentioned features and the technical features disclosed in the present application (but not limited to) having similar functions are replaced with each other.

Claims (12)

1. A method for acquiring an image, comprising:
acquiring at least one piece of face description information, wherein the face description information is used for describing face characteristics;
for the face description information in the at least one piece of face description information, acquiring a feature tag corresponding to the face description information, wherein the feature tag is used for identifying the classification of the face features;
importing at least one characteristic 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 characteristic label and the face image in a face image library;
when the face image library does not contain a real face image corresponding to the face description information, determining at least one similar face image with similar face features corresponding to the at least one feature tag in the face image library by utilizing the face matching model; and predicting the real face characteristics according to the similar face images by using the face matching model to obtain predicted face images close to the real faces.
2. The method of claim 1, wherein the obtaining the feature tag corresponding to the face description information comprises:
Extracting face feature words and definition words corresponding to the face feature words from the face description information, wherein the face feature words comprise any one of the following: eyes, eyebrows, ears, nose, mouth, the qualifier includes at least one of: big, small, high, low, normal, oblique;
and combining the face feature words and the limiting words to form the feature tag of the face description information.
3. The method of claim 1, wherein the face matching model is constructed by:
acquiring a plurality of sample face images and sample feature labels 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 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.
4. A method according to claim 3, wherein the training to obtain the face matching model takes each of the plurality of sample face images as input and takes a sample feature tag of each of the plurality of sample face images as output comprises:
The following training steps are performed: inputting each sample face image in the plurality of sample face images into an initial face matching model in sequence 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 larger than a preset accuracy threshold, and if so, using the initial face matching model as a trained face matching model.
5. The method of claim 4, wherein the training to obtain the face matching model takes each of the plurality of sample face images as input and takes a sample feature tag of each of the plurality of sample face images as output comprises:
and adjusting parameters of the initial face matching model in response to the fact that the initial face matching model is not larger than the preset accuracy threshold, and continuing to execute the training step.
6. An apparatus for acquiring an image, comprising:
The facial description information acquisition unit is configured to acquire at least one piece of facial description information, wherein the facial description information is used for describing facial features;
a feature tag obtaining unit, configured to obtain feature tags corresponding to face description information in the at least one piece of face description information, the feature tags being used for identifying classification of face features;
the facial image acquisition unit is configured to import at least one feature tag corresponding to the at least one piece of facial description information into a pre-trained facial matching model to obtain at least one facial image corresponding to the at least one piece of facial description information, wherein the facial matching model is used for representing the corresponding relation between the feature tag and the facial image in a facial image library;
a prediction unit configured to: when the face image library does not contain a real face image corresponding to the face description information, determining at least one similar face image with similar face features corresponding to the at least one feature tag in the face image library by utilizing the face matching model; and predicting the real face characteristics according to the similar face images by using the face matching model to obtain predicted face images close to the real faces.
7. The apparatus of claim 6, wherein the feature tag acquisition 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 includes at least one of: big, small, high, low, normal, oblique;
and the feature tag acquisition subunit is configured to combine the face feature words and the limiting words to form the feature tag of the face description information.
8. The apparatus according to 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 acquisition subunit configured to acquire a plurality of sample face images and a sample feature tag corresponding to each of the plurality of sample face images;
the face matching model construction subunit is configured to take each sample face image in the plurality of sample face images as input, take a sample feature tag of each sample face image in the plurality of sample face images as output, and train to obtain a face matching model.
9. The apparatus of claim 8, wherein the face matching model construction subunit comprises:
the face matching model construction module is configured to sequentially input 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, compare 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, determine whether the prediction 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 construction subunit comprises:
and the parameter adjustment module is used for responding to the condition that the parameter is not larger than the preset accuracy threshold value, and is configured to adjust the parameters of the initial face matching model and continuously execute 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, characterized in that the program, when being executed by a processor, implements 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 CN111259698A (en) 2020-06-09
CN111259698B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115155058B (en) * 2022-09-06 2023-02-03 北京澜舟科技有限公司 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
CN108416326A (en) * 2018-03-27 2018-08-17 百度在线网络技术(北京)有限公司 Face identification method and device
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
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
3-D face recognition using eLBP-based facial description and local feature hybrid matching;Huang, Di等;《IEEE Transactions on Information Forensics and Security》;第7卷(第5期);1551-1565 *
基于深度学习的人脸识别方法研究综述;杨巨成等;《天津科技大学学报》;第31卷(第6期);1-10 *

Also Published As

Publication number Publication date
CN111259698A (en) 2020-06-09

Similar Documents

Publication Publication Date Title
CN107909065B (en) Method and device for detecting face occlusion
US10936919B2 (en) Method and apparatus for detecting human face
CN109726624B (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
US10691928B2 (en) Method and apparatus for facial recognition
CN108922622B (en) Animal health monitoring method, device and computer readable storage medium
CN109564618B (en) Method and system for facial image analysis
CN110288049B (en) Method and apparatus for generating image recognition model
CN108416323B (en) Method and device for recognizing human face
US10691940B2 (en) Method and apparatus for detecting blink
US20190205618A1 (en) Method and apparatus for generating facial feature
CN109034069B (en) Method and apparatus for generating information
CN108197592B (en) Information acquisition method and device
CN111523640B (en) Training method and device for neural network model
US20170185913A1 (en) System and method for comparing training data with test data
KR20190081243A (en) Method and apparatus of recognizing facial expression based on normalized expressiveness and learning method of recognizing facial expression
US11645561B2 (en) Question answering system influenced by user behavior and text metadata generation
CN111061881A (en) Text classification method, equipment and storage medium
CN110084317B (en) Method and device for recognizing images
CN107832720B (en) Information processing method and device based on artificial intelligence
CN111539903B (en) Method and device for training face image synthesis model
CN110298850B (en) Segmentation method and device for fundus image
CN111259698B (en) Method and device for acquiring image
CN116994188A (en) Action recognition method and device, electronic equipment and storage medium
US10592832B2 (en) Effective utilization of idle cycles of users

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