WO2023005161A1 - 人脸图像相似度的计算方法、装置、设备及存储介质 - Google Patents

人脸图像相似度的计算方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2023005161A1
WO2023005161A1 PCT/CN2022/071689 CN2022071689W WO2023005161A1 WO 2023005161 A1 WO2023005161 A1 WO 2023005161A1 CN 2022071689 W CN2022071689 W CN 2022071689W WO 2023005161 A1 WO2023005161 A1 WO 2023005161A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
feature
human face
attention
face image
Prior art date
Application number
PCT/CN2022/071689
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 平安科技(深圳)有限公司
Publication of WO2023005161A1 publication Critical patent/WO2023005161A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • 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
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/181Segmentation; Edge detection involving edge growing; involving edge linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • 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

Definitions

  • the present application relates to the field of image processing, and in particular to a method, device, equipment and storage medium for calculating the similarity of human face images.
  • Multi-frame single-face tracking generally finds the face first, and then compares it. Generally, it needs to span multiple frames, and the relationship between multiple frames of video needs to be established.
  • the past technologies are basically, from coarse to fine granularity, basically: find a fixed object range through the detection frame, and then find features for it, and then compare; the inventor realized that through key point locking is smaller
  • the local range (reduce dimensionality data through coordinates), through the Kalman filter according to the position of the key point, but the key point itself is not accurate, and the Kalman filter will superimpose errors; the method of detail to segmentation (high labeling cost), Realize smaller and finer local comparison.
  • the main purpose of this application is to determine the correlation of the images according to the correlation between the corresponding features of the two images by performing feature extraction and fusion on the face images, thereby improving the efficiency of image recognition.
  • the first aspect of the present application provides a method for calculating the similarity of human face images, including: acquiring two frames of video images containing human faces, inputting the video images into a preset face recognition model for recognition, and outputting the video
  • the area range of the human face in the image according to the area range, extract the corresponding first human face image and the second human face image from the two frames of video images; combine the first human face image and the second human face image
  • the feature layer of the two-person face image input preset attention detection model performs image feature extraction on the first face image and the second face image, and obtains the first image feature and the first image feature of the first face image respectively.
  • the second image feature of the second human face image is carried out to the first image feature and the second image feature respectively, and the first attention image feature and the second attention image feature are obtained ; Calculate the feature similarity between the first attention image feature and the second attention image feature, and determine the first human face image and the second human face image based on the feature similarity Image similarity.
  • the second aspect of the present application provides a computing device for similarity of human face images, including a memory, a processor, and computer-readable instructions stored on the memory and operable on the processor, and the processor executes The following steps are implemented during the computer-readable instructions: acquiring two frames of video images containing faces, inputting the video images into a preset face recognition model for recognition, and outputting the range of faces in the video images; according to The area range, extracting the corresponding first human face image and the second human face image from the two frames of video images; inputting the first human face image and the second human face image into preset attention
  • the feature layer of the detection model performs image feature extraction on the first face image and the second face image, and obtains the first image feature of the first face image and the first image feature of the second face image respectively.
  • Two image features respectively perform convolution attention to the first image feature and the second image feature to obtain the first attention image feature and the second attention image feature; calculate the first attention image
  • the feature similarity between the feature and the feature of the second attention image is determined, and the image similarity between the first human face image and the second human face image is determined based on the feature similarity.
  • the third aspect of the present application provides a computer-readable storage medium, where computer instructions are stored in the computer-readable storage medium, and when the computer instructions are run on the computer, the computer is made to perform the following steps: acquire two frames containing The video image of the face, and the video image is input into the preset face recognition model for recognition, and the area range of the face in the video image is output; according to the area range, the corresponding frame is extracted from the two frames of video images.
  • the first face image and the second face image; the first face image and the second face image are input into the feature layer of the preset attention detection model for the first face image and the second face image
  • Carry out image feature extraction on the second human face image obtain the first image feature of the first human face image and the second image feature of the second human face image respectively
  • Two image features carry out the calculation of convolution attention, obtain the first attention image feature and the second attention image feature; calculate the feature similarity between the first attention image feature and the second attention image feature, and Determining the image similarity between the first human face image and the second human face image based on the feature similarity.
  • the fourth aspect of the present application provides a device for calculating similarity of human face images, wherein the device for calculating similarity of human face images includes: an identification module for acquiring two frames of video images containing human faces, and converting the The video image is input to a preset face recognition model for recognition, and the area range of the face in the video image is output; the extraction module is used to extract the corresponding first from the two frames of video images according to the area range.
  • the first feature extraction module is used to input the feature layer of the first face image and the second face image into the preset attention detection model to the first person
  • the face image and the second face image perform image feature extraction to obtain the first image feature of the first face image and the second image feature of the second face image respectively
  • the first calculation module is used for Carry out convolution attention calculations on the first image feature and the second image feature respectively, to obtain the first attention image feature and the second attention image feature
  • a determination module for calculating the first attention The feature similarity between the image feature and the second attention image feature, and determine the image similarity between the first human face image and the second human face image based on the feature similarity.
  • the first human face image and the second human face image corresponding to the video image are output; the human face image is input into the preset attention
  • the feature layer of the detection model performs image feature extraction to obtain the image features of the face image respectively; performs convolution attention calculation on the image features to obtain the first attention image feature and the second attention image feature of the face image respectively;
  • the feature similarity between the first attention image feature and the second attention image feature is determined as the image similarity between the first human face image and the second human face image.
  • Fig. 1 is the schematic diagram of an embodiment of the calculation method of face image similarity in the embodiment of the present application
  • Fig. 2 is the schematic diagram of another embodiment of the calculation method of face image similarity in the embodiment of the present application.
  • Fig. 3 is the schematic diagram of another embodiment of the calculation method of face image similarity in the embodiment of the present application.
  • Fig. 4 is the schematic diagram of another embodiment of the method for calculating the similarity of face images in the embodiment of the present application.
  • FIG. 5 is a schematic diagram of another embodiment of a method for calculating similarity of face images in the embodiment of the present application.
  • Fig. 6 is a schematic diagram of an embodiment of a computing device for face image similarity in the embodiment of the present application.
  • FIG. 7 is a schematic diagram of another embodiment of a computing device for face image similarity in the embodiment of the present application.
  • FIG. 8 is a schematic diagram of an embodiment of a device for calculating the similarity of human face images in the embodiment of the present application.
  • the embodiment of the present application provides a method, device, device and storage medium for calculating the similarity of face images, which are used to improve the privacy and security of personal information in websites, systems or applications.
  • An embodiment of the method for calculating the similarity of face images in the embodiment of the present application includes:
  • two frames of video images containing faces are obtained from a preset database, wherein the video images contain face information to be recognized.
  • the video images are then fed into the face recognition model.
  • the face recognition model can identify the faces in the video image through the frames of the nose, eyes, or other facial features, and obtain the area range of each face in the video image.
  • the area range of each human face in the video image is then cut out from the second image, thereby extracting the corresponding human face images of each video image, that is, the first human face image and the second human face image. face image.
  • image feature extraction means that the computer does not recognize images, but only recognizes numbers.
  • image feature extraction means that the computer does not recognize images, but only recognizes numbers.
  • the characteristics are the corresponding (essential) characteristics or characteristics of a certain type of objects that are different from other types of objects, or a collection of these characteristics and characteristics.
  • Features are data that can be extracted by measurement or processing. For images, each image has its own characteristics that can be distinguished from other types of images. Some are natural features that can be felt intuitively, such as brightness, edge, texture, and color; some require transformation or processing. can only be obtained, such as moments, histograms, and principal components. For example, we often combine multiple or multiple characteristics of a certain type of object to form a feature vector to represent this type of object. If there is only a single numerical feature, the feature vector is a one-dimensional vector. If there are n features The combination of is an n-dimensional feature vector. This type of feature vector is often used as the input of the recognition system. In fact, an n-dimensional feature is a point located in an n-dimensional space, and the task of recognition and classification is to find a division of this n-dimensional space.
  • the attention detection model includes a plurality of feature layers connected in sequence; wherein the input of the first feature layer is the input feature, and the input of each feature layer except the first feature layer is the previous one
  • the image feature output by the feature layer the value of the target element in the attention image feature is greater than the value of the target element in the corresponding image feature
  • the target element refers to the element calculated according to the pixel of the target object in the image to be detected.
  • AND or logic operations can be used instead of floating-point operations to calculate the feature similarity between the first attention image features and the second attention image features.
  • the feature similarity can be regarded as the image similarity between the first face image and the second face image.
  • the second face image is an image to be recognized
  • the first face image is a target image with a recognition label.
  • the recognition label is used as the recognition result of the second human face image.
  • the identification label may specifically be a person's identity, or classification information or other identification labels.
  • the first human face image and the second human face image corresponding to the video images are output; the human face images are input into the preset attention detection model
  • Image feature extraction is carried out on the feature layer of the face image, and the image features of the face image are respectively obtained; the convolution attention calculation is performed on the image features, and the first attention image feature and the second attention image feature of the face image are respectively obtained; the first attention image feature is calculated.
  • the feature similarity between the attention image feature and the second attention image feature is determined as the image similarity between the first human face image and the second human face image.
  • the second embodiment of the computing method of face image similarity in the embodiment of the present application comprises:
  • one training data set corresponds to one application scenario, for example: a witness recognition scenario and a natural scenario.
  • the training data set can be face data in different dimensions, open source data and private data, for example: face data of natural scenes, face data of Asians, attendance data, witness data and competition data.
  • the server can extract a plurality of sample images containing human faces in different application scenarios from a preset database, perform preprocessing on the sample images containing human faces, and obtain a preprocessed training data image set.
  • the preset initial face recognition model includes a backbone network and multiple classification networks
  • the output of the backbone network is the input of multiple classification networks
  • the data processed by the backbone network are classified through multiple classification networks, thereby Realize face recognition training on the training data set.
  • the backbone network can be a single convolutional neural network or a comprehensive framework of multiple convolutional neural networks.
  • the backbone network can be a deep residual learning framework ResNet or a target detection network framework ET-YOLOv3, or it can be a deep residual learning framework.
  • the framework ResNet is a comprehensive framework combined with the target detection network framework ET-YOLOv3.
  • the server can perform face frame recognition, frame area division, face key point detection and face feature vector extraction for each training data set to obtain the corresponding feature set (ie, multiple feature sets).
  • the convolutional network layer in the backbone network uses a small convolution kernel to retain more features, reduce the amount of calculation, and improve the efficiency of face feature extraction.
  • the first center vector and the second center vector are calculated, the distance value between each first center vector and the second center vector is calculated, and the distance value is used as the feature vector loss function value corresponding to each feature set , so as to obtain multiple feature vector loss functions, where the first center vector is the center vector corresponding to each feature set, or the center vector corresponding to each training data in each feature set, and the second center vector can be all features
  • the second center vector corresponding to the set can also be the center vector corresponding to all training data in each feature set.
  • the server can obtain the number of training data corresponding to each feature set, and calculate the sum of the first center vectors corresponding to all training data, and calculate the mean value of the sum value according to the number of training data, which is the corresponding value of each feature set
  • the server may also calculate the second center vector through a preset center vector formula.
  • the server calculates the classification loss function value of each classification data set through the preset cross-entropy loss function, thereby obtaining multiple classification loss function values.
  • the cross-entropy loss function can be a multi-classification cross-entropy loss function. Function, derivation is simpler, can make convergence faster, and update the corresponding weight matrix faster.
  • the number of data sets of multiple training data sets is obtained, and the average value of multiple eigenvector loss function values is calculated according to the number of data sets
  • the eigenvector loss function value, and the average classification loss function value of multiple classification loss function values, the sum of the average eigenvector loss function value and the average classification loss function value, as the target loss function value of the face recognition model, or the The weighted sum of the average eigenvector loss function value and the average classification loss function value is used as the target loss function value of the face recognition model.
  • the network structure and/or weight values of the backbone network are iteratively updated until the target loss function value converges (that is, the training accuracy of the face recognition model meets the preset Conditions) to get the updated face recognition model.
  • the network structure of the backbone network can be updated by adding or deleting the network layer of the backbone network, or by adding other network frameworks to update the network structure of the backbone network, or by modifying the convolution kernel size of the backbone network and step size etc. to update the network structure of the backbone network.
  • the server can also optimize the face recognition model in combination with the optimization algorithm.
  • Steps 206-210 in this embodiment are similar to steps 101-105 in the first embodiment, and will not be repeated here.
  • the first human face image and the second human face image corresponding to the video images are output; the human face images are input into the preset attention detection model
  • Image feature extraction is carried out on the feature layer of the face image, and the image features of the face image are respectively obtained; the convolution attention calculation is performed on the image features, and the first attention image feature and the second attention image feature of the face image are respectively obtained; the first attention image feature is calculated.
  • the feature similarity between the attention image feature and the second attention image feature is determined as the image similarity between the first human face image and the second human face image.
  • the third embodiment of the computing method of face image similarity in the embodiment of the present application comprises:
  • the first human face image and the second human face image are images to be feature extracted, and the first human face image and the second human face image can be RGB images (that is, images composed of red, yellow and blue primary colors)
  • the format of the first face image and the second face image may be jpg, jpeg, TIFF, PNG, BMP, or PSD, which is not limited in this embodiment of the present disclosure.
  • the first human face image and the second human face image include target objects, and the number of target objects may be one or more (that is, at least two).
  • the edge image can be understood as an image used to highlight the boundary between the target object and the background and the outline of the target object in the first face image and the second face image.
  • the target object included in the first face image, the second face image and the edge image is the same target object, but the expression forms of the target object in the first face image, the second face image and the edge image are different.
  • the pixels in a small area in the first face image and the second face image may be weighted and averaged to become corresponding pixels in the edge image.
  • the dimension of the first human face image and the second human face image can be H ⁇ W ⁇ 3; Wherein, what H represents is the height (such as, 600) of the first human face image and the second human face image, what W represents is The width (eg, 600) of the first human face image and the second human face image, 3 represents the number of three primary color channels of the first human face image and the second human face image.
  • the size of the preset convolution kernel may be 3*3, 5*5, or other sizes, which are not limited in this embodiment of the present disclosure. For example, if the size of the default convolution kernel is 3*3, the weight of each unit in the default convolution kernel can be as follows:
  • the method of performing gradient calculation on the first face image and the second face image according to the preset convolution kernel to extract the edge images corresponding to the first face image and the second face image may be as follows:
  • the preset convolution kernel Sx is convolved with the first face image and the second face image to obtain wherein, the preset convolution kernel Sx is transposed, and the transposed convolution kernel is obtained and convolved with Product, get wherein, through the combination of the sum, the gradient vector gradient direction ⁇ and the gradient magnitude corresponding to the first face image and the second face image are obtained.
  • the first face image and the second face are determined according to the gradient vector
  • the edge image corresponding to the image, the edge image includes the image frequency used to represent the intensity of the grayscale change.
  • the region where the gradient magnitude changes rapidly can be the edge region, and the gradient direction ⁇ is used to indicate the gradient change direction, and the first face image and the second face image can be determined by combining the gradient direction ⁇ and the gradient magnitude edge of the target object.
  • the global image information is used to characterize the first human face image and the second human face image as a whole.
  • the edge image information is used to characterize the edges and details of the target object in the first face image and the second face image.
  • the fusion result can be expressed as a matrix, which corresponds to the first face image and the second face image after the edge and details of the target object are enhanced.
  • the reference image features corresponding to the global image information and the edge image information can be summed, and the summed result is convolved at a second preset frequency to realize the feature fusion of the global image information and the edge image information, and obtain the first person
  • the face image and the second human face image include region image features of the target object.
  • the global feature is used to characterize the target object as a whole
  • the edge feature is used to highlight the edge and details to characterize the target object.
  • the output form of the image feature may be a matrix.
  • the feature fusion of the above global features and edge features includes: connecting the global features and edge features to obtain the first reference feature, the dimension of the first reference feature is the sum of the dimensions of the global feature and the edge feature; for example, If the dimension of the global feature is 2048 and the dimension of the edge feature is 2048, then the dimension of the first reference feature is 4096; the dimensionality reduction feature transformation is performed on the first reference feature, and the second reference feature is obtained as the target object corresponding image features.
  • Steps 301-302, 308-309 in this embodiment are similar to steps 101-102, 104-105 in the first embodiment, and will not be repeated here.
  • the first human face image and the second human face image corresponding to the video images are output; the human face images are input into the preset attention detection model
  • Image feature extraction is carried out on the feature layer of the face image, and the image features of the face image are respectively obtained; the convolution attention calculation is performed on the image features, and the first attention image feature and the second attention image feature of the face image are respectively obtained; the first attention image feature is calculated.
  • the feature similarity between the attention image feature and the second attention image feature is determined as the image similarity between the first human face image and the second human face image.
  • the fourth embodiment of the calculation method of the face image similarity in the embodiment of the present application includes:
  • the average pooling operation and the maximum pooling operation are performed on the image features respectively to obtain the average pooling feature and the maximum pooling feature;
  • the average pooling feature is processed by a pre-built multi-layer perceptron to obtain the average pooling parameter , and use the multi-layer perceptron to process the maximum pooling feature to obtain the maximum pooling parameter;
  • the sum of the average pooling parameter and the maximum pooling parameter is input into the activation module to obtain a channel attention map of image features.
  • performing an average pooling operation on image features refers to using a pooling window with a preset size (such as a pooling window of 2 ⁇ 2) to move on each feature matrix contained in the image features,
  • a pooling window with a preset size such as a pooling window of 2 ⁇ 2
  • the area covered by the pooled window after each move is next to the area covered by the pooled window before the move (that is, a certain edge of the two areas before and after the move coincides, but the two areas do not overlap each other)
  • each time the pooled window Cover a new area calculate the arithmetic mean of the elements currently covered by the pooling window (with the above 2 ⁇ 2 pooling window, you can cover 4 elements at a time, that is, two rows and two columns), and use the obtained calculation results as the final An element in the average pooling feature of the image feature.
  • the average pooling operation for this image feature is completed, and all the calculated average values are calculated according to the pooling window during calculation. Combining the positions of this image feature, the average pooling feature corresponding to this image feature is obtained.
  • the process of performing the maximum pooling operation on image features is basically the same as the above-mentioned average pooling operation process. The difference is that whenever the pooling window covers a new area, the largest element is selected from all elements in the area. As the calculation result of this time (different from the average value in the average pooling operation), similarly, when each element in the image feature has passed the above screening, the maximum pooling operation process for the image feature is completed, and the screening All the obtained elements are combined according to the position of the pooling window during screening to obtain the maximum pooling feature corresponding to this image feature.
  • the spatial attention calculation is performed on the enhanced image features obtained by merging the image features and the channel attention map, and a spatial attention map of the image features is obtained;
  • the average pooling operation and the maximum pooling operation are performed on the enhanced image features respectively to obtain the average pooling enhanced features and the maximum pooling enhanced features; the average pooling enhanced features and the maximum pooling enhanced features are combined to obtain the combined pool feature; use the preset size of the convolution kernel to perform convolution operation on the merged pooling feature, and input the operation result obtained by the convolution operation into the activation module to obtain the spatial attention map of the image feature.
  • the target elements are valuable for detecting the target object, while other elements are Interfere with the purpose of detecting the target object.
  • the target object in the image to be detected is located in the lower left corner of the image.
  • the elements also located in the lower left corner of the feature matrix are valuable for detecting the target object, while other Elements, such as those located above the feature matrix, interfere with the detection of the target object.
  • the channel attention map and spatial attention map of image features are calculated, and then the channel attention map and spatial attention map are combined with image features to obtain attention image features.
  • a normalization layer can be set for the first feature layer.
  • the normalization layer after the first feature layer outputs image features, it is necessary to: use the normalization layer to output the image of the first feature layer
  • the features are subjected to batch normalization operations to obtain normalized image features; correspondingly, the specific function of the attention layer connected to the first feature layer is: use the attention layer connected to the feature layer to perform normalized image features Convolution attention calculation to get attention image features.
  • batch normalization is an algorithm for solving changes in data distribution during training, improving network generalization, and speeding up network training.
  • the parameters are constantly updated, and the update of the network parameters of the previous layer will lead to changes in the input data distribution of the next layer of the network, so the network of this layer must adapt to the new data distribution, which greatly affects the speed of network training.
  • the training process of the convolutional neural network is to learn the data distribution. If the data distribution is constantly changing, it will reduce the generalization ability of the network.
  • the essence of batch normalization is to preprocess the data and normalize the data before sending it to the network. This can reduce the change of data distribution and greatly improve the generalization and training speed of the network.
  • Steps 401-403, 407 in this embodiment are similar to steps 101-103, 105 in the first embodiment, and will not be repeated here.
  • the first human face image and the second human face image corresponding to the video images are output; the human face images are input into the preset attention detection model
  • Image feature extraction is carried out on the feature layer of the face image, and the image features of the face image are respectively obtained; the convolution attention calculation is performed on the image features, and the first attention image feature and the second attention image feature of the face image are respectively obtained; the first attention image feature is calculated.
  • the feature similarity between the attention image feature and the second attention image feature is determined as the image similarity between the first human face image and the second human face image.
  • the fifth embodiment of the method for calculating the similarity of face images in the embodiment of the present application includes:
  • performing an average pooling operation on image features refers to using a pooling window with a preset size (for example, a pooling window of 2 ⁇ 2) in each feature matrix contained in the image feature Moving up, the area covered by the pooled window after each move is next to the area covered by the pooled window before the move (that is, a side of the two areas before and after the move coincides, but the two areas do not overlap each other), whenever The pooling window covers a new area, calculate the arithmetic mean of the elements currently covered by the pooling window (with the above 2 ⁇ 2 pooling window, it can cover 4 elements at a time, that is, two rows and two columns), and calculate the obtained The result is used as an element in the final average pooling feature.
  • a preset size for example, a pooling window of 2 ⁇ 2 ⁇ 2
  • the average pooling operation for this image feature is completed, and all the average values are calculated according to the calculation time. Combining the positions of the pooling windows, the average pooling feature corresponding to this image feature is obtained.
  • the process of performing the maximum pooling operation on image features is basically the same as the above-mentioned average pooling operation process. The difference is that whenever the pooling window covers a new area, the largest element is selected from all elements in the area. As the calculation result of this time (different from the average value in the average pooling operation), similarly, when each element in the image feature has passed the above screening, the maximum pooling operation process for the image feature is completed, and the screening All the obtained elements are combined according to the position of the pooling window during screening to obtain the maximum pooling feature corresponding to this image feature.
  • the multi-layer perceptron is a feed-forward artificial neural network model, which maps multiple input data sets to a single output data set.
  • the multi-layer perceptron is specifically used to map the maximum pooling feature and the average pooling feature to a one-dimensional vector containing C parameters, that is, to a vector of the following form: (A1, A2... AC-1, AC).
  • C is the number of channels of the image features input to this attention layer (the number of feature matrices contained in an image feature is called the number of channels).
  • the two one-dimensional vectors output by the multi-layer perceptron are the average pooling parameters and the maximum pooling parameters mentioned in the aforementioned calculation process.
  • the channel attention map can be obtained by using the activation function to activate the two one-dimensional vectors output by the multi-layer perceptron (equivalent to inputting the sum of the average pooling parameter and the maximum pooling parameter into the activation module).
  • the channel attention map is also a one-dimensional vector containing C parameters.
  • the function of the channel attention map is to highlight the meaningful feature matrix in the image features.
  • the features of each object have different degrees of significance on different feature matrices of the same image feature. For example, the features of a car may be more prominent on the first feature matrix, while the features of a house are more prominent on the second feature matrix. more pronounced in the matrix.
  • those feature matrices with more prominent features of the target object are meaningful feature matrices, while other feature matrices are meaningless feature matrices.
  • the spatial attention calculation is performed on the enhanced image features obtained by merging the image features and the channel attention map, and the spatial attention map of the image features is obtained;
  • Steps 501-503, 509 in this embodiment are similar to steps 101-103, 105 in the first embodiment, and will not be repeated here.
  • the first human face image and the second human face image corresponding to the video images are output; the human face images are input into the preset attention detection
  • the feature layer of the model performs image feature extraction to obtain the image features of the face image respectively; performs convolution attention calculation on the image features to obtain the first attention image feature and the second attention image feature of the face image respectively;
  • the feature similarity between the first attention image feature and the second attention image feature is determined as the image similarity between the first human face image and the second human face image.
  • This solution extracts and fuses the features of the face images, and determines the correlation of the images according to the correlation between the corresponding features of the two images, thereby improving the efficiency of image recognition.
  • a first embodiment of the computing device includes:
  • the recognition module 601 is used to obtain two frames of video images that contain human faces, and input the video images into a preset face recognition model for identification, and output the range of human faces in the video images;
  • An extraction module 602 configured to extract a corresponding first human face image and a second human face image from the two frames of video images according to the area range;
  • the first feature extraction module 603 is used to input the first human face image and the second human face image into the feature layer of the preset attention detection model for the first human face image and the second human face
  • the image is subjected to image feature extraction to obtain the first image feature of the first human face image and the second image feature of the second human face image respectively;
  • the first calculation module 604 is used to perform convolution attention calculation on the first image feature and the second image feature respectively, to obtain the first attention image feature and the second attention image feature;
  • a determining module 605 configured to calculate the feature similarity between the first attention image feature and the second attention image feature, and determine the first human face image and the second human face image based on the feature similarity Image similarity between face images.
  • the first human face image and the second human face image corresponding to the video images are output; the human face images are input into the preset attention detection model
  • Image feature extraction is carried out on the feature layer of the face image, and the image features of the face image are respectively obtained; the convolution attention calculation is performed on the image features, and the first attention image feature and the second attention image feature of the face image are respectively obtained; the first attention image feature is calculated.
  • the feature similarity between the attention image feature and the second attention image feature is determined as the image similarity between the first human face image and the second human face image.
  • the computing device of the human face image similarity specifically includes:
  • the recognition module 601 is used to obtain two frames of video images that contain human faces, and input the video images into a preset face recognition model for identification, and output the range of human faces in the video images;
  • An extraction module 602 configured to extract a corresponding first human face image and a second human face image from the two frames of video images according to the area range;
  • the first feature extraction module 603 is used to input the first human face image and the second human face image into the feature layer of the preset attention detection model for the first human face image and the second human face
  • the image is subjected to image feature extraction to obtain the first image feature of the first human face image and the second image feature of the second human face image respectively;
  • the first calculation module 604 is used to perform convolution attention calculation on the first image feature and the second image feature respectively, to obtain the first attention image feature and the second attention image feature;
  • a determining module 605 configured to calculate the feature similarity between the first attention image feature and the second attention image feature, and determine the first human face image and the second human face image based on the feature similarity Image similarity between face images.
  • the computing device of described human face image similarity comprises:
  • An acquisition module 606 configured to acquire a plurality of video images containing human faces under different application scenarios, and use the video images as a training sample image set;
  • the second feature extraction module 607 is used to input the training sample image set into the backbone network of the preset initial face recognition model, and perform face feature extraction on the video images in the training sample image set respectively to obtain a feature set,
  • the initial face recognition model includes a backbone network and a plurality of classification networks;
  • the second calculation module 608 is used to calculate the eigenvector loss function value of the feature set to obtain a plurality of eigenvector loss function values
  • the third calculation module 609 is configured to calculate the target loss function value of the initial face recognition model according to the plurality of eigenvector loss function values;
  • the update module 610 is configured to iteratively update the backbone network according to the target loss function value until the target loss function value converges to obtain a target face recognition model.
  • the first feature extraction module 603 includes:
  • An edge extraction unit 6031 configured to perform edge extraction on the first face image and the second face image to obtain a first edge image and a second edge image;
  • a fusion unit 6032 configured to fuse the global image information contained in the first face image and the second face image with the edge image information contained in the first edge image and the second edge image , obtaining the region including the target object in the first face image and the second face image;
  • the feature extraction unit 6033 is configured to perform feature extraction on the region to obtain the first global feature and the first edge feature corresponding to the first face image and the second global feature and the second edge feature corresponding to the second edge image. edge features;
  • a feature fusion unit 6034 configured to perform feature fusion on the first global feature and the first edge feature and the second global feature and the second edge feature, respectively, to obtain the first human face image The first image feature and the second image feature of the second face image.
  • the fusion unit 6032 is specifically used for:
  • the feature extraction results are summed to obtain image features of regions including the target object in the first face image and the second face image.
  • the first calculation module 604 includes:
  • the first calculation unit 6041 is configured to perform channel attention calculation on the first image feature and the second image feature output by the feature layer, to obtain a channel attention map of the image feature;
  • the second calculation unit 6042 is configured to perform spatial attention calculation on the enhanced image features obtained by merging the image features and the channel attention map based on the attention mechanism, to obtain a spatial attention map of the image features;
  • a feature merging unit 6043 configured to combine the spatial attention map and the enhanced image features to obtain the first attention image features of the first face image and the second attention of the second face image respectively image features.
  • the second computing unit 6042 is specifically used for:
  • the sum of the average pooling parameter and the maximum pooling parameter is input into an activation module to obtain a first channel attention map of the first image feature and a second channel attention map of the second image feature.
  • the first human face image and the second human face image corresponding to the video images are output; the human face images are input into the preset attention detection model
  • Image feature extraction is carried out on the feature layer of the face image, and the image features of the face image are respectively obtained; the convolution attention calculation is performed on the image features, and the first attention image feature and the second attention image feature of the face image are respectively obtained; the first attention image feature is calculated.
  • the feature similarity between the attention image feature and the second attention image feature is determined as the image similarity between the first human face image and the second human face image.
  • Fig. 6 and Fig. 7 describe in detail the calculation device of the similarity of the face image in the embodiment of the present application from the perspective of the modular functional entity, and the calculation device of the similarity of the face image in the embodiment of the present application is described below from the perspective of hardware processing Describe in detail.
  • Fig. 8 is a schematic structural diagram of a computing device for calculating the similarity of human face images provided by an embodiment of the present application.
  • the computing device 800 for computing similarity of human face images may have relatively large differences due to different configurations or performances, and may include one or More than one processor (central processing units, CPU) 810 (for example, one or more processors) and memory 820, one or more storage media 830 for storing application programs 833 or data 832 (for example, one or more mass storage devices ).
  • the memory 820 and the storage medium 830 may be temporary storage or persistent storage.
  • the program stored in the storage medium 830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the computing device 800 for the similarity of human face images.
  • the processor 810 can be configured to communicate with the storage medium 830, and execute a series of instruction operations in the storage medium 830 on the computing device 800 of the similarity of the face image to realize the face image provided by the above method embodiments. The steps of the calculation method of similarity.
  • the computing device 800 of the face image similarity can also include one or more power supplies 840, one or more wired or wireless network interfaces 850, one or more input and output interfaces 860, and/or, one or more operating systems 831 , such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.
  • operating systems 831 such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.
  • the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium.
  • the computer-readable storage medium may also be a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium, and when the instructions are run on the computer, the computer is made to execute the steps of the above method for calculating the similarity of human face images.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disc and other media that can store program codes. .

Abstract

本申请涉及图像处理领域,公开了一种人脸图像相似度的计算方法、装置、设备及存储介质。本方法包括:通过将两帧视频图像输入预置人脸识别模型进行识别,输出视频图像对应的第一人脸图像和第二人脸图像;将人脸图像输入预置注意力检测模型的特征层进行图像特征提取,分别得到人脸图像的图像特征;对图像特征执行卷积注意力计算,分别得到人脸图像的第一注意力图像特征和第二注意力图像特征;计算第一注意力图像特征和第二注意力图像特征之间的特征相似度,确定为第一人脸图像和第二人脸图像的图像相似度。本方案通过对人脸图像进行特征提取和融合,根据两图像对应特征之间的相关性确定图像的相关性,提高了图像识别效率。

Description

人脸图像相似度的计算方法、装置、设备及存储介质
本申请要求于2021年7月27日提交中国专利局、申请号为202110852052.1、发明名称为“人脸图像相似度的计算方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及图像处理领域,尤其涉及一种人脸图像相似度的计算方法、装置、设备及存储介质。
背景技术
多帧单人脸跟踪,一般是先找到人脸,再比对,一般都是要跨越多帧,需要建立多帧视频之间的关系。过去的技术基本都是,分颗粒度从粗到细而言,基本是:通过检测框找到固定的对象范围,然后再对其找特征,再比较;发明人意识到,通过关键点锁定更小的局部范围(通过坐标实现降维数据),根据关键点的位置通过卡尔曼滤波,但是本身关键点就不准,卡尔曼滤波又会叠加误差;细节到分割的方法(标注成本很高),实现更小更细局部的比对。
这几种方法,都是逐步精确锁定比较范围,实现比较对象尽量无杂质,从而提高准确度,但是两者的锁定范围和比较程度无法兼顾标准难度,速度,准确度,其中遇到的问题还有很多:姿势(面部旋转),遮挡(环境遮挡),光线(面部对光线的反射),分辨率(越低的分辨率越模糊),造成泛化性很差。
发明内容
本申请的主要目的是通过对人脸图像进行特征提取和融合,根据两图像对应特征之间的相关性确定图像的相关性,提高了图像识别效率。
本申请第一方面提供了一种人脸图像相似度的计算方法,包括:获取两帧包含人脸的视频图像,并将所述视频图像输入预置人脸识别模型进行识别,输出所述视频图像中人脸的区域范围;根据所述区域范围,从所述两帧视频图像中提取出对应的第一人脸图像和第二人脸图像;将所述第一人脸图像和所述第二人脸图像输入预置注意力检测模型的特征层对所述第一人脸图像和所述第二人脸图像进行图像特征提取,分别得到所述第一人脸图像的第一图像特征和所述第二人脸图像的第二图像特征;分别对所述第一图像特征和所述第二图像特征进行卷积注意力的计算,得到第一注意力图像特征和第二注意力图像特征;计算所述第一注意力图像特征和第二注意力图像特征之间的特征相似度,并基于所述特征相似度确定所述第一人脸图像与所述第二人脸图像之间的图像相似度。
本申请第二方面提供了一种人脸图像相似度的计算设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:获取两帧包含人脸的视频图像,并将所述视频图像输入预置人脸识别模型进行识别,输出所述视频图像中人脸的区域范围;根据所述区域范围,从所述两帧视频图像中提取出对应的第一人脸图像和第二人脸图像;将所述第一人脸图像和所述第二人脸图像输入预置注意力检测模型的特征层对所述第一人脸图像和所述第二人脸图像进行图像特征提取,分别得到所述第一人脸图像的第一图像特征和所述第二人脸图像的第二图像特征;分别对所述第一图像特征和所述第二图像特征进行卷积注意力的计算,得到第一注意力图像特征和第二注意力图像特征;计算所述第一注意力图像特征和第二注意力图像特征之间的特征相似度,并基于所述特征相似度确定所述第一人脸图像与所述第二人脸图像之间的图像相似度。
本申请的第三方面提供了一种计算机可读存储介质,所述计算机可读存储介质中存储计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:获取两帧 包含人脸的视频图像,并将所述视频图像输入预置人脸识别模型进行识别,输出所述视频图像中人脸的区域范围;根据所述区域范围,从所述两帧视频图像中提取出对应的第一人脸图像和第二人脸图像;将所述第一人脸图像和所述第二人脸图像输入预置注意力检测模型的特征层对所述第一人脸图像和所述第二人脸图像进行图像特征提取,分别得到所述第一人脸图像的第一图像特征和所述第二人脸图像的第二图像特征;分别对所述第一图像特征和所述第二图像特征进行卷积注意力的计算,得到第一注意力图像特征和第二注意力图像特征;计算所述第一注意力图像特征和第二注意力图像特征之间的特征相似度,并基于所述特征相似度确定所述第一人脸图像与所述第二人脸图像之间的图像相似度。
本申请第四方面提供了一种人脸图像相似度的计算装置,其中,所述人脸图像相似度的计算装置包括:识别模块,用于获取两帧包含人脸的视频图像,并将所述视频图像输入预置人脸识别模型进行识别,输出所述视频图像中人脸的区域范围;提取模块,用于根据所述区域范围,从所述两帧视频图像中提取出对应的第一人脸图像和第二人脸图像;第一特征提取模块,用于将所述第一人脸图像和所述第二人脸图像输入预置注意力检测模型的特征层对所述第一人脸图像和所述第二人脸图像进行图像特征提取,分别得到所述第一人脸图像的第一图像特征和所述第二人脸图像的第二图像特征;第一计算模块,用于分别对所述第一图像特征和所述第二图像特征进行卷积注意力的计算,得到第一注意力图像特征和第二注意力图像特征;确定模块,用于计算所述第一注意力图像特征和第二注意力图像特征之间的特征相似度,并基于所述特征相似度确定所述第一人脸图像与所述第二人脸图像之间的图像相似度。
本申请提供的技术方案中,通过将两帧视频图像输入预置人脸识别模型进行识别,输出视频图像对应的第一人脸图像和第二人脸图像;将人脸图像输入预置注意力检测模型的特征层进行图像特征提取,分别得到人脸图像的图像特征;对图像特征执行卷积注意力计算,分别得到人脸图像的第一注意力图像特征和第二注意力图像特征;计算第一注意力图像特征和第二注意力图像特征之间的特征相似度,确定为第一人脸图像和第二人脸图像的图像相似度。本方案通过对人脸图像进行特征提取和融合,根据两图像对应特征之间的相关性确定图像的相关性,提高了图像识别效率。
附图说明
图1为本申请实施例中人脸图像相似度的计算方法的一个实施例示意图;
图2为本申请实施例中人脸图像相似度的计算方法的另一个实施例示意图;
图3为本申请实施例中人脸图像相似度的计算方法的另一个实施例示意图;
图4为本申请实施例中人脸图像相似度的计算方法的另一个实施例示意图;
图5为本申请实施例中人脸图像相似度的计算方法的另一个实施例示意图;
图6为本申请实施例中人脸图像相似度的计算装置的一个实施例示意图;
图7为本申请实施例中人脸图像相似度的计算装置的另一个实施例示意图;
图8为本申请实施例中人脸图像相似度的计算设备的一个实施例示意图。
具体实施方式
本申请实施例提供了一种人脸图像相似度的计算方法、装置、设备及存储介质,用于提高网站、系统或应用中个人信息的隐私性与安全性。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”或“具有”及其任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或 设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
为便于理解,下面对本申请实施例的具体流程进行描述,请参阅图1,本申请实施例中人脸图像相似度的计算方法的一个实施例包括:
101、获取两帧包含人脸的视频图像,并将视频图像输入预置人脸识别模型进行识别,输出视频图像中人脸的区域范围;
本实施例中,训练得到人脸识别模型后,从预置数据库中获取两帧包含人脸的视频图像,其中,视频图像中包含待识别的人脸信息。然后将视频图像输入人脸识别模型中。
人脸识别模型能够通过鼻子、眼睛、或其他五官的框将视频图像中的人脸标识出来,得到视频图像中各人脸的区域范围。
102、根据区域范围,从两帧视频图像中提取出对应的第一人脸图像和第二人脸图像;
本实施例中,根据区域范围,然后将视频图像中各人脸的区域范围从第二图像中裁剪出来,从而提取各个视频图像对应的人脸图像,也就是第一人脸图像和第二人脸图像。
103、将第一人脸图像和第二人脸图像输入预置注意力检测模型的特征层对第一人脸图像和第二人脸图像进行图像特征提取,分别得到第一人脸图像的第一图像特征和第二人脸图像的第二图像特征;
本实施例中,图像特征提取是指计算机不认识图像,只认识数字。为了使计算机能够“理解”图像,从而具有真正意义上的“视觉”,本章我们将研究如何从图像中提取有用的数据或信息,得到图像的“非图像”的表示或描述,如数值、向量和符号等。这一过程就是特征提取,而提取出来的这些“非图像”的表示或描述就是特征。
其中,特征是某一类对象区别于其他类对象的相应(本质)特点或特性,或是这些特点和特性的集合。特征是通过测量或处理能够抽取的数据。对于图像而言,每一幅图像都具有能够区别于其他类图像的自身特征,有些是可以直观地感受到的自然特征,如亮度、边缘、纹理和色彩等;有些则是需要通过变换或处理才能得到的,如矩、直方图以及主成份等。比如,我们常常将某一类对象的多个或多种特性组合在一起,形成一个特征向量来代表该类对象,如果只有单个数值特征,则特征向量为一个一维向量,如果是n个特性的组合,则为一个n维特征向量。该类特征向量常常作为识别系统的输入。实际上,一个n维特征就是位于n维空间中的点,而识别分类的任务就是找到对这个n维空间的一种划分。
104、分别对第一图像特征和第二图像特征进行卷积注意力的计算,得到第一注意力图像特征和第二注意力图像特征;
本实施例中,其中,注意力检测模型包括依次连接的多个特征层;其中第一个特征层的输入为输入特征,除第一个特征层以外的每一个特征层的输入均为前一个特征层输出的图像特征;注意力图像特征中目标元素的数值大于对应的图像特征中目标元素的数值;目标元素指代根据待检测图像中目标物体的像素计算得到的元素。
105、计算第一注意力图像特征和第二注意力图像特征之间的特征相似度,并基于特征相似度确定第一人脸图像与第二人脸图像之间的图像相似度。
本实施例中,得到第一注意力图像特征之后,便可利用与或逻辑运算代替浮点运算,计算出第一注意力图像特征与第二注意力图像特征之间的特征相似度。该特征相似度即可视为第一人脸图像和第二人脸图像的图像相似度。
具体的,第二人脸图像为待识别图像,第一人脸图像为具有识别标签的目标图像,在将特征相似度确定为第一人脸图像和第二人脸图像的图像相似度之后,在图像相似度大于预设阈值时,将识别标签作为第二人脸图像的识别结果。如此,便可提高图像识别的准确率和识别速度。其中,识别标签可具体为人员身份,或分类信息或其他识别标签。
本申请实施例中,通过将两帧视频图像输入预置人脸识别模型进行识别,输出视频图像对应的第一人脸图像和第二人脸图像;将人脸图像输入预置注意力检测模型的特征层进行图像特征提取,分别得到人脸图像的图像特征;对图像特征执行卷积注意力计算,分别得到人脸图像的第一注意力图像特征和第二注意力图像特征;计算第一注意力图像特征和第二注意力图像特征之间的特征相似度,确定为第一人脸图像和第二人脸图像的图像相似度。本方案通过对人脸图像进行特征提取和融合,根据两图像对应特征之间的相关性确定图像的相关性,提高了图像识别效率。
请参阅图2,本申请实施例中人脸图像相似度的计算方法的第二个实施例包括:
201、获取多张不同应用场景下的包含人脸的样本图像,并将样本图像作为训练样本图像集;
本实施例中,一个训练数据集对应一个应用场景,例如:人证识别场景和自然场景。训练数据集可为不同维度下的人脸数据、开源数据和私有数据,例如:自然场景的人脸数据、亚洲人的人脸数据、考勤数据、人证数据和竞赛数据。服务器可从预置的数据库中提取多张不同应用场景下的包含人脸的样本图像,对包含人脸的样本图像进行预处理,得到预处理后的训练数据图像集。
202、将训练样本图像集输入预置的初始人脸识别模型的主干网络,对训练样本图像集中的样本图像分别进行人脸特征提取,得到特征集,其中,初始人脸识别模型包括主干网络和多个分类网络;
本实施例中,预置的初始人脸识别模型包括主干网络和多个分类网络,主干网络的输出为多个分类网络的输入,通过多个分类网络对主干网络处理后的数据进行分类,从而实现对训练数据集的人脸识别训练。主干网络可为单个卷积神经网络也可为多个卷积神经网络的综合框架,例如:主干网络可为深度残差学习框架ResNet或目标检测网络框架ET-YOLOv3,也可为深度残差学习框架ResNet结合目标检测网络框架ET-YOLOv3的综合框架。
服务器可通过初始人脸识别模型的主干网络,对每个训练数据集进行人脸标框识别、标框区域划分、人脸关键点检测和人脸特征向量提取,得到每个训练数据集对应的特征集(即多个特征集)。主干网络中的卷积网络层采用小卷积核,通过小卷积核保留更多的特征,减少计算量,提高人脸特征提取的效率。
203、计算特征集的特征向量损失函数值,得到多个特征向量损失函数值;
本实施例中,计算第一中心向量和第二中心向量,计算每个第一中心向量和第二中心向量之间的距离值,将该距离值作为每个特征集对应的特征向量损失函数值,从而获得多个特征向量损失函数,其中,第一中心向量为每个特征集对应的中心向量,也可为每个特征集中每个训练数据对应的中心向量,第二中心向量可为所有特征集对应的第二中心向量,也可为每个特征集中所有训练数据对应的中心向量。
服务器可通过获取每个特征集对应的训练数据个数,以及计算所有训练数据对应的第一中心向量的和值,根据训练数据个数计算和值的均值,该均值为每个特征集对应的第二中心向量,服务器也可通过预置的中心向量公式计算第二中心向量。
服务器通过预置的交叉熵损失函数计算每个分类数据集的分类损失函数值,从而得到多个分类损失函数值,该交叉熵损失函数可为多分类交叉熵损失函数,通过多分类交叉熵损失函数,求导更简单,能够使得收敛较快,对应的权重矩阵的更新更快。
204、根据多个特征向量损失函数值,计算初始人脸识别模型的目标损失函数值;
本实施例中,获得多个特征向量损失函数值和多个分类损失函数值后,获取多个训练 数据集的数据集个数,根据数据集个数,计算多个特征向量损失函数值的平均特征向量损失函数值,以及多个分类损失函数值的平均分类损失函数值,将平均特征向量损失函数值和平均分类损失函数值的和值,作为人脸识别模型的目标损失函数值,或者将平均特征向量损失函数值和平均分类损失函数值的加权和值,作为人脸识别模型的目标损失函数值。每个分类网络计算得到分类损失函数值时,可根据分类损失函数值对对应的分类网络进行反向更新。
205、根据目标损失函数值对主干网络进行迭代更新,直至目标损失函数值收敛,得到目标人脸识别模型;
本实施例中,根据目标损失函数值和预置的迭代次数,对主干网络的网络结构和/或权重值进行迭代更新,直至目标损失函数值收敛(即人脸识别模型的训练精度符合预设条件),得到更新后的人脸识别模型。其中,可通过对主干网络进行网络层的增加或删减来更新主干网络的网络结构,也可通过增设其他的网络框架来更新主干网络的网络结构,也可通过修改主干网络的卷积核大小和步长等来更新主干网络的网络结构。在对主干网络进行迭代更新时,服务器也可结合优化算法对人脸识别模型进行优化。
206、获取两帧包含人脸的视频图像,并将视频图像输入预置人脸识别模型进行识别,输出视频图像中人脸的区域范围;
207、根据区域范围,从两帧视频图像中提取出对应的第一人脸图像和第二人脸图像;
208、将第一人脸图像和第二人脸图像输入预置注意力检测模型的特征层对第一人脸图像和第二人脸图像进行图像特征提取,分别得到第一人脸图像的第一图像特征和第二人脸图像的第二图像特征;
209、分别对第一图像特征和第二图像特征进行卷积注意力的计算,得到第一注意力图像特征和第二注意力图像特征;
210、计算第一注意力图像特征和第二注意力图像特征之间的特征相似度,并基于特征相似度确定第一人脸图像与第二人脸图像之间的图像相似度。
本实施例中步骤206-210与第一实施例中的步骤101-105类似,此处不再赘述。
本申请实施例中,通过将两帧视频图像输入预置人脸识别模型进行识别,输出视频图像对应的第一人脸图像和第二人脸图像;将人脸图像输入预置注意力检测模型的特征层进行图像特征提取,分别得到人脸图像的图像特征;对图像特征执行卷积注意力计算,分别得到人脸图像的第一注意力图像特征和第二注意力图像特征;计算第一注意力图像特征和第二注意力图像特征之间的特征相似度,确定为第一人脸图像和第二人脸图像的图像相似度。本方案通过对人脸图像进行特征提取和融合,根据两图像对应特征之间的相关性确定图像的相关性,提高了图像识别效率。
请参阅图3,本申请实施例中人脸图像相似度的计算方法的第三个实施例包括:
301、获取两帧包含人脸的视频图像,并将视频图像输入预置人脸识别模型进行识别,输出视频图像中人脸的区域范围;
302、根据区域范围,从两帧视频图像中提取出对应的第一人脸图像和第二人脸图像;
303、对第一人脸图像和第二人脸图像进行边缘提取,得到第一边缘图像和第二边缘图像,其中,第一边缘图像和第二边缘图像所包含边缘图像信息;
本实施例中,第一人脸图像和第二人脸图像为待特征提取的图像,第一人脸图像和第二人脸图像可以为RGB图像(即,由红黄蓝三原色组成的图像),第一人脸图像和第二人脸图像的格式可以为jpg、jpeg、TIFF、PNG、BMP或PSD等,本公开实施例不作限定。第一人脸图像和第二人脸图像中包括目标对象,目标对象的数量可以为一个或多个(即,至少两 个)。另外,边缘图像可以理解为用于突出表示第一人脸图像和第二人脸图像中目标对象与背景之间边界以及目标对象轮廓的图像。第一人脸图像和第二人脸图像与边缘图像中所包括的目标对象为相同目标对象,而目标对象在第一人脸图像和第二人脸图像和边缘图像中的表现形式不同。
304、通过预置双路特征提取网络对第一边缘图像和第二边缘图像所包含边缘图像信息进行特征提取,并对第一边缘图像和第二边缘图像所包含边缘图像信息进行特征提取;
本实施例中,将第一人脸图像和第二人脸图像中一个小区域的像素进行加权平均后,可以成为边缘图像中的对应像素。第一人脸图像和第二人脸图像的维度可以为H×W×3;其中,H表示的是第一人脸图像和第二人脸图像的高度(如,600),W表示的是第一人脸图像和第二人脸图像的宽度(如,600),3表示的是第一人脸图像和第二人脸图像的三原色通道数。预设卷积核的尺寸可以为3*3,也可以为5*5,也可以为其他尺寸,本公开实施例不作限定。举例来说,若预设卷积核的尺寸为3*3,预设卷积核内每个单元的权重可以如下:
-1-2-1-212-2-1-2-1
具体地,根据预设卷积核对第一人脸图像和第二人脸图像进行梯度计算,以提取第一人脸图像和第二人脸图像对应的边缘图像的方式可以为:
将预设卷积核Sx与第一人脸图像和第二人脸图像进行卷积,得到其中,将预设卷积核Sx进行转置,得到转置后的卷积核并将与进行卷积,得到其中,通过对和的组合,得到第一人脸图像和第二人脸图像对应的梯度向量梯度方向θ以及梯度幅度其中,根据梯度向量确定出第一人脸图像和第二人脸图像对应的边缘图像,边缘图像中包括了用于表示灰度变化剧烈程度的图像频率。此外,需要说明的是,梯度幅度变化较快的区域可以为边缘区域,梯度方向θ用于表示梯度变化方向,结合梯度方向θ和梯度幅度能够确定出第一人脸图像和第二人脸图像中目标对象的边缘。
305、将特征提取结果进行加和,得到第一人脸图像和第二人脸图像中包括目标对象的区域;
本实施例中,其中,全局图像信息用于从整体上表征第一人脸图像和第二人脸图像。边缘图像信息用于表征第一人脸图像和第二人脸图像中目标对象的边缘和细节。融合结果可以表示为矩阵,对应目标对象的边缘和细节强化后的第一人脸图像和第二人脸图像。
可以将全局图像信息和边缘图像信息分别对应的参考图像特征进行加和,并对加和结果进行第二预设频次的卷积,实现全局图像信息和边缘图像信息的特征融合,得到第一人脸图像和第二人脸图像中包括目标对象的区域图像特征。
306、对区域进行特征提取,得到第一人脸图像对应的第一全局特征、第一边缘特征和第二边缘图像对应的第二全局特征、第二边缘特征;
本实施例中,全局特征用于在整体上表征目标对象,边缘特征用于突出在边缘和细节上表征目标对象。
307、对第一全局特征和第一边缘特征进行特征融合,得到第一人脸图像的第一图像特征,以及对第二全局特征和第二边缘特征进行特征融合得到第二人脸图像的第二图像特征;
本实施例中,其中,图像特征的输出形式可以为矩阵。对上述的全局特征和边缘特征进行特征融合,包括:将全局特征和边缘特征进行连接,得到第一参考特征,第一参考特征的维度为全局特征和边缘特征的维度之和;举例来说,若全局特征的维度为2048且边缘特征的维度为2048维,那么,第一参考特征的维度为4096维;对第一参考特征进行降维特征转换,得到第二参考特征,作为目标对象对应的图像特征。
308、分别对第一图像特征和第二图像特征进行卷积注意力的计算,得到第一注意力图像特征和第二注意力图像特征;
309、计算第一注意力图像特征和第二注意力图像特征之间的特征相似度,并基于特征相似度确定第一人脸图像与第二人脸图像的之间图像相似度。
本实施例中步骤301-302、308-309与第一实施例中的步骤101-102、104-105类似,此处不再赘述。
本申请实施例中,通过将两帧视频图像输入预置人脸识别模型进行识别,输出视频图像对应的第一人脸图像和第二人脸图像;将人脸图像输入预置注意力检测模型的特征层进行图像特征提取,分别得到人脸图像的图像特征;对图像特征执行卷积注意力计算,分别得到人脸图像的第一注意力图像特征和第二注意力图像特征;计算第一注意力图像特征和第二注意力图像特征之间的特征相似度,确定为第一人脸图像和第二人脸图像的图像相似度。本方案通过对人脸图像进行特征提取和融合,根据两图像对应特征之间的相关性确定图像的相关性,提高了图像识别效率。
请参阅图4,本申请实施例中人脸图像相似度的计算方法的第四个实施例包括:
401、获取两帧包含人脸的视频图像,并将视频图像输入预置人脸识别模型进行识别,输出视频图像中人脸的区域范围;
402、根据区域范围,从两帧视频图像中提取出对应的第一人脸图像和第二人脸图像;
403、将第一人脸图像和第二人脸图像输入预置注意力检测模型的特征层对第一人脸图像和第二人脸图像进行图像特征提取,分别得到第一人脸图像的第一图像特征和第二人脸图像的第二图像特征;
404、分别对第一图像特征和第二图像特征进行通道注意力的计算,得到图像特征的通道注意力图;
本实施例中,分别对图像特征进行平均池化运算和最大池化运算,得到平均池化特征和最大池化特征;利用预先构建的多层感知机处理平均池化特征,得到平均池化参数,并利用多层感知机处理最大池化特征,得到最大池化参数;
将平均池化参数与最大池化参数的和输入激活模块,得到图像特征的通道注意力图。
其中,对图像特征进行平均池化运算,是指,利用一个具有预先设定的尺寸的池化窗口(如可以是2×2的池化窗口)在图像特征包含的每一个特征矩阵上移动,每次移动后池化窗口覆盖的区域均紧挨着移动前池化窗口覆盖的区域(即移动前后的两个区域的某一条边重合,但是两个区域互不重叠),每当池化窗口覆盖一个新的区域,计算池化窗口当前覆盖的元素(以上述2×2的池化窗口,一次可以覆盖4个元素,即两行两列)的算术平均值,将得到的计算结果作为最终的平均池化特征中的一个元素,当图像特征中每一个元素均进行过上述平均值计算后,对这个图像特征的平均池化运算就完成,计算得到的所有平均值按照计算时池化窗口的位置组合,就得到这个图像特征对应的平均池化特征。
对图像特征进行最大池化运算的过程,和上述平均池化运算的过程基本一致,区别在于,每当池化窗口覆盖一个新区域时,从该区域内的所有元素中筛选出最大的元素,作为本次的计算结果(区别于平均池化运算中将平均值作为计算结果),同样的,当图像特征中每一个元素均经过上述筛选后,对图像特征的最大池化运算过程完成,筛选得到的所有元素按照筛选时池化窗口的位置组合,就得到这个图像特征对应的最大池化特征。
405、基于注意力机制对图像特征和通道注意力图合并得到的增强图像特征进行空间注意力计算,得到图像特征的空间注意力图;
本实施例中,分别对增强图像特征进行平均池化运算和最大池化运算,得到平均池化增强特征和最大池化增强特征;将平均池化增强特征和最大池化增强特征合并得到合并池化特征;利用预设尺寸的卷积核对合并池化特征进行卷积运算,并将卷积运算得到的运算 结果输入激活模块,得到图像特征的空间注意力图。
可以理解的,针对任意一个特征矩阵,其内部的元素中只有那些根据待检测图像中目标物体的像素计算得到的元素(即目标元素)对于检测目标物体是有价值的,而其他的元素则是对检测目标物体这一目的干扰。例如,待检测图像中目标物体位于图像的左下角,相应的,特征矩阵中,根据图像左下角的像素计算得到的,同样位于特征矩阵左下角的元素对于检测目标物体是有价值的,而其他元素,例如位于特征矩阵上方的元素则会在检测目标物体时形成干扰。
406、将空间注意力图和增强图像特征合并,分别得到第一人脸图像的第一注意力图像特征和第二人脸图像的第二注意力图像特征;
本实施例中,计算出图像特征的通道注意力图和空间注意力图,然后将通道注意力图和空间注意力图与图像特征合并,得到注意力图像特征。通过上述注意力计算,增加了卷积神经网络特征提取的有效性,使得目标检测的平均精度明显提升。
可选的,对于第一个特征层,可以设置归一化层,在这种情况下,第一个特征层输出图像特征之后,需要:利用归一化层对第一个特征层输出的图像特征进行批处理归一化运算,得到归一化图像特征;对应的,第一个特征层所连接的注意力层的具体作用是:利用特征层连接的注意力层对归一化图像特征执行卷积注意力计算,得到注意力图像特征。
本实施例中,批处理归一化(Batch Norm)是为了解决训练过程中数据分布的改变,提高网络泛化性,加快网络训练的一种算法。在网络训练的过程中,参数不断地在更新,前一层网络参数的更新,就会导致下一层网络输入数据分布的变化,那么该层网络就要去适应新的数据分布,这样大大影响了网络训练的速度。另一方面,卷积神经网路的训练过程就是在学习数据分布,如果数据分布不断发生变化的话,那么会降低网络的泛化能力。批处理归一化的本质就是对数据进行预处理,把数据送入网络之前,先对它进行归一化,这样做可以减少数据分布的变化,使得网络的泛化性和训练速度大大提高。
407、计算第一注意力图像特征和第二注意力图像特征之间的特征相似度,并基于特征相似度确定第一人脸图像与第二人脸图像之间的图像相似度。
本实施例中步骤401-403、407与第一实施例中的步骤101-103、105类似,此处不再赘述。
本申请实施例中,通过将两帧视频图像输入预置人脸识别模型进行识别,输出视频图像对应的第一人脸图像和第二人脸图像;将人脸图像输入预置注意力检测模型的特征层进行图像特征提取,分别得到人脸图像的图像特征;对图像特征执行卷积注意力计算,分别得到人脸图像的第一注意力图像特征和第二注意力图像特征;计算第一注意力图像特征和第二注意力图像特征之间的特征相似度,确定为第一人脸图像和第二人脸图像的图像相似度。本方案通过对人脸图像进行特征提取和融合,根据两图像对应特征之间的相关性确定图像的相关性,提高了图像识别效率。
请参阅图5,本申请实施例中人脸图像相似度的计算方法的第五个实施例包括:
501、获取两帧包含人脸的视频图像,并将视频图像输入预置人脸识别模型进行识别,输出视频图像中人脸的区域范围;
502、根据区域范围,从两帧视频图像中提取出对应的第一人脸图像和第二人脸图像;
503、将第一人脸图像和第二人脸图像输入预置注意力检测模型的特征层对第一人脸图像和第二人脸图像进行图像特征提取,分别得到第一人脸图像的第一图像特征和第二人脸图像的第二图像特征;
504、分别对第一图像特征和第二图像特征进行平均池化运算和最大池化运算,得到平 均池化特征和最大池化特征;
本实施例中,对图像特征进行平均池化运算,是指,利用一个具有预先设定的尺寸的池化窗口(如可以是2×2的池化窗口)在图像特征包含的每一个特征矩阵上移动,每次移动后池化窗口覆盖的区域均紧挨着移动前池化窗口覆盖的区域(即移动前后的两个区域的某一条边重合,但是两个区域互不重叠),每当池化窗口覆盖一个新的区域,计算池化窗口当前覆盖的元素(以上述2×2的池化窗口,一次可以覆盖4个元素,即两行两列)的算术平均值,将得到的计算结果作为最终的平均池化特征中的一个元素,当图像特征中每一个元素均进行过上述平均值计算后,对这个图像特征的平均池化运算就完成,计算得到的所有平均值按照计算时池化窗口的位置组合,就得到这个图像特征对应的平均池化特征。
对图像特征进行最大池化运算的过程,和上述平均池化运算的过程基本一致,区别在于,每当池化窗口覆盖一个新区域时,从该区域内的所有元素中筛选出最大的元素,作为本次的计算结果(区别于平均池化运算中将平均值作为计算结果),同样的,当图像特征中每一个元素均经过上述筛选后,对图像特征的最大池化运算过程完成,筛选得到的所有元素按照筛选时池化窗口的位置组合,就得到这个图像特征对应的最大池化特征。
505、利用预先构建的多层感知机处理平均池化特征,得到平均池化参数,并利用多层感知机处理最大池化特征,得到最大池化参数;
本实施例中,多层感知机是一种前馈人工神经网络模型,其将输入的多个数据集映射到单一的输出的数据集上。在本方案中,多层感知机具体用于将最大池化特征和平均池化特征,分别映射为一个包含C个参数的一维向量,即映射为如下形式的向量:(A1,A2……AC-1,AC)。
其中,C就是输入至这个注意力层的图像特征的通道数(一个图像特征包含的特征矩阵的数量,称为通道数)。
多层感知机输出的这两个一维向量,就是前述计算过程中提及的平均池化参数和最大池化参数。
506、将平均池化参数与最大池化参数的和输入激活模块,得到第一图像特征的第一通道注意力图和第二图像特征的第二通道注意力图;
本实施例中,利用激活函数对多层感知机输出的两个一维向量进行激活运算(相当于将平均池化参数与最大池化参数的和输入激活模块),就可以得到通道注意力图。其中,通道注意力图也是一个包含C个参数的一维向量。
本实施例中,通道注意力图的作用,在于突出图像特征中有意义的特征矩阵。一个图像中,每一种物体的特征在同一个图像特征的不同特征矩阵上的显著程度是不同的,例如,可能汽车的特征在第一特征矩阵上较为显著,而房屋的特征在第二特征矩阵上较为显著。显然,在物体检测这一应用场景中,那些目标物体的特征较为突出的特征矩阵是有意义的特征矩阵,而其他特征矩阵则是无意义的特征矩阵。
507、基于注意力机制对图像特征和通道注意力图合并得到的增强图像特征进行空间注意力计算,得到图像特征的空间注意力图;
508、将空间注意力图和增强图像特征合并,分别得到第一人脸图像的第一注意力图像特征和第二人脸图像的第二注意力图像特征;
509、计算第一注意力图像特征和第二注意力图像特征之间的特征相似度,并基于特征相似度确定第一人脸图像与第二人脸图像之间的图像相似度。
本实施例中步骤501-503、509与第一实施例中的101-103、105类似,此处不再赘述。
在本申请实施例中,通过将两帧视频图像输入预置人脸识别模型进行识别,输出视频图像对应的第一人脸图像和第二人脸图像;将人脸图像输入预置注意力检测模型的特征层 进行图像特征提取,分别得到人脸图像的图像特征;对图像特征执行卷积注意力计算,分别得到人脸图像的第一注意力图像特征和第二注意力图像特征;计算第一注意力图像特征和第二注意力图像特征之间的特征相似度,确定为第一人脸图像和第二人脸图像的图像相似度。本方案通过对人脸图像进行特征提取和融合,根据两图像对应特征之间的相关性确定图像的相关性,提高了图像识别效率。
上面对本申请实施例中人脸图像相似度的计算方法进行了描述,下面对本申请实施例中人脸图像相似度的计算装置进行描述,请参阅图6,本申请实施例中人脸图像相似度的计算装置的第一个实施例包括:
识别模块601,用于获取两帧包含人脸的视频图像,并将所述视频图像输入预置人脸识别模型进行识别,输出所述视频图像中人脸的区域范围;
提取模块602,用于根据所述区域范围,从所述两帧视频图像中提取出对应的第一人脸图像和第二人脸图像;
第一特征提取模块603,用于将所述第一人脸图像和所述第二人脸图像输入预置注意力检测模型的特征层对所述第一人脸图像和所述第二人脸图像进行图像特征提取,分别得到所述第一人脸图像的第一图像特征和所述第二人脸图像的第二图像特征;
第一计算模块604,用于分别对所述第一图像特征和所述第二图像特征进行卷积注意力的计算,得到第一注意力图像特征和第二注意力图像特征;
确定模块605,用于计算所述第一注意力图像特征和第二注意力图像特征之间的特征相似度,并基于所述特征相似度确定所述第一人脸图像与所述第二人脸图像之间的图像相似度。
本申请实施例中,通过将两帧视频图像输入预置人脸识别模型进行识别,输出视频图像对应的第一人脸图像和第二人脸图像;将人脸图像输入预置注意力检测模型的特征层进行图像特征提取,分别得到人脸图像的图像特征;对图像特征执行卷积注意力计算,分别得到人脸图像的第一注意力图像特征和第二注意力图像特征;计算第一注意力图像特征和第二注意力图像特征之间的特征相似度,确定为第一人脸图像和第二人脸图像的图像相似度。本方案通过对人脸图像进行特征提取和融合,根据两图像对应特征之间的相关性确定图像的相关性,提高了图像识别效率。
请参阅图7,本申请实施例中人脸图像相似度的计算装置的第二个实施例,该人脸图像相似度的计算装置具体包括:
识别模块601,用于获取两帧包含人脸的视频图像,并将所述视频图像输入预置人脸识别模型进行识别,输出所述视频图像中人脸的区域范围;
提取模块602,用于根据所述区域范围,从所述两帧视频图像中提取出对应的第一人脸图像和第二人脸图像;
第一特征提取模块603,用于将所述第一人脸图像和所述第二人脸图像输入预置注意力检测模型的特征层对所述第一人脸图像和所述第二人脸图像进行图像特征提取,分别得到所述第一人脸图像的第一图像特征和所述第二人脸图像的第二图像特征;
第一计算模块604,用于分别对所述第一图像特征和所述第二图像特征进行卷积注意力的计算,得到第一注意力图像特征和第二注意力图像特征;
确定模块605,用于计算所述第一注意力图像特征和第二注意力图像特征之间的特征相似度,并基于所述特征相似度确定所述第一人脸图像与所述第二人脸图像之间的图像相似度。
本实施例中,所述人脸图像相似度的计算装置包括:
获取模块606,用于获取多张不同应用场景下的包含人脸的视频图像,并将所述视频图像作为训练样本图像集;
第二特征提取模块607,用于将所述训练样本图像集输入预置的初始人脸识别模型的主干网络,对所述训练样本图像集中的视频图像分别进行人脸特征提取,得到特征集,其中,所述初始人脸识别模型包括主干网络和多个分类网络;
第二计算模块608,用于计算所述特征集的特征向量损失函数值,得到多个特征向量损失函数值;
第三计算模块609,用于根据所述多个特征向量损失函数值,计算所述初始人脸识别模型的目标损失函数值;
更新模块610,用于根据所述目标损失函数值对所述主干网络进行迭代更新,直至所述目标损失函数值收敛,得到目标人脸识别模型。
本实施例中,所述第一特征提取模块603包括:
边缘提取单元6031,用于对所述第一人脸图像和所述第二人脸图像进行边缘提取,得到第一边缘图像和第二边缘图像;
融合单元6032,用于将所述第一人脸图像和所述第二人脸图像所包含的全局图像信息和所述第一边缘图像和所述第二边缘图像所包含的边缘图像信息进行融合,得到所述第一人脸图像和所述第二人脸图像中包括目标对象的区域;
特征提取单元6033,用于对所述区域进行特征提取,得到所述第一人脸图像对应的第一全局特征、第一边缘特征和所述第二边缘图像对应的第二全局特征、第二边缘特征;
特征融合单元6034,用于分别对所述第一全局特征和所述第一边缘特征以及所述第二全局特征和所述第二边缘特征进行特征融合,分别得到所述第一人脸图像的第一图像特征和所述第二人脸图像的第二图像特征。
本实施例中,所述融合单元6032具体用于:
通过预置双路特征提取网络对所述第一边缘图像和所述第二边缘图像所包含边缘图像信息进行特征提取,并对所述第一边缘图像和所述第二边缘图像所包含边缘图像信息进行特征提取;
将所述特征提取结果进行加和,得到所述第一人脸图像和所述第二人脸图像中包括目标对象的区域图像特征。
本实施例中,所述第一计算模块604包括:
第一计算单元6041,用于分别对所述特征层输出的第一图像特征和所述第二图像特征进行通道注意力的计算,得到所述图像特征的通道注意力图;
第二计算单元6042,用于基于注意力机制对所述图像特征和所述通道注意力图合并得到的增强图像特征进行空间注意力计算,得到所述图像特征的空间注意力图;
特征合并单元6043,用于将所述空间注意力图和所述增强图像特征合并,分别得到所述第一人脸图像的第一注意力图像特征和所述第二人脸图像的第二注意力图像特征。
本实施例中,所述第二计算单元6042具体用于:
分别对所述第一图像特征和所述第二图像特征进行平均池化运算和最大池化运算,得到平均池化特征和最大池化特征;
利用预先构建的多层感知机处理所述平均池化特征,得到平均池化参数,并利用所述多层感知机处理所述最大池化特征,得到最大池化参数;
将所述平均池化参数与所述最大池化参数的和输入激活模块,得到所述第一图像特征的第一通道注意力图和第二图像特征的第二通道注意力图。
本申请实施例中,通过将两帧视频图像输入预置人脸识别模型进行识别,输出视频图 像对应的第一人脸图像和第二人脸图像;将人脸图像输入预置注意力检测模型的特征层进行图像特征提取,分别得到人脸图像的图像特征;对图像特征执行卷积注意力计算,分别得到人脸图像的第一注意力图像特征和第二注意力图像特征;计算第一注意力图像特征和第二注意力图像特征之间的特征相似度,确定为第一人脸图像和第二人脸图像的图像相似度。本方案通过对人脸图像进行特征提取和融合,根据两图像对应特征之间的相关性确定图像的相关性,提高了图像识别效率。
上面图6和图7从模块化功能实体的角度对本申请实施例中的人脸图像相似度的计算装置进行详细描述,下面从硬件处理的角度对本申请实施例中人脸图像相似度的计算设备进行详细描述。
图8是本申请实施例提供的一种人脸图像相似度的计算设备的结构示意图,该人脸图像相似度的计算设备800可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central processing units,CPU)810(例如,一个或一个以上处理器)和存储器820,一个或一个以上存储应用程序833或数据832的存储介质830(例如一个或一个以上海量存储设备)。其中,存储器820和存储介质830可以是短暂存储或持久存储。存储在存储介质830的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对人脸图像相似度的计算设备800中的一系列指令操作。更进一步地,处理器810可以设置为与存储介质830通信,在人脸图像相似度的计算设备800上执行存储介质830中的一系列指令操作,以实现上述各方法实施例提供的人脸图像相似度的计算方法的步骤。
人脸图像相似度的计算设备800还可以包括一个或一个以上电源840,一个或一个以上有线或无线网络接口850,一个或一个以上输入输出接口860,和/或,一个或一个以上操作系统831,例如Windows Serve,Mac OS X,Unix,Linux,FreeBSD等等。本领域技术人员可以理解,图8示出的人脸图像相似度的计算设备结构并不构成对本申请提供的人脸图像相似度的计算设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
本申请还提供一种计算机可读存储介质,该计算机可读存储介质可以为非易失性计算机可读存储介质,该计算机可读存储介质也可以为易失性计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在计算机上运行时,使得计算机执行上述人脸图像相似度的计算方法的步骤。
所述领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (20)

  1. 一种人脸图像相似度的计算方法,其中,所述人脸图像相似度的计算方法包括:
    获取两帧包含人脸的视频图像,并将所述视频图像输入预置人脸识别模型进行识别,输出所述视频图像中人脸的区域范围;
    根据所述区域范围,从所述两帧视频图像中提取出对应的第一人脸图像和第二人脸图像;
    将所述第一人脸图像和所述第二人脸图像输入预置注意力检测模型的特征层对所述第一人脸图像和所述第二人脸图像进行图像特征提取,分别得到所述第一人脸图像的第一图像特征和所述第二人脸图像的第二图像特征;
    分别对所述第一图像特征和所述第二图像特征进行卷积注意力的计算,得到第一注意力图像特征和第二注意力图像特征;
    计算所述第一注意力图像特征和第二注意力图像特征之间的特征相似度,并基于所述特征相似度确定所述第一人脸图像与所述第二人脸图像之间的图像相似度。
  2. 根据权利要求1所述的人脸图像相似度的计算方法,其中,在所述获取两帧包含人脸的视频图像,并将所述视频图像输入预置人脸识别模型进行识别,输出所述视频图像中人脸的区域范围之前,还包括:
    获取多张不同应用场景下的包含人脸的样本图像,并将所述样本图像作为训练样本图像集;
    将所述训练样本图像集输入预置的初始人脸识别模型的主干网络,对所述训练样本图像集中的样本图像分别进行人脸特征提取,得到特征集,其中,所述初始人脸识别模型包括主干网络和多个分类网络;
    计算所述特征集的特征向量损失函数值,得到多个特征向量损失函数值;
    根据所述多个特征向量损失函数值,计算所述初始人脸识别模型的目标损失函数值;
    根据所述目标损失函数值对所述主干网络进行迭代更新,直至所述目标损失函数值收敛,得到目标人脸识别模型。
  3. 根据权利要求1所述的人脸图像相似度的计算方法,其中,所述第一人脸图像和第二人脸图像包含全局图像信息,所述将所述第一人脸图像和所述第二人脸图像输入预置注意力检测模型的特征层对所述第一人脸图像和所述第二人脸图像进行图像特征提取,分别得到所述第一人脸图像的第一图像特征和所述第二人脸图像的第二图像特征包括:
    对所述第一人脸图像和所述第二人脸图像进行边缘提取,得到第一边缘图像和第二边缘图像,其中,所述第一边缘图像和所述第二边缘图像所包含边缘图像信息;
    将所述全局图像信息和所述边缘图像信息进行融合,得到所述第一人脸图像和所述第二人脸图像中包括目标对象的区域;
    对所述区域进行特征提取,得到所述第一人脸图像对应的第一全局特征、第一边缘特征和所述第二边缘图像对应的第二全局特征、第二边缘特征;
    对所述第一全局特征和所述第一边缘特征进行特征融合,得到第一人脸图像的第一图像特征,以及对所述第二全局特征和所述第二边缘特征进行特征融合得到所述第二人脸图像的第二图像特征。
  4. 根据权利要求3所述的人脸图像相似度的计算方法,其中,所述将所述全局图像信息和所述边缘图像信息进行融合,得到所述第一人脸图像和所述第二人脸图像中包括目标对象的区域包括:
    通过预置双路特征提取网络对所述第一边缘图像和所述第二边缘图像所包含边缘图像信息进行特征提取,并对所述第一边缘图像和所述第二边缘图像所包含边缘图像信息进行 特征提取;
    将所述特征提取结果进行加和,得到所述第一人脸图像和所述第二人脸图像中包括目标对象的区域。
  5. 根据权利要求1所述的人脸图像相似度的计算方法,其中,所述分别对所述第一图像特征和所述第二图像特征进行卷积注意力的计算,得到第一注意力图像特征和第二注意力图像特征包括:
    分别对所述第一图像特征和所述第二图像特征进行通道注意力的计算,得到所述图像特征的通道注意力图;
    基于注意力机制对所述图像特征和所述通道注意力图合并得到的增强图像特征进行空间注意力计算,得到所述图像特征的空间注意力图;
    将所述空间注意力图和所述增强图像特征合并,分别得到所述第一人脸图像的第一注意力图像特征和所述第二人脸图像的第二注意力图像特征。
  6. 根据权利要求5所述的人脸图像相似度的计算方法,其中,所述分别对所述特征层输出的第一图像特征和所述第二图像特征进行通道注意力的计算,得到所述图像特征的通道注意力图包括:
    分别对所述第一图像特征和所述第二图像特征进行平均池化运算和最大池化运算,得到平均池化特征和最大池化特征;
    利用预先构建的多层感知机处理所述平均池化特征,得到平均池化参数,并利用所述多层感知机处理所述最大池化特征,得到最大池化参数;
    将所述平均池化参数与所述最大池化参数的和输入激活模块,得到所述第一图像特征的第一通道注意力图和第二图像特征的第二通道注意力图。
  7. 一种人脸图像相似度的计算设备,其中,所述人脸图像相似度的计算设备包括:存储器和至少一个处理器,所述存储器中存储有指令,所述存储器和所述至少一个处理器通过线路互连;
    所述至少一个处理器调用所述存储器中的所述指令,以使得所述人脸图像相似度的计算设备执行如下所述的人脸图像相似度的计算的步骤:
    获取两帧包含人脸的视频图像,并将所述视频图像输入预置人脸识别模型进行识别,输出所述视频图像中人脸的区域范围;
    根据所述区域范围,从所述两帧视频图像中提取出对应的第一人脸图像和第二人脸图像;
    将所述第一人脸图像和所述第二人脸图像输入预置注意力检测模型的特征层对所述第一人脸图像和所述第二人脸图像进行图像特征提取,分别得到所述第一人脸图像的第一图像特征和所述第二人脸图像的第二图像特征;
    分别对所述第一图像特征和所述第二图像特征进行卷积注意力的计算,得到第一注意力图像特征和第二注意力图像特征;
    计算所述第一注意力图像特征和第二注意力图像特征之间的特征相似度,并基于所述特征相似度确定所述第一人脸图像与所述第二人脸图像之间的图像相似度。
  8. 根据权利要求7所述的人脸图像相似度的计算设备,其中,所述人脸图像相似度的计算程序被所述处理器执行实现在所述获取两帧包含人脸的视频图像,并将所述视频图像输入预置人脸识别模型进行识别,输出所述视频图像中人脸的区域范围步骤之前,还执行以下步骤:
    获取多张不同应用场景下的包含人脸的样本图像,并将所述样本图像作为训练样本图 像集;
    将所述训练样本图像集输入预置的初始人脸识别模型的主干网络,对所述训练样本图像集中的样本图像分别进行人脸特征提取,得到特征集,其中,所述初始人脸识别模型包括主干网络和多个分类网络;
    计算所述特征集的特征向量损失函数值,得到多个特征向量损失函数值;
    根据所述多个特征向量损失函数值,计算所述初始人脸识别模型的目标损失函数值;
    根据所述目标损失函数值对所述主干网络进行迭代更新,直至所述目标损失函数值收敛,得到目标人脸识别模型。
  9. 根据权利要求7所述的人脸图像相似度的计算设备,其中,所述人脸图像相似度的计算程序被所述处理器执行实现所述第一人脸图像和第二人脸图像包含全局图像信息,所述将所述第一人脸图像和所述第二人脸图像输入预置注意力检测模型的特征层对所述第一人脸图像和所述第二人脸图像进行图像特征提取,分别得到所述第一人脸图像的第一图像特征和所述第二人脸图像的第二图像特征步骤时,还执行以下步骤:
    对所述第一人脸图像和所述第二人脸图像进行边缘提取,得到第一边缘图像和第二边缘图像,其中,所述第一边缘图像和所述第二边缘图像所包含边缘图像信息;
    将所述全局图像信息和所述边缘图像信息进行融合,得到所述第一人脸图像和所述第二人脸图像中包括目标对象的区域;
    对所述区域进行特征提取,得到所述第一人脸图像对应的第一全局特征、第一边缘特征和所述第二边缘图像对应的第二全局特征、第二边缘特征;
    对所述第一全局特征和所述第一边缘特征进行特征融合,得到第一人脸图像的第一图像特征,以及对所述第二全局特征和所述第二边缘特征进行特征融合得到所述第二人脸图像的第二图像特征。
  10. 根据权利要求9所述的人脸图像相似度的计算设备,其中,所述人脸图像相似度的计算程序被所述处理器执行实现所述将所述全局图像信息和所述边缘图像信息进行融合,得到所述第一人脸图像和所述第二人脸图像中包括目标对象的区域步骤时,还执行以下步骤:
    通过预置双路特征提取网络对所述第一边缘图像和所述第二边缘图像所包含边缘图像信息进行特征提取,并对所述第一边缘图像和所述第二边缘图像所包含边缘图像信息进行特征提取;
    将所述特征提取结果进行加和,得到所述第一人脸图像和所述第二人脸图像中包括目标对象的区域。
  11. 根据权利要求7所述的人脸图像相似度的计算设备,其中,所述人脸图像相似度的计算程序被所述处理器执行实现所述分别对所述第一图像特征和所述第二图像特征进行卷积注意力的计算,得到第一注意力图像特征和第二注意力图像特征步骤时,还执行以下步骤:
    分别对所述第一图像特征和所述第二图像特征进行通道注意力的计算,得到所述图像特征的通道注意力图;
    基于注意力机制对所述图像特征和所述通道注意力图合并得到的增强图像特征进行空间注意力计算,得到所述图像特征的空间注意力图;
    将所述空间注意力图和所述增强图像特征合并,分别得到所述第一人脸图像的第一注意力图像特征和所述第二人脸图像的第二注意力图像特征。
  12. 根据权利要求11所述的人脸图像相似度的计算设备,其中,所述人脸图像相似度的计算程序被所述处理器执行实现所述分别对所述特征层输出的第一图像特征和所述第二 图像特征进行通道注意力的计算,得到所述图像特征的通道注意力图步骤时,还执行以下步骤:
    分别对所述第一图像特征和所述第二图像特征进行平均池化运算和最大池化运算,得到平均池化特征和最大池化特征;
    利用预先构建的多层感知机处理所述平均池化特征,得到平均池化参数,并利用所述多层感知机处理所述最大池化特征,得到最大池化参数;
    将所述平均池化参数与所述最大池化参数的和输入激活模块,得到所述第一图像特征的第一通道注意力图和第二图像特征的第二通道注意力图。
  13. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如下所述的人脸图像相似度的计算方法的步骤:
    获取两帧包含人脸的视频图像,并将所述视频图像输入预置人脸识别模型进行识别,输出所述视频图像中人脸的区域范围;
    根据所述区域范围,从所述两帧视频图像中提取出对应的第一人脸图像和第二人脸图像;
    将所述第一人脸图像和所述第二人脸图像输入预置注意力检测模型的特征层对所述第一人脸图像和所述第二人脸图像进行图像特征提取,分别得到所述第一人脸图像的第一图像特征和所述第二人脸图像的第二图像特征;
    分别对所述第一图像特征和所述第二图像特征进行卷积注意力的计算,得到第一注意力图像特征和第二注意力图像特征;
    计算所述第一注意力图像特征和第二注意力图像特征之间的特征相似度,并基于所述特征相似度确定所述第一人脸图像与所述第二人脸图像之间的图像相似度。
  14. 根据权利要求13所述的计算机可读存储介质,其中,所述计算机程序被处理器执行在所述获取两帧包含人脸的视频图像,并将所述视频图像输入预置人脸识别模型进行识别,输出所述视频图像中人脸的区域范围的步骤之前,还执行如下步骤:
    获取多张不同应用场景下的包含人脸的样本图像,并将所述样本图像作为训练样本图像集;
    将所述训练样本图像集输入预置的初始人脸识别模型的主干网络,对所述训练样本图像集中的样本图像分别进行人脸特征提取,得到特征集,其中,所述初始人脸识别模型包括主干网络和多个分类网络;
    计算所述特征集的特征向量损失函数值,得到多个特征向量损失函数值;
    根据所述多个特征向量损失函数值,计算所述初始人脸识别模型的目标损失函数值;
    根据所述目标损失函数值对所述主干网络进行迭代更新,直至所述目标损失函数值收敛,得到目标人脸识别模型。
  15. 根据权利要求13所述的计算机可读存储介质,其中,所述计算机程序被处理器执行所述第一人脸图像和第二人脸图像包含全局图像信息,所述将所述第一人脸图像和所述第二人脸图像输入预置注意力检测模型的特征层对所述第一人脸图像和所述第二人脸图像进行图像特征提取,分别得到所述第一人脸图像的第一图像特征和所述第二人脸图像的第二图像特征的步骤时,还执行如下步骤:
    对所述第一人脸图像和所述第二人脸图像进行边缘提取,得到第一边缘图像和第二边缘图像,其中,所述第一边缘图像和所述第二边缘图像所包含边缘图像信息;
    将所述全局图像信息和所述边缘图像信息进行融合,得到所述第一人脸图像和所述第二人脸图像中包括目标对象的区域;
    对所述区域进行特征提取,得到所述第一人脸图像对应的第一全局特征、第一边缘特征和所述第二边缘图像对应的第二全局特征、第二边缘特征;
    对所述第一全局特征和所述第一边缘特征进行特征融合,得到第一人脸图像的第一图像特征,以及对所述第二全局特征和所述第二边缘特征进行特征融合得到所述第二人脸图像的第二图像特征。
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述计算机程序被处理器执行所述将所述全局图像信息和所述边缘图像信息进行融合,得到所述第一人脸图像和所述第二人脸图像中包括目标对象的区域的步骤时,还执行如下步骤:
    通过预置双路特征提取网络对所述第一边缘图像和所述第二边缘图像所包含边缘图像信息进行特征提取,并对所述第一边缘图像和所述第二边缘图像所包含边缘图像信息进行特征提取;
    将所述特征提取结果进行加和,得到所述第一人脸图像和所述第二人脸图像中包括目标对象的区域。
  17. 根据权利要求13所述的计算机可读存储介质,其中,所述计算机程序被处理器执行所述分别对所述第一图像特征和所述第二图像特征进行卷积注意力的计算,得到第一注意力图像特征和第二注意力图像特征的步骤时,还执行如下步骤:
    分别对所述第一图像特征和所述第二图像特征进行通道注意力的计算,得到所述图像特征的通道注意力图;
    基于注意力机制对所述图像特征和所述通道注意力图合并得到的增强图像特征进行空间注意力计算,得到所述图像特征的空间注意力图;
    将所述空间注意力图和所述增强图像特征合并,分别得到所述第一人脸图像的第一注意力图像特征和所述第二人脸图像的第二注意力图像特征。
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述计算机程序被处理器执行所述分别对所述特征层输出的第一图像特征和所述第二图像特征进行通道注意力的计算,得到所述图像特征的通道注意力图的步骤时,还执行如下步骤:
    分别对所述第一图像特征和所述第二图像特征进行平均池化运算和最大池化运算,得到平均池化特征和最大池化特征;
    利用预先构建的多层感知机处理所述平均池化特征,得到平均池化参数,并利用所述多层感知机处理所述最大池化特征,得到最大池化参数;
    将所述平均池化参数与所述最大池化参数的和输入激活模块,得到所述第一图像特征的第一通道注意力图和第二图像特征的第二通道注意力图。
  19. 一种人脸图像相似度的计算装置,其特征在于,所述人脸图像相似度的计算装置包括:
    识别模块,用于获取两帧包含人脸的视频图像,并将所述视频图像输入预置人脸识别模型进行识别,输出所述视频图像中人脸的区域范围;
    提取模块,用于根据所述区域范围,从所述两帧视频图像中提取出对应的第一人脸图像和第二人脸图像;
    第一特征提取模块,用于将所述第一人脸图像和所述第二人脸图像输入预置注意力检测模型的特征层对所述第一人脸图像和所述第二人脸图像进行图像特征提取,分别得到所述第一人脸图像的第一图像特征和所述第二人脸图像的第二图像特征;
    第一计算模块,用于分别对所述第一图像特征和所述第二图像特征进行卷积注意力的计算,得到第一注意力图像特征和第二注意力图像特征;
    确定模块,用于计算所述第一注意力图像特征和第二注意力图像特征之间的特征相似 度,并基于所述特征相似度确定所述第一人脸图像与所述第二人脸图像之间的图像相似度。
  20. 根据权利要求19所述的人脸图像相似度的计算装置,其特征在于,所述人脸图像相似度的计算装置还包括:
    获取模块,用于获取多张不同应用场景下的包含人脸的样本图像,并将所述样本图像作为训练样本图像集;
    第二特征提取模块,用于将所述训练样本图像集输入预置的初始人脸识别模型的主干网络,对所述训练样本图像集中的样本图像分别进行人脸特征提取,得到特征集,其中,所述初始人脸识别模型包括主干网络和多个分类网络;
    第二计算模块,用于计算所述特征集的特征向量损失函数值,得到多个特征向量损失函数值;
    第三计算模块,用于根据所述多个特征向量损失函数值,计算所述初始人脸识别模型的目标损失函数值;
    更新模块,用于根据所述目标损失函数值对所述主干网络进行迭代更新,直至所述目标损失函数值收敛,得到目标人脸识别模型。
PCT/CN2022/071689 2021-07-27 2022-01-13 人脸图像相似度的计算方法、装置、设备及存储介质 WO2023005161A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110852052.1 2021-07-27
CN202110852052.1A CN113361495B (zh) 2021-07-27 2021-07-27 人脸图像相似度的计算方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2023005161A1 true WO2023005161A1 (zh) 2023-02-02

Family

ID=77540417

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/071689 WO2023005161A1 (zh) 2021-07-27 2022-01-13 人脸图像相似度的计算方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN113361495B (zh)
WO (1) WO2023005161A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115984949A (zh) * 2023-03-21 2023-04-18 威海职业学院(威海市技术学院) 一种带有注意力机制的低质量人脸图像识别方法及设备
CN116343301A (zh) * 2023-03-27 2023-06-27 滨州市沾化区退役军人服务中心 基于人脸识别的人员信息智能校验系统
CN117173854A (zh) * 2023-09-13 2023-12-05 西安博深安全科技股份有限公司 一种基于深度学习的煤矿明火预警方法及系统
CN117201874A (zh) * 2023-11-08 2023-12-08 北京远鉴信息技术有限公司 一种人脸图像替换方法、装置、电子设备及存储介质
CN117240607A (zh) * 2023-11-10 2023-12-15 北京云尚汇信息技术有限责任公司 一种基于安全计算机的安全认证方法

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113361495B (zh) * 2021-07-27 2024-04-09 平安科技(深圳)有限公司 人脸图像相似度的计算方法、装置、设备及存储介质
CN114627431B (zh) * 2022-02-22 2023-07-21 安徽新识智能科技有限公司 一种基于物联网的环境智能监控方法及系统
CN116309350B (zh) * 2023-02-15 2023-09-22 深圳市巨龙创视科技有限公司 人脸检测方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050238209A1 (en) * 2004-04-21 2005-10-27 Fuji Xerox Co., Ltd. Image recognition apparatus, image extraction apparatus, image extraction method, and program
CN110610129A (zh) * 2019-08-05 2019-12-24 华中科技大学 一种基于自注意力机制的深度学习人脸识别系统及方法
CN111462126A (zh) * 2020-04-08 2020-07-28 武汉大学 一种基于边缘增强的语义图像分割方法及系统
CN112597941A (zh) * 2020-12-29 2021-04-02 北京邮电大学 一种人脸识别方法、装置及电子设备
CN113361495A (zh) * 2021-07-27 2021-09-07 平安科技(深圳)有限公司 人脸图像相似度的计算方法、装置、设备及存储介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10482603B1 (en) * 2019-06-25 2019-11-19 Artificial Intelligence, Ltd. Medical image segmentation using an integrated edge guidance module and object segmentation network
CN110705353A (zh) * 2019-08-29 2020-01-17 北京影谱科技股份有限公司 基于注意力机制的遮挡人脸的识别方法和装置
CN110781784A (zh) * 2019-10-18 2020-02-11 高新兴科技集团股份有限公司 基于双路注意力机制的人脸识别方法、装置及设备
CN111126240B (zh) * 2019-12-19 2023-04-07 西安工程大学 一种三通道特征融合人脸识别方法
CN111428606B (zh) * 2020-03-19 2023-03-31 华南师范大学 一种面向边缘计算的轻量级人脸对比验证方法
CN111639596B (zh) * 2020-05-29 2023-04-28 上海锘科智能科技有限公司 基于注意力机制和残差网络的抗眼镜遮挡人脸识别方法
CN111985340A (zh) * 2020-07-22 2020-11-24 深圳市威富视界有限公司 基于神经网络模型的人脸识别方法、装置和计算机设备
CN112950661B (zh) * 2021-03-23 2023-07-25 大连民族大学 一种基于注意力生成对抗网络人脸卡通画生成方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050238209A1 (en) * 2004-04-21 2005-10-27 Fuji Xerox Co., Ltd. Image recognition apparatus, image extraction apparatus, image extraction method, and program
CN110610129A (zh) * 2019-08-05 2019-12-24 华中科技大学 一种基于自注意力机制的深度学习人脸识别系统及方法
CN111462126A (zh) * 2020-04-08 2020-07-28 武汉大学 一种基于边缘增强的语义图像分割方法及系统
CN112597941A (zh) * 2020-12-29 2021-04-02 北京邮电大学 一种人脸识别方法、装置及电子设备
CN113361495A (zh) * 2021-07-27 2021-09-07 平安科技(深圳)有限公司 人脸图像相似度的计算方法、装置、设备及存储介质

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115984949A (zh) * 2023-03-21 2023-04-18 威海职业学院(威海市技术学院) 一种带有注意力机制的低质量人脸图像识别方法及设备
CN116343301A (zh) * 2023-03-27 2023-06-27 滨州市沾化区退役军人服务中心 基于人脸识别的人员信息智能校验系统
CN116343301B (zh) * 2023-03-27 2024-03-08 滨州市沾化区退役军人服务中心 基于人脸识别的人员信息智能校验系统
CN117173854A (zh) * 2023-09-13 2023-12-05 西安博深安全科技股份有限公司 一种基于深度学习的煤矿明火预警方法及系统
CN117173854B (zh) * 2023-09-13 2024-04-05 西安博深安全科技股份有限公司 一种基于深度学习的煤矿明火预警方法及系统
CN117201874A (zh) * 2023-11-08 2023-12-08 北京远鉴信息技术有限公司 一种人脸图像替换方法、装置、电子设备及存储介质
CN117201874B (zh) * 2023-11-08 2024-01-23 北京远鉴信息技术有限公司 一种人脸图像替换方法、装置、电子设备及存储介质
CN117240607A (zh) * 2023-11-10 2023-12-15 北京云尚汇信息技术有限责任公司 一种基于安全计算机的安全认证方法
CN117240607B (zh) * 2023-11-10 2024-02-13 北京云尚汇信息技术有限责任公司 一种基于安全计算机的安全认证方法

Also Published As

Publication number Publication date
CN113361495B (zh) 2024-04-09
CN113361495A (zh) 2021-09-07

Similar Documents

Publication Publication Date Title
WO2023005161A1 (zh) 人脸图像相似度的计算方法、装置、设备及存储介质
US11651229B2 (en) Methods and systems for face recognition
US10503981B2 (en) Method and apparatus for determining similarity of objects in images
US9898686B2 (en) Object re-identification using self-dissimilarity
CN108520226B (zh) 一种基于躯体分解和显著性检测的行人重识别方法
US7929771B2 (en) Apparatus and method for detecting a face
CN105550657B (zh) 基于关键点的改进sift人脸特征提取方法
CN108921119B (zh) 一种障碍物实时检测和分类方法
US20050094854A1 (en) Face detection method and apparatus and security system employing the same
CN112949572A (zh) 基于Slim-YOLOv3的口罩佩戴情况检测方法
KR20220056707A (ko) 얼굴의 정렬 형태에 강인한 얼굴 인식 방법 및 그 장치
Galiyawala et al. Person retrieval in surveillance videos using deep soft biometrics
JP2018041273A (ja) 画像認識装置、画像認識装置の制御方法およびプログラム
JP6808783B2 (ja) 人工ニューラルネットワークを用いた画像処理
Sharma et al. Face recognition using face alignment and PCA techniques: a literature survey
Ahmad et al. Resource efficient mountainous skyline extraction using shallow learning
Thomas et al. Real Time Face Mask Detection and Recognition using Python
KhabiriKhatiri et al. Road Traffic Sign Detection and Recognition using Adaptive Color Segmentation and Deep Learning
Dehghani et al. Face detection speed improvement using bitmap-based Histogram of Oriented gradien
CN107122745B (zh) 一种识别视频中人物轨迹的方法及装置
Naji et al. Detecting faces in colored images using multi-skin color models and neural network with texture analysis
Pande et al. Parallel processing for multi face detection and recognition
Hbali et al. Object detection based on HOG features: Faces and dual-eyes augmented reality
Fujita A Fast-RCNN implementation for human silhouette detection in video sequences
Ayush Kumar et al. Vehicle Detection from Aerial Imagery Using Principal Component Analysis and Deep Learning

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE