WO2021082381A1 - 人脸识别方法及装置、电子设备和存储介质 - Google Patents
人脸识别方法及装置、电子设备和存储介质 Download PDFInfo
- Publication number
- WO2021082381A1 WO2021082381A1 PCT/CN2020/088384 CN2020088384W WO2021082381A1 WO 2021082381 A1 WO2021082381 A1 WO 2021082381A1 CN 2020088384 W CN2020088384 W CN 2020088384W WO 2021082381 A1 WO2021082381 A1 WO 2021082381A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- feature
- residual
- target parameter
- face
- face recognition
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 93
- 238000003860 storage Methods 0.000 title claims abstract description 31
- 238000012545 processing Methods 0.000 claims abstract description 190
- 238000012937 correction Methods 0.000 claims abstract description 137
- 238000000605 extraction Methods 0.000 claims abstract description 44
- 230000004913 activation Effects 0.000 claims description 53
- 230000006870 function Effects 0.000 claims description 45
- 230000008569 process Effects 0.000 claims description 22
- 238000004590 computer program Methods 0.000 claims description 13
- 238000005457 optimization Methods 0.000 claims description 3
- 238000001994 activation Methods 0.000 description 45
- 238000010586 diagram Methods 0.000 description 18
- 238000004891 communication Methods 0.000 description 10
- 238000004364 calculation method Methods 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 9
- 238000012549 training Methods 0.000 description 9
- 230000009471 action Effects 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 239000004065 semiconductor Substances 0.000 description 3
- 230000003068 static effect Effects 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000000295 complement effect Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 229910044991 metal oxide Inorganic materials 0.000 description 2
- 150000004706 metal oxides Chemical class 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000001902 propagating effect Effects 0.000 description 2
- KLDZYURQCUYZBL-UHFFFAOYSA-N 2-[3-[(2-hydroxyphenyl)methylideneamino]propyliminomethyl]phenol Chemical compound OC1=CC=CC=C1C=NCCCN=CC1=CC=CC=C1O KLDZYURQCUYZBL-UHFFFAOYSA-N 0.000 description 1
- RYGMFSIKBFXOCR-UHFFFAOYSA-N Copper Chemical compound [Cu] RYGMFSIKBFXOCR-UHFFFAOYSA-N 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 229910052802 copper Inorganic materials 0.000 description 1
- 239000010949 copper Substances 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 201000001098 delayed sleep phase syndrome Diseases 0.000 description 1
- 208000033921 delayed sleep phase type circadian rhythm sleep disease Diseases 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000001815 facial effect Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/168—Feature extraction; Face representation
- G06V40/171—Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/172—Classification, e.g. identification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/217—Validation; Performance evaluation; Active pattern learning techniques
- G06F18/2193—Validation; Performance evaluation; Active pattern learning techniques based on specific statistical tests
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/168—Feature extraction; Face representation
Definitions
- the embodiments of the present application relate to the field of computer vision technology, and in particular, to a face recognition method and device, electronic equipment, and storage medium.
- Face recognition technology has been widely used in security, finance, information, education and many other fields. Face recognition is based on the extraction and comparison of facial features. Therefore, features have a great influence on the accuracy of recognition. With the development of deep learning technology, the accuracy of face recognition under the condition that the face image meets the target parameters has reached the desired effect, but when the face image does not meet the target parameter conditions, the accuracy of face recognition is low.
- the embodiment of the present application proposes a face recognition method and device, electronic equipment, and storage medium.
- the embodiment of the present application provides a face recognition method, including:
- the processing the first feature and the first target parameter value to obtain the first correction feature corresponding to the first feature includes:
- the first residual feature, the first target parameter value, and the first feature are processed to obtain a first correction feature corresponding to the first feature.
- the first residual feature corresponding to the first feature is obtained, and the first residual feature, the first target parameter value, and the The first feature is processed to obtain the first correction feature corresponding to the first feature, so that the correction can be performed on the feature level based on the residual.
- the processing the first feature to obtain the first residual feature corresponding to the first feature includes:
- the first residual feature corresponding to the first feature is obtained. Based on the first residual feature thus obtained, a relatively accurate Correction features.
- the performing full connection processing and activation processing on the first feature to obtain the first residual feature corresponding to the first feature includes:
- the first residual feature corresponding to the first feature can be obtained, which can save the calculation amount and increase the calculation speed; by performing the first feature Multi-level fully connected processing and activation processing to obtain the first residual feature corresponding to the first feature helps to obtain a more accurate correction feature.
- the dimension of the feature obtained by performing the fully connected process on the first feature is the same as the dimension of the first feature.
- the processing the first residual feature, the first target parameter value, and the first feature to obtain the first correction feature corresponding to the first feature includes:
- a first correction feature corresponding to the first feature is determined.
- the first correction feature can be determined based on the first target parameter value, which is helpful To improve the accuracy of face recognition of face images that do not meet the target parameter conditions, and does not affect the accuracy of face recognition of face images that meet the target parameter conditions.
- the determining the first residual component corresponding to the first characteristic according to the first residual characteristic and the first target parameter value includes:
- the first residual component corresponding to the first characteristic is obtained.
- the first residual component can be accurately determined when the value range of the first target parameter is not a preset interval.
- the determining the first correction feature corresponding to the first feature according to the first residual component and the first feature includes:
- the sum of the first residual component and the first feature is determined as the first correction feature corresponding to the first feature.
- the first correction feature can be determined quickly and accurately.
- the target parameter includes face angle, blur degree, or occlusion ratio.
- the processing the first feature and the first target parameter value includes:
- the first feature and the first target parameter value are processed through the optimized face recognition model.
- the first feature and the first target parameter value are processed through the optimized face recognition model to obtain the first correction feature, and the face is performed based on the first correction feature thus obtained.
- Recognition can improve the accuracy of face recognition.
- the method before the processing the first feature and the first target parameter value through the face recognition model, the method further includes:
- the parameter-convergent face recognition model trained by this implementation method can correct the features of the face image that do not meet the target parameter conditions into features that meet the target parameter conditions, thereby helping to improve people who do not meet the target parameter conditions. Accuracy of face recognition for face images.
- the obtaining a loss function according to the second feature and the third feature includes:
- the second target parameter value corresponding to the third face image is considered, and the face recognition model obtained by training is helpful to improve the non-compliance with the target parameter.
- the accuracy of the face recognition of the face image subject to the conditions does not affect the accuracy of the face recognition of the face image that meets the target parameter conditions.
- the third feature and the second target parameter value of the third face image are processed by the face recognition model to obtain the second correction feature corresponding to the third feature ,include:
- the third feature is processed by the face recognition model to obtain the second residual feature corresponding to the third feature
- the second residual feature is obtained by the face recognition model.
- the difference feature, the second target parameter value of the third face image, and the third feature are processed to obtain the second correction feature corresponding to the third feature, thereby enabling the face recognition model to perform residual Poor learning, so as to obtain the ability to correct features.
- the processing the third feature by the face recognition model to obtain the second residual feature corresponding to the third feature includes:
- the face recognition model is used to perform full connection processing and activation processing on the third feature to obtain a second residual feature corresponding to the third feature, based on the second residual feature thus obtained Features can obtain more accurate correction features.
- the performing full connection processing and activation processing on the third feature through the face recognition model to obtain the second residual feature corresponding to the third feature includes:
- the first-level full connection processing and activation processing are performed on the third feature through the face recognition model, and the second residual feature corresponding to the third feature is obtained, which can save the amount of calculation and improve the calculation.
- Speed; multi-level fully connected processing and activation processing are performed on the third feature through the face recognition model to obtain the second residual feature corresponding to the third feature, which helps to improve the face recognition model performance.
- the dimension of the feature obtained by performing the full connection processing on the third feature is the same as the dimension of the third feature.
- the second residual feature, the second target parameter value of the third face image, and the third feature are processed by the face recognition model to obtain the first
- the second correction feature corresponding to the three features includes:
- the second correction feature corresponding to the third feature is determined by the face recognition model according to the second residual component and the third feature.
- the face recognition model determines the second residual component corresponding to the third feature according to the second residual feature and the second target parameter value, which can be based on the The second target parameter value determines the second correction feature.
- the face recognition model obtained from this training helps to improve the accuracy of face recognition for face images that do not meet the target parameter conditions, and does not affect people who meet the target parameter conditions. Accuracy of face recognition for face images.
- the determining the second residual component corresponding to the third feature by the face recognition model according to the second residual feature and the second target parameter value includes:
- the product of the second residual feature and the normalized value of the second target parameter value is determined by the face recognition model to obtain the second residual component corresponding to the third feature.
- the second residual component can be accurately determined when the value range of the second target parameter is not a preset interval.
- the determining, by the face recognition model, the second correction feature corresponding to the third feature according to the second residual component and the third feature includes:
- the sum of the second residual component and the third feature is determined as the second correction feature corresponding to the third feature through the face recognition model.
- the sum of the second residual component and the third feature is determined as the second correction feature corresponding to the third feature through the face recognition model, which can quickly and accurately determine The second correction feature.
- the feature extraction is performed on the second face image and the third face image respectively to obtain the first face image corresponding to the second face image and the third face image.
- the second feature and the third feature include:
- the second feature is obtained.
- the second feature is obtained according to the features of the multiple second face images, thereby helping to improve the stability of the face recognition model.
- the obtaining the second feature according to the plurality of fourth features includes:
- the average value of the plurality of fourth features is determined as the second feature.
- the obtaining a loss function according to the second feature and the second correction feature includes:
- the loss function is determined according to the difference between the second correction feature and the second feature.
- the embodiment of the present application provides a face recognition device, including:
- the first extraction module is configured to extract the first target parameter value of the first face image to be recognized
- a second extraction module configured to perform feature extraction on the first face image to obtain a first feature corresponding to the first face image
- a processing module configured to process the first feature and the first target parameter value to obtain a first correction feature corresponding to the first feature
- An obtaining module is configured to obtain a face recognition result of the first face image based on the first correction feature.
- the obtaining module is configured to:
- the first residual feature, the first target parameter value, and the first feature are processed to obtain a first correction feature corresponding to the first feature.
- the obtaining module is configured to:
- the obtaining module is configured to:
- the dimension of the feature obtained by performing the fully connected process on the first feature is the same as the dimension of the first feature.
- the obtaining module is configured to:
- a first correction feature corresponding to the first feature is determined.
- the obtaining module is configured to:
- the first residual component corresponding to the first characteristic is obtained.
- the obtaining module is configured to:
- the sum of the first residual component and the first feature is determined as the first correction feature corresponding to the first feature.
- the target parameter includes face angle, blur degree, or occlusion ratio.
- the processing module is configured to:
- the first feature and the first target parameter value are processed through the optimized face recognition model.
- the device further includes:
- a determining module configured to determine, according to multiple face images of any target object, a second face image that meets the target parameter condition and a third face image that does not meet the target parameter condition;
- the third extraction module is configured to perform feature extraction on the second face image and the third face image, respectively, to obtain second face images corresponding to the second face image and the third face image. Characteristics and third characteristics;
- An obtaining module configured to obtain a loss function according to the second feature and the third feature
- the optimization module is configured to backpropagate the face recognition model based on the loss function to obtain the optimized face recognition model.
- the acquisition module is configured to:
- the acquisition module is configured to:
- the acquisition module is configured to:
- the acquisition module is configured to:
- the dimension of the feature obtained by performing the full connection processing on the third feature is the same as the dimension of the third feature.
- the acquisition module is configured to:
- the face recognition model determines the second correction feature corresponding to the third feature according to the second residual component and the third feature.
- the acquisition module is configured to:
- the product of the second residual feature and the normalized value of the second target parameter value is determined by the face recognition model to obtain the second residual component corresponding to the third feature.
- the acquisition module is configured to:
- the sum of the second residual component and the third feature is determined as the second correction feature corresponding to the third feature through the face recognition model.
- the third extraction module is configured to:
- the second feature is obtained.
- the third extraction module is configured to:
- the average value of the plurality of fourth features is determined as the second feature.
- the acquisition module is configured to:
- the loss function is determined according to the difference between the second correction feature and the second feature.
- An embodiment of the application provides an electronic device, including:
- a memory configured to store executable instructions of the processor
- the processor is configured to execute the above method.
- the embodiment of the present application provides a computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
- the face recognition result can thereby correct the features of the face image, so that the accuracy of face recognition can be improved.
- Fig. 1 shows a flowchart of a face recognition method provided by an embodiment of the present application.
- FIG. 2 shows a mapping curve that maps the face angle value yaw to the interval [0, 1] in the face recognition method provided by the embodiment of the present application.
- FIG. 3 shows a schematic diagram of the training process of the face recognition model in the face recognition method provided by the embodiment of the present application.
- Fig. 4 shows a block diagram of a face recognition device provided by an embodiment of the present application.
- FIG. 5 shows a block diagram of an electronic device 800 provided by an embodiment of the present application.
- FIG. 6 shows a block diagram of an electronic device 1900 provided by an embodiment of the present application.
- Fig. 1 shows a flowchart of a face recognition method provided by an embodiment of the present application.
- the execution subject of the face recognition method may be a face recognition device.
- the face recognition method can be executed by a terminal device or a server or other processing device.
- the terminal device may be a user equipment mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant, a handheld device, a computing device, a vehicle-mounted device, or a wearable device.
- the face recognition method may be implemented by a processor invoking computer-readable instructions stored in a memory. As shown in Fig. 1, the face recognition method includes steps S11 to S14.
- step S11 the first target parameter value of the first face image to be recognized is extracted.
- the target parameter may be any parameter that may affect the accuracy of face recognition.
- the number of target parameters can be one or more.
- the target parameter may include one or more of face angle, blur degree, and occlusion ratio.
- the target parameter includes a face angle, and the value range of the face angle may be [-90°, 90°], where a face angle of 0 is a front face.
- the target parameter includes the ambiguity, and the value range of the ambiguity can be [0, 1], where the larger the ambiguity, the more blurred.
- the target parameter includes the occlusion ratio
- the value range of the occlusion ratio can be [0, 1], where a occlusion ratio of 0 indicates no occlusion at all, and an occlusion ratio of 1 indicates complete occlusion.
- the face angle value of the first face image can be extracted through open source tools such as dlib or opencv.
- open source tools such as dlib or opencv.
- one or more of pitch angle (pitch), roll angle (roll), and yaw angle (yaw) can be obtained.
- the yaw angle of the face in the first face image can be obtained as the face angle value of the first face image.
- the target parameter value may be normalized to map the target parameter value to the preset interval.
- the preset interval is [0, 1].
- the target parameter includes the face angle
- the value range of the face angle is [-90°, 90°]
- the preset interval is [0, 1]
- the face angle value can be normalized , To map the face angle value to [0,1].
- the face angle value yaw is normalized to obtain the normalized value yaw norm corresponding to the face angle value yaw.
- FIG. 2 shows a mapping curve that maps the face angle value yaw to the interval [0, 1] in the face recognition method provided by the embodiment of the present application.
- the horizontal axis is the face angle value yaw
- the vertical axis is the normalized value yaw norm corresponding to the face angle value yaw.
- yaw norm is close to 1.
- step S12 feature extraction is performed on the first face image to obtain a first feature corresponding to the first face image.
- convolution processing may be performed on the first face image to extract the first feature corresponding to the first face image.
- step S13 the first feature and the first target parameter value are processed to obtain a first correction feature corresponding to the first feature.
- the processing the first feature and the first target parameter value to obtain the first correction feature corresponding to the first feature includes: processing the first feature to obtain A first residual feature corresponding to the first feature; processing the first residual feature, the first target parameter value, and the first feature to obtain a first correction feature corresponding to the first feature .
- the first residual feature corresponding to the first feature is obtained, and the first residual feature, the first target parameter value, and the The first feature is processed to obtain the first correction feature corresponding to the first feature, so that the correction can be performed on the feature level based on the residual.
- the processing the first feature to obtain the first residual feature corresponding to the first feature includes: performing full connection processing and activation processing on the first feature to obtain The first residual feature corresponding to the first feature.
- the fully connected layer can be used for full connection processing
- the activation layer can be used for activation processing.
- the activation layer may use activation functions such as ReLu (Rectified Linear Unit, linear rectification function) or PReLu (Parametric Rectified Linear Unit, parameterized linear rectification function).
- the first residual feature corresponding to the first feature is obtained, and a more accurate correction can be obtained based on the first residual feature thus obtained. feature.
- the performing full connection processing and activation processing on the first feature to obtain the first residual feature corresponding to the first feature may include: performing one or more levels on the first feature Full connection processing and activation processing are used to obtain the first residual feature corresponding to the first feature.
- performing first-level full connection processing and activation processing on the first feature the first residual feature corresponding to the first feature can be obtained, which can save the calculation amount and increase the calculation speed; by performing the first feature Multi-level fully connected processing and activation processing to obtain the first residual feature corresponding to the first feature helps to obtain a more accurate correction feature.
- the first feature can be subjected to two-level full connection processing and activation processing, that is, full connection processing, activation processing, full connection processing, and activation processing are performed on the first feature in sequence to obtain the corresponding The first residual feature.
- the dimension of the feature obtained by performing the full connection processing on the first feature is the same as the dimension of the first feature.
- the dimensionality of the feature obtained by performing the fully connected processing on the first feature is consistent with the dimensionality of the first feature, which helps to improve the accuracy of the obtained correction feature.
- full connection processing and activation processing on the first feature
- other types of processing can also be performed on the first feature.
- full convolution processing may be performed on the first feature instead of full connection processing.
- the processing the first residual feature, the first target parameter value, and the first feature to obtain the first correction feature corresponding to the first feature includes: According to the first residual characteristic and the first target parameter value, determine the first residual component corresponding to the first characteristic; determine the first residual component according to the first residual component and the first characteristic A feature corresponds to the first correction feature.
- the first correction can be determined based on the first target parameter value.
- the determining the first residual component corresponding to the first characteristic according to the first residual characteristic and the first target parameter value includes: according to the first residual characteristic and the first residual characteristic The product of the normalized value of the first target parameter value is used to obtain the first residual component corresponding to the first feature.
- the value range of the first target parameter is not a preset interval, the product of the first residual feature and the normalized value of the first target parameter value may be used as the The first residual component corresponding to the first feature can thus be accurately determined.
- the determining the first correction feature corresponding to the first feature according to the first residual component and the first feature includes: comparing the first residual component with the first The sum of the features is determined as the first correction feature corresponding to the first feature.
- the first correction feature can be determined quickly and accurately.
- step S14 a face recognition result of the first face image is obtained based on the first correction feature.
- the processing the first feature and the first target parameter value includes: performing an optimized face recognition model on the first feature and the first target parameter value. deal with.
- the first feature and the first target parameter value are processed through the optimized face recognition model to obtain the first correction feature, and the face is performed based on the first correction feature thus obtained. Recognition can improve the accuracy of face recognition.
- the method before the first feature and the first target parameter value are processed by the face recognition model, the method further includes: determining according to multiple face images of any target object.
- the second feature and the third feature corresponding to the two face images and the third face image respectively;
- the loss function is obtained according to the second feature and the third feature;
- the face recognition model is based on the loss function Perform back propagation to obtain the optimized face recognition model.
- the target object may refer to an object used to train a face recognition model.
- the number of target objects may be multiple, and all face images corresponding to each target object may be the face images of the same person.
- Each target object may correspond to multiple face images, and the multiple face images corresponding to each target object may include face images that meet the target parameter condition and face images that do not meet the target parameter condition.
- the second face image that meets the target parameter condition and the second face image that does not meet the target parameter condition are determined from the multiple face images.
- the third face image is determined from the multiple face images.
- the target parameter condition can be any of the following: the target parameter value belongs to a specified interval, the target parameter value is less than or equal to a certain threshold, the target parameter value is greater than or equal to a certain threshold, and the absolute value of the target parameter value The value is less than or equal to a certain threshold, and the absolute value of the target parameter value is greater than or equal to a certain threshold.
- the target parameter includes a face angle
- the target parameter condition may include that the absolute value of the face angle is less than an angle threshold, where the angle threshold is greater than or equal to zero.
- the target parameter includes blurriness
- the target parameter condition may include that the blurriness is less than a blurriness threshold, where the blurriness threshold is greater than or equal to zero.
- the target parameter includes an occlusion ratio
- the target parameter condition may include that the occlusion ratio is less than an occlusion ratio threshold, where the occlusion ratio threshold is greater than or equal to zero.
- any one can be obtained.
- Target parameter values of multiple face images corresponding to the target object if the target parameter is a face angle, open source tools such as dlib or opencv can be used to obtain the face angle values of multiple face images corresponding to any target object.
- one or more of the pitch angle, roll angle, and yaw angle can be obtained.
- the yaw angle of the face in the face image can be obtained as the face angle value of the face image.
- the feature extraction is performed on the second face image and the third face image respectively to obtain the second face image corresponding to the second face image and the third face image.
- the feature and the third feature include: if there are multiple second face images, feature extraction is performed on the multiple second face images to obtain multiple fourths corresponding to the multiple second face images.
- Features According to the plurality of fourth features, the second feature is obtained.
- the second feature is obtained based on the features of the multiple second face images, thereby helping to improve the stability of the face recognition model.
- the obtaining the second feature according to the plurality of fourth features includes: determining an average value of the plurality of fourth features as the second feature. In this example, determining the average value of the plurality of fourth features as the second feature helps to further improve the stability of the face recognition model.
- the obtaining the second feature according to the plurality of fourth features includes: weighting the plurality of fourth features according to weights corresponding to the plurality of second face images , To obtain the second feature.
- the weight corresponding to any second face image that meets the target parameter conditions can be determined according to the target parameter value of the second face image. The closer the target parameter value is to the optimal target parameter value, the second The greater the weight corresponding to the face image. For example, if the target parameter is the face angle, the optimal face angle value can be 0; if the target parameter is the blur degree, the optimal blur degree value can be 0; if the target parameter is the occlusion ratio, the optimal occlusion ratio value Can be 0.
- the feature extraction is performed on the second face image and the third face image respectively to obtain the second face image corresponding to the second face image and the third face image.
- the feature and the third feature include: if there is only one second face image, feature extraction is performed on the second face image, and the feature corresponding to the second face image is used as the second feature.
- the extracted features can be saved, so that the features of the saved face image can be reused in subsequent training without repeating feature extraction on the same face image .
- the obtaining a loss function according to the second feature and the third feature includes: performing a second calculation of the third feature and the third face image by the face recognition model.
- the target parameter value is processed to obtain a second correction feature corresponding to the third feature; and a loss function is obtained according to the second feature and the second correction feature.
- the third feature is corrected in combination with the second target parameter value of the third face image, and the second corrected feature corresponding to the third feature is obtained.
- the third feature and the second target parameter value of the third face image are processed by the face recognition model to obtain the second correction feature corresponding to the third feature
- the method includes: processing the third feature through the face recognition model to obtain a second residual feature corresponding to the third feature; using the face recognition model to perform processing on the second residual feature, the The second target parameter value of the third face image and the third feature are processed to obtain a second correction feature corresponding to the third feature.
- the third feature is processed by the face recognition model to obtain the second residual feature corresponding to the third feature, and the second residual feature is calculated by the face recognition model.
- Feature, the second target parameter value of the third face image, and the third feature are processed to obtain the second correction feature corresponding to the third feature, thereby enabling the face recognition model to perform residual Learn to obtain the ability to correct features.
- the processing the third feature by the face recognition model to obtain the second residual feature corresponding to the third feature includes: performing processing on the first feature by the face recognition model The three features are fully connected and activated to obtain the second residual feature corresponding to the third feature.
- the face recognition model is used to perform full connection processing and activation processing on the third feature to obtain the second residual feature corresponding to the third feature, based on the second residual feature thus obtained A more accurate correction feature can be obtained.
- the face recognition model may be used to perform full convolution processing on the third feature instead of full connection processing.
- the performing full connection processing and activation processing on the third feature through the face recognition model to obtain the second residual feature corresponding to the third feature includes: through the face recognition The model performs one or more levels of fully connected processing and activation processing on the third feature to obtain a second residual feature corresponding to the third feature.
- the first-level full connection processing and activation processing are performed on the third feature through the face recognition model, and the second residual feature corresponding to the third feature is obtained, which can save calculation amount and increase calculation speed Perform multi-level full connection processing and activation processing on the third feature through the face recognition model to obtain the second residual feature corresponding to the third feature, which helps to improve the performance of the face recognition model .
- the face recognition model may be used to perform two-level full connection processing and activation processing on the third feature, that is, the face recognition model may sequentially perform full connection processing on the third feature, The activation process, the full connection process, and the activation process obtain the second residual feature corresponding to the third feature.
- the dimension of the feature obtained by performing the full connection process on the third feature is the same as the dimension of the third feature.
- by making the dimensionality of the feature obtained by performing the full connection processing on the third feature consistent with the dimensionality of the third feature it helps to ensure the performance of the face recognition model obtained by training.
- the second residual feature, the second target parameter value of the third face image, and the third feature are processed by the face recognition model to obtain the third
- the second correction feature corresponding to the feature includes: determining the second residual component corresponding to the third feature by the face recognition model according to the second residual feature and the second target parameter value;
- the face recognition model determines a second correction feature corresponding to the third feature according to the second residual component and the third feature.
- the face recognition model determines the second residual component corresponding to the third feature according to the second residual feature and the second target parameter value, which can be based on the first
- the second target parameter value determines the second correction feature
- the face recognition model obtained from this training helps to improve the accuracy of face recognition of face images that do not meet the target parameter conditions, and does not affect the face that meets the target parameter conditions The accuracy of the image's face recognition.
- the determining, by the face recognition model, the second residual component corresponding to the third feature according to the second residual feature and the second target parameter value includes: passing the The face recognition model determines the product of the second residual feature and the normalized value of the second target parameter value to obtain a second residual component corresponding to the third feature.
- the product of the second residual feature and the normalized value of the second target parameter value may be used as the The second residual component corresponding to the third feature can thus be accurately determined.
- the determining the second residual component corresponding to the third feature by the face recognition model according to the second residual feature and the second target parameter value includes: The face recognition model determines the product of the second residual feature and the second target parameter value to obtain a second residual component corresponding to the third feature.
- the product of the second residual feature and the second target parameter value may be used as the third feature corresponding to the third feature. Two residual components.
- the determining the second correction feature corresponding to the third feature according to the second residual component and the third feature by the face recognition model includes: using the face recognition The model determines the sum of the second residual component and the third feature as the second correction feature corresponding to the third feature.
- the sum of the second residual component and the third feature is determined as the second correction feature corresponding to the third feature through the face recognition model, so that the first correction feature can be determined quickly and accurately.
- the training goal of the face recognition model is to make the second correction feature corresponding to the third feature close to the second feature. Therefore, in one example, the face recognition model is based on the first correction feature.
- the second feature and the second correction feature, and obtaining a loss function may include: determining the loss function according to a difference between the second correction feature and the second feature. For example, the square of the difference between the second correction feature and the second feature may be determined as the value of the loss function.
- FIG. 3 shows a schematic diagram of the training process of the face recognition model in the face recognition method provided by the embodiment of the present application.
- the target parameter is the angle of the face
- the third feature (f_train) is sequentially subjected to full connection processing (fc 1), activation processing (relu 1), and full connection through the face recognition model.
- the target parameter is the face angle
- the second correction feature corresponding to the third feature is close to the third feature
- the face angle value is greater than 50°
- the second correction feature is close to the third feature
- the second residual component is no longer close to 0, and the third feature is corrected.
- the face recognition model is corrected at the feature level, that is, it is not necessary to obtain a corrected image (for example, it is not necessary to obtain a corrected image of a third face image), but only the correction features are required, thereby avoiding obtaining corrections.
- the noise introduced during the image process helps to further improve the accuracy of face recognition.
- the parameter-convergent face recognition model trained according to the above implementation can correct the features of the face image that does not meet the target parameter conditions into features that meet the target parameter conditions, thereby improving the face image that does not meet the target parameter conditions The accuracy of face recognition.
- the use of the face recognition method provided in the embodiments of the present application helps to improve the accuracy of face recognition of face images that do not meet the target parameter conditions, and does not affect the face recognition performance of face images that meet the target parameter conditions. accuracy.
- 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.
- embodiments of the present application also provide face recognition devices, electronic equipment, computer-readable storage media, and programs. All of the above can be used to implement any of the face recognition methods provided in the embodiments of the present application, and the corresponding technical solutions and descriptions are as follows: Please refer to the corresponding records in the method section, and will not repeat them.
- Fig. 4 shows a block diagram of a face recognition device provided by an embodiment of the present application.
- the face recognition device includes: a first extraction module 41 configured to extract a first target parameter value of a first face image to be recognized; a second extraction module 42 configured to Perform feature extraction on a face image to obtain a first feature corresponding to the first face image; the processing module 43 is configured to process the first feature and the first target parameter value to obtain the first feature A first correction feature corresponding to a feature; the obtaining module 44 is configured to obtain a face recognition result of the first face image based on the first correction feature.
- the obtaining module 44 is configured to: process the first feature to obtain a first residual feature corresponding to the first feature; The target parameter value and the first feature are processed to obtain a first correction feature corresponding to the first feature.
- the obtaining module 44 is configured to perform full connection processing and activation processing on the first feature to obtain the first residual feature corresponding to the first feature.
- the obtaining module 44 is configured to perform one or more levels of full connection processing and activation processing on the first feature to obtain the first residual feature corresponding to the first feature.
- the dimension of the feature obtained by performing the fully connected process on the first feature is the same as the dimension of the first feature.
- the obtaining module 44 is configured to: determine a first residual component corresponding to the first characteristic according to the first residual characteristic and the first target parameter value; and according to the first residual characteristic and the first target parameter value; The residual face and the first feature are used to determine the first correction feature corresponding to the first feature.
- the obtaining module 44 is configured to: obtain the first residual corresponding to the first characteristic according to the product of the first residual characteristic and the normalized value of the first target parameter value Weight.
- the obtaining module 44 is configured to determine the sum of the first residual component and the first feature as the first correction feature corresponding to the first feature.
- the target parameter includes face angle, blur degree, or occlusion ratio.
- the processing module 43 is configured to process the first feature and the first target parameter value through an optimized face recognition model.
- the device further includes: a determining module configured to determine, according to multiple face images of any target object, a second face image that meets the target parameter condition and a third person that does not meet the target parameter condition Face image; a third extraction module, configured to extract features of the second face image and the third face image, respectively, to obtain corresponding to the second face image and the third face image
- a determining module configured to determine, according to multiple face images of any target object, a second face image that meets the target parameter condition and a third person that does not meet the target parameter condition Face image
- a third extraction module configured to extract features of the second face image and the third face image, respectively, to obtain corresponding to the second face image and the third face image
- the second feature and the third feature of an acquisition module configured to acquire a loss function based on the second feature and the third feature
- an optimization module configured to backpropagate the face recognition model based on the loss function , To obtain the optimized face recognition model.
- the acquiring module is configured to process the third feature and the second target parameter value of the third face image through the face recognition model to obtain the corresponding third feature
- the second correction feature of; according to the second feature and the second correction feature, a loss function is obtained.
- the acquisition module is configured to process the third feature through the face recognition model to obtain a second residual feature corresponding to the third feature; and through the face recognition model The second residual feature, the second target parameter value of the third face image, and the third feature are processed to obtain a second correction feature corresponding to the third feature.
- the acquisition module is configured to perform full connection processing and activation processing on the third feature through the face recognition model to obtain a second residual feature corresponding to the third feature.
- the acquisition module is configured to: perform one or more levels of full connection processing and activation processing on the third feature through the face recognition model to obtain the second residual corresponding to the third feature. ⁇ Poor characteristics.
- the dimension of the feature obtained by performing the full connection processing on the third feature is the same as the dimension of the third feature.
- the acquisition module is configured to determine a second residual component corresponding to the third feature according to the second residual feature and the second target parameter value through the face recognition model ; Determine the second correction feature corresponding to the third feature according to the second residual component and the third feature through the face recognition model.
- the acquisition module is configured to determine the product of the second residual feature and the normalized value of the second target parameter value through the face recognition model to obtain the third feature The corresponding second residual component.
- the acquisition module is configured to determine the sum of the second residual component and the third feature as the second correction feature corresponding to the third feature through the face recognition model.
- the third extraction module is configured to: if there are multiple second face images, perform feature extraction on the multiple second face images to obtain the multiple second face images. Multiple fourth features corresponding to the image; obtaining the second feature according to the multiple fourth features.
- the third extraction module is configured to determine an average value of the plurality of fourth features as the second feature.
- the acquisition module is configured to determine the loss function according to the difference between the second correction feature and the second feature.
- the functions or modules included in the device provided in the embodiments of the application can be configured to execute the methods described in the above method embodiments.
- the functions or modules included in the device provided in the embodiments of the application can be configured to execute the methods described in the above method embodiments.
- the embodiment of the present application also proposes a computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
- the computer-readable storage medium may be a non-volatile computer-readable storage medium.
- An embodiment of the present application also proposes an electronic device, including: a processor; a memory configured to store executable instructions of the processor; wherein the processor is configured to execute the foregoing method.
- the electronic device can be provided as a terminal, server or other form of device.
- FIG. 5 shows a block diagram of an electronic device 800 provided by an embodiment of the present application.
- 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, The sensor component 814, and the 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 devices or their combination, such as static random access memory (Static Random-Access Memory, SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory).
- Erasable Programmable Read Only Memory EEPROM, Erasable Programmable Read-Only Memory (Electrical Programmable Read Only Memory, EPROM), Programmable Read-Only Memory (Programmable Read-Only Memory, PROM), Read-Only Memory (Read-Only Memory) , ROM), magnetic memory, flash memory, 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), and 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 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 above-mentioned 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 complementary metal oxide semiconductor (Complementary Metal Oxide Semiconductor, CMOS) or a charge coupled device (Charge Coupled Device, CCD) image sensor for use in imaging applications.
- CMOS Complementary Metal Oxide Semiconductor
- CCD Charge Coupled Device
- 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 based on Radio Frequency Identification (RFID) technology, Infrared Data Association (Infrared Data Association, IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (Bluetooth, BT) technology and other technologies. Technology to achieve.
- RFID Radio Frequency Identification
- IrDA Infrared Data Association
- UWB Ultra Wide Band
- Bluetooth Bluetooth
- the electronic device 800 may be used by one or more application specific integrated circuits (ASIC), digital signal processors (Digital Signal Processor, DSP), and digital signal processing equipment (Digital Signal Process, DSPD), programmable logic device (Programmable Logic Device, PLD), Field Programmable Gate Array (Field Programmable Gate Array, FPGA), controller, microcontroller, microprocessor or other electronic components to implement the above methods .
- ASIC application specific integrated circuits
- DSP Digital Signal Processor
- DSPD digital signal processing equipment
- PLD programmable logic device
- FPGA Field Programmable Gate Array
- controller microcontroller, microprocessor or other electronic components 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 another electronic device 1900 according to an embodiment of the present application.
- 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 the 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 supply 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 the network, and an input output (I/O) interface 1958 .
- the electronic device 1900 may 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 is also provided, 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 embodiments of this application may be systems, methods and/or computer program products.
- 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 embodiments of the present application.
- 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 (Digital Video Disc, DVD), memory stick, floppy disk, mechanical encoding device, such as storage on it Commanded punch card or raised structure in the groove, and any suitable combination of the above.
- 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 storage on it Commanded punch card or raised structure in the groove, and any suitable combination of the above.
- the computer-readable storage medium used here is not interpreted as the instantaneous 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 embodiments of the present application may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or one or more programming Source code or object code written in any combination of languages, 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 Local Area Network (LAN) or Wide Area Network (WAN)-or it can be connected to an external computer (for example, Use an Internet service provider to connect via the Internet).
- the electronic circuit is personalized by using the state information of the computer-readable program instructions, such as programmable logic circuit, Field Programmable Gate Array (FPGA), or Programmable Logic Array (Programmable Logic). Array, PLA), the electronic circuit can execute computer-readable program instructions to implement various aspects of the embodiments of the present application.
- 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 that makes these instructions when 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 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 flowcharts and/or block diagrams.
- 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 than 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.
- the embodiments of the present application relate to a face recognition method and device, electronic equipment, and storage medium.
- the method includes: extracting a first target parameter value of a first face image to be recognized; performing feature extraction on the first face image to obtain a first feature corresponding to the first face image; The first feature and the first target parameter value are processed to obtain a first correction feature corresponding to the first feature; based on the first correction feature, a face recognition result of the first face image is obtained.
- the embodiments of the present application can correct the features of the face image, thereby improving the accuracy of face recognition.
Landscapes
- Engineering & Computer Science (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Human Computer Interaction (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Data Mining & Analysis (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Probability & Statistics with Applications (AREA)
- Image Analysis (AREA)
- Collating Specific Patterns (AREA)
- Image Processing (AREA)
- Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)
Abstract
Description
Claims (46)
- 一种人脸识别方法,包括:提取待识别的第一人脸图像的第一目标参数值;对所述第一人脸图像进行特征提取,获得与所述第一人脸图像对应的第一特征;对所述第一特征和所述第一目标参数值进行处理,获得所述第一特征对应的第一校正特征;基于所述第一校正特征,获得所述第一人脸图像的人脸识别结果。
- 根据权利要求1所述的方法,所述对所述第一特征和所述第一目标参数值进行处理,获得所述第一特征对应的第一校正特征,包括:对所述第一特征进行处理,获得所述第一特征对应的第一残差特征;对所述第一残差特征、所述第一目标参数值和所述第一特征进行处理,获得所述第一特征对应的第一校正特征。
- 根据权利要求2所述的方法,所述对所述第一特征进行处理,获得所述第一特征对应的第一残差特征,包括:对所述第一特征进行全连接处理和激活处理,获得所述第一特征对应的第一残差特征。
- 根据权利要求3所述的方法,所述对所述第一特征进行全连接处理和激活处理,获得所述第一特征对应的第一残差特征,包括:对所述第一特征进行一级或多级全连接处理和激活处理,获得所述第一特征对应的第一残差特征。
- 根据权利要求3或4所述的方法,对所述第一特征进行全连接处理获得的特征的维数与所述第一特征的维数相同。
- 根据权利要求2至5中任意一项所述的方法,所述对所述第一残差特征、所述第一目标参数值和所述第一特征进行处理,获得所述第一特征对应的第一校正特征,包括:根据所述第一残差特征和所述第一目标参数值,确定所述第一特征对应的第一残差分量;根据所述第一残差人脸和所述第一特征,确定所述第一特征对应的第一校正特征。
- 根据权利要求6所述的方法,所述根据所述第一残差特征和所述第一目标参数值,确定所述第一特征对应的第一残差分量,包括:根据所述第一残差特征与所述第一目标参数值的归一化值的乘积,得到所述第一特征对应的第一残差分量。
- 根据权利要求6或7所述的方法,所述根据所述第一残差分量和所述第一特征,确定所述第一特征对应的第一校正特征,包括:将所述第一残差分量与所述第一特征之和确定为所述第一特征对应的第一校正特征。
- 根据权利要求1至8中任意一项所述的方法,目标参数包括人脸角度、模糊度或者遮挡比例。
- 根据权利要求1至9中任意一项所述的方法,所述对所述第一特征和所述第一目标参数值进行处理,包括:通过优化后的人脸识别模型对所述第一特征和所述第一目标参数值进行处理。
- 根据权利要求10所述的方法,在所述通过人脸识别模型对所述第一特征和所述第一目标参数值进行处理之前,所述方法还包括:根据任一目标对象的多个人脸图像确定符合目标参数条件的第二人脸图像和不符 合所述目标参数条件的第三人脸图像;分别对所述第二人脸图像和所述第三人脸图像进行特征提取,获得与所述第二人脸图像和所述第三人脸图像分别对应的第二特征和第三特征;根据所述第二特征和所述第三特征,获取损失函数;基于所述损失函数对人脸识别模型进行反向传播,得到所述优化后的人脸识别模型。
- 根据权利要求11所述的方法,所述根据所述第二特征和所述第三特征,获取损失函数,包括:通过所述人脸识别模型对所述第三特征和所述第三人脸图像的第二目标参数值进行处理,获得所述第三特征对应的第二校正特征;根据所述第二特征和所述第二校正特征,获取损失函数。
- 根据权利要求12所述的方法,所述通过所述人脸识别模型对所述第三特征和所述第三人脸图像的第二目标参数值进行处理,获得所述第三特征对应的第二校正特征,包括:通过所述人脸识别模型对所述第三特征进行处理,获得所述第三特征对应的第二残差特征;通过所述人脸识别模型对所述第二残差特征、所述第三人脸图像的第二目标参数值和所述第三特征进行处理,获得所述第三特征对应的第二校正特征。
- 根据权利要求13所述的方法,所述通过所述人脸识别模型对所述第三特征进行处理,获得所述第三特征对应的第二残差特征,包括:通过所述人脸识别模型对所述第三特征进行全连接处理和激活处理,获得所述第三特征对应的第二残差特征。
- 根据权利要求14所述的方法,所述通过所述人脸识别模型对所述第三特征进行全连接处理和激活处理,获得所述第三特征对应的第二残差特征,包括:通过所述人脸识别模型对所述第三特征进行一级或多级全连接处理和激活处理,获得所述第三特征对应的第二残差特征。
- 根据权利要求14或15所述的方法,对所述第三特征进行全连接处理获得的特征的维数与所述第三特征的维数相同。
- 根据权利要求12至16中任意一项所述的方法,所述通过所述人脸识别模型对所述第二残差特征、所述第三人脸图像的第二目标参数值和所述第三特征进行处理,获得所述第三特征对应的第二校正特征,包括:通过所述人脸识别模型根据所述第二残差特征和所述第二目标参数值,确定所述第三特征对应的第二残差分量;通过所述人脸识别模型根据所述第二残差分量与所述第三特征,确定所述第三特征对应的第二校正特征。
- 根据权利要求17所述的方法,所述通过所述人脸识别模型根据所述第二残差特征和所述第二目标参数值,确定所述第三特征对应的第二残差分量,包括:通过所述人脸识别模型确定所述第二残差特征与所述第二目标参数值的归一化值的乘积,得到所述第三特征对应的第二残差分量。
- 根据权利要求17或18所述的方法,所述通过所述人脸识别模型根据所述第二残差分量与所述第三特征,确定所述第三特征对应的第二校正特征,包括:通过所述人脸识别模型将所述第二残差分量与所述第三特征之和确定为所述第三特征对应的第二校正特征。
- 根据权利要求11至19中任意一项所述的方法,所述分别对所述第二人脸图像和 所述第三人脸图像进行特征提取,获得与所述第二人脸图像和所述第三人脸图像分别对应的第二特征和第三特征,包括:若存在多个第二人脸图像,则对所述多个第二人脸图像分别进行特征提取,得到所述多个第二人脸图像对应的多个第四特征;根据所述多个第四特征,获得所述第二特征。
- 根据权利要求20所述的方法,所述根据所述多个第四特征,获得所述第二特征,包括:将所述多个第四特征的平均值确定为所述第二特征。
- 根据权利要求12至19中任意一项所述的方法,所述根据所述第二特征和所述第二校正特征,获取损失函数,包括:根据所述第二校正特征与所述第二特征的差值,确定所述损失函数。
- 一种人脸识别装置,包括:第一提取模块,配置为提取待识别的第一人脸图像的第一目标参数值;第二提取模块,配置为对所述第一人脸图像进行特征提取,获得与所述第一人脸图像对应的第一特征;处理模块,配置为对所述第一特征和所述第一目标参数值进行处理,获得所述第一特征对应的第一校正特征;获得模块,配置为基于所述第一校正特征,获得所述第一人脸图像的人脸识别结果。
- 根据权利要求23所述的装置,所述获得模块配置为:对所述第一特征进行处理,获得所述第一特征对应的第一残差特征;对所述第一残差特征、所述第一目标参数值和所述第一特征进行处理,获得所述第一特征对应的第一校正特征。
- 根据权利要求24所述的装置,所述获得模块配置为:对所述第一特征进行全连接处理和激活处理,获得所述第一特征对应的第一残差特征。
- 根据权利要求25所述的装置,所述获得模块配置为:对所述第一特征进行一级或多级全连接处理和激活处理,获得所述第一特征对应的第一残差特征。
- 根据权利要求25或26所述的装置,对所述第一特征进行全连接处理获得的特征的维数与所述第一特征的维数相同。
- 根据权利要求24至27中任意一项所述的装置,所述获得模块配置为:根据所述第一残差特征和所述第一目标参数值,确定所述第一特征对应的第一残差分量;根据所述第一残差人脸和所述第一特征,确定所述第一特征对应的第一校正特征。
- 根据权利要求28所述的装置,所述获得模块配置为:根据所述第一残差特征与所述第一目标参数值的归一化值的乘积,得到所述第一特征对应的第一残差分量。
- 根据权利要求28或29所述的装置,所述获得模块配置为:将所述第一残差分量与所述第一特征之和确定为所述第一特征对应的第一校正特征。
- 根据权利要求23至30中任意一项所述的装置,目标参数包括人脸角度、模糊度或者遮挡比例。
- 根据权利要求23至31中任意一项所述的装置,所述处理模块配置为:通过优化后的人脸识别模型对所述第一特征和所述第一目标参数值进行处理。
- 根据权利要求32所述的装置,所述装置还包括:确定模块,配置为根据任一目标对象的多个人脸图像确定符合目标参数条件的第二人脸图像和不符合所述目标参数条件的第三人脸图像;第三提取模块,配置为分别对所述第二人脸图像和所述第三人脸图像进行特征提取,获得与所述第二人脸图像和所述第三人脸图像分别对应的第二特征和第三特征;获取模块,配置为根据所述第二特征和所述第三特征,获取损失函数;优化模块,配置为基于所述损失函数对人脸识别模型进行反向传播,得到所述优化后的人脸识别模型。
- 根据权利要求33所述的装置,所述获取模块配置为:通过所述人脸识别模型对所述第三特征和所述第三人脸图像的第二目标参数值进行处理,获得所述第三特征对应的第二校正特征;根据所述第二特征和所述第二校正特征,获取损失函数。
- 根据权利要求34所述的装置,所述获取模块配置为:通过所述人脸识别模型对所述第三特征进行处理,获得所述第三特征对应的第二残差特征;通过所述人脸识别模型对所述第二残差特征、所述第三人脸图像的第二目标参数值和所述第三特征进行处理,获得所述第三特征对应的第二校正特征。
- 根据权利要求35所述的装置,所述获取模块配置为:通过所述人脸识别模型对所述第三特征进行全连接处理和激活处理,获得所述第三特征对应的第二残差特征。
- 根据权利要求36所述的装置,所述获取模块配置为:通过所述人脸识别模型对所述第三特征进行一级或多级全连接处理和激活处理,获得所述第三特征对应的第二残差特征。
- 根据权利要求36或37所述的装置,对所述第三特征进行全连接处理获得的特征的维数与所述第三特征的维数相同。
- 根据权利要求34至38中任意一项所述的装置,所述获取模块配置为:通过所述人脸识别模型根据所述第二残差特征和所述第二目标参数值,确定所述第三特征对应的第二残差分量;通过所述人脸识别模型根据所述第二残差分量与所述第三特征,确定所述第三特征对应的第二校正特征。
- 根据权利要求39所述的装置,所述获取模块配置为:通过所述人脸识别模型确定所述第二残差特征与所述第二目标参数值的归一化值的乘积,得到所述第三特征对应的第二残差分量。
- 根据权利要求39或40所述的装置,所述获取模块配置为:通过所述人脸识别模型将所述第二残差分量与所述第三特征之和确定为所述第三特征对应的第二校正特征。
- 根据权利要求33至41中任意一项所述的装置,所述第三提取模块配置为:若存在多个第二人脸图像,则对所述多个第二人脸图像分别进行特征提取,得到所述多个第二人脸图像对应的多个第四特征;根据所述多个第四特征,获得所述第二特征。
- 根据权利要求42所述的装置,所述第三提取模块配置为:将所述多个第四特征的平均值确定为所述第二特征。
- 根据权利要求34至41中任意一项所述的装置,所述获取模块配置为:根据所述第二校正特征与所述第二特征的差值,确定所述损失函数。
- 一种电子设备,包括:处理器;配置为存储处理器可执行指令的存储器;其中,所述处理器被配置为:执行权利要求1至22中任意一项所述的方法。
- 一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现权利要求1至22中任意一项所述的方法。
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SG11202107252WA SG11202107252WA (en) | 2019-10-31 | 2020-04-30 | Face recognition method and apparatus, electronic device, and storage medium |
KR1020217006942A KR20210054522A (ko) | 2019-10-31 | 2020-04-30 | 얼굴 인식 방법 및 장치, 전자 기기 및 저장 매체 |
JP2020573403A JP7150896B2 (ja) | 2019-10-31 | 2020-04-30 | 顔認識方法及び装置、電子機器、並びに記憶媒体 |
US17/363,074 US20210326578A1 (en) | 2019-10-31 | 2021-06-30 | Face recognition method and apparatus, electronic device, and storage medium |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911053929.X | 2019-10-31 | ||
CN201911053929.XA CN110826463B (zh) | 2019-10-31 | 2019-10-31 | 人脸识别方法及装置、电子设备和存储介质 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US17/363,074 Continuation US20210326578A1 (en) | 2019-10-31 | 2021-06-30 | Face recognition method and apparatus, electronic device, and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021082381A1 true WO2021082381A1 (zh) | 2021-05-06 |
Family
ID=69551816
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/088384 WO2021082381A1 (zh) | 2019-10-31 | 2020-04-30 | 人脸识别方法及装置、电子设备和存储介质 |
Country Status (7)
Country | Link |
---|---|
US (1) | US20210326578A1 (zh) |
JP (1) | JP7150896B2 (zh) |
KR (1) | KR20210054522A (zh) |
CN (1) | CN110826463B (zh) |
SG (1) | SG11202107252WA (zh) |
TW (1) | TWI770531B (zh) |
WO (1) | WO2021082381A1 (zh) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110826463B (zh) * | 2019-10-31 | 2021-08-24 | 深圳市商汤科技有限公司 | 人脸识别方法及装置、电子设备和存储介质 |
CN112101216A (zh) * | 2020-09-15 | 2020-12-18 | 百度在线网络技术(北京)有限公司 | 人脸识别方法、装置、设备及存储介质 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100097485A1 (en) * | 2008-10-17 | 2010-04-22 | Samsung Digital Imaging Co., Ltd. | Method and apparatus for improving face image in digital image processor |
CN106980831A (zh) * | 2017-03-17 | 2017-07-25 | 中国人民解放军国防科学技术大学 | 基于自编码器的自亲缘关系识别方法 |
CN108229313A (zh) * | 2017-11-28 | 2018-06-29 | 北京市商汤科技开发有限公司 | 人脸识别方法和装置、电子设备和计算机程序及存储介质 |
CN109753920A (zh) * | 2018-12-29 | 2019-05-14 | 深圳市商汤科技有限公司 | 一种行人识别方法及装置 |
CN110163169A (zh) * | 2019-05-27 | 2019-08-23 | 北京达佳互联信息技术有限公司 | 人脸识别方法、装置、电子设备及存储介质 |
CN110826463A (zh) * | 2019-10-31 | 2020-02-21 | 深圳市商汤科技有限公司 | 人脸识别方法及装置、电子设备和存储介质 |
-
2019
- 2019-10-31 CN CN201911053929.XA patent/CN110826463B/zh active Active
-
2020
- 2020-04-30 WO PCT/CN2020/088384 patent/WO2021082381A1/zh active Application Filing
- 2020-04-30 KR KR1020217006942A patent/KR20210054522A/ko unknown
- 2020-04-30 SG SG11202107252WA patent/SG11202107252WA/en unknown
- 2020-04-30 JP JP2020573403A patent/JP7150896B2/ja active Active
- 2020-06-17 TW TW109120373A patent/TWI770531B/zh active
-
2021
- 2021-06-30 US US17/363,074 patent/US20210326578A1/en not_active Abandoned
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100097485A1 (en) * | 2008-10-17 | 2010-04-22 | Samsung Digital Imaging Co., Ltd. | Method and apparatus for improving face image in digital image processor |
CN106980831A (zh) * | 2017-03-17 | 2017-07-25 | 中国人民解放军国防科学技术大学 | 基于自编码器的自亲缘关系识别方法 |
CN108229313A (zh) * | 2017-11-28 | 2018-06-29 | 北京市商汤科技开发有限公司 | 人脸识别方法和装置、电子设备和计算机程序及存储介质 |
CN109753920A (zh) * | 2018-12-29 | 2019-05-14 | 深圳市商汤科技有限公司 | 一种行人识别方法及装置 |
CN110163169A (zh) * | 2019-05-27 | 2019-08-23 | 北京达佳互联信息技术有限公司 | 人脸识别方法、装置、电子设备及存储介质 |
CN110826463A (zh) * | 2019-10-31 | 2020-02-21 | 深圳市商汤科技有限公司 | 人脸识别方法及装置、电子设备和存储介质 |
Also Published As
Publication number | Publication date |
---|---|
TWI770531B (zh) | 2022-07-11 |
CN110826463B (zh) | 2021-08-24 |
JP7150896B2 (ja) | 2022-10-11 |
JP2022508990A (ja) | 2022-01-20 |
US20210326578A1 (en) | 2021-10-21 |
TW202119281A (zh) | 2021-05-16 |
SG11202107252WA (en) | 2021-07-29 |
CN110826463A (zh) | 2020-02-21 |
KR20210054522A (ko) | 2021-05-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11532180B2 (en) | Image processing method and device and storage medium | |
CN111310616B (zh) | 图像处理方法及装置、电子设备和存储介质 | |
US20210012523A1 (en) | Pose Estimation Method and Device and Storage Medium | |
WO2020199730A1 (zh) | 文本识别方法及装置、电子设备和存储介质 | |
JP7106687B2 (ja) | 画像生成方法および装置、電子機器、並びに記憶媒体 | |
TWI752405B (zh) | 神經網路訓練及圖像生成方法、電子設備、儲存媒體 | |
US10007841B2 (en) | Human face recognition method, apparatus and terminal | |
WO2020134866A1 (zh) | 关键点检测方法及装置、电子设备和存储介质 | |
WO2020155711A1 (zh) | 图像生成方法及装置、电子设备和存储介质 | |
WO2021031609A1 (zh) | 活体检测方法及装置、电子设备和存储介质 | |
WO2021051949A1 (zh) | 一种图像处理方法及装置、电子设备和存储介质 | |
TW202038183A (zh) | 文本識別方法及裝置、電子設備、儲存介質 | |
CN109934275B (zh) | 图像处理方法及装置、电子设备和存储介质 | |
CN110458218B (zh) | 图像分类方法及装置、分类网络训练方法及装置 | |
CN105335684B (zh) | 人脸检测方法及装置 | |
WO2022099989A1 (zh) | 活体识别、门禁设备控制方法和装置、电子设备和存储介质、计算机程序 | |
WO2021208666A1 (zh) | 字符识别方法及装置、电子设备和存储介质 | |
TW202127369A (zh) | 網路訓練方法、圖像生成方法、電子設備及電腦可讀儲存介質 | |
CN111259967A (zh) | 图像分类及神经网络训练方法、装置、设备及存储介质 | |
TW202029062A (zh) | 網路優化方法及裝置、圖像處理方法及裝置、儲存媒體 | |
CN111242303A (zh) | 网络训练方法及装置、图像处理方法及装置 | |
WO2021082381A1 (zh) | 人脸识别方法及装置、电子设备和存储介质 | |
CN111523599B (zh) | 目标检测方法及装置、电子设备和存储介质 | |
CN109447258B (zh) | 神经网络模型的优化方法及装置、电子设备和存储介质 | |
CN113538310A (zh) | 图像处理方法及装置、电子设备和存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
ENP | Entry into the national phase |
Ref document number: 2020573403 Country of ref document: JP 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: 20880854 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 27.09.2022) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20880854 Country of ref document: EP Kind code of ref document: A1 |