Face recognition method, face recognition device and processing-in-memory computing system
The processing-in-memory computing system addresses the high energy consumption of conventional face recognition systems by integrating detection and recognition models, achieving efficient and real-time face detection and recognition in edge devices.
Patent Information
- Application Number
- US19/488666
- Authority / Receiving Office
- US · United States
- Patent Type
- Applications(United States)
- Current Assignee / Owner
- Priority Date
- 2023-05-31
- Filing Date
- 2024-04-17
- Publication Date
- 2026-12-03
AI Technical Summary
Conventional chip computing architectures for face recognition suffer from high energy consumption and cost due to the memory wall problem, where frequent data transmission between computing cores and memory is required, making it inefficient for edge devices with limited computing power.
A face recognition method utilizing a processing-in-memory computing system that integrates face detection and recognition models, performing computations directly on memory to reduce energy consumption and enable real-time face detection and recognition.
The method achieves low-power face recognition by integrating face detection and recognition models within a processing-in-memory computing system, enabling real-time face detection and recognition in devices with limited energy resources.
Smart Images

Figure US20260388317A1-D00000_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of computer technology, in particular to a face recognition method, a face recognition device, a processing-in-memory computing system, an electronic apparatus, and a computer-readable storage medium.BACKGROUND
[0002] Face recognition is a biometric technology for identifying an identity based on facial feature information of a person. A series of related technologies, also called portrait recognition and face recognition, are to capture an image or video stream containing a human face by a camera or a video camera, automatically detect and track the human face in the image or the video stream, and further perform the face recognition on the detected human face. With the rise of the fields of target monitoring, target tracking, human-computer interaction, pedestrian flow statistics and the like, the face recognition technology is more and more widely concerned.
[0003] With the development of artificial intelligence (AI) application, more and more cloud-based algorithms (such as face recognition algorithms) are gradually transferred to an edge side, and how to transfer the cloud-based algorithms with the high computing power and high energy consumption to the edge side with limited computing power has become a problem.
[0004] In the related art, a conventional chip computing architecture has a problem of memory wall, so that a large amount of energy is consumed in frequent transmission between a computing core and a memory during the operation of the algorithm, and the face recognition technology is generally implemented based on the conventional chip computing architecture. Therefore, the face recognition technology in the related art generally has the problems of high cost and high power consumption.SUMMARY
[0005] The present disclosure provides a face recognition method, a face recognition device, a processing-in-memory computing system, an electronic apparatus, and a computer-readable storage medium.
[0006] According to a first aspect of the present disclosure, the present disclosure provides a face recognition method, including:
[0007] acquiring an image to be processed;
[0008] inputting the image to be processed into a processing-in-memory computing chip configured with a face detection model, and performing a face detection processing on the image to be processed by using the preset face detection model to obtain an initial face detection frame in the image to be processed;
[0009] acquiring a target face image according to the initial face detection frame;
[0010] performing, in the processing-in-memory computing chip, a face recognition processing on the target face image by using a face recognition model pre-configured in the processing-in-memory computing chip to obtain a target face feature vector corresponding to the target face image; and
[0011] comparing the target face feature vector with a feature vector corresponding to a preset face image to obtain a face recognition result.
[0012] In some embodiments, the acquiring the target face image according to the initial face detection frame includes:
[0013] inputting the initial face detection frame into a programmable logic unit to perform a non-maximum suppression processing thereon, to obtain a target face detection frame;
[0014] inputting the target face detection frame into the processing-in-memory computing chip; and
[0015] mapping the target face detection frame to the image to be processed in the processing-in-memory computing chip to obtain a target face image on the image to be processed corresponding to the target face detection frame.
[0016] In some embodiments, the face recognition method further includes: before the performing the non-maximum suppression processing,
[0017] screening out, in the programmable logic unit, a preset number of initial face detection frames from a plurality of initial face detection frames output by the face detection model according to confidence degrees of the plurality of initial face detection frames in a descending order of the confidence degrees; and
[0018] the inputting the initial face detection frame into a programmable logic unit to perform the non-maximum suppression processing, to obtain the target face detection frame includes:
[0019] inputting the preset number of initial face detection frames into the programmable logic unit to perform the non-maximum suppression processing thereon to obtain the target face detection frame.
[0020] In some embodiments, the acquiring the image to be processed includes:
[0021] acquiring a raw image;
[0022] performing an image decoding and a moving object detection on the raw image; and
[0023] inputting, in response to the detection of occurrence of a moving object in the raw image, the raw image into the programmable logic unit to perform image preprocessing on the raw image, to obtain the image to be processed.
[0024] In some embodiments, the image preprocessing includes at least one of: an image scaling processing, an image cropping processing, an image format conversion processing and an image enhancement processing.
[0025] In some embodiments, the moving object detection includes a moving object detection performed on the raw image using a frame difference method.
[0026] In some embodiments, the comparing the target face feature vector with the preset face feature vector to obtain the face recognition result includes:
[0027] inputting the target face feature vector into the programmable logic unit for the programmable logic unit to execute the following processings:
[0028] performing a normalization processing on the target face feature vector to obtain a normalized target face feature vector;
[0029] comparing the normalized target face feature vector with a feature vector corresponding to a preset face image in a preset database to obtain a face feature matching degree; and
[0030] obtaining, in response to the face feature matching degree being greater than a preset threshold, the face recognition result indicating that the face matching is successful.
[0031] In some embodiments, the face detection model includes: a Backbone layer, a Neck layer and a Head layer;
[0032] the Backbone layer is configured to extract image features of the input image to be processed;
[0033] the Neck layer is configured to reduce a dimension of image features from the Backbone layer or adjusting the image features; and
[0034] the Head layer is configured to be input with the features obtained through the processing of the Neck layer to generate a final network output, to obtain the initial face detection frame.
[0035] In some embodiments, the face recognition model is trained by a knowledge distillation method.
[0036] According to a second aspect of the present disclosure, the present disclosure provides a face recognition device, including:
[0037] an acquisition module configured to acquire an image to be processed;
[0038] a detection module configured to input the image to be processed into a processing-in-memory computing chip configured with a face detection model, and perform a face detection processing on the image to be processed by using the face detection model to obtain an initial face detection frame in the image to be processed;
[0039] a processing module configured to acquire a target face image according to the initial face detection frame;
[0040] a recognition module configured to perform a face recognition processing on the target face image by a face recognition model pre-configured in the processing-in-memory computing chip in the processing-in-memory computing chip to obtain a target face feature vector corresponding to the target face image; and
[0041] a comparison module configured to compare the target face feature vector with a feature vector corresponding to a preset face image to obtain a face recognition result.
[0042] According to a third aspect of the present disclosure, the present disclosure provides a processing-in-memory computing system, including:
[0043] a processing-in-memory computing chip integrated with a face detection model, and configured to perform a face detection processing on an image to be processed by using the face detection model to obtain an initial face detection frame in the image to be processed, and transmit the initial face detection frame to a programmable logic terminal; and
[0044] the programmable logic terminal configured to acquire a target face image according to the initial face detection frame and transmit the target face image to the processing-in-memory computing chip;
[0045] wherein the processing-in-memory computing chip is further integrated with a face recognition model, and is further configured to perform face recognition processing on the target face image by the face recognition model to obtain a target face feature vector corresponding to the target face image and transmit the target face feature vector to the programmable logic terminal; and
[0046] the programmable logic terminal is further configured to compare the target face feature vector with a feature vector corresponding to a preset face image to obtain a face recognition result.
[0047] In some embodiments, the programmable logic terminal is configured to:
[0048] perform a non-maximum suppression processing on initial face detection frames to obtain a target face detection frame; and
[0049] map the target face detection frame to the image to be processed to obtain the target face image on the image to be processed corresponding to the target face detection frame.
[0050] In some embodiments, the processing-in-memory computing system further includes: a processing system terminal in a field programmable gate array device;
[0051] wherein the processing system terminal is configured to: acquire a raw image from a camera device; perform an image decoding and a moving object detection on the raw image; and transmit the raw image to the programmable logic terminal in a case of detecting that a moving object appears in the raw image; and
[0052] the programmable logic terminal is further configured to perform image preprocessing on the raw image, in a case that it is detected by the processing system terminal that a moving object appears in the raw image, to obtain the image to be processed, and transmit the image to be processed to the processing-in-memory computing chip.
[0053] In some embodiments, the programmable logic terminal is configured to:
[0054] perform a normalization processing on the target face feature vector to obtain a normalized target face feature vector;
[0055] compare the normalized target face feature vector with a feature vector corresponding to a preset face image in a preset database to obtain a face feature matching degree; and
[0056] obtain the face recognition result indicating that the face matching is successful in a case of the face feature matching degree being greater than a preset threshold.
[0057] According to a fourth aspect of the present disclosure, the present disclosure provides an electronic apparatus, including the processing-in-memory computing system.
[0058] According to a fifth aspect of the present disclosure, the present disclosure provides an electronic apparatus, including:
[0059] at least one processor; and
[0060] a memory communicatively connected to the at least one processor; wherein
[0061] the memory stores one or more computer programs executable by the at least one processor, the one or more computer programs being executable by the at least one processor to cause the at least one processor to perform the face recognition method.
[0062] According to a sixth aspect of the present disclosure, the present disclosure provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the face recognition method.BRIEF DESCRIPTION OF DRAWINGS
[0063] The accompanying drawings, which are provided for further understanding of the present disclosure and constitute a part of this specification, are for explaining the present disclosure together with the embodiments of the present disclosure, but are not intended to limit the present disclosure. The above and other features and advantages will become more apparent to one of ordinary skill in the art by describing in detail exemplary embodiments with reference to the drawings. In the drawings:
[0064] FIG. 1 is a schematic flowchart of a face recognition method according to an embodiment of the present disclosure.
[0065] FIG. 2 is a schematic diagram of a model architecture of a face detection model according to an embodiment of the present disclosure.
[0066] FIG. 3 is a schematic flowchart of a method for acquiring a target face image according to an embodiment of the present disclosure.
[0067] FIG. 4 is a schematic flowchart of a method for acquiring an image to be processed according to an embodiment of the present disclosure.
[0068] FIG. 5 is a schematic diagram of a model architecture of a face recognition model according to an embodiment of the present disclosure.
[0069] FIG. 6 is a schematic flowchart of a method for acquiring a face recognition result according to an embodiment of the present disclosure.
[0070] FIG. 7 is a schematic diagram of a structure of a face recognition device according to an embodiment of the present disclosure.
[0071] FIG. 8 is a schematic diagram of a structure of a processing-in-memory computing system according to an embodiment of the present disclosure.
[0072] FIG. 9 is a schematic diagram of an application scenario of a processing-in-memory computing system according to an embodiment of the present disclosure.
[0073] FIG. 10 is a block diagram of an electronic apparatus according to an embodiment ofDETAIL DESCRIPTION OF EMBODIMENTS
[0074] In order to enable one of ordinary skill in the art to better understand the technical solutions of the present disclosure, the exemplary embodiments of the present disclosure, including various details of the embodiments of the present disclosure, will be described below with reference to the accompanying drawings, to assist understanding, and should be considered as being merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein may be made without departing from the scope and spirit of the present disclosure. Also, the description of the well-known function and structure is omitted in the following description for clarity and conciseness.
[0075] Embodiments of the present disclosure and features of the embodiments may be combined with each other without conflict.
[0076] As used herein, the term “and / or” includes any and all combinations of one or more of the associated listed items.
[0077] The terms used herein are for the purpose of describing particular embodiments only and are not intended to limit the present disclosure. As used herein, the singular forms “a”, “an” and “the” are intended to include a plural form as well, unless the context clearly indicates otherwise. It should be further understood that, the terms of “including / includes” and / or “comprising / comprise”, when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. The term “connected / connecting”, “coupled / coupling”, or the like is not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect connections.
[0078] Unless otherwise defined, all terms (including technical and scientific terms) used herein shall have the ordinary meaning as understood by one of ordinary skill in the art. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having meanings consistent with their meanings in the context of the related art and the present disclosure, and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
[0079] FIG. 1 is a schematic flowchart of a face recognition method according to an embodiment of the present disclosure. As shown in FIG. 1, the face recognition method includes step S10 to step S14.
[0080] In the step S10, an image to be processed is acquired.
[0081] In the step S11, the image to be processed is input into a processing-in-memory computing chip configured with a face detection model, and a face detection processing is performed on the image to be processed by using the preset face detection model to obtain an initial face detection frame in the image to be processed.
[0082] In the step S12, a target face image is acquired according to the initial face detection frame.
[0083] In the step S13, a face recognition processing is performed on the target face image by a face recognition model pre-configured in the processing-in-memory computing chip in the processing-in-memory computing chip to obtain a target face feature vector corresponding to the target face image.
[0084] In the step S14, the target face feature vector is compared with a feature vector corresponding to a preset face image to obtain a face recognition result.
[0085] According to the face recognition method provided by the embodiment of the present disclosure, the face detection and recognition is performed by using the processing-in-memory computing chip with the low power consumption integrated with the lightweight face detection model and the face recognition model, so that the real-time face detection and recognition can be realized with the lower energy consumption, which can be applied to a device with the low energy consumption such as an unmanned aerial vehicle, an ink tablet or a wearable device or the like, to realize functions of awakening and unlocking the device.
[0086] In step S11, in the embodiment of the present disclosure, the image to be processed is input into the face detection model pre-configured in the processing-in-memory computing chip to perform the face detection processing to obtain the initial face detection frame in the image to be processed, where the initial face detection frame may be used to represent position coordinate information of a face in the image obtained by a model prediction.
[0087] In the embodiment of the present disclosure, the input of the face detection model is the image to be processed, a pixel size of the image to be processed is a preset pixel size, and an image format of the image to be processed is a preset image format. For example, the pixel size of the image to be processed is 320×240, the image format of the image to be processed is an RGB format, the image to be processed is input into the face detection model, and an original result of the face detection is output through the a neural network inference calculation of the face detection model, and the original result of the face detection includes the initial face detection frame.
[0088] FIG. 2 is a schematic diagram of a model architecture of a face detection model according to an embodiment of the present disclosure. In order to implement a lightweight model design, the number of network channels and the number of network layers of the face detection model are set to be relative values. In some embodiments, as shown in FIG. 2, the face detection model includes three parts, which are a feature extraction layer, a feature processing layer, and a prediction output layer, respectively, where the feature extraction layer is a Backbone layer, the feature processing layer is a Neck layer, and the prediction output layer is a Head layer.
[0089] The feature extraction layer, that is, the Backbone layer, is a backbone network of the model and is configured to extract image features of the input image to be processed so as to facilitate subsequent processing and analysis. The Backbone layer is composed of an input layer input, a convolutional layer (Conv2d), a batch normalization layer (BatchNorm), a nonlinear activation function layer (ReLU6), four network modules (Block), and three attention mechanism network modules (Block_SE), where the number of channels of a first convolutional layer (Conv2d) in the model is set to 16, N=1, N represents the number of network modules Block of the model, and N may be adjusted according to the computing power of the processing-in-memory computing chip.
[0090] As shown in the right of FIG. 2, the network block (Block) includes three units each consisting of the convolutional layer (Conv2d), the batch normalization layer (BatchNorm) and the nonlinear activation function layer (ReLU6); the attention mechanism network module (Block_SE) includes one network module (Block) and one attention mechanism module (Squeeze-and-Excitation, SE), a feature map is short-circuited with the attention mechanism module after passing through the network module (Block), and the attention mechanism module (SE) includes a pooling layer (AveragePooling) and two units each consisting of the convolution layer (Conv2d), the batch normalization layer (BatchNorm) and the nonlinear activation function layer (ReLU6).
[0091] A feature processing layer, that is, the Neck layer, is an intermediate layer for connecting the Backbone layer with the Head layer, and the Neck layer mainly has functions of reducing a dimension of image features from the Backbone layer or adjusting the image features, and improving the diversity and robustness of the features so as to better adapt to the task requirements. In the Neck layer, a feature map obtained through processing by a seventh module in seven modules of the Backbone layer is processed through convolution (Conv2d) to obtain a first feature map Feature 1; the first feature map Feature 1, after being performed an Upsample processing thereon, is added to a feature map obtained through processing by a fifth module of the seven modules of the Backbone layer, to obtain a result, and the result is processed through convolution (Conv2d) to obtain a second feature map Feature2; the second feature map Feature2, after being performed an Upsample processing thereon, is added to a feature map obtained through processing by a third module of the seven modules of the Backbone layer, to obtain a result, and the result is processed through convolution (Conv2d) to obtain a third feature map Feature3; and the first feature map Feature1, the second feature map Feature2, and the third feature map Feature3 are processed through corresponding convolution (Conv2d), respectively, and then input to the Head layer.
[0092] A prediction output layer, that is, the Head layer, is the last layer of the model, which is a detection head for the face detection, and is usually a classifier or a regressor, which is configured to generate a final network output by being input with the features obtained through the processing of the Neck layer, so as to obtain the initial face detection frame. In the Head layer, the first feature map Featurel, the second feature map Feature2, and the third feature map Feature3 are processed through convolution (Conv2d), respectively, then are processed through superposition fusion (Concat), and then convolution (Conv2d) and dimension conversion (permute, view), so that three feature map vectors, which are respectively a first feature map vector, a second feature map vector and a third feature map vector, are output through a softmax layer.
[0093] The first feature map vector represents the initial face detection frame and corresponding position coordinates of the initial face detection frame, the second feature map vector represents the initial face detection frame and corresponding face key point coordinates of the initial face detection frame, and the third feature map vector represents the initial face detection frame and corresponding confidence degree of the initial face detection frame. For example, the first feature map vector, the second feature map vector and the third feature map vector are data with lengths of 3160×4, 3160×10 and 3160×2, respectively, where 3160 represents 3160 initial face detection frames, 4 represents coordinate dimensions (x, y, w, h) of each initial face detection frame, 10 represents position coordinates (5×(x, y)) of 5 face key points corresponding to each initial face detection frame, the face key points include two eyes, a nose and two mouth corners of a face, and 2 represents the confidence degree, there are 16 (that is, 4+10+2=16) dimension information in total.
[0094] In the embodiment of the present disclosure, main computing resources of the computing of the neural network of the model are all consumed in the in multiplication and addition operations, and the processing-in-memory (PIM) chip is suitable for the computing of the neural network, so that the process of repeatedly copying data in the computing process can be greatly reduced.
[0095] FIG. 3 is a schematic flowchart of a method for acquiring a target face image according to an embodiment of the present disclosure. In some embodiments, as shown in FIG. 3, the step S12 of acquiring the target face image according to the initial face detection frame may further include steps S31 to S33.
[0096] In the step S31, the initial face detection frame is input into a programmable logic unit to perform a non-maximum suppression processing thereon, to obtain a target face detection frame.
[0097] The non-maximum suppression processing is performed, by adopting a non-maximum suppression (NMS) algorithm, on the initial face detection frame obtained and selected by the face detection to obtain the target face detection frame.
[0098] The non-maximum suppression (NMS) algorithm is an algorithm that searches for a local maximum and suppresses non-maximum elements.
[0099] In the process of face detection inference, the plurality of initial face detection frames (such as A, B, C, D, E, F, etc.) are generated, where many initial face detection frames detect a same target face, but only one target face detection frame is needed for each target face finally, the initial face detection frame with the highest score may be selected by the NMS algorithm, the initial face detection frame with the highest score is assumed as the initial face detection frame C, and then a corresponding IOU (Intersection over Union) value between the initial face detection frame C and another initial face detection frame is calculated, where the IOU value is an evaluation index of target detection. When the IOU value exceeds a set threshold, the initial face detection frame with the IOU Value exceeding the threshold is suppressed, specifically, a score of the initial face detection frame with the IOU value exceeding the threshold is set to 0, after one round, another initial face detection frame with the highest score is continuously searched in the remaining initial face detection frames, and then other initial face detection frame with an IOU value between the another initial face detection frame with the highest score and the other initial face detection frame exceeding the threshold is suppressed, until the initial face detection frame almost not being overlapped by any other initial face detection frame is finally left, in such way, the target face detection frame corresponding to each target face is obtained.
[0100] In some embodiments, the face recognition method further includes: after the initial face detection frame is input into the programmable logic unit, and before the non-maximum suppression processing is performed,
[0101] a preset number of initial face detection frames is screened out from the plurality of initial face detection frames output by the face detection model according to the confidence degrees of the plurality of initial face detection frames in a descending order of the confidence degrees in the programmable logic unit.
[0102] For example, the number of the initial face detection frames output by the face detection model is 3160, the preset number is 100, and after the initial face detection frames are sorted according to the confidence degrees of the initial face detection frames, the initial face detection frames corresponding to the first 100 confidence degrees in the confidence degree sorting are selected for the next processing.
[0103] Further, the inputting the initial face detection frame into the programmable logic unit to perform the non-maximum suppression processing thereon, to obtain the target face detection frame, includes: inputting the preset number of initial face detection frames into the programmable logic unit to perform the non-maximum suppression processing thereon to obtain the target face detection frame.
[0104] In the step S32, the target face detection frame is input into the processing-in-memory computing chip.
[0105] In the step S33, the target face detection frame is mapped to the image to be processed in the processing-in-memory computing chip to obtain a target face image on the image to be processed corresponding to the target face detection frame.
[0106] The detected target face detection frame is mapped to the corresponding position coordinates on the image to be processed according to the position coordinates of the detected target face detection frame, a cropping processing is performed on the image to be processed to obtain the target face image corresponding to the target face detection frame, the cropped image is zoomed to a preset pixel size, for example, a pixel size of 112×112, and affine transformation is performed on the cropped image according to the face key point coordinates (such as the eyes, the nose, and the mouth corners) obtained by face detection to correct the target face image.
[0107] FIG. 4 is a schematic flowchart of a method for acquiring an image to be processed according to an embodiment of the present disclosure. In some embodiments, as shown in FIG. 4, the step S10 of acquiring the image to be processed includes steps S41 to S43.
[0108] In the step S41, a raw image is acquired.
[0109] In some embodiments, a processing system controls a camera device to capture a raw image, and receives the captured raw image transmitted by the camera device. In some embodiments, the raw image captured and transmitted by the camera device at regular intervals is received.
[0110] In the step S42, an image decoding and a moving object detection are performed on the raw image.
[0111] After the raw image is obtained, the image decoding is performed on the raw image in the processing system, and the moving object detection is performed on the decoded raw image.
[0112] In some embodiments, the moving object detection is performed on the raw image through a frame difference method, whether pixel values of any two corresponding pixels in a frame image and a subsequent frame image are consistent or not is determined, and if the number of pixels with inconsistent values is greater than a preset threshold, it is considered that the moving object appears in the raw image.
[0113] In the step S43, the raw image is input into the programmable logic unit to perform image preprocessing on the raw image in response to the detection of appearance of the moving object in the raw image, so as to obtain the image to be processed.
[0114] The face detection model has requirements on input, so after the raw image is obtained, before the image is input into the face detection model for face detection, it is necessary to perform the image preprocessing on the raw image, to obtain the image to be processed which meets the requirements of the face detection model on input.
[0115] In some embodiments, the image preprocessing includes at least one of: image scaling processing, image format conversion processing and image enhancement processing.
[0116] The image scaling processing refers to down-sampling the image to a size of preset pixels, for example, a size of 320×240 pixels. For example, values of some pixels in the raw image are directly taken as values of pixels of the scaled image, thereby improving the processing efficiency. The image format conversion processing refers to converting an image format of an image into a preset image format, for example, the model requires that the image format of the input image is an RGB format, if the raw image is in the RGB format, the format conversion is not needed, and if the raw image is in the YUV format, the format conversion is needed. The image enhancement processing may be histogram equalization of the image to prevent the image from being too bright or too dark.
[0117] In the step S13, in the embodiment of the present disclosure, the acquired target face image is input into the face recognition model configured in advance in the processing-in-memory computing chip, so that the face recognition processing is performed on the target face image by using the face recognition model in the processing-in-memory computing chip, thereby obtaining the target face feature vector corresponding to the target face image. The target face feature vector may have 256 dimensions.
[0118] FIG. 5 is a schematic diagram of a model architecture of a face recognition model according to an embodiment of the present disclosure. In some embodiments, as shown in FIG. 5, since the computing power of the processing-in-memory computing chip is limited, the face recognition model is designed according to a small model structure during the model design, where the network input of the model may be color images of 64×64 in 3 channels, and in order to achieve a lightweight model design, both the number of network channels and the number of network layers of the face recognition model are set to be relatively small values. In some embodiments, as shown in FIG. 5, the face recognition model includes: a first network unit composed of a convolution layer (Conv2d), a batch normalization layer (BatchNorm), and a nonlinear activation function layer (ReLU6); four network modules (Block); three attention mechanism network modules (Block_SE); a second network unit composed of a convolution layer (Conv2d), a batch normalization layer (BatchNorm), and a nonlinear activation function layer (ReLU6); a pooling layer (AveragePooling); and a fully connected layer composed of a first linear layer (Linear), a batch normalization layer (BatchNorm), a nonlinear activation function layer (ReLU6) and a second linear layer (Linear). The number of channels of the first convolution layer (Conv2d) of the model is set to 16, N=1, N is the number of network modules block of the model, and may be adjusted according to the computing power of the processing-in-memory computing chip.
[0119] The network block (Block) includes three units each consisting of the convolutional layer (Conv2d), the batch normalization layer (BatchNorm) and the nonlinear activation function layer (ReLU6); the attention mechanism network module (Block_SE) includes one network module (Block) and one attention mechanism module (Squeeze-and-Excitation, SE), a feature map is short-circuited with the attention mechanism module after passing through the network module (Block), and the attention mechanism module (SE) includes a pooling layer (AveragePooling) and two units each consisting of the convolution layer (Conv2d), the batch normalization layer (BatchNorm) and the nonlinear activation function layer (ReLU6).
[0120] In order to improve the expression capability of the model on the face features, the model inference calculation capability of the model is improved by adopting a knowledge distillation method in the training process, the face recognition model to be learned and trained is used as a student model (Student), the number of network channels and the number of network layers of the face recognition model are increased, and a model with the greater number of network channels and the greater number of network layers with respect to the face recognition model is obtained and used as a teacher model (Teacher). For example, the number of network channels of the first convolutional layer in the student model is set to be 16, N=1, the number of network channels of the first convolutional layer in the teacher model is set to be 64, and N=4.
[0121] The teacher model is a face recognition model trained by using a training data set in advance, the student model is a face recognition model to be trained, and the knowledge distillation refers to transferring dark knowledge in the teacher model (Teacher) to the student model (Student). The expression capability of the student model may approach or exceed the teacher model as much as possible through the knowledge distillation, so that the effect of network prediction (output) of the teacher model with high complexity is achieved by using the student model with low complexity, network parameters are simplified, and the network precision is guaranteed.
[0122] FIG. 6 is a schematic flowchart of a method for acquiring a face recognition result according to an embodiment of the present disclosure. In some embodiments, as shown in FIG. 6, the step S14 of comparing the target face feature vector with the feature vector corresponding to the preset face image to obtain the face recognition result includes: inputting the target face feature vector into the programmable logic unit so that the programmable logic unit may execute steps S61 to S63.
[0123] In the step S61, performing normalization processing on the target face feature vector to obtain a normalized target face feature vector.
[0124] The normalization processing is to subtract a mean value of the target face feature vector from the target face feature vector, to obtain a result, and divide the result by a variance of the target face feature vector.
[0125] In the step S62, comparing the normalized target face feature vector with a feature vector corresponding to a preset face image in a preset database to obtain a face feature matching degree.
[0126] The feature vector corresponding to the preset face image is the feature vector obtained by performing face recognition on the preset face image by using the face recognition model to obtain the face feature vector and then performing normalization processing on the obtained face feature vector.
[0127] In some embodiments, the face feature matching degree may be obtained by calculating a similarity between two feature vectors, where the similarity between the two feature vectors may be calculated by using a preset vector similarity algorithm, such as an euclidean distance similarity algorithm, a cosine similarity algorithm, or the like.
[0128] In the step S63, obtaining, when the face feature matching degree is greater than a preset threshold, the face recognition result indicating that the face matching is successful.
[0129] When the face feature matching degree is greater than the preset threshold, it is indicated that a face image which is similar to the target face image exists in face images represented by a preset face feature vector of the preset database, that is, the target face image is matched in the preset database, thereby obtaining the face recognition result indicating that the face matching is successful.
[0130] When the face feature matching degree is smaller than or equal to the preset threshold, it is indicated that the face images represented by the preset face feature vector of the preset database are not similar to the target face image, that is, the target face image cannot be matched in the preset database, thereby obtaining the face recognition result indicating that the face matching is unsuccessful.
[0131] In some embodiments, the normalized target face feature vector may be compared with a plurality of preset face feature vectors in the preset database one by one to obtain a plurality of face feature matching degrees, a maximum face feature matching degree is obtained from the plurality of face feature matching degrees, and the maximum face feature matching degree is compared with the preset threshold, so as to determine whether the target face image matches with the face images in the preset database.
[0132] In some embodiments, the preset database is established by firstly obtaining the plurality of preset face images and guiding to label identity information of the plurality of preset face images, extracting face feature vectors of the plurality of preset face images by using the face recognition model, performing normalization processing on the face feature vectors to obtain a normalized face feature vectors corresponding to each preset face image, and storing the normalized face feature vectors in the preset database.
[0133] It is understood that the above embodiments of the method of the present disclosure may be combined with each other to form a combined embodiment without departing from the principle logic. Due to space limitation, the detailed description thereof is omitted in the present disclosure. One of ordinary skill in the art will appreciate that in the above method of the specific embodiments, the specific order of execution of the steps should be determined based on functions and possibly inherent logic of the method.
[0134] FIG. 7 is a schematic diagram of a structure of a face recognition device according to an embodiment of the present disclosure. As shown in FIG. 7, the face recognition device 700 includes: an acquisition module 701, a detection module 702, a processing module 703, a recognition module 704 and a comparison module 705.
[0135] The acquisition module 701 is configured to acquire an image to be processed. The detection module 702 is configured to input the image to be processed into a processing-in-memory computing chip configured with a face detection model, and perform a face detection processing on the image to be processed by using the face detection model to obtain an initial face detection frame in the image to be processed. The processing module 703 is configured to acquire a target face image according to the initial face detection frame. The recognition module 704 is configured to perform a face recognition processing on the target face image by a face recognition model pre-configured in the processing-in-memory computing chip in the processing-in-memory computing chip to obtain a target face feature vector corresponding to the target face image. The comparison module 705 is configured to compare the target face feature vector with a feature vector corresponding to a preset face image to obtain a face recognition result.
[0136] The face recognition device 700 provided in the embodiment of the present disclosure is configured to implement the face recognition method provided in any one of the embodiments, and for specific relevant description, reference may be made to the description in the face recognition method in any one of the embodiments, and details thereof are not repeated here.
[0137] FIG. 8 is a schematic diagram of a structure of a processing-in-memory computing system according to an embodiment of the present disclosure. As shown in FIG. 8, the processing-in-memory computing system 800 includes: a processing-in-memory computing chip 801 and a PL (programmable logic) terminal 802.
[0138] The processing-in-memory computing chip 801 is integrated with a face detection model, and is configured to perform a face detection processing on an image to be processed by using the face detection model to obtain an initial face detection frame in the image to be processed, and transmit the initial face detection frame to the PL terminal 802. The PL terminal 802 is disposed in an FPGA (field programmable gate array) device, is configured to acquire a target face image according to the initial face detection frame and transmit the target face image to the processing-in-memory computing chip 801. The processing-in-memory computing chip 801 is further integrated with a face recognition model, and is further configured to perform a face recognition processing on the target face image by the face recognition model to obtain a target face feature vector corresponding to the target face image and transmit the target face feature vector to the PL terminal 802. The PL terminal 802 is further configured to compare the target face feature vector with a feature vector corresponding to a preset face image to obtain a face recognition result.
[0139] In some embodiments, the PL terminal 802 is configured to: perform a non-maximum suppression processing on the initial face detection frame to obtain a target face detection frame; and map the target face detection frame to the image to be processed to obtain the target face image on the image to be processed corresponding to the target face detection frame.
[0140] In some embodiments, as shown in FIG. 8, the processing-in-memory computing system 800 further includes: a PS (processing system) terminal 803 disposed in the FPGA device. The PS terminal 803 is configured to acquire the image to be processed, where the acquiring the image to be processed includes: acquiring an raw image from a camera device; performing image decoding and moving object detection on the raw image; and transmitting the raw image to the PL terminal 802 when it is detected that a moving object appears in the raw image. The PL terminal 802 is further configured to perform an image preprocessing on the raw image, in response that it is detected by the PS terminal 803 that a moving object appears in the raw image, to obtain the image to be processed, and transmit the image to be processed to the processing-in-memory computing chip 801.
[0141] In some embodiments, a linux operating system may be deployed in the FPGA device as the processing system (the PS terminal), so as to implement control and scheduling of hardware resources, and implement some algorithms (such as a motion detection algorithm, etc.) with strong versatility and low performance requirements based on the operating system.
[0142] In some embodiments, the PL terminal 802 is configured to: perform a normalization processing on the target face feature vectors to obtain a normalized target face feature vector; compare the normalized target face feature vector with a feature vector corresponding to a preset face image in a preset database to obtain a face feature matching degree; and obtain the face recognition result indicating that the face matching is successful when the face feature matching degree is greater than a preset threshold.
[0143] FIG. 9 is a schematic diagram of an application scenario of a processing-in-memory computing system according to an embodiment of the present disclosure. As shown in FIG. 9, in some application scenarios, the processing-in-memory computing system 900 may be applied to a terminal device 905, and the processing system (the PS terminal) 903 in the processing-in-memory computing system 900 may serve as a device control terminal, perform information interaction with a camera device 904 and the terminal device 905, for example, control the camera device 904 to capture images, and transmit the face detection result and the face recognition result to the terminal device 905.
[0144] In some application scenarios, as shown in FIG. 9, the camera device 904 transmits the captured raw image to the processing system 903, and the processing system 903 performs an image signal decoding and a moving object detection to activate a programmable logic unit (the PL terminal) 902; when a moving object is detected by the processing system 903, the processing system 903 transmits the image to the programmable logic unit (the PL terminal) 902 for image preprocessing; the programmable logic unit (the PL terminal) 902 may keep a normally open and low computing power operation mode in hardware, and after being activated, the programmable logic unit (the PL terminal) 902 transmits the image to be processed obtained by processing to the processing-in-memory computing chip 901 integrated with the face detection model and the face recognition model. After the processing-in-memory computing chip 901 performs face detection processing by using the face detection model, the processing-in-memory computing chip 901 transmits a feature map back to the programmable logic unit (the PL terminal) 902 for post-processing the feature map, to obtain the target face detection frame. A corresponding target face image is cropped from the image to be processed and is transmitted to the processing-in-memory computing chip 901; the processing-in-memory computing chip 901 computes the face feature vector of the target face image by using the face recognition model, and then transmits the face feature vector back to the programmable logic unit (PL terminal) 902 for face feature comparison to obtain the face recognition result; the programmable logic unit (PL terminal) 902 feeds back the face detection result and the face recognition result to the terminal device 905 through the processing system 903 for displaying the face detection result and the face recognition result in real time by the terminal device 905, or implementing other functions, such as awakening and unlocking the device, and the like.
[0145] In some embodiments, the processing-in-memory computing system 900 may be integrated into the terminal device 905, and further, the camera device 904 may also be integrated into the terminal device 905.
[0146] In some application scenarios, the terminal device 905 may be an ink tablet, an unmanned aerial vehicle, or a wearable device or other electronic apparatus with low power consumption, and the face detection and the face recognition are performed by the processing-in-memory computing system 900, to realize functions of awakening, displaying and unlocking the device.
[0147] In an application scenario of the unmanned aerial vehicle, the terminal device 905 may also perform the face detection and the face recognition by using the processing-in-memory computing system 900, so as to realize the functions of assisting in avoiding obstacles, avoiding pedestrians, pursuing suspects and the like.
[0148] In an application scenario of the wearable device, the wearable device may be, for example, a smart watch, intelligent glasses or the like. In an application scenario of the smart watch, the functions of unlocking the watch, awakening the watch for lightening screen and the like can be realized through the face recognition method provided by the embodiment of the present disclosure, when a single face is recognized and the face is a face of the owner, the screen is lightened for displaying notification message, and when a plurality of faces are recognized, the screen may not be lightened and the notification message may be hidden even if the face of the owner is recognized.
[0149] In an application scenario of the intelligent glasses, the face feature matching is realized locally, but the intelligent glasses have a limited storage, and a small data volume in the face feature database, so that the face features may be uploaded to the cloud by the device through networking, and the face features are searched and compared in the big database in the cloud.
[0150] In some embodiments, the terminal device 905 may alternatively be an electronic apparatus such as a smart phone, a computer, a tablet, a television, or the like.
[0151] The embodiment of the present disclosure further provides an electronic apparatus, which includes the processing-in-memory computing system provided in the above embodiments, and the processing-in-memory computing system may be integrated into the electronic apparatus, so as to implement the functions of face detection and face recognition.
[0152] FIG. 10 is a block diagram of an electronic apparatus according to an embodiment of the present disclosure.
[0153] Referring to FIG. 10, an embodiment of the present disclosure provides an electronic apparatus 1000, where the electronic apparatus 1000 includes: at least one processor 1001; at least one memory 1002, and one or more I / O interfaces 1003 coupled between the processor 1001 and the memory 1002; the memory 1002 stores one or more computer programs that may be executed by the at least one processor 1001, and the one or more computer programs are executed by the at least one processor 1001, so that the at least one processor 1001 may execute the above face recognition method.
[0154] An embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the above face recognition method. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.
[0155] An embodiment of the present disclosure further provides a computer program product, which includes a computer-readable code or a non-volatile computer-readable storage medium carrying the computer-readable code, and when the computer-readable code runs in a processor of an electronic apparatus, the processor in the electronic apparatus executes the above face recognition method.
[0156] One of ordinary skill in the art will appreciate that all or some of the steps in the method, systems, functional modules / units in the devices, disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components. For example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a Central Processing Unit (CPU), digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable storage medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium).
[0157] The term of “computer storage medium” includes volatile and nonvolatile, removable and non-removable medium implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules or other data, as is well known to one of ordinary skill in the art. The computer storage medium includes, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Erasable Programmable Read Only Memory (EPROM), Static Random Access Memory (SRAM), FLASH, or other memory technology, portable compact disc read-only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage; any other medium which may be used to store the desired information and which may be accessed by a computer. In addition, the communication medium typically includes computer readable program instructions, data structures, program modules or other data such as a carrier wave or a modulated data signal in other transport mechanism, and may include any information delivery medium, as is well known to one of ordinary skill in the art.
[0158] The computer-readable program instructions described herein may be downloaded from the computer-readable storage medium to respective computing / processing devices, or to an external computer or external storage device over 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, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage media in the respective computing / processing devices.
[0159] The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, or C++ or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the scenario related to the remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the remote computer may be connected to the external computer (for example, through the Internet using an Internet service provider). In some embodiments, the aspects of the present disclosure are implemented by personalizing an electronic circuit, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA), with the state information of the computer-readable program instructions, which may execute the computer-readable program instructions.
[0160] The computer program product described herein may be embodied in hardware, software, or a combination thereof. In an alternative embodiment, the computer program product is embodied as a computer storage medium, and in another alternative embodiment, embodied as a software product, such as a software development kit (SDK) or the like.
[0161] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or the block diagrams of the method, the device (system) and the computer program product according to embodiments of the present disclosure. It will be understood that each block of the flowchart and / or the block diagrams and the combinations of the blocks in the flowchart and / or the block diagrams may be implemented by the computer-readable program instructions.
[0162] These computer-readable program instructions may be provided to a processor of a general purpose computer, a special purpose computer, or other programmable data processing device to produce a machine, so that the instructions, which are executed by the processor of the computer or other programmable data processing device, create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or the block diagrams. These computer-readable program instructions may also be stored in the computer-readable storage medium, so that the computer, the programmable data processing device, and / or other device may operate in a particular manner, and therefore, the computer-readable medium storing the instructions includes a manufactured article including instructions which implement the various aspects of the functions / acts specified in one or more blocks of the flowchart and / or the block diagrams.
[0163] The computer-readable program instructions may also be loaded onto the computer, other programmable data processing device, or other device, so that a series of operational steps are performed on the computer, other programmable device or other device to produce a computer implemented process, and therefore, the instructions which are executed on the computer, other programmable data processing device or other device implement the functions / actions specified in one or more blocks of the flowchart and / or the block diagrams.
[0164] The flowchart and block diagrams in the drawings illustrate architectures, functions, and operations of possible implementations of a system, a method and a computer program product according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, program segment(s), or a portion of a code, which includes one or more executable instructions for implementing specified logical function(s). In some alternative implementations, functions noted in the blocks may occur out of the order noted in the drawings. For example, two blocks being successively connected may, in fact, be performed substantially concurrently, or the blocks may sometimes be performed in the reverse order, depending upon the function involved. It will also be noted that each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowchart, may be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.
[0165] The present disclosure has disclosed example embodiments, and although specific terms are employed, they are used and should be interpreted in a generic and descriptive sense only and not for purposes of limitation. In some instances, features, characteristics and / or elements described in connection with a particular embodiment may be used alone or in combination with features, characteristics and / or elements described in connection with other embodiments, unless expressly stated otherwise, as would be apparent to one of ordinary skill in the art. It will, therefore, be understood by one of ordinary skill in the art that various changes in form and details may be made therein without departing from the scope of the present disclosure as set forth in the appended claims.
Claims
1. A face recognition method, comprising:acquiring an image to be processed;inputting the image to be processed into a processing-in-memory computing chip configured with a face detection model, and performing a face detection processing on the image to be processed by using the preset face detection model to obtain an initial face detection frame in the image to be processed;acquiring a target face image according to the initial face detection frame;performing, in the processing-in-memory computing chip, a face recognition processing on the target face image by a face recognition model pre-configured in the processing-in-memory computing chip to obtain a target face feature vector corresponding to the target face image; andcomparing the target face feature vector with a feature vector corresponding to a preset face image to obtain a face recognition result.
2. The method of claim 1, wherein the acquiring the target face image according to the initial face detection frame comprises:inputting the initial face detection frame into a programmable logic unit to perform a non-maximum suppression processing thereon, to obtain a target face detection frame;inputting the target face detection frame into the processing-in-memory computing chip; andmapping the target face detection frame to the image to be processed in the processing-in-memory computing chip to obtain a target face image on the image to be processed corresponding to the target face detection frame.
3. The method of claim 2, further comprising: before the performing the non-maximum suppression processing, the face recognition method,screening out, in the programmable logic unit, a preset number of initial face detection frames from a plurality of initial face detection frames output by the face detection model according to confidence degrees of the plurality of initial face detection frames in a descending order of the confidence degrees; andthe inputting the initial face detection frame into a programmable logic unit to perform the non-maximum suppression processing, to obtain the target face detection frame comprises:inputting the preset number of initial face detection frames into the programmable logic unit to perform the non-maximum suppression processing thereon to obtain the target face detection frame.
4. The method of claim 1, wherein the acquiring the image to be processed comprises:acquiring a raw image;performing an image decoding and a moving object detection on the raw image; andinputting, in response to the detection of occurrence of a moving object in the raw image, the raw image into the programmable logic unit to perform an image preprocessing on the raw image, to obtain the image to be processed.
5. The method of claim 4, wherein the image preprocessing comprises at least one of: an image scaling processing, an image cropping processing, an image format conversion processing and an image enhancement processing.
6. The method of claim 4, wherein the moving object detection comprises a moving object detection performed on the raw image using a frame difference method.
7. The method of claim 1, wherein the comparing the target face feature vector with the preset face feature vector to obtain the face recognition result comprises:inputting the target face feature vector into the programmable logic unit for the programmable logic unit to execute the following processings:performing a normalization processing on the target face feature vector to obtain a normalized target face feature vector;comparing the normalized target face feature vector with a feature vector corresponding to a preset face image in a preset database to obtain a face feature matching degree; andobtaining, in response to the face feature matching degree being greater than a preset threshold, the face recognition result indicating that the face matching is successful.
8. The method of claim 1, wherein the face detection model comprises: a Backbone layer, a Neck layer and a Head layer;the Backbone layer is configured to extract image features of the input image to be processed;the Neck layer is configured to reduce a dimension of image features from the Backbone layer or adjusting the image features; andthe Head layer is configured to be input with the features obtained through the processing of the Neck layer to generate a final network output, to obtain the initial face detection frame.
9. The method of claim 1, wherein the face recognition model is trained by a knowledge distillation method.
10. A face recognition device, comprising:an acquisition module configured to acquire an image to be processed;a detection module configured to input the image to be processed into a processing-in-memory computing chip configured with a face detection model, and perform a face detection processing on the image to be processed by using the face detection model to obtain an initial face detection frame in the image to be processed;a processing module configured to acquire a target face image according to the initial face detection frame;a recognition module configured to perform a face recognition processing on the target face image by a face recognition model pre-configured in the processing-in-memory computing chip in the processing-in-memory computing chip to obtain a target face feature vector corresponding to the target face image; anda comparison module configured to compare the target face feature vector with a feature vector corresponding to a preset face image to obtain a face recognition result.
11. A processing-in-memory computing system, comprising:a processing-in-memory computing chip integrated with a face detection model, and configured to perform a face detection processing on an image to be processed by using the face detection model to obtain an initial face detection frame in the image to be processed, and transmit the initial face detection frame to a programmable logic terminal; andthe programmable logic terminal configured to acquire a target face image according to the initial face detection frame and transmit the target face image to the processing-in-memory computing chip;wherein the processing-in-memory computing chip is further integrated with a face recognition model, and is further configured to perform a face recognition processing on the target face image by using the face recognition model to obtain a target face feature vector corresponding to the target face image and transmit the target face feature vector to the programmable logic terminal; andthe programmable logic terminal is further configured to compare the target face feature vector with a feature vector corresponding to a preset face image to obtain a face recognition result.
12. The processing-in-memory computing system of claim 11, wherein the programmable logic terminal is configured to:perform a non-maximum suppression processing on initial face detection frames to obtain a target face detection frame; andmap the target face detection frame to the image to be processed to obtain the target face image on the image to be processed corresponding to the target face detection frame.
13. The processing-in-memory computing system of claim 11, further comprising: a processing system terminal in a field programmable gate array device;wherein the processing system terminal is configured to: acquire a raw image from a camera device; perform an image decoding and a moving object detection on the raw image; and transmit the raw image to the programmable logic terminal in a case of detecting that a moving object appears in the raw image; andthe programmable logic terminal is further configured to perform an image preprocessing on the raw image, in a case that it is detected by the processing system terminal that a moving object appears in the raw image, to obtain the image to be processed, and transmit the image to be processed to the processing-in-memory computing chip.
14. The processing-in-memory computing system of claim 11, wherein the programmable logic terminal is configured to:perform a normalization processing on the target face feature vector to obtain a normalized target face feature vector;compare the normalized target face feature vector with a feature vector corresponding to a preset face image in a preset database to obtain a face feature matching degree; andobtain the face recognition result indicating that the face matching is successful in a case of the face feature matching degree being greater than a preset threshold.
15. An electronic apparatus, comprising the processing-in-memory computing system of claim 11.
16. An electronic apparatus, comprising:at least one processor; anda memory communicatively connected to the at least one processor; whereinthe memory stores one or more computer programs executable by the at least one processor, the one or more computer programs being executable by the at least one processor to cause the at least one processor to perform the face recognition method of claim 1.
17. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, implements the method of any one of claim 1.
18. An electronic apparatus, comprising:at least one processor; anda memory communicatively connected to the at least one processor; whereinthe memory stores one or more computer programs executable by the at least one processor, the one or more computer programs being executable by the at least one processor to cause the at least one processor to perform the face recognition method of claim 2.
19. An electronic apparatus, comprising:at least one processor; anda memory communicatively connected to the at least one processor; whereinthe memory stores one or more computer programs executable by the at least one processor, the one or more computer programs being executable by the at least one processor to cause the at least one processor to perform the face recognition method of claim 3.
20. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, implements the method of claim 2.
