WO2020155606A1 - 面部识别方法及装置、电子设备和存储介质 - Google Patents

面部识别方法及装置、电子设备和存储介质 Download PDF

Info

Publication number
WO2020155606A1
WO2020155606A1 PCT/CN2019/100859 CN2019100859W WO2020155606A1 WO 2020155606 A1 WO2020155606 A1 WO 2020155606A1 CN 2019100859 W CN2019100859 W CN 2019100859W WO 2020155606 A1 WO2020155606 A1 WO 2020155606A1
Authority
WO
WIPO (PCT)
Prior art keywords
features
attention
cluster
attribute
target object
Prior art date
Application number
PCT/CN2019/100859
Other languages
English (en)
French (fr)
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 KR1020207018821A priority Critical patent/KR102390580B1/ko
Priority to SG11202006192YA priority patent/SG11202006192YA/en
Priority to JP2020533112A priority patent/JP7038829B2/ja
Priority to US16/907,406 priority patent/US11455830B2/en
Publication of WO2020155606A1 publication Critical patent/WO2020155606A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • 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
    • G06V40/169Holistic features and representations, i.e. based on the facial image taken as a whole
    • 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
    • G06V40/171Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2323Non-hierarchical techniques based on graph theory, e.g. minimum spanning trees [MST] or graph cuts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation

Definitions

  • the present disclosure relates to the field of computer technology but is not limited to the field of computers, and in particular to a facial recognition method and device, electronic equipment and storage medium.
  • Facial attribute prediction has a wide range of applications. For example, it is an extremely important part of the surveillance and security field. Effectively predicting the person's gender, age, whether to wear dangerous objects and other attributes, play an extremely important role in the application of facial attribute prediction. Correct attribute prediction can further improve the accuracy of facial recognition, so that facial recognition can be more widely used in various application scenarios.
  • the present disclosure proposes a technical solution for facial recognition.
  • a facial recognition method which includes: extracting attribute characteristics of a to-be-processed image including a target object to obtain N attribute characteristics of the target object, where N is an integer greater than 1;
  • the force mechanism extracts attention features of the image to be processed to obtain N attention features of the target object; performs cluster processing on the N attention features to obtain M cluster attention features, where M is A positive integer and M ⁇ N; according to the N attribute features and the M cluster attention features, the facial recognition result of the target object is determined.
  • performing cluster processing on the N attention features to obtain M cluster attention features includes: performing cluster processing on the N attention features to obtain M cluster attention features.
  • the cluster set, each attention feature corresponds to one of the M cluster sets; the cluster attention features of each cluster set are determined respectively, and M cluster attention features are obtained.
  • the method further includes: multiplying the N attribute features and the N attention features to obtain enhanced N attribute features,
  • determining the facial recognition result of the target object according to the N attribute features and the M cluster attention features includes: comparing the enhanced N attribute features according to the M cluster attention features Respectively, the facial recognition result of the target object is obtained.
  • determining the facial recognition result of the target object according to the N attribute features and the M cluster attention features includes: according to the M cluster attention feature pairs The N attribute features are respectively corrected to obtain the facial recognition result.
  • the enhanced N attribute features are respectively modified according to the M cluster attention features to obtain the face recognition result of the target object, including: combining the enhanced N attributes
  • the features are respectively multiplied by the cluster attention features corresponding to at least some of the N attribute features to obtain the facial recognition result.
  • correcting the N attribute features according to the M cluster attention features to obtain the facial recognition result of the target object includes: combining the N attribute features with The cluster attention features corresponding to at least part of the N attribute features are respectively multiplied to obtain the facial recognition result.
  • the method is implemented by a neural network.
  • the neural network includes a multi-task convolutional network, multiple individual attention networks, and a clustering network.
  • the multi-task convolutional network is used to The image to be processed performs attribute feature extraction, the multiple individual attention networks are used to perform attention feature extraction on the image to be processed, and the clustering network is used to perform clustering processing on the N attention features .
  • the method further includes: in the process of training the neural network, adjusting the network parameters of multiple individual attention networks according to the network loss of the clustering network.
  • the clustering processing includes spectral clustering
  • the M cluster attention features are respectively cluster centers of the M cluster sets.
  • a facial recognition device including: an attribute extraction module for performing attribute feature extraction on a to-be-processed image including a target object to obtain N attribute characteristics of the target object, where N is An integer greater than 1; an attention extraction module for extracting attention features of the image to be processed based on an attention mechanism to obtain N attention features of the target object; a clustering module for analyzing the N Attention features are clustered to obtain M cluster attention features, where M is a positive integer and M ⁇ N; the result determination module is used to determine the N attribute features and the M cluster attention features To determine the facial recognition result of the target object.
  • the clustering module includes: a clustering sub-module, configured to perform clustering processing on the N attention features to obtain M cluster sets, and each attention feature is associated with M One of the cluster sets corresponds to one of the cluster sets; the feature determination sub-module is used to determine the cluster attention features of each cluster set to obtain M cluster attention features.
  • the device further includes: an attribute enhancement module, configured to multiply the N attribute features and the N attention features to obtain enhanced N attribute features, where ,
  • the result determining module includes:
  • the first correction sub-module is configured to respectively correct the enhanced N attribute features according to the M cluster attention features to obtain the face recognition result of the target object.
  • the result determination module includes: a second correction submodule, configured to respectively correct the N attribute features according to the M cluster attention features to obtain the facial recognition result.
  • the first correction sub-module includes: a first multiplication sub-module, configured to compare the enhanced N attribute features with at least part of the N attribute features The cluster attention features are respectively multiplied to obtain the facial recognition result.
  • the second correction submodule includes: a second multiplication submodule, configured to combine the N attribute features with at least part of the N attribute features corresponding to the aggregation The similar attention features are respectively multiplied to obtain the facial recognition result.
  • the device is implemented by a neural network.
  • the neural network includes a multi-task convolutional network, multiple individual attention networks, and a clustering network.
  • the multi-task convolutional network is used to The image to be processed performs attribute feature extraction, the multiple individual attention networks are used to perform attention feature extraction on the image to be processed, and the clustering network is used to perform clustering processing on the N attention features .
  • the device further includes: a parameter adjustment module, which is used to adjust the network of multiple individual attention networks according to the network loss of the clustering network during the training of the neural network parameter.
  • the clustering processing includes spectral clustering
  • the M cluster attention features are respectively cluster centers of the M cluster sets.
  • an electronic device including: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured to execute the above method.
  • a computer-readable storage medium having computer program instructions stored thereon, and the computer program instructions implement the above method when executed by a processor.
  • a computer program product is executed by a processor to implement the above method.
  • attribute feature extraction and attention feature extraction can be performed on the image to be processed respectively to obtain multiple attribute features and attention features; the attention feature is clustered to obtain cluster attention features, and based on multiple attributes Features and clustering attention features determine the results of facial recognition, extracting attention features through multi-attention mechanisms and clustering similar attention features to optimize different local features and improve the recognition effect of facial attributes.
  • Fig. 1 shows a flowchart of a face recognition method according to an embodiment of the present disclosure.
  • Fig. 2 shows a schematic diagram of an application example of a face recognition method according to an embodiment of the present disclosure.
  • Fig. 3 shows a comparison diagram of lip attention characteristics before and after optimization according to the present disclosure.
  • Fig. 4 shows a block diagram of a facial recognition device according to an embodiment of the present disclosure.
  • Fig. 5 shows a block diagram of an electronic 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. 1 shows a flowchart of a facial recognition method 100 according to an embodiment of the present disclosure.
  • the facial recognition method 100 includes: in step 102, performing attribute feature extraction on a to-be-processed image including a target object to obtain N attribute characteristics of the target object, where N is an integer greater than one.
  • step 104 attention feature extraction is performed on the image to be processed based on the attention mechanism to obtain N attention features of the target object.
  • step 106 perform clustering processing on the N attention features to obtain M cluster attention features, where M is a positive integer and M ⁇ N.
  • the facial recognition result of the target object is determined according to the N attribute features and the M cluster attention features.
  • the method provided by the embodiments of this application can be applied to various image processing devices.
  • the image processing device can recognize the face of the image target object through the execution of step 102, step 104, step 106, and step 108, for example, face recognition, etc. .
  • the image processing equipment can be a security equipment, for example, equipment installed at the gate of a community, school, factory area, residence, etc., where monitoring is required.
  • the image processing device may also be applied to a non-security field.
  • the image processing device may be a ticketing device that performs ticket checking through facial recognition.
  • the image processing device may be a payment device, which determines whether to make a payment based on the facial recognition result.
  • the facial recognition method of the present application can be applied to various scenes that require facial recognition to obtain facial recognition results.
  • attribute feature extraction and attention feature extraction on the image to be processed respectively to obtain multiple attribute features and attention features; cluster the attention features to obtain cluster attention features, and according to multiple attributes
  • Features and clustering attention features determine the results of facial recognition, extracting attention features through multi-attention mechanisms and clustering similar attention features to optimize different local features and improve the recognition effect of facial attributes.
  • the features required for different tasks may not be the features of the entire face, but only the partial features of the face. For example, if it is predicted whether a person wears glasses, only separate eye information may be needed, and the extra information may interfere with the results. Therefore, attention features can be added to improve the accuracy of prediction.
  • the attention feature may be a feature specified to be extracted, and may be one or more of the attribute features.
  • the attribute feature may be an overall feature and/or a local feature of the target object.
  • the overall feature includes, but is not limited to, the overall feature of the face of the target object; the local feature may be a local feature in the face, for example, the feature of the eyes, the feature of the lips, and the like.
  • facial attributes for example, multiple attributes related to the face such as gender, age, and wearing of a person
  • multiple attributes can be jointly recognized and shared features.
  • attention mechanism Attention Mechanism
  • important features such as ears, mouth, nose, etc.
  • the image to be processed including the target object may be subjected to attribute feature extraction to obtain N attribute characteristics of the target object.
  • the target object may be, for example, a person in the image, and the image to be processed may be, for example, a face image including the target object.
  • the convolutional neural network CNN can be used as the base network (Base Net) to perform feature extraction on the image to be processed to obtain the facial feature map; and then through, for example, the Multi-Task Convolution Neural Net (MTCNN)
  • MTCNN Multi-Task Convolution Neural Net
  • the obtained facial feature map is subjected to attribute feature extraction, thereby obtaining N attribute features of the target object.
  • the multi-task convolutional neural network can use different types of networks such as VGG16, residual network, etc. The present disclosure does not limit the network types of the multi-task convolutional neural network.
  • attention feature extraction may be performed on the image to be processed based on the attention mechanism to obtain N attention features of the target object.
  • feature extraction of the image to be processed may be performed through a basic network to obtain a facial feature map, thereby achieving feature sharing; and then through multiple individual attention networks (Individual Attention Network, IAN), the facial feature map may be extracted with attention features.
  • IAN Intelligent Attention Network
  • the N attention features may be clustered in step 106 to obtain M cluster attention features.
  • some facial features can be learned better, such as glasses, nose, etc.
  • some fine-grained features such as earrings and eyebrows are not easy to learn. Therefore, it is possible to cluster all the similar parts of the attention features together, and optimize, especially correct, some of the original attention features that have poor learning effects.
  • step 106 may include:
  • the cluster attention features of each cluster set are determined respectively, and M cluster attention features are obtained.
  • N attention features can be clustered into M categories (M ⁇ N), and after clustering processing, each attention feature corresponds to one of the M categories. After clustering, M cluster sets can be obtained. The cluster attention features of each cluster set are extracted separately, and M cluster attention features can be obtained. In this way, M cluster attention features can be used as representatives of N attention features, and then the facial recognition result of the target object can be determined according to the N attribute features and M cluster attention features.
  • the clustering process may be spectral clustering, and the M cluster attention features are the cluster centers of each cluster set in the M cluster sets.
  • all values in each cluster set can be averaged to obtain the cluster center.
  • training can be performed through a preset training set to learn the corresponding weight of each attention feature, and each attention feature in the cluster set is weighted and averaged to obtain the combination of the clusters. Class center.
  • the present disclosure does not limit the specific method of clustering.
  • the attention features that are well-learned can help other attention features that are not well-learned, and the effect of the attention mechanism can be improved through the mutual help of related attention features.
  • the facial recognition result of the target object may be determined according to the N attribute characteristics and the M cluster attention characteristics.
  • the obtained N attribute features and M cluster attention features can be comprehensively considered through multiplication and other methods, and other methods can also be used for further processing to determine the face recognition result of the target object.
  • step 108 may include:
  • the N attribute features are respectively corrected according to the M cluster attention features to obtain the facial recognition result.
  • M cluster attention features can be used to directly modify N attribute features.
  • the step of correcting the N attribute features based on the M cluster attention features may include: combining the N attribute features with clusters corresponding to at least some of the N attribute features. The similar attention features are respectively multiplied to obtain the facial recognition result.
  • At least some of the N attribute features in this embodiment include: each of the N attribute features, and fewer than N attribute features.
  • the method may further include: multiplying the N attribute features and the N attention features to obtain enhanced N attribute features;
  • Step 108 may include: respectively correcting the enhanced N attribute features according to the M cluster attention features to obtain the face recognition result of the target object.
  • the N attention features and the N attribute features are respectively corrected to obtain the face recognition result of the target object.
  • the step of correcting the enhanced N attribute features according to the M cluster attention features may include: combining the enhanced N attribute features with at least part of the N attribute features. The corresponding cluster attention features are multiplied respectively to obtain the facial recognition result.
  • Fig. 2 shows a schematic diagram of an application example of a face recognition method according to an embodiment of the present disclosure.
  • the method 200 is an application example of the facial recognition method 100.
  • feature extraction can be performed on the image to be processed through the basic network to obtain a facial feature map; the attribute feature extraction on the facial feature map can obtain N attribute features 202; attention to the facial feature map Force feature extraction, N attention features 204 are obtained; N attention features 204 are clustered, and M cluster sets are obtained.
  • Each of the N attention features corresponds to one of the M cluster sets; the cluster attention features of each cluster set are determined respectively, and M cluster attention features can be obtained .
  • the N attribute features 202 are directly corrected (S208), and the facial recognition result of the target object can be determined .
  • the predecessor of IAN clustering can be used to correct the facial recognition results of the target object, and the difficult attention features can be optimized through the attention features that are easy to learn.
  • the N attention features 204 can be further multiplied by the N attribute features 202 to obtain enhanced N attribute features. Furthermore, according to the M cluster attention features, the enhanced N attribute features are respectively corrected to obtain the face recognition result of the target object. As a result, the attention feature can be further emphasized, and the attention feature that is not easy can be optimized through the attention feature that is easy to learn.
  • the attention mechanism can be improved through mutual help of related attributes.
  • the method can be implemented by a neural network.
  • the neural network includes a multi-task convolutional network, multiple separate attention networks, and a clustering network.
  • the multi-task convolutional network is used to Performing attribute feature extraction on the to-be-processed image
  • the multiple individual attention networks are used to perform attention feature extraction on the to-be-processed image
  • the clustering network is used to cluster the N attention features deal with.
  • the multi-task convolutional network is used to extract the attribute features 202 of the image to be processed (facial feature map).
  • MTCNN multi-task convolutional network
  • VGG16 and Residual Network networks of different sizes, such as VGG16 and Residual Network, can be used to deal with different application scenarios.
  • IAN Multiple individual attention networks
  • attention features 204 from the image to be processed (facial feature map).
  • facial feature map For example, the glasses and lips of a person are respectively targeted.
  • IAN a simple convolutional neural network can be used for learning, or an attention mechanism such as residual attention can be used.
  • the clustering network is used for clustering N attention features to obtain M cluster attention features.
  • the present disclosure does not limit the network type of the clustering network.
  • the method further includes: in the process of training the neural network, adjusting the network parameters of multiple individual attention networks according to the network loss of the clustering network.
  • the aforementioned neural networks can be trained according to a preset training set.
  • combined tasks are used for optimization.
  • no artificial links may be involved, and independent learning is used to achieve optimization.
  • the network parameters of multiple individual attention networks can be adjusted according to the network loss of the clustering network, so that the back propagation of the neural network can be used to optimize the individual attention network.
  • a multi-task attribute learning network based on MTCNN can be used to train N attributes of the facial feature map at the same time to obtain N attribute features 202.
  • the N attribute features 202 obtained through MTCNN are feature tensors, which can be expressed as (N, C, W, H).
  • the value of (N, C, W, H) is determined by the specific neural network.
  • N, C, W, and H are all natural numbers, and N represents the number of feature tensors; C represents the number of feature maps obtained, also known as the number of channels, which is usually much greater than 3; W represents the width of the feature map; H represents the feature The length of the graph.
  • N attribute features 202 can be expressed as N attribute features (C, W, H), that is, N attribute feature tensors (number of channels, width, length). Subsequently, the N attribute features 202 can be used to predict the N facial attributes as a result of facial recognition.
  • IAN may be used to train N attributes from a facial feature map, and an attention map (attention map) may be used to learn N attributes, so as to obtain N attention features 204.
  • an attention map attention map
  • each attention feature corresponds to a two-dimensional attention feature image (Mask)
  • the feature tensor A of the obtained attention feature 204 can be expressed as (N, 1, W, H), that is, the number of channels here Is 1. Therefore, the N attention features 204 can be expressed as N feature tensors A(W, H), that is, N feature tensors A (width, length).
  • N attention feature tensors A (width, length) can be multiplied by N attribute feature tensors, so that N attribute features The relevant features in the tensor are emphasized.
  • the N attention features are clustered to obtain M cluster sets, which can be expressed as C 1 ,..., C M.
  • the cluster centers extracted from each of the M cluster sets can be expressed as the first cluster attention feature (A x1 ,A y1 ),..., the Mth cluster attention feature (A xm ,A ym ).
  • the above M cluster attention features can be expressed as (M, 1, W, H), that is, M two-dimensional tensors X _1 (width, length),..., X _M (width, length).
  • N attribute feature tensors F (number of channels, width, length) obtained by the correction of N attention features A, determine the corresponding cluster class centers, and then use the corresponding M two-dimensional tensors X The center of the class makes the final modification to the N attribute features F. Since these M tensors X come from the output of the previous IAN, through such learning, IAN can also be optimized at the same time, and multiple attention features can be used to modify the N attribute features F at the same time.
  • the correction method is to simultaneously multiply N attribute features F (number of channels, width, length) by M clustered tensors X _m , where m is in the range of [1,M] The natural number within. From this, the multiplied tensor FX (M, number of channels, width, length) can be obtained. Expand the multiplied tensor FX (M, number of channels, width, length) into (M ⁇ number of channels, width, length), and finally use the expanded results to predict features to obtain the final facial recognition result.
  • FIG. 3 shows a comparison diagram of the lip attention characteristics before and after optimization according to the present disclosure.
  • the lip attention feature image before optimization has more noise.
  • the attention features of the lips can be better concentrated on the lips, and the noise is reduced.
  • the facial recognition method of the embodiments of the present disclosure when training and predicting face attributes, it is possible to independently optimize the attention features and increase the strength of the training model to improve the accuracy of prediction, thereby better predicting the fine-grained attributes of the face , Such as whether it is equipped with a hat, necklace, whether to carry headphones, etc. According to the embodiments of the present disclosure, it can be applied to face attribute recognition in the fields of surveillance and security, etc., to improve the recognition rate of face attributes and improve the recognition effect.
  • the present disclosure also provides facial recognition devices, electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any facial recognition method provided in the present disclosure.
  • facial recognition devices electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any facial recognition method provided in the present disclosure.
  • the writing order of each step does not mean a strict execution order, and the specific execution order of each step should be determined by its function and possible internal logic.
  • Fig. 4 shows a block diagram of a facial recognition device according to an embodiment of the present disclosure. As shown in Fig. 4, the device includes:
  • the attribute extraction module 41 is configured to perform attribute feature extraction on the image to be processed including the target object to obtain N attribute characteristics of the target object, where N is an integer greater than 1;
  • the attention extraction module 42 is configured to perform attention feature extraction on the image to be processed based on the attention mechanism to obtain N attention features of the target object;
  • the clustering module 43 is configured to perform clustering processing on the N attention features to obtain M cluster attention features, where M is a positive integer and M ⁇ N;
  • the result determination module 44 is configured to determine the facial recognition result of the target object according to the N attribute features and the M cluster attention features.
  • the clustering module includes: a clustering sub-module, configured to perform clustering processing on the N attention features to obtain M cluster sets, and each attention feature is associated with M One of the cluster sets corresponds to one of the cluster sets; the feature determination sub-module is used to determine the cluster attention features of each cluster set to obtain M cluster attention features.
  • the device further includes: an attribute enhancement module, configured to multiply the N attribute features and the N attention features to obtain enhanced N attribute features, where ,
  • the result determining module includes:
  • the first correction sub-module is configured to respectively correct the enhanced N attribute features according to the M cluster attention features to obtain the face recognition result of the target object.
  • the result determination module includes: a second correction submodule, configured to respectively correct the N attribute features according to the M cluster attention features to obtain the facial recognition result.
  • the first correction submodule includes: a first multiplication submodule, configured to combine the enhanced N attribute features with the cluster attention corresponding to each of the attribute features The features are respectively multiplied to obtain the facial recognition result.
  • the second correction sub-module includes: a second multiplication sub-module, configured to combine the N attribute features with the cluster attention features corresponding to each of the attribute features Respectively multiply to obtain the facial recognition result.
  • the device is implemented by a neural network.
  • the neural network includes a multi-task convolutional network, multiple individual attention networks, and a clustering network.
  • the multi-task convolutional network is used to The image to be processed performs attribute feature extraction, the multiple individual attention networks are used to perform attention feature extraction on the image to be processed, and the clustering network is used to perform clustering processing on the N attention features .
  • the device further includes: a parameter adjustment module, which is used to adjust the network of multiple individual attention networks according to the network loss of the clustering network during the training of the neural network parameter.
  • the clustering processing includes spectral clustering
  • the M cluster attention features are respectively cluster centers of the M cluster sets.
  • the functions or modules contained in the apparatus 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 apparatus 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 foregoing 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 product, which implements the above method after being executed by a processor.
  • FIG. 5 shows a block diagram of an electronic device 800 according to an embodiment of the present disclosure.
  • 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 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 these data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc.
  • the memory 804 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable and 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 and 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 an external audio signal.
  • 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 the 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. 6 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure.
  • the electronic device 1900 may be provided as a server. 6
  • the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932, for storing instructions executable by the processing component 1922, such as application programs.
  • the application program stored in the memory 1932 may include one or more modules each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above-described methods.
  • the electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input output (I/O) interface 1958 .
  • the electronic device 1900 can operate based on an operating system stored in the memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
  • a non-volatile computer-readable storage medium such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 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.
  • Non-exhaustive list of 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, state 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 processors of general-purpose computers, special-purpose computers, or other programmable data processing devices, thereby producing a machine that makes these instructions when executed by the processors of the computer or other programmable data processing devices , A device that implements the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams 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. Thus, the computer-readable medium storing the 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 components for realizing 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 substantially 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)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Multimedia (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Image Analysis (AREA)

Abstract

本公开涉及一种面部识别方法及装置、电子设备和存储介质。该方法包括:对包括目标对象的待处理图像进行属性特征提取,得到所述目标对象的N个属性特征,N为大于1的整数;基于注意力机制对所述待处理图像进行注意力特征提取,得到所述目标对象的N个注意力特征;对所述N个注意力特征进行聚类处理,得到M个聚类注意力特征,M为正整数且M<N;根据所述N个属性特征以及所述M个聚类注意力特征,确定所述目标对象的面部识别结果。

Description

面部识别方法及装置、电子设备和存储介质
相关申请的交叉引用
本申请基于申请号为201910107458.X、申请日为2019年02月02日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开。
技术领域
本公开涉及计算机技术领域但不限于计算机领域,尤其涉及一种面部识别方法及装置、电子设备和存储介质。
背景技术
面部属性预测具有广泛的应用,例如,其是监控安防领域中极为重要的一环。有效地预测人的性别、年龄、是否佩戴危险物及其他的属性,对面部属性预测的应用起到极为重要的作用。正确的属性预测可以进一步提升面部识别的正确率,使面部识别能够更广泛地应用于各种应用场景。
发明内容
本公开提出了一种面部识别技术方案。
根据本公开的一方面,提供了一种面部识别方法,包括:对包括目标对象的待处理图像进行属性特征提取,得到所述目标对象的N个属性特征,N为大于1的整数;基于注意力机制对所述待处理图像进行注意力特征提取,得到所述目标对象的N个注意力特征;对所述N个注意力特征进行聚类处理,得到M个聚类注意力特征,M为正整数且M<N;根据所述N个属性特征以及所述M个聚类注意力特征,确定所述目标对象的面部识别结果。
在一种可能的实现方式中,对所述N个注意力特征进行聚类处理,得到M个聚类注意力特征,包括:对所述N个注意力特征进行聚类处理,得到M 个聚类集合,每个注意力特征与M个聚类集合中的一个聚类集合相对应;分别确定各个聚类集合的聚类注意力特征,得到M个聚类注意力特征。
在一种可能的实现方式中,所述方法还包括:将所述N个属性特征与所述N个注意力特征分别相乘,得到增强后的N个属性特征,
其中,根据所述N个属性特征以及所述M个聚类注意力特征,确定所述目标对象的面部识别结果,包括:根据所述M个聚类注意力特征对增强后的N个属性特征分别进行修正,得到所述目标对象的面部识别结果。
在一种可能的实现方式中,根据所述N个属性特征以及所述M个聚类注意力特征,确定所述目标对象的面部识别结果,包括:根据所述M个聚类注意力特征对所述N个属性特征分别进行修正,得到所述面部识别结果。
在一种可能的实现方式中,根据所述M个聚类注意力特征对增强后的N个属性特征分别进行修正,得到所述目标对象的面部识别结果,包括:将增强后的N个属性特征与所述N个属性特征的至少部分属性特征所对应的所述聚类注意力特征分别相乘,得到所述面部识别结果。
在一种可能的实现方式中,根据所述M个聚类注意力特征对所述N个属性特征分别进行修正,得到所述目标对象的面部识别结果,包括:将所述N个属性特征与所述N个属性特征的至少部分所述属性特征所对应的所述聚类注意力特征分别相乘,得到所述面部识别结果。
在一种可能的实现方式中,所述方法通过神经网络实现,所述神经网络包括多任务卷积网络、多个单独注意力网络以及聚类网络,所述多任务卷积网络用于对所述待处理图像进行属性特征提取,所述多个单独注意力网络用于对所述待处理图像进行注意力特征提取,所述聚类网络用于对所述N个注意力特征进行聚类处理。
在一种可能的实现方式中,所述方法还包括:在训练所述神经网络的过程中,根据所述聚类网络的网络损失,调整多个单独注意力网络的网络参数。
在一种可能的实现方式中,所述聚类处理包括谱聚类,所述M个聚类注意力特征分别是所述M个聚类集合的类中心。
根据本公开的另一方面,提供了一种面部识别装置,包括:属性提取 模块,用于对包括目标对象的待处理图像进行属性特征提取,得到所述目标对象的N个属性特征,N为大于1的整数;注意力提取模块,用于基于注意力机制对所述待处理图像进行注意力特征提取,得到所述目标对象的N个注意力特征;聚类模块,用于对所述N个注意力特征进行聚类处理,得到M个聚类注意力特征,M为正整数且M<N;结果确定模块,用于根据所述N个属性特征以及所述M个聚类注意力特征,确定所述目标对象的面部识别结果。
在一种可能的实现方式中,所述聚类模块包括:聚类子模块,用于对所述N个注意力特征进行聚类处理,得到M个聚类集合,每个注意力特征与M个聚类集合中的一个聚类集合相对应;特征确定子模块,用于分别确定各个聚类集合的聚类注意力特征,得到M个聚类注意力特征。
在一种可能的实现方式中,所述装置还包括:属性增强模块,用于将所述N个属性特征与所述N个注意力特征分别相乘,得到增强后的N个属性特征,其中,所述结果确定模块包括:
第一修正子模块,用于根据所述M个聚类注意力特征对增强后的N个属性特征分别进行修正,得到所述目标对象的面部识别结果。
在一种可能的实现方式中,所述结果确定模块包括:第二修正子模块,用于根据所述M个聚类注意力特征对所述N个属性特征分别进行修正,得到所述面部识别结果。
在一种可能的实现方式中,所述第一修正子模块包括:第一相乘子模块,用于将增强后的N个属性特征与所述N个属性特征的至少部分属性特征所对应的所述聚类注意力特征分别相乘,得到所述面部识别结果。
在一种可能的实现方式中,所述第二修正子模块包括:第二相乘子模块,用于将所述N个属性特征与N个属性特征的至少部分属性特征所对应的所述聚类注意力特征分别相乘,得到所述面部识别结果。
在一种可能的实现方式中,所述装置通过神经网络实现,所述神经网络包括多任务卷积网络、多个单独注意力网络以及聚类网络,所述多任务卷积网络用于对所述待处理图像进行属性特征提取,所述多个单独注意力网络用于对所述待处理图像进行注意力特征提取,所述聚类网络用于对所 述N个注意力特征进行聚类处理。
在一种可能的实现方式中,所述装置还包括:参数调整模块,用于在训练所述神经网络的过程中,根据所述聚类网络的网络损失,调整多个单独注意力网络的网络参数。
在一种可能的实现方式中,所述聚类处理包括谱聚类,所述M个聚类注意力特征分别是所述M个聚类集合的类中心。
根据本公开的另一方面,提供了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为:执行上述方法。
根据本公开的另一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。
根据本公开的再一方面,一种计算机程序产品,所述计算机程序产品被处理器执行后,实现上述方法。
在本公开实施例中,能够对待处理图像分别进行属性特征提取及注意力特征提取,得到多个属性特征及注意力特征;对注意力特征聚类得到聚类注意力特征,并根据多个属性特征及聚类注意力特征确定面部识别结果,通过多注意力机制提取注意力特征并通过聚类来聚集相似的注意力特征,从而优化不同的局部特征,提高面部属性的识别效果。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。
图1示出根据本公开实施例的面部识别方法的流程图。
图2示出根据本公开实施例的面部识别方法的应用示例的示意图。
图3示出根据本公开进行优化前后唇部注意力特征的对比图。
图4示出根据本公开实施例的面部识别装置的框图。
图5示出根据本公开实施例的一种电子设备的框图。
图6示出根据本公开实施例的一种电子设备的框图。
具体实施方式
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。
图1示出根据本公开实施例的面部识别方法100的流程图。该面部识别方法100包括:在步骤102中,对包括目标对象的待处理图像进行属性特征提取,得到所述目标对象的N个属性特征,N为大于1的整数。在步骤104中,基于注意力机制对所述待处理图像进行注意力特征提取,得到所述目标对象的N个注意力特征。在步骤106中,对所述N个注意力特征进行聚类处理,得到M个聚类注意力特征,M为正整数且M<N。在步骤108中,根据所述N个属性特征以及所述M个聚类注意力特征,确定所述目标对象的面部识别结果。
本申请实施例提供的方法,可以应用于各种图像处理设备中,图像处理设备通过步骤102、步骤104、步骤106及步骤108的执行,能够识别图像目标对象的面部,例如,人脸识别等。该图像处理设备可为安防设备,例如,安装在小区门口、学校、厂区、居所等各种需要安放监控等位置处的 设备。
在一些实施例中,所述图像处理设备还可以应用于非安防领域,例如,该图像处理设备可为通过面部识别进行检票的票务设备。再例如,该图像处理设备可为支付设备,通过面部识别结果确定是否进行支付等。
总之本申请的面部识别方法可应用在各种需要进行面部识别获得面部识别结果的场景。
根据本公开的实施例,能够对待处理图像分别进行属性特征提取及注意力特征提取,得到多个属性特征及注意力特征;对注意力特征聚类得到聚类注意力特征,并根据多个属性特征及聚类注意力特征确定面部识别结果,通过多注意力机制提取注意力特征并通过聚类来聚集相似的注意力特征,从而优化不同的局部特征,提高面部属性的识别效果。
在面部识别(例如人脸识别)的过程中,不同任务所需要的特征可能不是整个面部的特征,而仅是面部的局部特征。例如,如果预测人是否佩戴眼镜,则可能只需要单独的眼部信息,而多余的信息可能对结果造成干扰。因此,可通过添加注意力特征以提升预测的精度。
在本公开的实施例中,所述注意力特征可为指定需要提取的特征,可为所述属性特征中的一个或多个。
所述属性特征可为目标对象的整体特征和/或局部特征。例如,所述整体特征包括但不限于:目标对象脸部的整体特征;所述局部特征可为面部内某一个局部的特征,例如,眼睛的特征、唇部特征等。
在识别面部属性(例如人的性别、年龄、佩戴物等多个与面部相关的属性)时,可以多属性共同识别及共享特征。在单独的属性上,可以通过添加注意力机制(Attention Mechanism),以使重要的特征(如耳朵、口、鼻等)被更好地学习,也就是使得局部特征能够被强调,从而更好地学习整体属性特征。
在一种可能的实现方式中,可以在步骤102中对包括目标对象的待处理图像进行属性特征提取,得到所述目标对象的N个属性特征。其中,目标对象可以例如为图像中的人物等,待处理图像可以例如为包括目标对象的人脸图像。可以通过例如卷积神经网络CNN作为基础网络(Base Net),对待 处理图像进行特征提取以得到面部特征图;再通过例如多任务卷积神经网络(Multi-Task Convolution Neural Net,MTCNN),对所得到的面部特征图进行属性特征提取,从而得到目标对象的N个属性特征。其中,多任务卷积神经网络可以使用VGG16、残差网络等不同类型的网络,本公开对多任务卷积神经网络的网络类型不作限制。
在一种可能的实现方式中,可以在步骤104中基于注意力机制对所述待处理图像进行注意力特征提取,得到所述目标对象的N个注意力特征。可以例如通过基础网络对待处理图像进行特征提取以得到面部特征图,从而实现特征共享;再通过多个单独注意力网络(Individual Attention Network,IAN)对所述面部特征图进行注意力特征的提取。需要说明的是,多个单独注意力网络中的每个网络是针对一个单独的注意力点进行训练,例如分别针对人的眼镜、唇部等。针对IAN。多个单独注意力网络可以使用简单的卷积神经网络,或者采用相关技术的注意力机制,例如残差注意力(residual attention)等,本公开对多个单独注意力网络的网络类型不作限制。
在一种可能的实现方式中,可以在步骤106中对所述N个注意力特征进行聚类处理,得到M个聚类注意力特征。
举例来说,部分面部特征能够比较好地学习,例如眼镜、鼻子等。相对的,例如耳环、眉毛等的一些细粒度特征却并不好学习。因此,可以通过聚类方式让所有注意力特征中相似的部分可以聚在一起,并优化、尤其是修正一部分学习效果不好的原有注意力特征。
在一种可能的实现方式中,步骤106可包括:
对所述N个注意力特征进行聚类处理,得到M个聚类集合,每个注意力特征与M个聚类集合中的一个聚类集合相对应;
分别确定各个聚类集合的聚类注意力特征,得到M个聚类注意力特征。
举例来说,可以将N个注意力特征聚类成M类(M<N),进行聚类处理后,每个注意力特征都对应于M类中的一类。经聚类后,可得到M个聚类集合。分别提取各个聚类集合的聚类注意力特征,可得到M个聚类注意力特征。这样,可以M个聚类注意力特征作为N个注意力特征的代表,进而根据N个属性特征和M个聚类注意力特征来确定目标对象的面部识别结果。
在一种可能的实现方式中,聚类处理可以是谱聚类,M个聚类注意力特征是所述M个聚类集合中每一个聚类集合的类中心。在M个聚类集合中取出类中心的方法可以有多种。在一种实现中,可以在每个聚类集合中对所有值取平均值以得到类中心。在另一实现中,可以通过预设训练集进行训练,以学习得出每个注意力特征的相应权重,对聚类集合中的每个注意力特征进行加权平均,以得到该聚类结合的类中心。本公开对聚类的具体方式不作限制。
通过这种方式,可以通过好学习的注意力特征来帮助到其它不好学习的注意力特征,通过相关注意力特征的互相帮助来提升注意力机制的效果。
在一种可能的实现方式中,可在步骤108中根据所述N个属性特征以及所述M个聚类注意力特征,确定所述目标对象的面部识别结果。可以通过相乘等方式综合考虑所得到的N个属性特征和M个聚类注意力特征,也可以采用其他方式进一步处理,以确定目标对象的面部识别结果。
在一种可能的实现方式中,步骤108可包括:
根据所述M个聚类注意力特征对所述N个属性特征分别进行修正,得到所述面部识别结果。也就是说,可以采用M个聚类注意力特征直接对N个属性特征分别进行修正。
在一种可能的实现方式中,根据M个聚类注意力特征对N个属性特征进行修正的步骤可包括:将N个属性特征与所述N个属性特征中至少部分属性特征所对应的聚类注意力特征分别相乘,得到所述面部识别结果。
通过这种方式,可使得面部识别结果更好地聚焦于单个注意力特征。本实施例中的N个属性特征中的至少部分属性特征包括:N个属性特征中的各属性特征,及少于N个的属性特征。
在一种可能的实现方式中,所述方法还可包括:将所述N个属性特征与所述N个注意力特征分别相乘,得到增强后的N个属性特征;
步骤108可包括:根据所述M个聚类注意力特征对增强后的N个属性特征分别进行修正,得到所述目标对象的面部识别结果。
举例来说,可以先将N个注意力特征与N个属性特征分别相乘,得到增强后的N个属性特征,从而使得需要被强调的属性特征得到增强。进而,根 据M个聚类注意力特征对增强后的N个属性特征分别进行修正,得到目标对象的面部识别结果。
在一个具体实现中,根据M个聚类注意力特征对增强后的N个属性特征进行修正的步骤可包括:将增强后的N个属性特征与所述N个属性特征中至少部分属性特征所对应的聚类注意力特征分别相乘,得到面部识别结果。
通过这种方式,可以进一步强调注意力特征,提高面部识别的效果。
图2示出根据本公开实施例的面部识别方法的应用示例的示意图。方法200是面部识别方法100的一个应用示例。如图2所示,在方法200中,可通过基础网络对待处理图像进行特征提取,得到面部特征图;对面部特征图进行属性特征提取,可得到N个属性特征202;对面部特征图进行注意力特征提取,得到N个注意力特征204;对N个注意力特征204进行聚类处理,了得到M个聚类集合。该N个注意力特征中的每个注意力特征与M个聚类集合中的一个聚类集合相对应;分别确定各个聚类集合的聚类注意力特征,可得到M个聚类注意力特征。
在面部识别方法200的一个变形中,根据由N个注意力特征204所得到的M个聚类注意力特征,直接对N个属性特征202进行修正(S208),可确定目标对象的面部识别结果。这样,可以利用IAN聚类的前导对目标对象的面部识别结果进行修正,通过容易学习的注意力特征来优化不容易的注意力特征。
在面部识别方法200的一个变形中,如图2中的虚线箭头S206所示,可进一步将N个注意力特征204与N个属性特征202分别相乘,得到增强后的N个属性特征。进而,根据M个聚类注意力特征对增强后的N个属性特征分别进行修正,得到目标对象的面部识别结果。由此,可以进一步强调注意力特征,通过容易学习的注意力特征来优化不容易的注意力特征。
通过面部识别方法200的上述变形,可以通过相关属性的互相帮助来提升注意力机制。
在一种可能的实现方式中,所述方法可通过神经网络实现,所述神经网络包括多任务卷积网络、多个单独注意力网络以及聚类网络,所述多任 务卷积网络用于对所述待处理图像进行属性特征提取,所述多个单独注意力网络用于对所述待处理图像进行注意力特征提取,所述聚类网络用于对所述N个注意力特征进行聚类处理。
多任务卷积网络(MTCNN)用于对待处理图像(面部特征图)进行属性特征202的提取。关于具体使用的多任务卷积网络,可以使用类似VGG16、残差网络(Residual Network)等不同大小的网络来应对不同的应用场景。
多个单独注意力网络(IAN)用于对待处理图像(面部特征图)进行注意力特征204的提取。需要说明的是,多个单独注意力网络中的每个网络是针对一个单独的注意力点进行训练,例如分别针对人的眼镜、唇部等。针对IAN,可以使用简单的卷积神经网络进行学习,或者采用注意力机制、例如残差注意力(residual attention)等。
聚类网络用于对N个注意力特征进行聚类处理,得到M个聚类注意力特征。本公开对聚类网络的网络类型不作限制。
在一种可能的实现方式中,所述方法还包括:在训练所述神经网络的过程中,根据所述聚类网络的网络损失,调整多个单独注意力网络的网络参数。
上述各个神经网络可根据预设的训练集进行训练。在本发明采用的各网络中,采用组合任务来进行优化,在组合过程中可以不涉及人工涉及的环节,而全部采用自主学习来实现优化。
在训练所述神经网络的过程中,可根据所述聚类网络的网络损失,调整多个单独注意力网络的网络参数,从而利用神经网络的反向传播对单独注意力网络进行优化,
在一个具体实现方式中,可以利用MTCNN为基础的多任务属性学习网络,同时训练面部特征图的N个属性(attribute),得到N个属性特征202。经由MTCNN得到的N个属性特征202为特征张量,可以表示为(N,C,W,H)。(N,C,W,H)的数值由具体的神经网络来决定。其中N、C、W、H均为自然数,N表示特征张量的个数;C表示得到的特征图的数量、又称通道数,通常远大于3;W表示特征图的宽度;H表示特征图的长度。也就是说,N个属性特征202可以表示为N个属性特征(C,W,H),即N个属性特征张量(通 道数,宽度,长度)。后续可以利用N个属性特征202对作为面部识别结果的N个面部属性进行预测。
在一个具体实现方式中,可以利用例如IAN来训练来自面部特征图的N个属性,使用注意力图(attention map)来学习N个属性,从而得到N个注意力特征204。由于每个注意力特征对应于1个二维注意力特征图像(Mask),因此得到的注意力特征204的特征张量A可以表示为(N,1,W,H),即此处通道数为1。因此,N个注意力特征204可以表示为N个特征张量A(W,H),即N个特征张量A(宽度,长度)。
在一个具体实现中,如图2的虚线箭头S206所示例的,可以将N个注意力特征张量A(宽度,长度)与N个属性特征张量进行相乘处理,从而使得N个属性特征张量中的相关特征被强调。
在一个具体实现中,对N个注意力特征进行聚类处理,得到M个聚类集合,可以表示为C 1,…,C M。其中,M个聚类集合各自取出的类中心可以表示为第1个聚类注意力特征(A x1,A y1),…,第M个聚类注意力特征(A xm,A ym)。上述M个聚类注意力特征可以表示为(M,1,W,H),即M个二维张量X _1(宽度,长度),…,X _M(宽度,长度)。对经过N个注意力特征A的修正所得到的N个属性特征张量F(通道数,宽度,长度),确定各自所对应的聚类类中心,然后使用M个二维张量X中相应的类中心对N个属性特征F进行最后的修正。由于这M个张量X来自于之前IAN的输出,所以通过这样的学习,也可以同时优化IAN,还可以同时使用多个注意力特征对N个属性特征F进行修正。
在一个具体示例中,修正的方式是,将N个属性特征F(通道数,宽度,长度)同时乘上M个已经聚类好的张量X _m,其中m是在[1,M]范围内的自然数。由此可以得到相乘后的张量FX(M,通道数,宽度,长度)。将相乘后的张量FX(M,通道数,宽度,长度)展开成(M×通道数,宽度,长度),最后使用该展开的结果对特征进行预测,以得到最终的面部识别结果。
根据上述方法,可以使得多任务下的注意力特征的面部识别效果得到整体的提升。图3示出了根据本公开进行优化前后唇部注意力特征的对比 图。如图3上半部分所示,优化前的唇部注意力特征图像有较多噪声。如图3下半部分所示,按照本公开优化之后,唇部注意力特征能更好的集中在唇部,噪声有所减少。
根据本公开实施例的面部识别方法,能够在训练及预测人脸属性时,通过自主优化注意力特征,提升训练模型的强度来提升预测的精度,从而更好的预测人脸上的细粒度属性,比如是否配到帽子,项链,是否携带耳机等。根据本公开的实施例,可应用于监控安防等领域中进行人脸属性识别,提升人脸属性识别率,提高识别效果。
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。
此外,本公开还提供了面部识别装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种面部识别方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
图4示出根据本公开实施例的面部识别装置的框图,如图4所示,所述装置包括:
属性提取模块41,用于对包括目标对象的待处理图像进行属性特征提取,得到所述目标对象的N个属性特征,N为大于1的整数;
注意力提取模块42,用于基于注意力机制对所述待处理图像进行注意力特征提取,得到所述目标对象的N个注意力特征;
聚类模块43,用于对所述N个注意力特征进行聚类处理,得到M个聚类注意力特征,M为正整数且M<N;
结果确定模块44,用于根据所述N个属性特征以及所述M个聚类注意力特征,确定所述目标对象的面部识别结果。
在一种可能的实现方式中,所述聚类模块包括:聚类子模块,用于对 所述N个注意力特征进行聚类处理,得到M个聚类集合,每个注意力特征与M个聚类集合中的一个聚类集合相对应;特征确定子模块,用于分别确定各个聚类集合的聚类注意力特征,得到M个聚类注意力特征。
在一种可能的实现方式中,所述装置还包括:属性增强模块,用于将所述N个属性特征与所述N个注意力特征分别相乘,得到增强后的N个属性特征,其中,所述结果确定模块包括:
第一修正子模块,用于根据所述M个聚类注意力特征对增强后的N个属性特征分别进行修正,得到所述目标对象的面部识别结果。
在一种可能的实现方式中,所述结果确定模块包括:第二修正子模块,用于根据所述M个聚类注意力特征对所述N个属性特征分别进行修正,得到所述面部识别结果。
在一种可能的实现方式中,所述第一修正子模块包括:第一相乘子模块,用于将增强后的N个属性特征与各所述属性特征所对应的所述聚类注意力特征分别相乘,得到所述面部识别结果。
在一种可能的实现方式中,所述第二修正子模块包括:第二相乘子模块,用于将所述N个属性特征与各所述属性特征所对应的所述聚类注意力特征分别相乘,得到所述面部识别结果。
在一种可能的实现方式中,所述装置通过神经网络实现,所述神经网络包括多任务卷积网络、多个单独注意力网络以及聚类网络,所述多任务卷积网络用于对所述待处理图像进行属性特征提取,所述多个单独注意力网络用于对所述待处理图像进行注意力特征提取,所述聚类网络用于对所述N个注意力特征进行聚类处理。
在一种可能的实现方式中,所述装置还包括:参数调整模块,用于在训练所述神经网络的过程中,根据所述聚类网络的网络损失,调整多个单独注意力网络的网络参数。
在一种可能的实现方式中,所述聚类处理包括谱聚类,所述M个聚类注意力特征分别是所述M个聚类集合的类中心。
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法 实施例的描述,为了简洁,这里不再赘述。
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是非易失性计算机可读存储介质。
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为上述方法。
电子设备可以被提供为终端、服务器或其它形态的设备。
本公开实施例还提出一种计算机程序产品,所述计算机程序产品被处理器执行后,实现上述方法。
图5示出根据本公开实施例的一种电子设备800的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。
参照图5,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包 括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器, 磁传感器,压力传感器或温度传感器。
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。
图6示出根据本公开实施例的电子设备1900的框图。例如,电子设备1900可以被提供为一服务器。参照图6,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完 全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不 同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。

Claims (21)

  1. 一种面部识别方法,包括:
    对包括目标对象的待处理图像进行属性特征提取,得到所述目标对象的N个属性特征,N为大于1的整数;
    基于注意力机制对所述待处理图像进行注意力特征提取,得到所述目标对象的N个注意力特征;
    对所述N个注意力特征进行聚类处理,得到M个聚类注意力特征,M为正整数且M<N;
    根据所述N个属性特征以及所述M个聚类注意力特征,确定所述目标对象的面部识别结果。
  2. 根据权利要求1所述的方法,其中,对所述N个注意力特征进行聚类处理,得到M个聚类注意力特征,包括:
    对所述N个注意力特征进行聚类处理,得到M个聚类集合,每个注意力特征与M个聚类集合中的一个聚类集合相对应;
    分别确定各个聚类集合的聚类注意力特征,得到M个聚类注意力特征。
  3. 根据权利要求1或2所述的方法,其中,所述方法还包括:
    将所述N个属性特征与所述N个注意力特征分别相乘,得到增强后的N个属性特征,
    其中,根据所述N个属性特征以及所述M个聚类注意力特征,确定所述目标对象的面部识别结果,包括:
    根据所述M个聚类注意力特征对增强后的N个属性特征分别进行修正,得到所述目标对象的面部识别结果。
  4. 根据权利要求1或2所述的方法,其中,根据所述N个属性特征以及所述M个聚类注意力特征,确定所述目标对象的面部识别结果,包括:
    根据所述M个聚类注意力特征对所述N个属性特征分别进行修正,得到所述面部识别结果。
  5. 根据权利要求3所述的方法,其中,根据所述M个聚类注意力特征对增强后的N个属性特征分别进行修正,得到所述目标对象的面部识别结果, 包括:
    将增强后的N个属性特征与所述N个属性特征中至少部分属性特征所对应的所述聚类注意力特征分别相乘,得到所述面部识别结果。
  6. 根据权利要求4所述的方法,其中,根据所述M个聚类注意力特征对所述N个属性特征分别进行修正,得到所述目标对象的面部识别结果,包括:
    将所述N个属性特征与所述N个属性特征中至少部分属性特征所对应的所述聚类注意力特征分别相乘,得到所述面部识别结果。
  7. 根据权利要求1至6中任一项所述的方法,其中,所述方法通过神经网络实现,所述神经网络包括多任务卷积网络、多个单独注意力网络以及聚类网络,所述多任务卷积网络用于对所述待处理图像进行属性特征提取,所述多个单独注意力网络用于对所述待处理图像进行注意力特征提取,所述聚类网络用于对所述N个注意力特征进行聚类处理。
  8. 根据权利要求7所述的方法,其中,所述方法还包括:
    在训练所述神经网络的过程中,根据所述聚类网络的网络损失,调整多个单独注意力网络的网络参数。
  9. 根据权利要求1-8中任意一项所述的方法,其中,所述聚类处理包括谱聚类,所述M个聚类注意力特征分别是所述M个聚类集合的类中心。
  10. 一种面部识别装置,其中,包括:
    属性提取模块,用于对包括目标对象的待处理图像进行属性特征提取,得到所述目标对象的N个属性特征,N为大于1的整数;
    注意力提取模块,用于基于注意力机制对所述待处理图像进行注意力特征提取,得到所述目标对象的N个注意力特征;
    聚类模块,用于对所述N个注意力特征进行聚类处理,得到M个聚类注意力特征,M为正整数且M<N;
    结果确定模块,用于根据所述N个属性特征以及所述M个聚类注意力特征,确定所述目标对象的面部识别结果。
  11. 根据权利要求10所述的装置,其中,所述聚类模块包括:
    聚类子模块,用于对所述N个注意力特征进行聚类处理,得到M个聚类集合,每个注意力特征与M个聚类集合中的一个聚类集合相对应;
    特征确定子模块,用于分别确定各个聚类集合的聚类注意力特征,得到M个聚类注意力特征。
  12. 根据权利要求10或11所述的装置,其中,所述装置还包括:
    属性增强模块,用于将所述N个属性特征与所述N个注意力特征分别相乘,得到增强后的N个属性特征,
    其中,所述结果确定模块包括:
    第一修正子模块,用于根据所述M个聚类注意力特征对增强后的N个属性特征分别进行修正,得到所述目标对象的面部识别结果。
  13. 根据权利要求10或11所述的装置,其中,所述结果确定模块包括:
    第二修正子模块,用于根据所述M个聚类注意力特征对所述N个属性特征分别进行修正,得到所述面部识别结果。
  14. 根据权利要求12所述的装置,其中,所述第一修正子模块包括:
    第一相乘子模块,用于将增强后的N个属性特征与各所述属性特征所对应的所述聚类注意力特征分别相乘,得到所述面部识别结果。
  15. 根据权利要求13所述的装置,其中,所述第二修正子模块包括:
    第二相乘子模块,用于将所述N个属性特征与各所述属性特征所对应的所述聚类注意力特征分别相乘,得到所述面部识别结果。
  16. 根据权利要求10至15中任一项所述的装置,其中,所述装置通过神经网络实现,所述神经网络包括多任务卷积网络、多个单独注意力网络以及聚类网络,所述多任务卷积网络用于对所述待处理图像进行属性特征提取,所述多个单独注意力网络用于对所述待处理图像进行注意力特征提取,所述聚类网络用于对所述N个注意力特征进行聚类处理。
  17. 根据权利要求16所述的装置,其中,所述装置还包括:
    参数调整模块,用于在训练所述神经网络的过程中,根据所述聚类网络的网络损失,调整多个单独注意力网络的网络参数。
  18. 根据权利要求10-17中任意一项所述的装置,其中,所述聚类处理包括谱聚类,所述M个聚类注意力特征分别是所述M个聚类集合的类中心。
  19. 一种电子设备,其中,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为:执行权利要求1至9中任意一项所述的方法。
  20. 一种计算机可读存储介质,其上存储有计算机程序指令,其中,所述计算机程序指令被处理器执行时实现权利要求1至9中任意一项所述的方法。
  21. 一种计算机程序产品,所述计算机程序产品被处理器执行后,实现权利要求1至9中任意一项所述的方法。
PCT/CN2019/100859 2019-02-02 2019-08-15 面部识别方法及装置、电子设备和存储介质 WO2020155606A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
KR1020207018821A KR102390580B1 (ko) 2019-02-02 2019-08-15 얼굴 인식 방법 및 장치, 전자 기기 및 저장 매체
SG11202006192YA SG11202006192YA (en) 2019-02-02 2019-08-15 Face recognition method and apparatus, electronic device, and storage medium
JP2020533112A JP7038829B2 (ja) 2019-02-02 2019-08-15 顔部認識方法及び装置、電子機器並びに記憶媒体
US16/907,406 US11455830B2 (en) 2019-02-02 2020-06-22 Face recognition method and apparatus, electronic device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910107458.X 2019-02-02
CN201910107458.XA CN109800737B (zh) 2019-02-02 2019-02-02 面部识别方法及装置、电子设备和存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/907,406 Continuation US11455830B2 (en) 2019-02-02 2020-06-22 Face recognition method and apparatus, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
WO2020155606A1 true WO2020155606A1 (zh) 2020-08-06

Family

ID=66561887

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/100859 WO2020155606A1 (zh) 2019-02-02 2019-08-15 面部识别方法及装置、电子设备和存储介质

Country Status (7)

Country Link
US (1) US11455830B2 (zh)
JP (1) JP7038829B2 (zh)
KR (1) KR102390580B1 (zh)
CN (1) CN109800737B (zh)
SG (1) SG11202006192YA (zh)
TW (1) TWI717923B (zh)
WO (1) WO2020155606A1 (zh)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112580694A (zh) * 2020-12-01 2021-03-30 中国船舶重工集团公司第七0九研究所 基于联合注意力机制的小样本图像目标识别方法及系统
CN112733652A (zh) * 2020-12-31 2021-04-30 深圳赛安特技术服务有限公司 图像目标识别方法、装置、计算机设备及可读存储介质
CN113049084A (zh) * 2021-03-16 2021-06-29 电子科技大学 一种基于注意力机制的Resnet的分布式光纤传感信号识别方法
CN113052175A (zh) * 2021-03-26 2021-06-29 北京百度网讯科技有限公司 目标检测方法、装置、电子设备及可读存储介质
CN113392263A (zh) * 2021-06-24 2021-09-14 上海商汤科技开发有限公司 一种数据标注方法及装置、电子设备和存储介质
CN113470827A (zh) * 2021-06-30 2021-10-01 上海商汤智能科技有限公司 分类方法及装置、电子设备和存储介质
CN113553905A (zh) * 2021-06-16 2021-10-26 北京百度网讯科技有限公司 图像识别方法、装置及系统
CN114495294A (zh) * 2021-12-03 2022-05-13 华中科技大学鄂州工业技术研究院 一种地铁闸机无感支付方法、装置及存储介质

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109800737B (zh) 2019-02-02 2021-06-25 深圳市商汤科技有限公司 面部识别方法及装置、电子设备和存储介质
CN110210572B (zh) * 2019-06-10 2023-02-07 腾讯科技(深圳)有限公司 图像分类方法、装置、存储介质及设备
CN110458052B (zh) * 2019-07-25 2023-04-07 Oppo广东移动通信有限公司 基于增强现实的目标对象识别方法、装置、设备、介质
CN111339813B (zh) * 2019-09-30 2022-09-27 深圳市商汤科技有限公司 人脸属性识别方法、装置、电子设备和存储介质
CN111274388B (zh) * 2020-01-14 2024-05-10 平安科技(深圳)有限公司 一种文本聚类的方法及装置
CN111950643B (zh) * 2020-08-18 2022-06-28 创新奇智(上海)科技有限公司 图像分类模型训练方法、图像分类方法及对应装置
CN112560756A (zh) * 2020-12-24 2021-03-26 北京嘀嘀无限科技发展有限公司 识别人脸的方法、装置、电子设备和存储介质
CN113177533B (zh) * 2021-05-28 2022-09-06 济南博观智能科技有限公司 一种人脸识别方法、装置及电子设备
CN113688729B (zh) * 2021-08-24 2023-04-07 上海商汤科技开发有限公司 一种行为识别方法及装置、电子设备和存储介质
KR102664254B1 (ko) * 2022-04-01 2024-05-08 한국생산기술연구원 비전 인공지능 기반 수신호 인식 장치 및 이를 이용한 수신호 인식 방법
KR102458179B1 (ko) 2022-06-20 2022-10-24 주식회사 한국공간데이터 얼굴 속성을 이용한 얼굴 인식 방법 및 얼굴 인식 장치
CN117437684B (zh) * 2023-12-14 2024-04-16 深圳须弥云图空间科技有限公司 一种基于修正注意力的图像识别方法和装置

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120313964A1 (en) * 2011-06-13 2012-12-13 Sony Corporation Information processing apparatus, information processing method, and program
CN105678304A (zh) * 2015-12-30 2016-06-15 浙江宇视科技有限公司 一种车标识别方法及装置
CN106611421A (zh) * 2016-12-30 2017-05-03 西安电子科技大学 基于特征学习和素描线段约束的sar图像分割方法
CN106845421A (zh) * 2017-01-22 2017-06-13 北京飞搜科技有限公司 基于多区域特征与度量学习的人脸特征识别方法及系统
CN108229674A (zh) * 2017-02-21 2018-06-29 北京市商汤科技开发有限公司 聚类用神经网络的训练方法和装置、聚类方法和装置
CN108960331A (zh) * 2018-07-10 2018-12-07 重庆邮电大学 一种基于行人图像特征聚类的行人再识别方法
CN109800737A (zh) * 2019-02-02 2019-05-24 深圳市商汤科技有限公司 面部识别方法及装置、电子设备和存储介质

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003346151A (ja) 2002-05-29 2003-12-05 Fuji Photo Film Co Ltd 画像認識方法および装置並びにプログラム
TWI528331B (zh) * 2014-10-06 2016-04-01 由田新技股份有限公司 注意力偵測裝置、方法、電腦可讀取紀錄媒體、及其電腦程式產品
CN105096420A (zh) * 2015-07-31 2015-11-25 北京旷视科技有限公司 门禁系统以及用于其的数据处理方法
JP6873600B2 (ja) 2016-03-04 2021-05-19 キヤノン株式会社 画像認識装置、画像認識方法及びプログラム
US10831827B2 (en) * 2016-04-01 2020-11-10 International Business Machines Corporation Automatic extraction of user mobility behaviors and interaction preferences using spatio-temporal data
CN107909059A (zh) * 2017-11-30 2018-04-13 中南大学 一种面向复杂城市场景中协同仿生视觉的交通标志牌检测与识别方法
CN108875521A (zh) * 2017-12-20 2018-11-23 北京旷视科技有限公司 人脸检测方法、装置、系统和存储介质
CN109255369B (zh) * 2018-08-09 2020-10-16 杭州易现先进科技有限公司 利用神经网络识别图片的方法及装置、介质和计算设备
CN109145867B (zh) * 2018-09-07 2021-08-10 北京旷视科技有限公司 人体姿态估计方法、装置、系统、电子设备、存储介质
US11256960B2 (en) * 2020-04-15 2022-02-22 Adobe Inc. Panoptic segmentation

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120313964A1 (en) * 2011-06-13 2012-12-13 Sony Corporation Information processing apparatus, information processing method, and program
CN105678304A (zh) * 2015-12-30 2016-06-15 浙江宇视科技有限公司 一种车标识别方法及装置
CN106611421A (zh) * 2016-12-30 2017-05-03 西安电子科技大学 基于特征学习和素描线段约束的sar图像分割方法
CN106845421A (zh) * 2017-01-22 2017-06-13 北京飞搜科技有限公司 基于多区域特征与度量学习的人脸特征识别方法及系统
CN108229674A (zh) * 2017-02-21 2018-06-29 北京市商汤科技开发有限公司 聚类用神经网络的训练方法和装置、聚类方法和装置
CN108960331A (zh) * 2018-07-10 2018-12-07 重庆邮电大学 一种基于行人图像特征聚类的行人再识别方法
CN109800737A (zh) * 2019-02-02 2019-05-24 深圳市商汤科技有限公司 面部识别方法及装置、电子设备和存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LUO, JIANHAO ET AL: "A Survey on Fine-Grained Image Categorization Using Deep Convolutional Features", ACTA AUTOMATICA SINICA, vol. 43, no. 8, 31 August 2017 (2017-08-31), pages 1306 - 1318 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112580694B (zh) * 2020-12-01 2024-04-19 中国船舶重工集团公司第七0九研究所 基于联合注意力机制的小样本图像目标识别方法及系统
CN112580694A (zh) * 2020-12-01 2021-03-30 中国船舶重工集团公司第七0九研究所 基于联合注意力机制的小样本图像目标识别方法及系统
CN112733652A (zh) * 2020-12-31 2021-04-30 深圳赛安特技术服务有限公司 图像目标识别方法、装置、计算机设备及可读存储介质
CN112733652B (zh) * 2020-12-31 2024-04-19 深圳赛安特技术服务有限公司 图像目标识别方法、装置、计算机设备及可读存储介质
CN113049084B (zh) * 2021-03-16 2022-05-06 电子科技大学 一种基于注意力机制的Resnet的分布式光纤传感信号识别方法
CN113049084A (zh) * 2021-03-16 2021-06-29 电子科技大学 一种基于注意力机制的Resnet的分布式光纤传感信号识别方法
CN113052175B (zh) * 2021-03-26 2024-03-29 北京百度网讯科技有限公司 目标检测方法、装置、电子设备及可读存储介质
CN113052175A (zh) * 2021-03-26 2021-06-29 北京百度网讯科技有限公司 目标检测方法、装置、电子设备及可读存储介质
CN113553905A (zh) * 2021-06-16 2021-10-26 北京百度网讯科技有限公司 图像识别方法、装置及系统
CN113553905B (zh) * 2021-06-16 2024-04-26 北京百度网讯科技有限公司 图像识别方法、装置及系统
CN113392263A (zh) * 2021-06-24 2021-09-14 上海商汤科技开发有限公司 一种数据标注方法及装置、电子设备和存储介质
CN113470827A (zh) * 2021-06-30 2021-10-01 上海商汤智能科技有限公司 分类方法及装置、电子设备和存储介质
CN114495294A (zh) * 2021-12-03 2022-05-13 华中科技大学鄂州工业技术研究院 一种地铁闸机无感支付方法、装置及存储介质

Also Published As

Publication number Publication date
SG11202006192YA (en) 2020-11-27
CN109800737A (zh) 2019-05-24
KR20200096565A (ko) 2020-08-12
JP7038829B2 (ja) 2022-03-18
US20200320281A1 (en) 2020-10-08
CN109800737B (zh) 2021-06-25
US11455830B2 (en) 2022-09-27
TWI717923B (zh) 2021-02-01
KR102390580B1 (ko) 2022-04-26
JP2021514497A (ja) 2021-06-10
TW202030638A (zh) 2020-08-16

Similar Documents

Publication Publication Date Title
TWI717923B (zh) 面部識別方法及裝置、電子設備和儲存介質
US20210326708A1 (en) Neural network training method and apparatus, and image processing method and apparatus
WO2021196401A1 (zh) 图像重建方法及装置、电子设备和存储介质
WO2021155632A1 (zh) 图像处理方法及装置、电子设备和存储介质
WO2021056808A1 (zh) 图像处理方法及装置、电子设备和存储介质
CN110909815B (zh) 神经网络训练、图像处理方法、装置及电子设备
CN110598504B (zh) 图像识别方法及装置、电子设备和存储介质
TW202105244A (zh) 圖像處理方法及裝置、電子設備和電腦可讀儲存介質
JP2022523606A (ja) 動画解析のためのゲーティングモデル
JP7165818B2 (ja) ニューラルネットワークのトレーニング方法及び装置並びに画像生成方法及び装置
TW202105202A (zh) 影片處理方法及裝置、電子設備、儲存媒體和電腦程式
CN110458218B (zh) 图像分类方法及装置、分类网络训练方法及装置
CN105335684B (zh) 人脸检测方法及装置
TWI735112B (zh) 圖像生成方法、電子設備和儲存介質
US20210012154A1 (en) Network optimization method and apparatus, image processing method and apparatus, and storage medium
CN109165738B (zh) 神经网络模型的优化方法及装置、电子设备和存储介质
CN111259967B (zh) 图像分类及神经网络训练方法、装置、设备及存储介质
TW202032425A (zh) 圖像處理方法及裝置、電子設備和儲存介質
CN111242303B (zh) 网络训练方法及装置、图像处理方法及装置
WO2020114236A1 (zh) 关键点检测方法、装置、电子设备及存储介质
WO2020192113A1 (zh) 图像处理方法及装置、电子设备和存储介质
CN110135349A (zh) 识别方法、装置、设备及存储介质
WO2023024439A1 (zh) 一种行为识别方法及装置、电子设备和存储介质
CN109447258B (zh) 神经网络模型的优化方法及装置、电子设备和存储介质
WO2021056770A1 (zh) 图像重建方法及装置、电子设备和存储介质

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2020533112

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20207018821

Country of ref document: KR

Kind code of ref document: A

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

Ref document number: 19912709

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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 23/11/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19912709

Country of ref document: EP

Kind code of ref document: A1