WO2021027343A1 - Human face image recognition method and apparatus, electronic device, and storage medium - Google Patents

Human face image recognition method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2021027343A1
WO2021027343A1 PCT/CN2020/089012 CN2020089012W WO2021027343A1 WO 2021027343 A1 WO2021027343 A1 WO 2021027343A1 CN 2020089012 W CN2020089012 W CN 2020089012W WO 2021027343 A1 WO2021027343 A1 WO 2021027343A1
Authority
WO
WIPO (PCT)
Prior art keywords
face image
image data
face
feature
features
Prior art date
Application number
PCT/CN2020/089012
Other languages
French (fr)
Chinese (zh)
Inventor
黄德亮
朱烽
赵瑞
Original Assignee
深圳市商汤科技有限公司
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 深圳市商汤科技有限公司 filed Critical 深圳市商汤科技有限公司
Priority to KR1020217026325A priority Critical patent/KR20210114511A/en
Priority to JP2021547720A priority patent/JP2022520120A/en
Publication of WO2021027343A1 publication Critical patent/WO2021027343A1/en

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/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Definitions

  • the present disclosure relates to the field of computer vision technology, and in particular to a method and device for facial image recognition, electronic equipment and storage media.
  • Face recognition applications based on deep learning are currently very common.
  • the performance of the face recognition model obtained through deep learning is closely related to the type of data used for training.
  • Effectiveness refers to the improvement of the face recognition model, and can help to dig out more helpful information for model training
  • the present disclosure proposes a technical solution for facial image recognition.
  • a face image recognition method including:
  • an unpaired face image data pair is obtained; wherein, the unpaired face image data pair is used to characterize the characteristics of two face images belonging to different faces ;
  • the face image recognition network is trained to obtain the target recognition network for recognizing the face image.
  • the face image recognition network is trained to obtain the target recognition network for recognizing face images. Compared with the previous face image recognition network, it will be more complete and can be used When the target recognition network recognizes the face image to be recognized, it improves the recognition efficiency and accuracy of the face image.
  • the extracting the image data to be processed belonging to different faces from the face image data includes:
  • Extracting features of the face image in the face image data according to the face image recognition network Extracting features of the face image in the face image data according to the face image recognition network
  • the features belonging to different face images are used as the image data to be processed.
  • the facial image features in the facial image data can be extracted according to the facial image recognition network, since it is necessary to target the image features of two persons belonging to different faces to form a non-paired face Image data pair, therefore, features belonging to different face images are used as the image data to be processed.
  • the obtaining an unpaired face image data pair according to the to-be-processed image data belonging to different faces includes:
  • the features belonging to different faces include at least a first feature in a first face and a second feature in a second face;
  • the first face and the second face are constructed as the face image data pair.
  • the face image recognition network is trained. Therefore, if the similarity obtained at least according to the first feature of the first face and the second feature of the second face meets the preset condition, the first face and The second face structure is the face image data pair.
  • the method before the training the face image recognition network, the method further includes:
  • the sampling order is obtained.
  • the sampling order before training the face image recognition network, it is necessary to obtain the sampling order according to the feature correlation between the face image data pairs, so as to extract sample data from the training samples according to the sampling order, which is beneficial Training of facial image recognition network. If the sampling order is not considered, such as random sampling, it is bound to reduce the training effect of the face image recognition network.
  • the obtaining the sampling order according to the feature correlation between the face image data pairs includes:
  • the traversal path obtained by traversing the KD-Tree is used as the sampling order.
  • KD-Tree is adopted, and features with close feature correlation between face image data pairs are used as adjacent nodes of KD-Tree. Then, after traversing KD-Tree to obtain a traversal path, the traversal path can be As the sampling sequence, extracting sample data from training samples according to the sampling sequence is beneficial to the training of the face image recognition network.
  • the method further includes:
  • the face image data pairs read according to the sampling order are used as training samples input to the face image recognition network.
  • extracting sample data from training samples according to the sampling sequence is beneficial to the training of the face image recognition network.
  • the face image data pair is derived from at least a first face image set used for face training and a second face image set obtained by collecting faces, and one of the two face image sets Human faces are different.
  • the face image data pair can be obtained from two pre-divided face image sets, and the faces in the two face image sets are not the same, thereby avoiding filtering different people from one face image set
  • the cost of face processing can quickly obtain the sample data "non-paired face image data pair" used to train the face image recognition network.
  • the training of the face image recognition network includes:
  • the sample feature includes the feature extracted from the first face image set, and the sample feature set is obtained through multiple iterations.
  • the features extracted from the first face image set are used as sample features and saved, so that more features can be retained, so that the face image can be recognized for the next time.
  • the iterative training of the network with more reference features is conducive to the training of the face image recognition network.
  • the training of the face image recognition network further includes:
  • the loss function in each iteration, can be calculated based on the current facial features extracted from the second face image set and the sample features saved in the previous iteration, so that people can be trained based on the back propagation of the loss function.
  • Face image recognition network the target recognition network obtained will be more complete than the previous face image recognition network.
  • the recognition efficiency and accuracy of the face image can be improved rate.
  • a face image recognition device including:
  • the extraction unit is used to extract the to-be-processed image data belonging to different faces from the face image data;
  • the first processing unit is configured to obtain unpaired face image data pairs according to the to-be-processed image data belonging to different faces; wherein, the unpaired face image data pairs are used to characterize different face image data.
  • the unpaired face image data pairs are used to characterize different face image data.
  • the second processing unit is configured to train the face image recognition network according to the unpaired face image data pair to obtain a target recognition network for recognizing the face image.
  • the extraction unit is further configured to:
  • Extracting features of the face image in the face image data according to the face image recognition network Extracting features of the face image in the face image data according to the face image recognition network
  • the features belonging to different face images are used as the image data to be processed.
  • the first processing unit is further configured to:
  • the features belonging to different faces include at least a first feature in a first face and a second feature in a second face;
  • the first face and the second face are constructed as the face image data pair.
  • the device further includes a third processing unit, configured to:
  • the sampling order is obtained.
  • the third processing unit is further configured to:
  • the traversal path obtained by traversing the KD-Tree is used as the sampling order.
  • the second processing unit is further configured to:
  • the face image data pairs read according to the sampling order are used as training samples input to the face image recognition network.
  • the face image data pair is derived from at least a first face image set used for face training and a second face image set obtained by collecting faces, and one of the two face image sets Human faces are different.
  • the second processing unit is further configured to:
  • the sample feature includes the feature extracted from the first face image set, and the sample feature set is obtained through multiple iterations.
  • the second processing unit is further configured to:
  • an electronic device including:
  • a memory for storing processor executable instructions
  • the processor is configured to execute the above-mentioned face image recognition method.
  • a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the above-mentioned face image recognition method is realized.
  • a computer program including computer readable code, and when the computer readable code is run in an electronic device, a processor in the electronic device executes The above face image recognition method.
  • the to-be-processed image data belonging to different faces are extracted from the face image data; the unpaired face image data pairs are obtained according to the to-be-processed image data belonging to different faces; The unpaired face image data pairs are used to characterize the characteristics of two face images belonging to different faces; according to the unpaired face image data pairs, the face image recognition network is trained to obtain Target recognition network for face images.
  • the face image recognition network is trained to obtain the target recognition network for recognizing face images. Compared with the previous face image recognition network, it will be more complete. When the recognition network recognizes the face image to be recognized, it can improve the recognition efficiency and accuracy of the face image.
  • Fig. 1 shows a flowchart of a face image recognition method according to an embodiment of the present disclosure.
  • Fig. 2 shows a flowchart of a face image recognition method according to an embodiment of the present disclosure.
  • Fig. 3 shows a flowchart of a training process of a face image recognition network according to an embodiment of the present disclosure.
  • Fig. 4 shows a flowchart of the training process of a face image recognition network according to an embodiment of the present disclosure.
  • Fig. 5 shows a block diagram of a face image recognition device according to an embodiment of the present disclosure.
  • Fig. 6 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • FIG. 7 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • the performance of the face recognition network obtained through deep learning is closely related to the type of data used for training.
  • you can Training the face recognition network (such as incremental training) by collecting face data in this scene.
  • the incremental training refers to: training based on new training samples to continuously learn new knowledge from new training samples, and to save most of the historical knowledge that has been learned before, such as two pieces of information obtained from the same face.
  • the present disclosure adds a process of training on pairwise unpaired face image data obtained from different faces.
  • the collected face images can be used to construct unlabeled data for unsupervised training.
  • the face images are fed into the face recognition network for training in a "pair" manner. Since this unsupervised training method only constrains between pairs of faces, even if multiple pairs of face images are fed into the face recognition network, there are no constraints between different pairs of face images. Therefore, Unable to dig out more effective information that is helpful for training the face recognition network, which leads to the low processing efficiency of the trained face recognition network (such as the target recognition network used to recognize face images) obtained by this training method The recognition accuracy is not high.
  • image data to be processed belonging to different faces may be used, and unpaired face image data pairs are obtained according to the image data to be processed belonging to different faces, so that the above-mentioned operation is performed based on the unpaired face image data.
  • Incremental training because of the constraints between different pairs of face images, it can dig out more effective information that is helpful for training the face recognition network, resulting in the trained face recognition obtained by the training method of the present disclosure
  • the processing efficiency of the network (such as the target recognition network used to recognize the face image) is relatively efficient, and the recognition accuracy is improved.
  • Fig. 1 shows a flowchart of a face image recognition method according to an embodiment of the present disclosure.
  • the face image recognition method is applied to a face image recognition device.
  • the face image recognition device can be implemented by a terminal device or a server or other processing equipment.
  • the terminal equipment can be user equipment (UE, User Equipment), mobile devices, cellular phones, cordless phones, personal digital assistants (PDAs, Personal Digital Assistant), handheld devices, computing devices, vehicle-mounted devices, wearable devices, etc.
  • the face image recognition method can be implemented by a processor calling computer-readable instructions stored in a memory. As shown in Figure 1, the process includes:
  • Step S101 Extract image data to be processed belonging to different faces from the face image data.
  • face image data is acquired, and the face image data is image data of multiple different faces.
  • Extract the features of the face image in the face image data according to the face image recognition network For example, the feature extraction function module in the face image recognition network can be used to extract the features of the face image in the face image data.
  • the features belonging to different face images are used as the image data to be processed, and the image data to be processed is composed of multiple face features, including multiple face features of the same face and multiple face features of different faces.
  • Step S102 Obtain an unpaired face image data pair according to the to-be-processed image data belonging to different faces; wherein the unpaired face image data pair is used to represent two faces belonging to different faces The characteristics of the image.
  • the to-be-processed image data belonging to different faces may be multiple features obtained after feature extraction of image data of multiple different faces, and the difference between the two features of the multiple features is calculated. Similarity, if the similarity between the two features meets the preset condition, the face images corresponding to the two features with similarity are queried, and the face image data pair is constructed according to the queried face images,
  • the face image data pair (such as an unpaired face image pair) can also be called "paired" unlabeled data, that is, in the subsequent training process, the unpaired face image is regarded as unlabeled data and paired Input the face image recognition network to train the face image recognition network.
  • the references "first” and “second” are used to distinguish different features derived from different face images.
  • the aforementioned features belonging to different faces include at least a first feature in a first face and a second feature in a second face.
  • the similarity obtained according to the first feature and the second feature meets the preset conditions
  • the first face and the second face are constructed as the face image data pair.
  • Step S103 According to the unpaired face image data pair, the face image recognition network is trained to obtain a target recognition network for recognizing the face image.
  • a plurality of face image data pairs are used as unlabeled data, and the face image recognition network is input in pairs to train the face image recognition network.
  • the training samples used for the training of the face image recognition network can be obtained, namely: multiple face image data pairs (such as non-paired face image pairs), among which, the non-paired person Face image pairing: Two face images do not belong to the same person.
  • the possible constraints (or correlations) between different pairs of face image data can be used to obtain unpaired face image data pairs to train the face image recognition network more effectively.
  • the face image to be recognized can be recognized according to the target recognition network to obtain the recognition result.
  • the target recognition network used to recognize the face image is obtained by training the face image recognition network Later, according to the target recognition network for image recognition, the recognition processing effect is higher and the recognition accuracy is improved.
  • the face image recognition method is applied to a face image recognition device.
  • the face image recognition device can be implemented by a terminal device or a server or other processing equipment.
  • the terminal equipment can be user equipment (UE, User Equipment), mobile devices, cellular phones, cordless phones, personal digital assistants (PDAs, Personal Digital Assistant), handheld devices, computing devices, vehicle-mounted devices, wearable devices, etc.
  • the face image recognition method can be implemented by a processor calling computer-readable instructions stored in a memory. As shown in Figure 2, the process includes:
  • Step S201 Extract image data to be processed belonging to different faces from the face image data.
  • face image data is acquired, and the face image data is image data of multiple different faces.
  • Extract the features of the face image in the face image data according to the face image recognition network For example, the feature extraction function module in the face image recognition network can be used to extract the features of the face image in the face image data.
  • the features belonging to different face images are used as the image data to be processed, and the image data to be processed is composed of multiple face features, including multiple face features of the same face and multiple face features of different faces.
  • Step S202 Obtain an unpaired face image data pair according to the to-be-processed image data belonging to different faces; wherein the unpaired face image data pair is used to represent two faces belonging to different faces The characteristics of the image.
  • the to-be-processed image data belonging to different faces may be multiple features obtained after feature extraction of image data of multiple different faces, and the difference between the two features of the multiple features is calculated. Similarity, if the similarity between the two features meets the preset condition, the face images corresponding to the two features with similarity are queried, and the face image data pair is constructed according to the queried face images,
  • the face image data pair (such as an unpaired face image pair) can also be called "paired" unlabeled data, that is, in the subsequent training process, the unpaired face image is regarded as unlabeled data and paired Input the face image recognition network to train the face image recognition network.
  • the references "first” and “second” are used to distinguish different features derived from different face images.
  • the aforementioned features belonging to different faces include at least a first feature in a first face and a second feature in a second face.
  • the similarity obtained according to the first feature and the second feature meets the preset conditions
  • the first face and the second face are constructed as the face image data pair.
  • Step S203 Obtain a sampling order according to the feature correlation between the face image data pairs.
  • the sampling order of the face pictures can be determined according to the correlation of the face features, for example, a feature set can be obtained according to the features between the face image data pairs.
  • a feature tree KD-Tree is constructed according to the feature set, and features with close feature correlation between face image data pairs are used as adjacent nodes of the KD-Tree.
  • the traversal path obtained by traversing the KD-Tree is used as the sampling order. Calculating the sampling order of the face image based on the correlation of the face image features can make the face images read adjacently have a greater correlation, that is to say, read the face image according to the sampling order. Compared with random reading of face images, more constraints (or correlations) generated between different face image data can be obtained.
  • constraints can train the face image recognition network more effectively and improve its network parameters.
  • the sample features stored in the feature memory module can be combined to further improve the effective training of the face image recognition network, and improve the training efficiency and accuracy of the face image recognition network.
  • Step S204 Use the face image data pairs read according to the sampling order as training samples input to the face image recognition network.
  • the face image data pair is derived from at least the first face image set used for face training and the second face image set obtained by collecting faces in a real environment, and the two face image sets Faces are different.
  • the feature set obtained by extracting the features of the first face image can be recorded as set A in subsequent application examples, and the feature set obtained by extracting features of the second face image can be recorded as set in subsequent application examples B, do not repeat it here.
  • Step S205 Train the face image recognition network according to the training samples to obtain a target recognition network for recognizing the face image.
  • a plurality of face image data pairs are used as unlabeled data, and the face image recognition network is input in pairs to train the face image recognition network.
  • the training samples for the face image recognition network training can be obtained, namely: multiple face image data pairs (such as non-paired face image pairs), where the non-paired person Face image pairing: Two face images do not belong to the same person.
  • the possible constraints (or correlations) between different pairs of face image data can be used to obtain training samples composed of unpaired face image data pairs, and then the training samples can be more effective To train the face image recognition network.
  • the face image to be recognized can be recognized according to the target recognition network to obtain the recognition result.
  • the face image recognition network can be trained more effectively and its network parameters can be improved according to the training samples, after training the face image recognition network to obtain a target recognition network for recognizing face images, according to the target
  • the recognition network performs image recognition, the recognition processing effect is higher, and the recognition accuracy is improved.
  • training the face image recognition network includes: saving sample features in each iteration of training the face image recognition network.
  • the sample features include features extracted from the first face image set, and a sample feature set is obtained through multiple iterations. Characterized in that a subsequent sample may be referred to as application example F A, F A feature may be stored in the memory module, the sample application feature sets in the subsequent examples may be referred to as F M, F A set consisting of F M. , Do not repeat it here.
  • the training the face image recognition network further includes: according to the current face features extracted from the second face image set in each iteration and the sample feature set obtained in the previous iteration Calculate the loss function for all sample characteristics. Training the face image recognition network according to the back propagation of the loss function. It can be understood as: the facial features retained in each iteration and the facial features of the previous iteration are used to calculate the loss function, that is, the facial features retained in each iteration are constrained with the facial features of the previous iteration to obtain more constraints information.
  • the constraint information can also be called "effective information" because it can train the face image recognition network more effectively.
  • the present disclosure can use the face image recognition network Add a feature memory module (used to save the sample feature) in the training process.
  • the current iteration face feature and the sample feature in the feature memory module are calculated together to calculate the loss function, which can provide more effective information, thus, In the training process, more effective information can be used to train the face image recognition network more effectively and improve training efficiency.
  • FIG. 3 shows a flowchart of a face image recognition network training process according to an embodiment of the present disclosure, as shown in Fig. 3, including:
  • Step S301 Extracting features from different collected face images, and constructing training samples composed of unpaired face image pairs.
  • the images in the training samples may be called training images.
  • Step S302 Calculate the sampling order of the training images in the training sample during training according to the characteristics of the unpaired face image pair.
  • Step S303 Read the training images in the training samples according to the calculated sampling order, and train the face image recognition network together with the sample features in the feature memory module.
  • Fig. 4 shows a flowchart of a face image recognition network training process according to an embodiment of the present disclosure. Based on Figs. 3 to 4, the specific implementations involved are described as follows:
  • Output face image features, unpaired face image pairs.
  • Specific implementation methods include: aligning the input face images; using the current face recognition model to extract features from the aligned face images to obtain face recognition features, and the facial image features collected from actual application scenarios are recorded as a set A.
  • the original face image features of the system are recorded as set B; the cosine similarity is calculated from the pairwise features in feature set B and feature set A, and the obtained cosine similarity set is sorted from largest to smallest, taking the top 10% (The percentage is not unique and can be adjusted according to the actual situation.
  • the cosine similarity of the critical point is used as an optimized target threshold for subsequent training of the face image recognition network.
  • feature set A information of unpaired face image pair
  • Output The image sampling order during the training of the face image recognition network.
  • the target recognition network is obtained after training, that is, the new face image recognition network.
  • the specific implementation method includes: using the network parameters of the current face image recognition network to initialize the face image recognition network; reading the unpaired face image pair according to the calculated sampling order, and for each iteration, the read the unpaired face image pair
  • the paired face image pair includes at least two parts: I A and I B , I A comes from the original face training image of the system, and I B comes from the collected face image.
  • the images I A and I B are calculated by the face image recognition network to obtain the features F A and F B , and then the F A is saved in the feature memory module.
  • the B and F all features in the feature set of the memory module M F loss function calculation, and updates the network parameters Face Recognition network.
  • Loss function can be calculated as shown in equation (1), where, L is the loss function; N, M are the total number of different characteristics corresponding to at least one; sample characterized wherein F M F A sample collection configuration; F. B is the feature of the image I B obtained through the calculation of the face image recognition network; threshold is the cosine similarity of the critical point obtained when the cosine similarity is calculated according to the pairwise features in the feature set B and the feature set A, which is regarded as the person An optimized target threshold for face image recognition network training.
  • sample features in the feature memory module are time-sensitive and need to be deleted periodically to update the sample features in the feature memory module. For example, if the sample feature in the feature memory module has existed for more than 100 iterations (the value is not unique, it can be adjusted according to the actual training effect), the sample feature will be removed from the feature memory module, and the iterative process will continue until it meets the requirements. Set the number of iterations.
  • the writing order of the steps does not mean a strict execution order but constitutes any limitation on the implementation process.
  • the specific execution order of each step should be based on its function and possibility.
  • the inner logic is determined.
  • the present disclosure also provides facial image recognition devices, electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any of the facial image recognition methods provided in the present disclosure.
  • the corresponding technical solutions and descriptions and refer to methods Part of the corresponding records will not be repeated.
  • Fig. 5 shows a block diagram of a face image recognition device according to an embodiment of the present disclosure.
  • the face image recognition device includes: an extracting unit 31, which is configured to extract from face image data belonging to The to-be-processed image data of different faces; the first processing unit 32 is configured to obtain a pair of unpaired face image data according to the to-be-processed image data belonging to different faces; wherein, the unpaired face image The data pair is used to characterize the features of two face images belonging to different faces; the second processing unit 33 is used to train the face image recognition network according to the non-paired face image data pair to obtain Target recognition network that recognizes facial images.
  • a recognition unit may also be included for recognizing the face image to be recognized according to the target recognition network to obtain a recognition result.
  • the extraction unit is further configured to: extract features of a face image in the face image data according to the face image recognition network; use features belonging to different face images as the waiting Process image data.
  • the first processing unit is further configured to: the features belonging to different faces include at least a first feature in a first face and a second feature in a second face; according to the When the similarity obtained by the first feature and the second feature meets a preset condition, the first face and the second face are constructed as the face image data pair.
  • the device further includes a third processing unit, configured to obtain a sampling order according to the feature correlation between the pair of face image data.
  • the third processing unit is further configured to: obtain a feature set according to the features between the face image data pairs; construct a feature tree KD-Tree according to the feature set, and face image data Features with close feature correlation between pairs are regarded as adjacent nodes of the KD-Tree; the traversal path obtained by traversing the KD-Tree is used as the sampling order.
  • the second processing unit is further configured to: use the face image data pairs read according to the sampling order as training samples input to the face image recognition network.
  • the face image data pair is derived from at least a first face image set used for face training and a second face image set obtained by collecting faces in a real environment, and two face images The faces in the set are not the same.
  • the second processing unit is further configured to: save sample features in each iteration of training the face image recognition network; the sample features include data from the first face image From the features extracted from the collection, the sample feature set is obtained through multiple iterations.
  • the second processing unit is further configured to: obtain all the sample features in the sample feature set according to the current face features extracted from the second face image set in each iteration and the previous iteration , Calculate the loss function; train the face image recognition network according to the back propagation of the loss function.
  • the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
  • the embodiments of the present disclosure also provide a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above-mentioned method when executed by a processor.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium.
  • An embodiment of the present disclosure also provides an electronic device, including: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured as the above method.
  • the electronic device can be provided as a terminal, server or other form of device.
  • the embodiments of the present disclosure also provide a computer program, the computer program includes computer-readable code, when the computer-readable code is run in an electronic device, the processor in the electronic device is executed to implement the above method .
  • Fig. 6 is a block diagram showing an electronic device 800 according to an exemplary embodiment.
  • the electronic device 800 may be a mobile phone, a computer, a digital broadcasting terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and other terminals.
  • the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, and a sensor component 814 , And communication component 816.
  • the processing component 802 generally controls the overall operations of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the foregoing method.
  • the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components.
  • the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
  • the memory 804 is configured to store various types of data to support operations in the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, images, videos, etc.
  • the memory 804 can be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic Disk or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EPROM erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Magnetic Disk Magnetic Disk or Optical Disk.
  • the power supply component 806 provides power for various components of the electronic device 800.
  • the power supply component 806 may include a power management system, one or more power supplies, and other components associated with the generation, management, and distribution of power for the electronic device 800.
  • the multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user.
  • the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touch, sliding, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure related to the touch or slide operation.
  • the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 810 is configured to output and/or input audio signals.
  • the audio component 810 includes a microphone (MIC).
  • the microphone is configured to receive external audio signals.
  • the received audio signal may be further stored in the memory 804 or transmitted via the communication component 816.
  • the audio component 810 further includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module.
  • the peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
  • the sensor component 814 includes one or more sensors for providing the electronic device 800 with various aspects of state evaluation.
  • the sensor component 814 can detect the on/off status of the electronic device 800 and the relative positioning of the components.
  • the component is the display and the keypad of the electronic device 800.
  • the sensor component 814 can also detect the electronic device 800 or the electronic device 800.
  • the position of the component changes, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration/deceleration of the electronic device 800, and the temperature change of the electronic device 800.
  • the sensor component 814 may include a proximity sensor configured to detect the presence of nearby objects when there is no physical contact.
  • the sensor component 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
  • the communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices.
  • the electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof.
  • the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 further includes a near field communication (NFC) module to facilitate short-range communication.
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • the electronic device 800 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field A programmable gate array (FPGA), controller, microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
  • ASIC application specific integrated circuits
  • DSP digital signal processors
  • DSPD digital signal processing devices
  • PLD programmable logic devices
  • FPGA field A programmable gate array
  • controller microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
  • a non-volatile computer-readable storage medium such as a memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to complete the foregoing method.
  • Fig. 7 is a block diagram showing an electronic device 900 according to an exemplary embodiment.
  • the electronic device 900 may be provided as a server.
  • the electronic device 900 includes a processing component 922, which further includes one or more processors, and a memory resource represented by a memory 932, for storing instructions that can be executed by the processing component 922, such as application programs.
  • the application program stored in the memory 932 may include one or more modules each corresponding to a set of instructions.
  • the processing component 922 is configured to execute instructions to perform the aforementioned methods.
  • the electronic device 900 may also include a power supply component 926 configured to perform power management of the electronic device 900, a wired or wireless network interface 950 configured to connect the electronic device 900 to a network, and an input output (I/O) interface 958 .
  • the electronic device 900 can operate based on an operating system stored in the memory 932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
  • a non-volatile computer-readable storage medium such as the memory 932 including computer program instructions, which can be executed by the processing component 922 of the electronic device 900 to complete the foregoing method.
  • the present disclosure may be a system, method, and/or computer program product.
  • the computer program product may include a computer-readable storage medium loaded with computer-readable program instructions for enabling a processor to implement various aspects of the present disclosure.
  • the computer-readable storage medium may be a tangible device that can hold and store instructions used by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) Or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a printer with instructions stored thereon
  • RAM random access memory
  • ROM read-only memory
  • EPROM erasable programmable read-only memory
  • flash memory flash memory
  • SRAM static random access memory
  • CD-ROM compact disk read-only memory
  • DVD digital versatile disk
  • memory stick floppy disk
  • mechanical encoding device such as a printer with instructions stored thereon
  • the computer-readable storage medium used here is not interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (for example, light pulses through fiber optic cables), or through wires Transmission of electrical signals.
  • the computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing/processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • the network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network, and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device .
  • the computer program instructions used to perform the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, status setting data, or in one or more programming languages.
  • Source code or object code written in any combination, the programming language includes object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages.
  • Computer-readable program instructions can be executed entirely on the user's computer, partly on the user's computer, executed as a stand-alone software package, partly on the user's computer and partly executed on a remote computer, or entirely on the remote computer or server carried out.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to access the Internet connection).
  • LAN local area network
  • WAN wide area network
  • an electronic circuit such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be customized by using the status information of the computer-readable program instructions.
  • the computer-readable program instructions are executed to realize various aspects of the present disclosure.
  • These computer-readable program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine such that when these instructions are executed by the processor of the computer or other programmable data processing device , A device that implements the functions/actions specified in one or more blocks in the flowchart and/or block diagram is produced. It is also possible to store these computer-readable program instructions in a computer-readable storage medium. These instructions make computers, programmable data processing apparatuses, and/or other devices work in a specific manner, so that the computer-readable medium storing instructions includes An article of manufacture, which includes instructions for implementing various aspects of the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of an instruction, and the module, program segment, or part of an instruction contains one or more functions for implementing the specified logical function.
  • Executable instructions may also occur in a different order from the order marked in the drawings. For example, two consecutive blocks can actually be executed in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or actions Or it can be realized by a combination of dedicated hardware and computer instructions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The present disclosure relates to a human face image recognition method and apparatus, an electronic device, and a storage medium. The method comprises: from human face image data, extracting image data to be processed that belongs to different human faces; obtaining an unpaired human face image data pair according to the image data to be processed that belongs to different human faces, wherein the unpaired human face image data pair is used for representing the features of two human face images belonging to different human faces; and according to the unpaired human face image data pair, training a human face image recognition network to obtain a target recognition network for recognizing a human face image. By means of the present invention, the recognition efficiency and accuracy of the human face image can be improved.

Description

一种人脸图像识别方法及装置、电子设备和存储介质Face image recognition method and device, electronic equipment and storage medium
本申请要求在2019年8月12日提交中国专利局、申请号为201910739381.8、发明名称为“一种人脸图像识别方法及装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on August 12, 2019, the application number is 201910739381.8, and the invention title is "a method and device for facial image recognition, electronic equipment and storage medium", all of which The content is incorporated in this application by reference.
技术领域Technical field
本公开涉及计算机视觉技术领域,尤其涉及一种人脸图像识别方法及装置、电子设备和存储介质。The present disclosure relates to the field of computer vision technology, and in particular to a method and device for facial image recognition, electronic equipment and storage media.
背景技术Background technique
基于深度学习的人脸识别应用,目前非常普遍。通过深度学习得到的人脸识别模型的性能与其训练所用的数据类型息息相关,为了提高人脸识别的识别效率和准确度,需要对人脸识别模型进行改善、或者提高用于该模型训练的训练数据的有效性(有效性指有助于人脸识别模型的改善,并能有助于挖掘出更多对模型训练有帮助的信息),然而,相关技术中未存在有效的解决方案。Face recognition applications based on deep learning are currently very common. The performance of the face recognition model obtained through deep learning is closely related to the type of data used for training. In order to improve the recognition efficiency and accuracy of face recognition, it is necessary to improve the face recognition model or increase the training data used for the model training Effectiveness (effectiveness refers to the improvement of the face recognition model, and can help to dig out more helpful information for model training), however, there is no effective solution in related technologies.
发明内容Summary of the invention
本公开提出了一种人脸图像识别技术方案。The present disclosure proposes a technical solution for facial image recognition.
根据本公开的一方面,提供了一种人脸图像识别方法,所述方法包括:According to an aspect of the present disclosure, there is provided a face image recognition method, the method including:
从人脸图像数据中提取属于不同人脸的待处理图像数据;Extract the to-be-processed image data belonging to different faces from the face image data;
根据所述属于不同人脸的待处理图像数据,得到非配对的人脸图像数据对;其中,所述非配对的人脸图像数据对用于表征属于不同人脸的两张人脸图像的特征;According to the to-be-processed image data belonging to different faces, an unpaired face image data pair is obtained; wherein, the unpaired face image data pair is used to characterize the characteristics of two face images belonging to different faces ;
根据所述非配对的人脸图像数据对,对人脸图像识别网络进行训练,得到用于识别人脸图像的目标识别网络。According to the unpaired face image data pair, the face image recognition network is trained to obtain the target recognition network for recognizing the face image.
采用本公开,由于可以针对属于不同人脸的两两人脸图像特征,来形成非配对的人脸图像数据对,从而可以得到属于不同人脸图像但却特征相近的两两人脸图像特征,因此,根据该非配对的人脸图像数据对,对人脸图像识别网络进行训练,得到用于识别人脸图像的目标识别网络,相比之前的人脸图像识别网络会更加完善,可以在使用目标识别网络对待识别的人脸图像进行识别时,提高对人脸图像的识别效率和准确率。可能的实现方式中,所述从人脸图像数据中提取属于不同人脸的待处理图像数据,包括:With the present disclosure, since it is possible to form non-paired face image data pairs for the image features of two persons belonging to different faces, it is possible to obtain the image characteristics of two persons belonging to different face images but with similar features. Therefore, according to the unpaired face image data pair, the face image recognition network is trained to obtain the target recognition network for recognizing face images. Compared with the previous face image recognition network, it will be more complete and can be used When the target recognition network recognizes the face image to be recognized, it improves the recognition efficiency and accuracy of the face image. In a possible implementation manner, the extracting the image data to be processed belonging to different faces from the face image data includes:
根据所述人脸图像识别网络,提取所述人脸图像数据中人脸图像的特征;Extracting features of the face image in the face image data according to the face image recognition network;
将属于不同人脸图像的特征作为所述待处理图像数据。The features belonging to different face images are used as the image data to be processed.
采用本公开,可以根据所述人脸图像识别网络,提取所述人脸图像数据中人脸图像的特征,由于需要针对属于不同人脸的两两人脸图像特征,来形成非配对的人脸图像数据对,因此,将属于不同人 脸图像的特征作为所述待处理图像数据。With the present disclosure, the facial image features in the facial image data can be extracted according to the facial image recognition network, since it is necessary to target the image features of two persons belonging to different faces to form a non-paired face Image data pair, therefore, features belonging to different face images are used as the image data to be processed.
可能的实现方式中,所述根据所述属于不同人脸的待处理图像数据,得到非配对的人脸图像数据对,包括:In a possible implementation manner, the obtaining an unpaired face image data pair according to the to-be-processed image data belonging to different faces includes:
所述属于不同人脸的特征至少包括第一人脸中的第一特征和第二人脸中的第二特征;The features belonging to different faces include at least a first feature in a first face and a second feature in a second face;
根据所述第一特征和所述第二特征得到的相似度符合预设条件的情况下,将所述第一人脸和所述第二人脸构造为所述人脸图像数据对。In the case that the similarity obtained according to the first feature and the second feature meets a preset condition, the first face and the second face are constructed as the face image data pair.
采用本公开,由于属于不同人脸的特征有很多,需要筛选出属于不同人脸但较为相似的特征,这样一来,根据该较为相似的特征形成非配对的人脸图像数据对,才有利于人脸图像识别网络的训练,因此,可以至少根据第一人脸的第一特征和第二人脸的第二特征得到的相似度符合预设条件的情况下,将所述第一人脸和所述第二人脸构造为所述人脸图像数据对。With the present disclosure, since there are many features belonging to different faces, it is necessary to filter out relatively similar features that belong to different faces. In this way, it is beneficial to form unpaired face image data pairs based on the relatively similar features. The face image recognition network is trained. Therefore, if the similarity obtained at least according to the first feature of the first face and the second feature of the second face meets the preset condition, the first face and The second face structure is the face image data pair.
可能的实现方式中,所述对人脸图像识别网络进行训练之前,所述方法还包括:In a possible implementation, before the training the face image recognition network, the method further includes:
根据所述人脸图像数据对之间的特征相关性,得到采样顺序。According to the feature correlation between the face image data pairs, the sampling order is obtained.
采用本公开,对人脸图像识别网络进行训练之前,需要根据所述人脸图像数据对之间的特征相关性,得到采样顺序,以便根据该采样顺序从训练样本中提取样本数据,从而有利于人脸图像识别网络的训练。如果不考虑采样顺序,比如随机采样,势必降低人脸图像识别网络的训练效果。According to the present disclosure, before training the face image recognition network, it is necessary to obtain the sampling order according to the feature correlation between the face image data pairs, so as to extract sample data from the training samples according to the sampling order, which is beneficial Training of facial image recognition network. If the sampling order is not considered, such as random sampling, it is bound to reduce the training effect of the face image recognition network.
可能的实现方式中,所述根据所述人脸图像数据对之间的特征相关性,得到采样顺序,包括:In a possible implementation manner, the obtaining the sampling order according to the feature correlation between the face image data pairs includes:
根据所述人脸图像数据对之间的特征,得到特征集合;Obtaining a feature set according to the features between the face image data pairs;
根据所述特征集合构造特征树KD-Tree,人脸图像数据对之间的特征相关性近的特征作为所述KD-Tree的相邻节点;Constructing a feature tree KD-Tree according to the feature set, and features with close feature correlation between face image data pairs are used as adjacent nodes of the KD-Tree;
将遍历所述KD-Tree得到的遍历路径作为所述采样顺序。The traversal path obtained by traversing the KD-Tree is used as the sampling order.
采用本公开,采用KD-Tree,并根据人脸图像数据对之间的特征相关性近的特征作为KD-Tree的相邻节点,那么,遍历KD-Tree得到遍历路径后,可以将该遍历路径作为采样顺序,根据该采样顺序从训练样本中提取样本数据,有利于人脸图像识别网络的训练。可能的实现方式中,所述得到采样顺序之后,所述方法还包括:According to the present disclosure, KD-Tree is adopted, and features with close feature correlation between face image data pairs are used as adjacent nodes of KD-Tree. Then, after traversing KD-Tree to obtain a traversal path, the traversal path can be As the sampling sequence, extracting sample data from training samples according to the sampling sequence is beneficial to the training of the face image recognition network. In a possible implementation manner, after the sampling order is obtained, the method further includes:
将根据所述采样顺序读取的人脸图像数据对,作为输入所述人脸图像识别网络的训练样本。The face image data pairs read according to the sampling order are used as training samples input to the face image recognition network.
采用本公开,根据该采样顺序从训练样本中提取样本数据,有利于人脸图像识别网络的训练。With the present disclosure, extracting sample data from training samples according to the sampling sequence is beneficial to the training of the face image recognition network.
可能的实现方式中,所述人脸图像数据对,至少来源于用于人脸训练的第一人脸图像集合和采集人脸得到的第二人脸图像集合,且两个人脸图像集合中的人脸为不相同。In a possible implementation manner, the face image data pair is derived from at least a first face image set used for face training and a second face image set obtained by collecting faces, and one of the two face image sets Human faces are different.
采用本公开,可以将人脸图像数据对从预先划分好的两个人脸图像集合中获取,两个人脸图像集合中的人脸为不相同,从而避免了从一个人脸图像集合中筛选不同人脸的处理成本,可以更快得到用于训练人脸图像识别网络的样本数据“非配对的人脸图像数据对”。With the present disclosure, the face image data pair can be obtained from two pre-divided face image sets, and the faces in the two face image sets are not the same, thereby avoiding filtering different people from one face image set The cost of face processing can quickly obtain the sample data "non-paired face image data pair" used to train the face image recognition network.
可能的实现方式中,所述对人脸图像识别网络进行训练,包括:In a possible implementation manner, the training of the face image recognition network includes:
对所述人脸图像识别网络进行训练的每次迭代中,保存样本特征;In each iteration of training the face image recognition network, save sample features;
所述样本特征包括从所述第一人脸图像集合中提取的特征,经多次迭代得到样本特征集。The sample feature includes the feature extracted from the first face image set, and the sample feature set is obtained through multiple iterations.
采用本公开,对人脸图像识别网络进行训练的过程中,将从第一人脸图像集合中提取的特征作为样本特征并保存,可以更多的保留特征,从而为下一次对人脸图像识别网络的迭代训练更多参考特征,有利于人脸图像识别网络的训练。可能的实现方式中,所述对人脸图像识别网络进行训练,还包括:With the present disclosure, in the process of training the face image recognition network, the features extracted from the first face image set are used as sample features and saved, so that more features can be retained, so that the face image can be recognized for the next time. The iterative training of the network with more reference features is conducive to the training of the face image recognition network. In a possible implementation manner, the training of the face image recognition network further includes:
根据每次迭代中从所述第二人脸图像集合中提取的当前人脸特征和上一次迭代得到样本特征集中的所有样本特征,计算损失函数;Calculating a loss function according to the current face features extracted from the second face image set in each iteration and all the sample features in the sample feature set obtained in the previous iteration;
根据所述损失函数的反向传播来训练所述人脸图像识别网络。Training the face image recognition network according to the back propagation of the loss function.
采用本公开,在每次迭代中,可以根据第二人脸图像集合中提取的当前人脸特征和上一次迭代保存的样本特征来计算损失函数,从而根据该损失函数的反向传播来训练人脸图像识别网络,得到的目标识别网络,相比之前的人脸图像识别网络会更加完善,可以在使用目标识别网络对待识别的人脸图像进行识别时,提高对人脸图像的识别效率和准确率。According to the present disclosure, in each iteration, the loss function can be calculated based on the current facial features extracted from the second face image set and the sample features saved in the previous iteration, so that people can be trained based on the back propagation of the loss function. Face image recognition network, the target recognition network obtained will be more complete than the previous face image recognition network. When the target recognition network is used to recognize the face image to be recognized, the recognition efficiency and accuracy of the face image can be improved rate.
根据本公开的一方面,提供了一种人脸图像识别装置,所述装置包括:According to an aspect of the present disclosure, there is provided a face image recognition device, the device including:
提取单元,用于从人脸图像数据中提取属于不同人脸的待处理图像数据;The extraction unit is used to extract the to-be-processed image data belonging to different faces from the face image data;
第一处理单元,用于根据所述属于不同人脸的待处理图像数据,得到非配对的人脸图像数据对;其中,所述非配对的人脸图像数据对用于表征属于不同人脸的两张人脸图像的特征;The first processing unit is configured to obtain unpaired face image data pairs according to the to-be-processed image data belonging to different faces; wherein, the unpaired face image data pairs are used to characterize different face image data. Features of two face images;
第二处理单元,用于根据所述非配对的人脸图像数据对,对人脸图像识别网络进行训练,得到用于识别人脸图像的目标识别网络。The second processing unit is configured to train the face image recognition network according to the unpaired face image data pair to obtain a target recognition network for recognizing the face image.
可能的实现方式中,所述提取单元,进一步用于:In a possible implementation manner, the extraction unit is further configured to:
根据所述人脸图像识别网络,提取所述人脸图像数据中人脸图像的特征;Extracting features of the face image in the face image data according to the face image recognition network;
将属于不同人脸图像的特征作为所述待处理图像数据。The features belonging to different face images are used as the image data to be processed.
可能的实现方式中,所述第一处理单元,进一步用于:In a possible implementation manner, the first processing unit is further configured to:
所述属于不同人脸的特征至少包括第一人脸中的第一特征和第二人脸中的第二特征;The features belonging to different faces include at least a first feature in a first face and a second feature in a second face;
根据所述第一特征和所述第二特征得到的相似度符合预设条件的情况下,将所述第一人脸和所述第二人脸构造为所述人脸图像数据对。In the case that the similarity obtained according to the first feature and the second feature meets a preset condition, the first face and the second face are constructed as the face image data pair.
可能的实现方式中,所述装置还包括第三处理单元,用于:In a possible implementation manner, the device further includes a third processing unit, configured to:
根据所述人脸图像数据对之间的特征相关性,得到采样顺序。According to the feature correlation between the face image data pairs, the sampling order is obtained.
可能的实现方式中,所述第三处理单元,进一步用于:In a possible implementation manner, the third processing unit is further configured to:
根据所述人脸图像数据对之间的特征,得到特征集合;Obtaining a feature set according to the features between the face image data pairs;
根据所述特征集合构造特征树KD-Tree,人脸图像数据对之间的特征相关性近的特征作为所述KD-Tree的相邻节点;Constructing a feature tree KD-Tree according to the feature set, and features with close feature correlation between face image data pairs are used as adjacent nodes of the KD-Tree;
将遍历所述KD-Tree得到的遍历路径作为所述采样顺序。The traversal path obtained by traversing the KD-Tree is used as the sampling order.
可能的实现方式中,所述第二处理单元,进一步用于:In a possible implementation manner, the second processing unit is further configured to:
将根据所述采样顺序读取的人脸图像数据对,作为输入所述人脸图像识别网络的训练样本。The face image data pairs read according to the sampling order are used as training samples input to the face image recognition network.
可能的实现方式中,所述人脸图像数据对,至少来源于用于人脸训练的第一人脸图像集合和采集人脸得到的第二人脸图像集合,且两个人脸图像集合中的人脸为不相同。In a possible implementation manner, the face image data pair is derived from at least a first face image set used for face training and a second face image set obtained by collecting faces, and one of the two face image sets Human faces are different.
可能的实现方式中,所述第二处理单元,进一步用于:In a possible implementation manner, the second processing unit is further configured to:
对所述人脸图像识别网络进行训练的每次迭代中,保存样本特征;In each iteration of training the face image recognition network, save sample features;
所述样本特征包括从所述第一人脸图像集合中提取的特征,经多次迭代得到样本特征集。The sample feature includes the feature extracted from the first face image set, and the sample feature set is obtained through multiple iterations.
可能的实现方式中,所述第二处理单元,进一步用于:In a possible implementation manner, the second processing unit is further configured to:
根据每次迭代中从所述第二人脸图像集合中提取的当前人脸特征和上一次迭代得到样本特征集中的所有样本特征,计算损失函数;Calculating a loss function according to the current face features extracted from the second face image set in each iteration and all the sample features in the sample feature set obtained in the previous iteration;
根据所述损失函数的反向传播来训练所述人脸图像识别网络。Training the face image recognition network according to the back propagation of the loss function.
根据本公开的一方面,提供了一种电子设备,包括:According to an aspect of the present disclosure, there is provided an electronic device including:
处理器;processor;
用于存储处理器可执行指令的存储器;A memory for storing processor executable instructions;
其中,所述处理器被配置为:执行上述人脸图像识别方法。Wherein, the processor is configured to execute the above-mentioned face image recognition method.
根据本公开的一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述人脸图像识别方法。According to an aspect of the present disclosure, there is provided a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the above-mentioned face image recognition method is realized.
根据本公开的一方面,提供了一种计算机程序,所述计算机程序包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现上述人脸图像识别方法。According to an aspect of the present disclosure, there is provided a computer program including computer readable code, and when the computer readable code is run in an electronic device, a processor in the electronic device executes The above face image recognition method.
在本公开实施例中,从人脸图像数据中提取属于不同人脸的待处理图像数据;根据所述属于不同人脸的待处理图像数据,得到非配对的人脸图像数据对;其中,所述非配对的人脸图像数据对用于表征属于不同人脸的两张人脸图像的特征;根据所述非配对的人脸图像数据对,对人脸图像识别网络进行训练,得到用于识别人脸图像的目标识别网络。采用本公开,由于可以针对属于不同人脸的两两人脸图像特征,来形成非配对的人脸图像数据对,从而可以得到属于不同人脸图像但却特征相近的两两人脸图像特征,因此,根据该非配对的人脸图像数据对,对人脸图像识别网络进行训练,得到用于识别人脸图像的目标识别网络,相比之前的人脸图像识别网络会更加完善,后续在目标识别网络对待识别的人脸图像进行识别时,能提高对人脸图像的识别效率和准确率。In the embodiment of the present disclosure, the to-be-processed image data belonging to different faces are extracted from the face image data; the unpaired face image data pairs are obtained according to the to-be-processed image data belonging to different faces; The unpaired face image data pairs are used to characterize the characteristics of two face images belonging to different faces; according to the unpaired face image data pairs, the face image recognition network is trained to obtain Target recognition network for face images. With the present disclosure, since it is possible to form non-paired face image data pairs for the image features of two persons belonging to different faces, it is possible to obtain the image characteristics of two persons belonging to different face images but with similar features. Therefore, according to the unpaired face image data pair, the face image recognition network is trained to obtain the target recognition network for recognizing face images. Compared with the previous face image recognition network, it will be more complete. When the recognition network recognizes the face image to be recognized, it can improve the recognition efficiency and accuracy of the face image.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, rather than limiting the present disclosure.
根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。According to the following detailed description of exemplary embodiments with reference to the accompanying drawings, other features and aspects of the present disclosure will become clear.
附图说明Description of the drawings
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments that conform to the disclosure and are used together with the specification to explain the technical solutions of the disclosure.
图1示出根据本公开实施例的人脸图像识别方法的流程图。Fig. 1 shows a flowchart of a face image recognition method according to an embodiment of the present disclosure.
图2示出根据本公开实施例的人脸图像识别方法的流程图。Fig. 2 shows a flowchart of a face image recognition method according to an embodiment of the present disclosure.
图3示出根据本公开实施例的人脸图像识别网络训练过程流程图。Fig. 3 shows a flowchart of a training process of a face image recognition network according to an embodiment of the present disclosure.
图4示出根据本公开实施例的人脸图像识别网络训练过程流程图。Fig. 4 shows a flowchart of the training process of a face image recognition network according to an embodiment of the present disclosure.
图5示出根据本公开实施例的人脸图像识别装置的框图。Fig. 5 shows a block diagram of a face image recognition device according to an embodiment of the present disclosure.
图6示出根据本公开实施例的电子设备的框图。Fig. 6 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
图7示出根据本公开实施例的电子设备的框图。FIG. 7 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式detailed description
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the drawings. The same reference numerals in the drawings indicate elements with the same or similar functions. Although various aspects of the embodiments are shown in the drawings, unless otherwise noted, the drawings are not necessarily drawn to scale.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The dedicated word "exemplary" here means "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" need not be construed as being superior or better than other embodiments.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。The term "and/or" in this article is only an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, exist alone B these three situations. In addition, the term "at least one" in this document means any one or any combination of at least two of the multiple, for example, including at least one of A, B, and C, may mean including A, Any one or more elements selected in the set formed by B and C.
另外,为了更好的说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. Those skilled in the art should understand that the present disclosure can also be implemented without some specific details. In some instances, the methods, means, elements, and circuits well-known to those skilled in the art have not been described in detail in order to highlight the gist of the disclosure.
随着深度学习的发展,人脸识别技术在很多应用场景都得到了应用,尤其是在安防监控中更是不可或缺的一个模块。通过深度学习得到的人脸识别网络的性能与其训练所用的数据类型息息相关,为了在某一场景(如视频分析、安防人脸监控等)下得到更好的识别处理效率和准确性等性能,可以通过采集该场景下的人脸数据对人脸识别网络做训练(如增量训练)。所述增量训练是指:根据新的训练样本进行训练,以不断地从新的训练样本中学习新的知识,并能保存大部分以前已经学习到的历史知识,比如根据同一人脸得到的两两配对人脸图像数据进行训练所得到的历史记录,本公开在此基础上增加了根据不同人脸得到的两两非配对人脸图像数据进行训练的过程。With the development of deep learning, face recognition technology has been applied in many application scenarios, especially an indispensable module in security monitoring. The performance of the face recognition network obtained through deep learning is closely related to the type of data used for training. In order to obtain better recognition processing efficiency and accuracy in a certain scene (such as video analysis, security face monitoring, etc.), you can Training the face recognition network (such as incremental training) by collecting face data in this scene. The incremental training refers to: training based on new training samples to continuously learn new knowledge from new training samples, and to save most of the historical knowledge that has been learned before, such as two pieces of information obtained from the same face. Based on the historical records obtained by training two pairs of face image data, the present disclosure adds a process of training on pairwise unpaired face image data obtained from different faces.
需要指出的是,为了在增量训练中不引入噪声,可以使用采集的人脸图像构造无标签数据做无监督训练。在训练过程中,人脸图像按照“成对”的方式被输送进人脸识别网络进行训练。由于这种无 监督训练方式只在成对的人脸之间进行约束,即使有多对人脸图像被输送进人脸识别网络,不同对的人脸图像之间由于并没有进行约束,因此,无法挖掘更多对训练该人脸识别网络有帮助的有效信息,从而导致采用这种训练方式得到的训练后人脸识别网络(如用于识别人脸图像的目标识别网络)的处理效率比较低效,识别精度也不高。It should be pointed out that in order not to introduce noise in the incremental training, the collected face images can be used to construct unlabeled data for unsupervised training. During the training process, the face images are fed into the face recognition network for training in a "pair" manner. Since this unsupervised training method only constrains between pairs of faces, even if multiple pairs of face images are fed into the face recognition network, there are no constraints between different pairs of face images. Therefore, Unable to dig out more effective information that is helpful for training the face recognition network, which leads to the low processing efficiency of the trained face recognition network (such as the target recognition network used to recognize face images) obtained by this training method The recognition accuracy is not high.
本公开中,可以采用属于不同人脸的待处理图像数据,根据属于不同人脸的待处理图像数据,得到非配对的人脸图像数据对,从而,根据该非配对的人脸图像数据进行上述增量训练,由于在不同对的人脸图像之间进行约束,因此,可以挖掘出更多对训练该人脸识别网络有帮助的有效信息,导致采用本公开训练方式得到的训练后人脸识别网络(如用于识别人脸图像的目标识别网络)的处理效率比较高效,提高了识别精度。In the present disclosure, image data to be processed belonging to different faces may be used, and unpaired face image data pairs are obtained according to the image data to be processed belonging to different faces, so that the above-mentioned operation is performed based on the unpaired face image data. Incremental training, because of the constraints between different pairs of face images, it can dig out more effective information that is helpful for training the face recognition network, resulting in the trained face recognition obtained by the training method of the present disclosure The processing efficiency of the network (such as the target recognition network used to recognize the face image) is relatively efficient, and the recognition accuracy is improved.
图1示出根据本公开实施例的人脸图像识别方法的流程图,该人脸图像识别方法应用于人脸图像识别装置,例如,人脸图像识别装置可以由终端设备或服务器或其它处理设备执行,其中,终端设备可以为用户设备(UE,User Equipment)、移动设备、蜂窝电话、无绳电话、个人数字处理(PDA,Personal Digital Assistant)、手持设备、计算设备、车载设备、可穿戴设备等。在一些可能的实现方式中,该人脸图像识别方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。如图1所示,该流程包括:Fig. 1 shows a flowchart of a face image recognition method according to an embodiment of the present disclosure. The face image recognition method is applied to a face image recognition device. For example, the face image recognition device can be implemented by a terminal device or a server or other processing equipment. Implementation, where the terminal equipment can be user equipment (UE, User Equipment), mobile devices, cellular phones, cordless phones, personal digital assistants (PDAs, Personal Digital Assistant), handheld devices, computing devices, vehicle-mounted devices, wearable devices, etc. . In some possible implementations, the face image recognition method can be implemented by a processor calling computer-readable instructions stored in a memory. As shown in Figure 1, the process includes:
步骤S101、从人脸图像数据中提取属于不同人脸的待处理图像数据。Step S101: Extract image data to be processed belonging to different faces from the face image data.
一示例中,获取人脸图像数据,人脸图像数据为多个不同人脸的图像数据。根据人脸图像识别网络提取该人脸图像数据中人脸图像的特征,比如,可以采用人脸图像识别网络中的特征提取功能模块,对该人脸图像数据中人脸图像的特征进行特征提取。将属于不同人脸图像的特征作为该待处理图像数据,该待处理图像数据由多个人脸特征组成,包括同一人脸的多个人脸特征及不同人脸的多个人脸特征。In one example, face image data is acquired, and the face image data is image data of multiple different faces. Extract the features of the face image in the face image data according to the face image recognition network. For example, the feature extraction function module in the face image recognition network can be used to extract the features of the face image in the face image data. . The features belonging to different face images are used as the image data to be processed, and the image data to be processed is composed of multiple face features, including multiple face features of the same face and multiple face features of different faces.
步骤S102、根据所述属于不同人脸的待处理图像数据,得到非配对的人脸图像数据对;其中,所述非配对的人脸图像数据对用于表征属于不同人脸的两张人脸图像的特征。Step S102: Obtain an unpaired face image data pair according to the to-be-processed image data belonging to different faces; wherein the unpaired face image data pair is used to represent two faces belonging to different faces The characteristics of the image.
可能的实现方式中,属于不同人脸的待处理图像数据,可以是对多个不同人脸的图像数据进行特征提取后所得到的多个特征,计算该多个特征中两两特征之间的相似度,如果两两特征之间的相似度符合预设条件,则查询具备相似度的两两特征所分别对应的人脸图像,根据查询到的人脸图像构造所述人脸图像数据对,该人脸图像数据对(如非配对人脸图像对)也可以称为“成对”的无标签数据,即在后续训练过程中将该非配对人脸图像作为无标签数据,并成对地输入人脸图像识别网络,以训练该人脸图像识别网络。In a possible implementation, the to-be-processed image data belonging to different faces may be multiple features obtained after feature extraction of image data of multiple different faces, and the difference between the two features of the multiple features is calculated. Similarity, if the similarity between the two features meets the preset condition, the face images corresponding to the two features with similarity are queried, and the face image data pair is constructed according to the queried face images, The face image data pair (such as an unpaired face image pair) can also be called "paired" unlabeled data, that is, in the subsequent training process, the unpaired face image is regarded as unlabeled data and paired Input the face image recognition network to train the face image recognition network.
一示例中,用“第一”、“第二”这种指代来区分来源于不同人脸图像的不同特征。上述属于不同人脸的特征至少包括第一人脸中的第一特征和第二人脸中的第二特征,根据所述第一特征和所述第二特征得到的相似度符合预设条件的情况下,将所述第一人脸和所述第二人脸构造为所述人脸图像数据 对。In one example, the references "first" and "second" are used to distinguish different features derived from different face images. The aforementioned features belonging to different faces include at least a first feature in a first face and a second feature in a second face. The similarity obtained according to the first feature and the second feature meets the preset conditions In this case, the first face and the second face are constructed as the face image data pair.
步骤S103、根据所述非配对的人脸图像数据对,对人脸图像识别网络进行训练,得到用于识别人脸图像的目标识别网络。Step S103: According to the unpaired face image data pair, the face image recognition network is trained to obtain a target recognition network for recognizing the face image.
一示例中,将多个人脸图像数据对作为无标签数据,并成对地输入人脸图像识别网络,以训练该人脸图像识别网络。In an example, a plurality of face image data pairs are used as unlabeled data, and the face image recognition network is input in pairs to train the face image recognition network.
采用本公开,通过上述步骤S101-步骤S102,可以得到用于该人脸图像识别网络训练的训练样本,即:多个人脸图像数据对(如非配对人脸图像对),其中,非配对人脸图像对指:两张人脸图像不属于同一个人。通过上述步骤S103,可以利用不同对人脸图像数据间可能产生的约束性(或称相关性),得到非配对的人脸图像数据对后更有效的训练该人脸图像识别网络。在实际应用中,比如,在智能视频分析或安防人脸监控场景中,可以根据该目标识别网络对待识别的人脸图像进行识别,得到识别结果。由于根据非配对的人脸图像数据对可以更有效的训练该人脸图像识别网络并对其网络参数进行完善,因此,通过训练该人脸图像识别网络得到用于识别人脸图像的目标识别网络后,根据该目标识别网络进行图像识别,识别处理效果更高,且提高了识别精度。Using the present disclosure, through the above steps S101 to S102, the training samples used for the training of the face image recognition network can be obtained, namely: multiple face image data pairs (such as non-paired face image pairs), among which, the non-paired person Face image pairing: Two face images do not belong to the same person. Through the above step S103, the possible constraints (or correlations) between different pairs of face image data can be used to obtain unpaired face image data pairs to train the face image recognition network more effectively. In practical applications, for example, in intelligent video analysis or security face monitoring scenes, the face image to be recognized can be recognized according to the target recognition network to obtain the recognition result. Since the face image recognition network can be trained more effectively and its network parameters can be improved according to the unpaired face image data pair, the target recognition network used to recognize the face image is obtained by training the face image recognition network Later, according to the target recognition network for image recognition, the recognition processing effect is higher and the recognition accuracy is improved.
图2示出根据本公开实施例的人脸图像识别方法的流程图,该人脸图像识别方法应用于人脸图像识别装置,例如,人脸图像识别装置可以由终端设备或服务器或其它处理设备执行,其中,终端设备可以为用户设备(UE,User Equipment)、移动设备、蜂窝电话、无绳电话、个人数字处理(PDA,Personal Digital Assistant)、手持设备、计算设备、车载设备、可穿戴设备等。在一些可能的实现方式中,该人脸图像识别方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。如图2所示,该流程包括:2 shows a flowchart of a face image recognition method according to an embodiment of the present disclosure. The face image recognition method is applied to a face image recognition device. For example, the face image recognition device can be implemented by a terminal device or a server or other processing equipment. Implementation, where the terminal equipment can be user equipment (UE, User Equipment), mobile devices, cellular phones, cordless phones, personal digital assistants (PDAs, Personal Digital Assistant), handheld devices, computing devices, vehicle-mounted devices, wearable devices, etc. . In some possible implementations, the face image recognition method can be implemented by a processor calling computer-readable instructions stored in a memory. As shown in Figure 2, the process includes:
步骤S201、从人脸图像数据中提取属于不同人脸的待处理图像数据。Step S201: Extract image data to be processed belonging to different faces from the face image data.
一示例中,获取人脸图像数据,人脸图像数据为多个不同人脸的图像数据。根据人脸图像识别网络提取该人脸图像数据中人脸图像的特征,比如,可以采用人脸图像识别网络中的特征提取功能模块,对该人脸图像数据中人脸图像的特征进行特征提取。将属于不同人脸图像的特征作为该待处理图像数据,该待处理图像数据由多个人脸特征组成,包括同一人脸的多个人脸特征及不同人脸的多个人脸特征。In one example, face image data is acquired, and the face image data is image data of multiple different faces. Extract the features of the face image in the face image data according to the face image recognition network. For example, the feature extraction function module in the face image recognition network can be used to extract the features of the face image in the face image data. . The features belonging to different face images are used as the image data to be processed, and the image data to be processed is composed of multiple face features, including multiple face features of the same face and multiple face features of different faces.
步骤S202、根据所述属于不同人脸的待处理图像数据,得到非配对的人脸图像数据对;其中,所述非配对的人脸图像数据对用于表征属于不同人脸的两张人脸图像的特征。Step S202: Obtain an unpaired face image data pair according to the to-be-processed image data belonging to different faces; wherein the unpaired face image data pair is used to represent two faces belonging to different faces The characteristics of the image.
可能的实现方式中,属于不同人脸的待处理图像数据,可以是对多个不同人脸的图像数据进行特征提取后所得到的多个特征,计算该多个特征中两两特征之间的相似度,如果两两特征之间的相似度符合预设条件,则查询具备相似度的两两特征所分别对应的人脸图像,根据查询到的人脸图像构造所述人脸图像数据对,该人脸图像数据对(如非配对人脸图像对)也可以称为“成对”的无标签数据,即在后续训练过程中将该非配对人脸图像作为无标签数据,并成对地输入人脸图像识别网络,以训练 该人脸图像识别网络。In a possible implementation, the to-be-processed image data belonging to different faces may be multiple features obtained after feature extraction of image data of multiple different faces, and the difference between the two features of the multiple features is calculated. Similarity, if the similarity between the two features meets the preset condition, the face images corresponding to the two features with similarity are queried, and the face image data pair is constructed according to the queried face images, The face image data pair (such as an unpaired face image pair) can also be called "paired" unlabeled data, that is, in the subsequent training process, the unpaired face image is regarded as unlabeled data and paired Input the face image recognition network to train the face image recognition network.
一示例中,用“第一”、“第二”这种指代来区分来源于不同人脸图像的不同特征。上述属于不同人脸的特征至少包括第一人脸中的第一特征和第二人脸中的第二特征,根据所述第一特征和所述第二特征得到的相似度符合预设条件的情况下,将所述第一人脸和所述第二人脸构造为所述人脸图像数据对。In one example, the references "first" and "second" are used to distinguish different features derived from different face images. The aforementioned features belonging to different faces include at least a first feature in a first face and a second feature in a second face. The similarity obtained according to the first feature and the second feature meets the preset conditions In this case, the first face and the second face are constructed as the face image data pair.
步骤S203、根据所述人脸图像数据对之间的特征相关性,得到采样顺序。Step S203: Obtain a sampling order according to the feature correlation between the face image data pairs.
一示例中,在增量训练之前,可以按照人脸特征的相关性决定人脸图片的采样顺序,比如,根据所述人脸图像数据对之间的特征,得到特征集合。根据所述特征集合构造特征树KD-Tree,人脸图像数据对之间的特征相关性近的特征作为所述KD-Tree的相邻节点。将遍历所述KD-Tree得到的遍历路径作为所述采样顺序。根据人脸图像特征的相关性计算对人脸图像的采样顺序,可以使得相邻读取的人脸图像具备较大的相关性,也就是说,根据该采样顺序来读取人脸图像,相比较于对人脸图像的随机读取,可以得到不同对人脸图像数据间产生的更多约束性(或称相关性)。而更多约束性(或称相关性)可以更有效的训练该人脸图像识别网络并对其网络参数进行完善。在后续的示例中,可以结合特征记忆模块中保存的样本特征,进一步提高对该人脸图像识别网络的有效训练,提高该人脸图像识别网络的训练效率和准确度。In an example, before the incremental training, the sampling order of the face pictures can be determined according to the correlation of the face features, for example, a feature set can be obtained according to the features between the face image data pairs. A feature tree KD-Tree is constructed according to the feature set, and features with close feature correlation between face image data pairs are used as adjacent nodes of the KD-Tree. The traversal path obtained by traversing the KD-Tree is used as the sampling order. Calculating the sampling order of the face image based on the correlation of the face image features can make the face images read adjacently have a greater correlation, that is to say, read the face image according to the sampling order. Compared with random reading of face images, more constraints (or correlations) generated between different face image data can be obtained. And more constraints (or relevance) can train the face image recognition network more effectively and improve its network parameters. In the subsequent example, the sample features stored in the feature memory module can be combined to further improve the effective training of the face image recognition network, and improve the training efficiency and accuracy of the face image recognition network.
步骤S204、将根据采样顺序读取的人脸图像数据对,作为输入所述人脸图像识别网络的训练样本。Step S204: Use the face image data pairs read according to the sampling order as training samples input to the face image recognition network.
一示例中,该人脸图像数据对,至少来源于用于人脸训练的第一人脸图像集合和真实环境下采集人脸得到的第二人脸图像集合,且两个人脸图像集合中的人脸为不相同,提取第一人脸图像的特征得到的特征集合在后续应用示例中可以记为集合A,提取第二人脸图像的特征得到的特征集合在后续应用示例中可以记为集合B,此处不做赘述。In one example, the face image data pair is derived from at least the first face image set used for face training and the second face image set obtained by collecting faces in a real environment, and the two face image sets Faces are different. The feature set obtained by extracting the features of the first face image can be recorded as set A in subsequent application examples, and the feature set obtained by extracting features of the second face image can be recorded as set in subsequent application examples B, do not repeat it here.
步骤S205、根据所述训练样本对人脸图像识别网络进行训练,得到用于识别人脸图像的目标识别网络。Step S205: Train the face image recognition network according to the training samples to obtain a target recognition network for recognizing the face image.
一示例中,将多个人脸图像数据对作为无标签数据,并成对地输入人脸图像识别网络,以训练该人脸图像识别网络。In an example, a plurality of face image data pairs are used as unlabeled data, and the face image recognition network is input in pairs to train the face image recognition network.
采用本公开,通过上述步骤S201-步骤S204,可以得到用于该人脸图像识别网络训练的训练样本,即:多个人脸图像数据对(如非配对人脸图像对),其中,非配对人脸图像对指:两张人脸图像不属于同一个人。通过上述步骤S205,可以利用不同对人脸图像数据间可能产生的约束性(或称相关性),得到非配对的人脸图像数据对所构成的训练样本,之后,可以根据该训练样本更有效的训练该人脸图像识别网络。在实际应用中,比如,在智能视频分析或安防人脸监控场景中,可以根据该目标识别网络对待识别的人脸图像进行识别,得到识别结果。由于根据该训练样本可以更有效的训练该人脸图像识别网络并对其网络参数进行完善,因此,通过训练该人脸图像识别网络得到用于识别人脸图像的目标识别网络后,根据该目标识别网络进行图像识别,识别处理效果更高,且提高了识别精度。According to the present disclosure, through the above steps S201-S204, the training samples for the face image recognition network training can be obtained, namely: multiple face image data pairs (such as non-paired face image pairs), where the non-paired person Face image pairing: Two face images do not belong to the same person. Through the above step S205, the possible constraints (or correlations) between different pairs of face image data can be used to obtain training samples composed of unpaired face image data pairs, and then the training samples can be more effective To train the face image recognition network. In practical applications, for example, in intelligent video analysis or security face monitoring scenes, the face image to be recognized can be recognized according to the target recognition network to obtain the recognition result. Since the face image recognition network can be trained more effectively and its network parameters can be improved according to the training samples, after training the face image recognition network to obtain a target recognition network for recognizing face images, according to the target The recognition network performs image recognition, the recognition processing effect is higher, and the recognition accuracy is improved.
可能的实现方式中,对人脸图像识别网络进行训练,包括:对所述人脸图像识别网络进行训练的每次迭代中,保存样本特征。所述样本特征包括从所述第一人脸图像集合中提取的特征,经多次迭代得到样本特征集。样本特征在后续应用示例中可以记为F A,F A可以保存在特征记忆模块中,样本特征集在后续应用示例中可以记为F M,F A所构成的集合为F M。,此处不做赘述。 In a possible implementation manner, training the face image recognition network includes: saving sample features in each iteration of training the face image recognition network. The sample features include features extracted from the first face image set, and a sample feature set is obtained through multiple iterations. Characterized in that a subsequent sample may be referred to as application example F A, F A feature may be stored in the memory module, the sample application feature sets in the subsequent examples may be referred to as F M, F A set consisting of F M. , Do not repeat it here.
可能的实现方式中,所述对人脸图像识别网络进行训练,还包括:根据每次迭代中从所述第二人脸图像集合中提取的当前人脸特征和上一次迭代得到样本特征集中的所有样本特征,计算损失函数。根据所述损失函数的反向传播来训练所述人脸图像识别网络。可以理解为:每一次迭代保留的人脸特征与上一次迭代的人脸特征计算损失函数,即用每一次迭代保留的人脸特征与上一次迭代的人脸特征进行约束,以得到更多约束信息。而这些约束信息由于可以更有效的训练该人脸图像识别网络,也可以称为“有效信息”。如果在训练过程中仅用当前迭代的两两人脸图像特征计算损失函数,相比于本公开的实现方式而言,得不到更多有效信息,而本公开可以通过在人脸图像识别网络中增加特征记忆模块(用于保存该样本特征),在训练过程中,将当前迭代的人脸特征与特征记忆模块里的样本特征一起计算损失函数,则可以提供更多的有效信息,从而,在训练过程中可以利用更多的有效信息,更有效的训练该人脸图像识别网络,提高训练效率。In a possible implementation manner, the training the face image recognition network further includes: according to the current face features extracted from the second face image set in each iteration and the sample feature set obtained in the previous iteration Calculate the loss function for all sample characteristics. Training the face image recognition network according to the back propagation of the loss function. It can be understood as: the facial features retained in each iteration and the facial features of the previous iteration are used to calculate the loss function, that is, the facial features retained in each iteration are constrained with the facial features of the previous iteration to obtain more constraints information. The constraint information can also be called "effective information" because it can train the face image recognition network more effectively. If, in the training process, only the current iteration of the two-person face image features are used to calculate the loss function, compared to the implementation of the present disclosure, no more effective information can be obtained. However, the present disclosure can use the face image recognition network Add a feature memory module (used to save the sample feature) in the training process. In the training process, the current iteration face feature and the sample feature in the feature memory module are calculated together to calculate the loss function, which can provide more effective information, thus, In the training process, more effective information can be used to train the face image recognition network more effectively and improve training efficiency.
应用示例:Application example:
图3示出根据本公开实施例的人脸图像识别网络训练过程流程图,如图3所示,包含:Fig. 3 shows a flowchart of a face image recognition network training process according to an embodiment of the present disclosure, as shown in Fig. 3, including:
步骤S301、对采集到的不同人脸图像分别提取特征,构造由非配对人脸图像对构成的训练样本,在训练样本中的图像可以称为训练图像。Step S301: Extracting features from different collected face images, and constructing training samples composed of unpaired face image pairs. The images in the training samples may be called training images.
步骤S302、根据非配对人脸图像对的特征,计算训练样本中的训练图像在训练时的采样顺序。Step S302: Calculate the sampling order of the training images in the training sample during training according to the characteristics of the unpaired face image pair.
步骤S303、按照计算好的采样顺序,读取训练样本中的训练图像,并结合特征记忆模块中的样本特征一起训练人脸图像识别网络。Step S303: Read the training images in the training samples according to the calculated sampling order, and train the face image recognition network together with the sample features in the feature memory module.
图4示出根据本公开实施例的人脸图像识别网络训练过程流程图,基于图3-图4所示,对所涉及的具体实现方式描述如下:Fig. 4 shows a flowchart of a face image recognition network training process according to an embodiment of the present disclosure. Based on Figs. 3 to 4, the specific implementations involved are described as follows:
一、对采集到的不同人脸图像分别提取特征,构造由非配对人脸图像对构成的训练样本。1. Extract features from different collected face images, and construct training samples composed of unpaired face image pairs.
输入:从实际应用场景采集的人脸图像、***原有的人脸训练图像,且两个集合的人脸需保证不存在相同的人脸;Input: The face image collected from the actual application scene, the original face training image of the system, and the two sets of faces need to ensure that there is no identical face;
输出:人脸图像特征、非配对人脸图像对。Output: face image features, unpaired face image pairs.
具体实现方式包括:对输入的人脸图像做人脸对齐;使用当前人脸识别模型对对齐后的人脸图像提取特征,得到人脸识别特征,从实际应用场景采集的人脸图像特征记为集合A,***原有人脸图像特征记为集合B;将特征集合B与特征集合A中的两两特征计算余弦相似度,并对得到的余弦相似度集合按照从大到小排序,取前10%(该百分比不唯一,可根据实际情况调整,百分比越大,对该人脸图 像识别网络的训练难度越大,训练完得到的目标识别网络的性能也越好)的余弦相似度对应的图像组合作为该非配对人脸图像对,并将临界点的余弦相似度作为后续该人脸图像识别网络训练的一个优化目标阈值(threshold)。Specific implementation methods include: aligning the input face images; using the current face recognition model to extract features from the aligned face images to obtain face recognition features, and the facial image features collected from actual application scenarios are recorded as a set A. The original face image features of the system are recorded as set B; the cosine similarity is calculated from the pairwise features in feature set B and feature set A, and the obtained cosine similarity set is sorted from largest to smallest, taking the top 10% (The percentage is not unique and can be adjusted according to the actual situation. The larger the percentage, the more difficult it is to train the face image recognition network, and the better the performance of the target recognition network after training) The image combination corresponding to the cosine similarity As the unpaired face image pair, the cosine similarity of the critical point is used as an optimized target threshold for subsequent training of the face image recognition network.
二、根据非配对人脸图像对的特征,计算训练样本中的训练图像在训练时的采样顺序。2. Calculate the sampling order of the training images in the training sample during training according to the characteristics of the unpaired face image pair.
输入:特征集合A、非配对人脸图像对的信息;Input: feature set A, information of unpaired face image pair;
输出:人脸图像识别网络训练时的图像采样顺序。Output: The image sampling order during the training of the face image recognition network.
具体实现方式包括:根据该非配对人脸图像对的信息,构造特征集合C={A1,A2,…,An},集合C中的元素为训练所选取的***原有人脸训练图像的特征;使用特征集合C建立KD-Tree,遍历KD-Tree,遍历路径则为训练时的图像采样顺序。Specific implementation methods include: constructing a feature set C={A1, A2,...,An} according to the information of the unpaired face image pair, and the elements in the set C are the features of the original face training image of the system selected for training; Use the feature set C to build a KD-Tree, traverse the KD-Tree, and the traversal path is the image sampling order during training.
三、按照计算好的采样顺序,读取训练样本中的训练图像,并结合特征记忆模块中的样本特征一起训练人脸图像识别网络。3. According to the calculated sampling order, read the training images in the training samples, and train the face image recognition network together with the sample features in the feature memory module.
输入:当前人脸图像识别网络、该非配对人脸图像对,图像采样顺序;Input: current face image recognition network, this unpaired face image pair, image sampling order;
输出:训练后得到目标识别网络,即新的人脸图像识别网络。Output: The target recognition network is obtained after training, that is, the new face image recognition network.
具体实现方式包括:使用当前人脸图像识别网络的网络参数,初始化该人脸图像识别网络;按照计算好的采样顺序读取该非配对人脸图像对,对于每一次迭代,读取的该非配对人脸图像对至少包含两个部分:I A和I B,I A来源于***原有人脸训练图像,I B来源于采集的人脸图像。图像I A和I B经过人脸图像识别网络的计算,得到特征F A和F B,然后将F A保存到特征记忆模块。将F B与特征记忆模块中的所有特征集合F M计算损失函数,并更新人脸图像识别网络的网络参数。计算损失函数的公式可以如公式(1)所示,其中,L为损失函数;N、M分别为不同特征至少一种对应的数量总和;F M为样本特征F A构成的样本特征集合;F B为图像I B经过人脸图像识别网络的计算所得到特征;threshold为根据特征集合B与特征集合A中的两两特征计算余弦相似度时得到的临界点的余弦相似度,即作为该人脸图像识别网络训练的一个优化目标阈值。 The specific implementation method includes: using the network parameters of the current face image recognition network to initialize the face image recognition network; reading the unpaired face image pair according to the calculated sampling order, and for each iteration, the read the unpaired face image pair The paired face image pair includes at least two parts: I A and I B , I A comes from the original face training image of the system, and I B comes from the collected face image. The images I A and I B are calculated by the face image recognition network to obtain the features F A and F B , and then the F A is saved in the feature memory module. The B and F all features in the feature set of the memory module M F loss function calculation, and updates the network parameters Face Recognition network. Loss function can be calculated as shown in equation (1), where, L is the loss function; N, M are the total number of different characteristics corresponding to at least one; sample characterized wherein F M F A sample collection configuration; F. B is the feature of the image I B obtained through the calculation of the face image recognition network; threshold is the cosine similarity of the critical point obtained when the cosine similarity is calculated according to the pairwise features in the feature set B and the feature set A, which is regarded as the person An optimized target threshold for face image recognition network training.
Figure PCTCN2020089012-appb-000001
Figure PCTCN2020089012-appb-000001
需要指出的是:特征记忆模块中的样本特征存在时效性,需要定期删除,从而实现对特征记忆模块中的样本特征的更新。比如,特征记忆模块中的样本特征存在时间超过100(数值不唯一,可根据实际训练效果进行调整)次迭代,则将该样本特征从特征记忆模块中移除,一直进行该迭代处理直到满足预设的迭代次数。What needs to be pointed out is that the sample features in the feature memory module are time-sensitive and need to be deleted periodically to update the sample features in the feature memory module. For example, if the sample feature in the feature memory module has existed for more than 100 iterations (the value is not unique, it can be adjusted according to the actual training effect), the sample feature will be removed from the feature memory module, and the iterative process will continue until it meets the requirements. Set the number of iterations.
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。Those skilled in the art can understand that in the above methods of the specific implementation, the writing order of the steps does not mean a strict execution order but constitutes any limitation on the implementation process. The specific execution order of each step should be based on its function and possibility. The inner logic is determined.
本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。The foregoing various method embodiments mentioned in the present disclosure can all be combined with each other to form a combined embodiment without violating the principle and logic. Due to space limitations, the present disclosure will not repeat them.
此外,本公开还提供了人脸图像识别装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种人脸图像识别方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。In addition, the present disclosure also provides facial image recognition devices, electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any of the facial image recognition methods provided in the present disclosure. The corresponding technical solutions and descriptions and refer to methods Part of the corresponding records will not be repeated.
图5示出根据本公开实施例的人脸图像识别装置的框图,如图5所示,本公开实施例的人脸图像识别装置包括:提取单元31,用于从人脸图像数据中提取属于不同人脸的待处理图像数据;第一处理单元32,用于根据所述属于不同人脸的待处理图像数据,得到非配对的人脸图像数据对;其中,所述非配对的人脸图像数据对用于表征属于不同人脸的两张人脸图像的特征;第二处理单元33,用于根据所述非配对的人脸图像数据对,对人脸图像识别网络进行训练,得到用于识别人脸图像的目标识别网络。Fig. 5 shows a block diagram of a face image recognition device according to an embodiment of the present disclosure. As shown in Fig. 5, the face image recognition device according to an embodiment of the present disclosure includes: an extracting unit 31, which is configured to extract from face image data belonging to The to-be-processed image data of different faces; the first processing unit 32 is configured to obtain a pair of unpaired face image data according to the to-be-processed image data belonging to different faces; wherein, the unpaired face image The data pair is used to characterize the features of two face images belonging to different faces; the second processing unit 33 is used to train the face image recognition network according to the non-paired face image data pair to obtain Target recognition network that recognizes facial images.
可能的实现方式中,还可以包括识别单元,用于根据所述目标识别网络对待识别的人脸图像进行识别,得到识别结果。In a possible implementation manner, a recognition unit may also be included for recognizing the face image to be recognized according to the target recognition network to obtain a recognition result.
可能的实现方式中,所述提取单元,进一步用于:根据所述人脸图像识别网络,提取所述人脸图像数据中人脸图像的特征;将属于不同人脸图像的特征作为所述待处理图像数据。In a possible implementation manner, the extraction unit is further configured to: extract features of a face image in the face image data according to the face image recognition network; use features belonging to different face images as the waiting Process image data.
可能的实现方式中,所述第一处理单元,进一步用于:所述属于不同人脸的特征至少包括第一人脸中的第一特征和第二人脸中的第二特征;根据所述第一特征和所述第二特征得到的相似度符合预设条件的情况下,将所述第一人脸和所述第二人脸构造为所述人脸图像数据对。In a possible implementation manner, the first processing unit is further configured to: the features belonging to different faces include at least a first feature in a first face and a second feature in a second face; according to the When the similarity obtained by the first feature and the second feature meets a preset condition, the first face and the second face are constructed as the face image data pair.
可能的实现方式中,所述装置还包括第三处理单元,用于:根据所述人脸图像数据对之间的特征相关性,得到采样顺序。In a possible implementation manner, the device further includes a third processing unit, configured to obtain a sampling order according to the feature correlation between the pair of face image data.
可能的实现方式中,所述第三处理单元,进一步用于:根据所述人脸图像数据对之间的特征,得到特征集合;根据所述特征集合构造特征树KD-Tree,人脸图像数据对之间的特征相关性近的特征作为所述KD-Tree的相邻节点;将遍历所述KD-Tree得到的遍历路径作为所述采样顺序。In a possible implementation manner, the third processing unit is further configured to: obtain a feature set according to the features between the face image data pairs; construct a feature tree KD-Tree according to the feature set, and face image data Features with close feature correlation between pairs are regarded as adjacent nodes of the KD-Tree; the traversal path obtained by traversing the KD-Tree is used as the sampling order.
可能的实现方式中,所述第二处理单元,进一步用于:将根据所述采样顺序读取的人脸图像数据对,作为输入所述人脸图像识别网络的训练样本。In a possible implementation manner, the second processing unit is further configured to: use the face image data pairs read according to the sampling order as training samples input to the face image recognition network.
可能的实现方式中,所述人脸图像数据对,至少来源于用于人脸训练的第一人脸图像集合和真实环境下采集人脸得到的第二人脸图像集合,且两个人脸图像集合中的人脸为不相同。In a possible implementation manner, the face image data pair is derived from at least a first face image set used for face training and a second face image set obtained by collecting faces in a real environment, and two face images The faces in the set are not the same.
可能的实现方式中,所述第二处理单元,进一步用于:对所述人脸图像识别网络进行训练的每次迭代中,保存样本特征;所述样本特征包括从所述第一人脸图像集合中提取的特征,经多次迭代得到样本特征集。In a possible implementation manner, the second processing unit is further configured to: save sample features in each iteration of training the face image recognition network; the sample features include data from the first face image From the features extracted from the collection, the sample feature set is obtained through multiple iterations.
可能的实现方式中,所述第二处理单元,进一步用于:根据每次迭代中从所述第二人脸图像集合中提取的当前人脸特征和上一次迭代得到样本特征集中的所有样本特征,计算损失函数;根据所述损失函数的反向传播来训练所述人脸图像识别网络。In a possible implementation manner, the second processing unit is further configured to: obtain all the sample features in the sample feature set according to the current face features extracted from the second face image set in each iteration and the previous iteration , Calculate the loss function; train the face image recognition network according to the back propagation of the loss function.
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。In some embodiments, the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments. For specific implementation, refer to the description of the above method embodiments. For brevity, here No longer.
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是非易失性计算机可读存储介质。The embodiments of the present disclosure also provide a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above-mentioned method when executed by a processor. The computer-readable storage medium may be a non-volatile computer-readable storage medium.
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为上述方法。An embodiment of the present disclosure also provides an electronic device, including: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured as the above method.
电子设备可以被提供为终端、服务器或其它形态的设备。The electronic device can be provided as a terminal, server or other form of device.
本公开实施例还提供了一种计算机程序,所述计算机程序包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现上述方法。The embodiments of the present disclosure also provide a computer program, the computer program includes computer-readable code, when the computer-readable code is run in an electronic device, the processor in the electronic device is executed to implement the above method .
图6是根据一示例性实施例示出的一种电子设备800的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。Fig. 6 is a block diagram showing an electronic device 800 according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcasting terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and other terminals.
参照图6,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。6, the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, and a sensor component 814 , And communication component 816.
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。The processing component 802 generally controls the overall operations of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the foregoing method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图像,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 804 is configured to store various types of data to support operations in the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, images, videos, etc. The memory 804 can be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic Disk or Optical Disk.
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理***,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。The power supply component 806 provides power for various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with the generation, management, and distribution of power for the electronic device 800.
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜***或具有焦距和光学变焦能力。The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, sliding, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure related to the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当 电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a microphone (MIC). When the electronic device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive external audio signals. The received audio signal may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 further includes a speaker for outputting audio signals.
I/O接口812为处理组件802和***接口模块之间提供接口,上述***接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module. The peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。The sensor component 814 includes one or more sensors for providing the electronic device 800 with various aspects of state evaluation. For example, the sensor component 814 can detect the on/off status of the electronic device 800 and the relative positioning of the components. For example, the component is the display and the keypad of the electronic device 800. The sensor component 814 can also detect the electronic device 800 or the electronic device 800. The position of the component changes, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration/deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor component 814 may include a proximity sensor configured to detect the presence of nearby objects when there is no physical contact. The sensor component 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理***的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, the electronic device 800 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field A programmable gate array (FPGA), controller, microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。In an exemplary embodiment, there is also provided a non-volatile computer-readable storage medium, such as a memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to complete the foregoing method.
图7是根据一示例性实施例示出的一种电子设备900的框图。例如,电子设备900可以被提供为一服务器。参照图7,电子设备900包括处理组件922,其进一步包括一个或多个处理器,以及由存储器932所代表的存储器资源,用于存储可由处理组件922的执行的指令,例如应用程序。存储器932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件922被配置为执行指令,以执行上述方法。Fig. 7 is a block diagram showing an electronic device 900 according to an exemplary embodiment. For example, the electronic device 900 may be provided as a server. 7, the electronic device 900 includes a processing component 922, which further includes one or more processors, and a memory resource represented by a memory 932, for storing instructions that can be executed by the processing component 922, such as application programs. The application program stored in the memory 932 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 922 is configured to execute instructions to perform the aforementioned methods.
电子设备900还可以包括一个电源组件926被配置为执行电子设备900的电源管理,一个有线或无线网络接口950被配置为将电子设备900连接到网络,和一个输入输出(I/O)接口958。电子设备900可以操作基于存储在存储器932的操作***,例如Windows ServerTM,Mac OS XTM,UnixTM, LinuxTM,FreeBSDTM或类似。The electronic device 900 may also include a power supply component 926 configured to perform power management of the electronic device 900, a wired or wireless network interface 950 configured to connect the electronic device 900 to a network, and an input output (I/O) interface 958 . The electronic device 900 can operate based on an operating system stored in the memory 932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器932,上述计算机程序指令可由电子设备900的处理组件922执行以完成上述方法。In an exemplary embodiment, there is also provided a non-volatile computer-readable storage medium, such as the memory 932 including computer program instructions, which can be executed by the processing component 922 of the electronic device 900 to complete the foregoing method.
本公开可以是***、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。The present disclosure may be a system, method, and/or computer program product. The computer program product may include a computer-readable storage medium loaded with computer-readable program instructions for enabling a processor to implement various aspects of the present disclosure.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。The computer-readable storage medium may be a tangible device that can hold and store instructions used by the instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (non-exhaustive list) include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) Or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a printer with instructions stored thereon The protruding structure in the hole card or the groove, and any suitable combination of the above. The computer-readable storage medium used here is not interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (for example, light pulses through fiber optic cables), or through wires Transmission of electrical signals.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing/processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network, and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device .
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。The computer program instructions used to perform the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, status setting data, or in one or more programming languages. Source code or object code written in any combination, the programming language includes object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions can be executed entirely on the user's computer, partly on the user's computer, executed as a stand-alone software package, partly on the user's computer and partly executed on a remote computer, or entirely on the remote computer or server carried out. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to access the Internet connection). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be customized by using the status information of the computer-readable program instructions. The computer-readable program instructions are executed to realize various aspects of the present disclosure.
这里参照根据本公开实施例的方法、装置(***)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Herein, various aspects of the present disclosure are described with reference to flowcharts and/or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and/or block diagrams and combinations of blocks in the flowcharts and/or block diagrams can be implemented by computer-readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer-readable program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine such that when these instructions are executed by the processor of the computer or other programmable data processing device , A device that implements the functions/actions specified in one or more blocks in the flowchart and/or block diagram is produced. It is also possible to store these computer-readable program instructions in a computer-readable storage medium. These instructions make computers, programmable data processing apparatuses, and/or other devices work in a specific manner, so that the computer-readable medium storing instructions includes An article of manufacture, which includes instructions for implementing various aspects of the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。It is also possible to load computer-readable program instructions onto a computer, other programmable data processing device, or other equipment, so that a series of operation steps are executed on the computer, other programmable data processing device, or other equipment to produce a computer-implemented process , So that the instructions executed on the computer, other programmable data processing apparatus, or other equipment realize the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本公开的多个实施例的***、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的***来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the drawings show the possible implementation architecture, functions, and operations of the system, method, and computer program product according to multiple embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, program segment, or part of an instruction, and the module, program segment, or part of an instruction contains one or more functions for implementing the specified logical function. Executable instructions. In some alternative implementations, the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two consecutive blocks can actually be executed in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or actions Or it can be realized by a combination of dedicated hardware and computer instructions.
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中技术的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Without departing from the scope and spirit of the described embodiments, many modifications and changes are obvious to those of ordinary skill in the art. The choice of terms used herein is intended to best explain the principles, practical applications, or technical improvements of the technologies in the market, or to enable other ordinary skilled in the art to understand the embodiments disclosed herein.

Claims (21)

  1. 一种人脸图像识别方法,其特征在于,所述方法包括:A face image recognition method, characterized in that the method includes:
    从人脸图像数据中提取属于不同人脸的待处理图像数据;Extract the to-be-processed image data belonging to different faces from the face image data;
    根据所述属于不同人脸的待处理图像数据,得到非配对的人脸图像数据对;其中,所述非配对的人脸图像数据对用于表征属于不同人脸的两张人脸图像的特征;According to the to-be-processed image data belonging to different faces, an unpaired face image data pair is obtained; wherein, the unpaired face image data pair is used to characterize the characteristics of two face images belonging to different faces ;
    根据所述非配对的人脸图像数据对,对人脸图像识别网络进行训练,得到用于识别人脸图像的目标识别网络。According to the unpaired face image data pair, the face image recognition network is trained to obtain the target recognition network for recognizing the face image.
  2. 根据权利要求1所述的方法,其特征在于,所述从人脸图像数据中提取属于不同人脸的待处理图像数据,包括:The method according to claim 1, wherein said extracting image data to be processed belonging to different faces from face image data comprises:
    根据所述人脸图像识别网络,提取所述人脸图像数据中人脸图像的特征;Extracting features of the face image in the face image data according to the face image recognition network;
    将属于不同人脸图像的特征作为所述待处理图像数据。The features belonging to different face images are used as the image data to be processed.
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述属于不同人脸的待处理图像数据,得到非配对的人脸图像数据对,包括:The method according to claim 2, wherein the obtaining a pair of unpaired face image data according to the to-be-processed image data belonging to different faces comprises:
    所述属于不同人脸的特征至少包括第一人脸中的第一特征和第二人脸中的第二特征;The features belonging to different faces include at least a first feature in a first face and a second feature in a second face;
    根据所述第一特征和所述第二特征得到的相似度符合预设条件的情况下,将所述第一人脸和所述第二人脸构造为所述人脸图像数据对。In the case that the similarity obtained according to the first feature and the second feature meets a preset condition, the first face and the second face are constructed as the face image data pair.
  4. 根据权利要求2所述的方法,其特征在于,所述对人脸图像识别网络进行训练之前,所述方法还包括:The method according to claim 2, characterized in that, before the training of the face image recognition network, the method further comprises:
    根据所述人脸图像数据对之间的特征相关性,得到采样顺序。According to the feature correlation between the face image data pairs, the sampling order is obtained.
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述人脸图像数据对之间的特征相关性,得到采样顺序,包括:The method according to claim 4, wherein the obtaining a sampling order according to the feature correlation between the face image data pairs comprises:
    根据所述人脸图像数据对之间的特征,得到特征集合;Obtaining a feature set according to the features between the face image data pairs;
    根据所述特征集合构造特征树KD-Tree,人脸图像数据对之间的特征相关性近的特征作为所述KD-Tree的相邻节点;Constructing a feature tree KD-Tree according to the feature set, and features with close feature correlation between face image data pairs are used as adjacent nodes of the KD-Tree;
    将遍历所述KD-Tree得到的遍历路径作为所述采样顺序。The traversal path obtained by traversing the KD-Tree is used as the sampling order.
  6. 根据权利要求4或5所述的方法,其特征在于,所述得到采样顺序之后,所述方法还包括:The method according to claim 4 or 5, characterized in that, after the sampling order is obtained, the method further comprises:
    将根据所述采样顺序读取的人脸图像数据对作为输入所述人脸图像识别网络的训练样本。The face image data pairs read according to the sampling order are used as training samples input to the face image recognition network.
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,所述人脸图像数据对,至少来源于用于人脸训练的第一人脸图像集合和采集人脸得到的第二人脸图像集合,且两个人脸图像集合中的人脸为不相同。The method according to any one of claims 1 to 6, wherein the face image data pair is at least derived from a first face image collection used for face training and a second face image collection The face image collection, and the faces in the two face image collections are different.
  8. 根据权利要求7所述的方法,其特征在于,所述对人脸图像识别网络进行训练,包括:The method according to claim 7, wherein said training a face image recognition network comprises:
    对所述人脸图像识别网络进行训练的每次迭代中,保存样本特征;In each iteration of training the face image recognition network, save sample features;
    所述样本特征包括从所述第一人脸图像集合中提取的特征,经多次迭代得到样本特征集。The sample feature includes the feature extracted from the first face image set, and the sample feature set is obtained through multiple iterations.
  9. 根据权利要求8所述的方法,其特征在于,所述对人脸图像识别网络进行训练,还包括:The method according to claim 8, wherein said training a face image recognition network further comprises:
    根据每次迭代中从所述第二人脸图像集合中提取的当前人脸特征和上一次迭代得到样本特征集中的所有样本特征,计算损失函数;Calculating a loss function according to the current face features extracted from the second face image set in each iteration and all the sample features in the sample feature set obtained in the previous iteration;
    根据所述损失函数的反向传播来训练所述人脸图像识别网络。Training the face image recognition network according to the back propagation of the loss function.
  10. 一种人脸图像识别装置,其特征在于,所述装置包括:A face image recognition device, characterized in that the device includes:
    提取单元,用于从人脸图像数据中提取属于不同人脸的待处理图像数据;The extraction unit is used to extract the to-be-processed image data belonging to different faces from the face image data;
    第一处理单元,用于根据所述属于不同人脸的待处理图像数据,得到非配对的人脸图像数据对;其中,所述非配对的人脸图像数据对用于表征属于不同人脸的两张人脸图像的特征;The first processing unit is configured to obtain unpaired face image data pairs according to the to-be-processed image data belonging to different faces; wherein, the unpaired face image data pairs are used to characterize different face image data. Features of two face images;
    第二处理单元,用于根据所述非配对的人脸图像数据对,对人脸图像识别网络进行训练,得到用于识别人脸图像的目标识别网络。The second processing unit is configured to train the face image recognition network according to the unpaired face image data pair to obtain a target recognition network for recognizing the face image.
  11. 根据权利要求10所述的装置,其特征在于,所述提取单元,进一步用于:The device according to claim 10, wherein the extraction unit is further configured to:
    根据所述人脸图像识别网络,提取所述人脸图像数据中人脸图像的特征;Extracting features of the face image in the face image data according to the face image recognition network;
    将属于不同人脸图像的特征作为所述待处理图像数据。The features belonging to different face images are used as the image data to be processed.
  12. 根据权利要求11所述的装置,其特征在于,所述第一处理单元,进一步用于:The device according to claim 11, wherein the first processing unit is further configured to:
    所述属于不同人脸的特征至少包括第一人脸中的第一特征和第二人脸中的第二特征;The features belonging to different faces include at least a first feature in a first face and a second feature in a second face;
    根据所述第一特征和所述第二特征得到的相似度符合预设条件的情况下,将所述第一人脸和所述第二人脸构造为所述人脸图像数据对。In the case that the similarity obtained according to the first feature and the second feature meets a preset condition, the first face and the second face are constructed as the face image data pair.
  13. 根据权利要求11所述的装置,其特征在于,所述装置还包括第三处理单元,用于:The device according to claim 11, wherein the device further comprises a third processing unit, configured to:
    根据所述人脸图像数据对之间的特征相关性,得到采样顺序。According to the feature correlation between the face image data pairs, the sampling order is obtained.
  14. 根据权利要求13所述的装置,其特征在于,所述第三处理单元,进一步用于:The device according to claim 13, wherein the third processing unit is further configured to:
    根据所述人脸图像数据对之间的特征,得到特征集合;Obtaining a feature set according to the features between the face image data pairs;
    根据所述特征集合构造特征树KD-Tree,人脸图像数据对之间的特征相关性近的特征作为所述KD-Tree的相邻节点;Constructing a feature tree KD-Tree according to the feature set, and features with close feature correlation between face image data pairs are used as adjacent nodes of the KD-Tree;
    将遍历所述KD-Tree得到的遍历路径作为所述采样顺序。The traversal path obtained by traversing the KD-Tree is used as the sampling order.
  15. 根据权利要求13或14所述的装置,其特征在于,所述第二处理单元,进一步用于:The device according to claim 13 or 14, wherein the second processing unit is further configured to:
    将根据所述采样顺序读取的人脸图像数据对,作为输入所述人脸图像识别网络的训练样本。The face image data pairs read according to the sampling order are used as training samples input to the face image recognition network.
  16. 根据权利要求10-15中任一项所述的装置,其特征在于,所述人脸图像数据对,至少来源于用于人脸训练的第一人脸图像集合和采集人脸得到的第二人脸图像集合,且两个人脸图像集合中的人脸为不相同。The device according to any one of claims 10-15, wherein the face image data pair is at least derived from a first face image collection used for face training and a second face image collection The face image collection, and the faces in the two face image collections are different.
  17. 根据权利要求16所述的装置,其特征在于,所述第二处理单元,进一步用于:The device according to claim 16, wherein the second processing unit is further configured to:
    对所述人脸图像识别网络进行训练的每次迭代中,保存样本特征;In each iteration of training the face image recognition network, save sample features;
    所述样本特征包括从所述第一人脸图像集合中提取的特征,经多次迭代得到样本特征集。The sample feature includes the feature extracted from the first face image set, and the sample feature set is obtained through multiple iterations.
  18. 根据权利要求17所述的装置,其特征在于,所述第二处理单元,进一步用于:The device according to claim 17, wherein the second processing unit is further configured to:
    根据每次迭代中从所述第二人脸图像集合中提取的当前人脸特征和上一次迭代得到样本特征集中的所有样本特征,计算损失函数;Calculating a loss function according to the current face features extracted from the second face image set in each iteration and all the sample features in the sample feature set obtained in the previous iteration;
    根据所述损失函数的反向传播来训练所述人脸图像识别网络。Training the face image recognition network according to the back propagation of the loss function.
  19. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    处理器;processor;
    用于存储处理器可执行指令的存储器;A memory for storing processor executable instructions;
    其中,所述处理器被配置为:执行权利要求1至9中任意一项所述的方法。Wherein, the processor is configured to execute the method according to any one of claims 1-9.
  20. 一种计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1至9中任意一项所述的方法。A computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions implement the method according to any one of claims 1 to 9 when executed by a processor.
  21. 一种计算机程序,其特征在于,所述计算机程序包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现权利要求1至9中的任意一项所述的方法。A computer program, characterized in that the computer program includes computer readable code, and when the computer readable code is executed in an electronic device, a processor in the electronic device executes for implementing claims 1 to 9 The method described in any one of.
PCT/CN2020/089012 2019-08-12 2020-05-07 Human face image recognition method and apparatus, electronic device, and storage medium WO2021027343A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020217026325A KR20210114511A (en) 2019-08-12 2020-05-07 Face image recognition method and apparatus, electronic device and storage medium
JP2021547720A JP2022520120A (en) 2019-08-12 2020-05-07 Face image recognition methods and devices, electrical equipment and storage media

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910739381.8A CN110458102A (en) 2019-08-12 2019-08-12 A kind of facial image recognition method and device, electronic equipment and storage medium
CN201910739381.8 2019-08-12

Publications (1)

Publication Number Publication Date
WO2021027343A1 true WO2021027343A1 (en) 2021-02-18

Family

ID=68485929

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/089012 WO2021027343A1 (en) 2019-08-12 2020-05-07 Human face image recognition method and apparatus, electronic device, and storage medium

Country Status (5)

Country Link
JP (1) JP2022520120A (en)
KR (1) KR20210114511A (en)
CN (1) CN110458102A (en)
TW (1) TW202107337A (en)
WO (1) WO2021027343A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114255502A (en) * 2021-12-23 2022-03-29 中国电信股份有限公司 Face image generation method and device, face recognition method, face recognition equipment and medium
CN115909434A (en) * 2022-09-07 2023-04-04 以萨技术股份有限公司 Data processing system for acquiring human face image characteristics

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110458102A (en) * 2019-08-12 2019-11-15 深圳市商汤科技有限公司 A kind of facial image recognition method and device, electronic equipment and storage medium
CN111339964A (en) * 2020-02-28 2020-06-26 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium
CN112149732A (en) * 2020-09-23 2020-12-29 上海商汤智能科技有限公司 Image protection method and device, electronic equipment and storage medium
CN112949634B (en) * 2021-03-08 2024-04-26 北京交通大学 Railway contact net nest detection method
CN112784823B (en) * 2021-03-17 2023-04-07 中国工商银行股份有限公司 Face image recognition method, face image recognition device, computing equipment and medium
CN113269425B (en) * 2021-05-18 2022-06-07 北京航空航天大学 Quantitative evaluation method for health state of equipment under unsupervised condition and electronic equipment
KR20230032092A (en) 2021-08-30 2023-03-07 주식회사 엘지에너지솔루션 A solid electrolyte membrane and all solid-state lithium secondary battery comprising the same

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8224042B2 (en) * 2009-03-12 2012-07-17 Seiko Epson Corporation Automatic face recognition
CN103679158A (en) * 2013-12-31 2014-03-26 北京天诚盛业科技有限公司 Face authentication method and device
CN109753875A (en) * 2018-11-28 2019-05-14 北京的卢深视科技有限公司 Face identification method, device and electronic equipment based on face character perception loss
CN110458102A (en) * 2019-08-12 2019-11-15 深圳市商汤科技有限公司 A kind of facial image recognition method and device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4606779B2 (en) * 2004-06-07 2011-01-05 グローリー株式会社 Image recognition apparatus, image recognition method, and program causing computer to execute the method
JP4591215B2 (en) * 2005-06-07 2010-12-01 株式会社日立製作所 Facial image database creation method and apparatus
JP6312485B2 (en) * 2014-03-25 2018-04-18 キヤノン株式会社 Information processing apparatus, authentication apparatus, and methods thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8224042B2 (en) * 2009-03-12 2012-07-17 Seiko Epson Corporation Automatic face recognition
CN103679158A (en) * 2013-12-31 2014-03-26 北京天诚盛业科技有限公司 Face authentication method and device
CN109753875A (en) * 2018-11-28 2019-05-14 北京的卢深视科技有限公司 Face identification method, device and electronic equipment based on face character perception loss
CN110458102A (en) * 2019-08-12 2019-11-15 深圳市商汤科技有限公司 A kind of facial image recognition method and device, electronic equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114255502A (en) * 2021-12-23 2022-03-29 中国电信股份有限公司 Face image generation method and device, face recognition method, face recognition equipment and medium
CN114255502B (en) * 2021-12-23 2024-03-29 中国电信股份有限公司 Face image generation method and device, face recognition method, equipment and medium
CN115909434A (en) * 2022-09-07 2023-04-04 以萨技术股份有限公司 Data processing system for acquiring human face image characteristics

Also Published As

Publication number Publication date
KR20210114511A (en) 2021-09-23
TW202107337A (en) 2021-02-16
CN110458102A (en) 2019-11-15
JP2022520120A (en) 2022-03-28

Similar Documents

Publication Publication Date Title
WO2021027343A1 (en) Human face image recognition method and apparatus, electronic device, and storage medium
WO2021196401A1 (en) Image reconstruction method and apparatus, electronic device and storage medium
JP7171884B2 (en) Pedestrian recognition method and device
WO2020155627A1 (en) Facial image recognition method and apparatus, electronic device, and storage medium
WO2020232977A1 (en) Neural network training method and apparatus, and image processing method and apparatus
WO2021031645A1 (en) Image processing method and apparatus, electronic device and storage medium
WO2022011892A1 (en) Network training method and apparatus, target detection method and apparatus, and electronic device
US20200394216A1 (en) Method and device for video processing, electronic device, and storage medium
TW202131281A (en) Image processing method and apparatus, and electronic device and storage medium
WO2021036382A1 (en) Image processing method and apparatus, electronic device and storage medium
WO2021035812A1 (en) Image processing method and apparatus, electronic device and storage medium
WO2020155609A1 (en) Target object processing method and apparatus, electronic device, and storage medium
WO2017092122A1 (en) Similarity determination method, device, and terminal
CN110659690B (en) Neural network construction method and device, electronic equipment and storage medium
CN110532956B (en) Image processing method and device, electronic equipment and storage medium
CN110781957A (en) Image processing method and device, electronic equipment and storage medium
WO2021208666A1 (en) Character recognition method and apparatus, electronic device, and storage medium
WO2020192113A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN111259967B (en) Image classification and neural network training method, device, equipment and storage medium
CN111582383B (en) Attribute identification method and device, electronic equipment and storage medium
WO2023115911A1 (en) Object re-identification method and apparatus, electronic device, storage medium, and computer program product
CN109992606A (en) A kind of method for digging of target user, device, electronic equipment and storage medium
TWI751593B (en) Network training method and device, image processing method and device, electronic equipment, computer readable storage medium and computer program
WO2015188589A1 (en) User data update method and device
CN110286775A (en) A kind of dictionary management method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20852763

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021547720

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20217026325

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20852763

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04.08.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20852763

Country of ref document: EP

Kind code of ref document: A1