Facial image recognition method and device, electronic equipment and storage medium
By using facial image recognition method based on object detection model and pulse neural network model in complex environments, the problems of low recognition efficiency and low accuracy of traditional convolutional neural networks in complex environments are solved, and efficient and accurate facial recognition is achieved.
Patent Information
- Application Number
- CN202411708282.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-02-28
AI Technical Summary
Traditional convolutional neural networks have problems with low facial recognition efficiency and low recognition accuracy in complex environments.
Using a target image recognition model based on a preset object detection model and a pulse neural network model, the facial image to be processed is recognized, at least two feature images to be processed corresponding to the object to be recognized, and the target image is obtained through multi-feature fusion processing to determine the object information of the object to be recognized.
Accurate recognition of facial images is achieved in complex environments, improving recognition efficiency and accuracy, and improving user experience.
Smart Images

Figure CN119541025A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a facial image recognition method, device, electronic equipment and storage medium. Background Art
[0002] In daily life, when users use related applications, they often use face recognition functions to verify the user's identity information through face recognition to ensure the security of subsequent processing.
[0003] However, when users use applications, the environment around them is often complex and changeable, and there may be insufficient light or obstructions in the surrounding environment. Due to the limitations of its own design, traditional convolutional neural networks are inefficient in facial recognition in complex environments and have low recognition accuracy. Summary of the invention
[0004] The present invention provides a facial image recognition method, device, electronic equipment and storage medium, which improve the accuracy and efficiency of facial recognition.
[0005] According to one aspect of the present invention, there is provided a facial image recognition method, the method comprising:
[0006] Obtain a facial image to be processed of an object to be identified;
[0007] Performing recognition processing on the facial image to be processed based on a target image recognition model to determine at least two feature images to be processed corresponding to the object to be recognized, wherein the target image recognition model is determined based on a preset target detection model and a spiking neural network model, and model parameters of the spiking neural network model are determined based on model parameters of a preset convolutional neural network model;
[0008] Multi-feature fusion processing is performed on at least two feature images to be processed to obtain a target image, so as to determine object information of the object to be identified based on the target image.
[0009] According to another aspect of the present invention, there is provided a facial image recognition device, the device comprising:
[0010] An image acquisition module is used to acquire a facial image to be processed of an object to be identified;
[0011] A feature image determination module, used to perform recognition processing on the facial image to be processed based on a target image recognition model, and determine at least two feature images to be processed corresponding to the object to be recognized, wherein the target image recognition model is determined based on a preset target detection model and a spiking neural network model, and model parameters of the spiking neural network model are determined based on model parameters of a preset convolutional neural network model;
[0012] The feature fusion module is used to perform multi-feature fusion processing on at least two feature images to be processed to obtain a target image, so as to determine the object information of the object to be identified based on the target image.
[0013] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the facial image recognition method of any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the facial image recognition method of any embodiment of the present invention when executed.
[0018] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, wherein the computer program implements the facial image recognition method according to any embodiment of the present invention when executed by a processor.
[0019] The technical solution of the embodiment of the present invention obtains a facial image to be processed of an object to be identified, uses a target image recognition model to perform recognition processing on the facial image to be processed, and determines at least two feature images to be processed corresponding to the object to be identified. The target image recognition model determined by the preset target detection model and the pulse neural network model can accurately identify the facial image to be processed in a complex environment. By performing multi-feature fusion processing on at least two feature images to be processed, a target image is obtained, and the object information of the object to be identified is determined according to the target image, thereby realizing the determination of the identity information of the object to be identified. The present invention solves the problems of low efficiency and low recognition accuracy of traditional convolutional neural networks in complex environments, and determines the model parameters of the pulse neural network model by presetting the model parameters of the convolutional neural network model. The target image recognition model obtained according to the pulse neural network model and the preset target detection model not only meets the needs of accurately identifying facial images in complex environments, but also improves the efficiency of image recognition and enhances user experience.
[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 is a flow chart of a facial image recognition method provided by an embodiment of the present invention;
[0023] Figure 2 It is a structural example diagram of the Yolov3 network model provided by an embodiment of the present invention;
[0024] Figure 3 It is a structural example diagram of the Spiking-Yolov3 network model provided by an embodiment of the present invention;
[0025] Figure 4 is a flow chart of a facial image recognition method provided by an embodiment of the present invention;
[0026] Figure 5 is a diagram showing an example of a network structure of a preset convolutional neural network model provided in an embodiment of the present invention;
[0027] Figure 6 is an example diagram of the calculation and processing of the preset convolutional neural network model provided by an embodiment of the present invention;
[0028] Figure 7 It is an example diagram of mapping a preset convolutional neural network model to a spiking neural network model provided by an embodiment of the present invention;
[0029] Figure 8 is an example diagram of maximum pooling processing provided by an embodiment of the present invention;
[0030] Fig. 9 This is an example diagram of the conversion from a CNN model to an SNN model provided by an embodiment of the present invention;
[0031] Fig.10 is a structural schematic diagram of a facial image recognition device provided by an embodiment of the present invention;
[0032] Fig.11 It is a schematic diagram of the structure of an electronic device for implementing the facial image recognition method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] Embodiment 1
[0036] Figure 1 This is a flowchart of a facial image recognition method provided by the first embodiment of the present invention. This embodiment is applicable to the case where facial images to be processed of an object to be recognized are recognized, and is particularly applicable to the recognition of facial images in complex environments. For example, facial images collected in an environment where the object to be recognized is blocked or has insufficient light are recognized. This method can be executed by a facial image recognition device, which can be implemented in the form of hardware and / or software, and can be configured in electronic devices such as mobile phones, computers, or servers. Figure 1 As shown, the method includes:
[0037] S110, obtaining a facial image to be processed of an object to be identified.
[0038] The object to be identified may be a user whose facial image needs to be identified. The facial image to be processed may be a facial image of the object to be identified. Optionally, the facial image to be processed may be an image captured in real time by the object to be identified through a camera device, or may be a stored image retrieved from a corresponding database.
[0039] Specifically, a facial image to be processed of the object to be identified is obtained to provide an image basis for subsequently determining the identity information of the object to be identified.
[0040] Exemplarily, the subject to be identified is a user who currently needs to perform facial recognition as an example for explanation. The facial image to be processed collected by the user through the front camera device of the mobile phone is obtained to determine the identity information of the user through the facial image to be processed.
[0041] S120. Perform recognition processing on the facial image to be processed based on the target image recognition model to determine at least two feature images to be processed corresponding to the object to be recognized. The target image recognition model is determined based on a preset target detection model and a pulse neural network model. The model parameters of the pulse neural network model are determined based on the model parameters of a preset convolutional neural network model.
[0042] The feature image to be processed can be used to characterize the information of preset key points of the object to be identified. For example, taking the object to be identified as a user, the feature image to be processed can be the feature image corresponding to the key position points of the user's mouth and eyes. The target image recognition model is determined based on the preset target detection model and the pulse neural network model. The preset target detection model can be a convolutional neural network model for real-time target detection. Optionally, the preset target detection model can be a Yolov3 network model, and its network structure can be as follows Figure 2 As shown. Figure 2 The Yolov3 network model includes multiple deep convolution submodules DBL, residual submodules Res1, Res2, Res8, Res4, upsampling submodules, feature concatenation submodule Concat, and convolution layer Cov. The spiking neural network model (Spiking Neural Network, SNN) is a network model that simulates neurons processing image information in a pulse coding manner. Optionally, if the preset target detection model is the Yolov3 network model, the target image recognition model can be the Spiking-Yolov3 network model.
[0043] The model parameters of the pulse neural network model are obtained based on the model parameters of the preset convolutional neural network model. The preset convolutional neural network model (CNN) can be understood as a deep learning model for processing and recognizing image data. The preset convolutional neural network model includes a convolution layer, a pooling layer, and a fully connected layer. The convolution layer is used to extract image features and obtain local image information through the convolution operation of the filter. The pooling layer is used to reduce the spatial dimension of the feature map and retain the main image information. The fully connected layer is used to map the extracted features to specific image categories.
[0044] Optionally, the model parameters such as the discharge rate, membrane potential, pulse firing frequency and number of pulse firing of the spiking neurons of the spiking neural network model are determined by presetting the activation value, the maximum firing frequency of the neurons, the pulse firing frequency and the total number of pulses of the convolutional neural network model. Optionally, the convolution function of the preset convolutional neural network model can also be adjusted to determine the convolution function corresponding to the spiking neural network model.
[0045] Specifically, the model parameters corresponding to the pulse neural network model are obtained according to the model parameters of the preset convolutional neural network model. Among them, the model parameters of the pulse neural network model may include model parameters such as the discharge rate of the pulse neuron, the membrane potential, the pulse emission frequency and the number of pulse emission. The target image recognition model is determined according to the pulse neural network model and the preset target detection model. According to the target image recognition model, the facial image to be processed is recognized and processed to determine at least two feature images to be processed corresponding to the key points in the facial image to be processed. Among them, the key points can be the key position points of the eyes, the key position points of the mouth, etc.
[0046] Optionally, the preset target detection model includes a feature extraction module and a detection result determination module, and the method for determining the target image recognition model may be: splicing the image preprocessing module and the pulse generation module before the feature extraction module of the preset target detection model; converting the convolution kernel parameters of the preset target detection model into model parameters of the pulse neural network model to obtain a pulse neuron module corresponding to the feature extraction module and a pulse counter module corresponding to the detection result determination module; based on the image preprocessing module, the pulse generation module, the pulse neuron module and the pulse counter module, obtaining the target image recognition model.
[0047] The feature extraction module of the preset target detection model may be a module for extracting features from an input image to obtain image features. The detection result determination module may be a module for predicting and screening image features to obtain detection results corresponding to the image.
[0048] The image preprocessing module can be a module for adjusting the pixel values of the facial image to be processed. The pulse generation module can be used to convert the pixel values of the facial image to be processed into a pulse signal. The pulse signal is a signal that transmits image feature information in short pulses. The convolution kernel parameters can be understood as the model parameters used for convolution processing in the preset target detection model. The pulse neuron module can be a module for deep pulse processing of the pulse signal. The pulse counter module can be used to determine the feature image to be processed corresponding to the facial image to be processed. The target image recognition model is described from the input and output perspectives, including: an image preprocessing module, a pulse generation module, a pulse neuron module, and a pulse counter module.
[0049] For example, if the preset target detection model is a Yolov3 network model and the pulse neural network model is an SNN model, the target image recognition model may be a Spiking-Yolov3 network model. Figure 2 , Figure 2 Figure 1 is a structural example diagram of the Yolov3 network model. In the Yolov3 network model, the feature extraction module includes multiple deep convolution submodules DBL, residual submodules Res1, Res2, Res8, Res4, upsampling submodules, feature splicing submodule Concat, and convolution layer Cov. Among them, Darknet-53 is the backbone network of the Yolov3 network model, including deep convolution submodule (DBL) and residual submodules (Res1, Res2, Res8, Res4). The deep convolution submodule DBL consists of a convolution layer (Conv), batch normalization (BN), and an activation function (Leakerelu). The Res-unit unit extracts features by stacking multiple DBLs, and adds the input and DBL output element by element through addition operations (add). The residual submodule can achieve preliminary feature extraction and nonlinear mapping processing through a series of convolution, batch normalization, and activation function operations. The above structure can alleviate the problem of gradient disappearance in deep network training and improve feature extraction capabilities. The upsampling submodule is used to enlarge the feature map. The feature concatenation submodule Concat can concatenate features of different scales to integrate different image information and improve image recognition efficiency. Figure 2 The Yolov3 network model can extract the image with a resolution of 416×416×3 through the above submodules, and determine the module through the detection results to obtain feature maps of different sizes, that is, Figure 2 In the figure, there are 13×13×N feature maps, 26×26×N feature maps, and 52×52×N feature maps, where N represents the number of output channels.
[0050] Migrate the above Yolov3 network model to the SNN model to form the Spiking-Yolov3 network model. The Spiking-Yolov3 network model can provide a better initial state for the SNN model, so that the model can converge faster, thereby accelerating the model training process. Figure 3 , Figure 3The structure example diagram of the Spiking-Yolov3 network model is as follows. The Spiking-Yolov3 network model is an image preprocessing module Preprocssing and a pulse generation module Spike Generation spliced before the feature extraction module of the Yolov3 network model. And the convolution kernel parameters of the Yolov3 network model are converted into the pulse neuron connection weight coefficients to obtain the pulse neuron module SpikingNeurons corresponding to the feature extraction module, and the pulse counter module Spiking Counter corresponding to the detection result determination module. Based on this, the Spiking-Yolov3 network model based on the pulse neural network model is obtained. In the Spiking-Yolov3 network model, image features are transmitted in the form of pulse signals. The Spiking-Yolov3 network model retains the accuracy of the Yolov3 network model detection image, and can give play to the advantages of the pulse neural network model when processing time series information to improve image processing efficiency.
[0051] S130, performing multi-feature fusion processing on at least two feature images to be processed to obtain a target image, so as to determine object information of the object to be identified based on the target image.
[0052] The target image may be a feature image obtained after feature fusion. The object information may be understood as the identity information of the object to be identified.
[0053] Specifically, multi-feature fusion processing is performed on at least two feature images to be processed to obtain a target image. The target image is compared with a preset facial image in a database. When the target image matches the preset facial image, image information corresponding to the preset facial image is used as object information of the object to be identified.
[0054] Exemplarily, the feature image to be processed is a feature map corresponding to the key points of the user's mouth and eyes as an example for explanation. The user's facial image to be identified is located and detected according to the Spiking-Yolov3 network model, and the key point feature map corresponding to the user's mouth and eyes is determined. According to the detected key point feature map, the position area image of the eyes and mouth is determined. The position area image is input into the eye and mouth state recognition network model to obtain the feature information corresponding to the eyes and mouth. The feature information of the eyes and mouth is subjected to multi-feature fusion processing of the face to obtain the fused target image. According to the target image, the identity information corresponding to the user is obtained. Among them, the eye and mouth state recognition network model can be any network model that can perform feature extraction.
[0055] The technical solution of this embodiment obtains a facial image to be processed of an object to be identified, uses a target image recognition model to perform recognition processing on the facial image to be processed, and determines at least two feature images to be processed corresponding to the object to be identified. The target image recognition model determined by the preset target detection model and the pulse neural network model can accurately identify the facial image to be processed in a complex environment. By performing multi-feature fusion processing on at least two feature images to be processed, a target image is obtained, and the object information of the object to be identified is determined according to the target image, thereby realizing the determination of the identity information of the object to be identified. The present invention solves the problems of low efficiency and low recognition accuracy of traditional convolutional neural networks in complex environments, and determines the model parameters of the pulse neural network model by presetting the model parameters of the convolutional neural network model. The target image recognition model obtained according to the pulse neural network model and the preset target detection model not only meets the needs of accurately identifying facial images in complex environments, but also improves the efficiency of image recognition and enhances user experience.
[0056] Embodiment 2
[0057] Figure 4 This is a flowchart of a facial image recognition method provided by the second embodiment of the present invention. This embodiment is based on the above embodiment and refines the step of "recognizing and processing the facial image to be processed based on the target image recognition model, and determining at least two feature images to be processed corresponding to the object to be recognized". The specific implementation method can be found in the technical solution of this embodiment. Among them, the technical terms that are the same or corresponding to the above embodiment are not repeated here. Figure 4 As shown, the method includes:
[0058] S210: Obtain a facial image to be processed of an object to be identified.
[0059] S220. An image preprocessing module based on a target image recognition model adjusts a numerical range corresponding to pixel values of the facial image to be processed to obtain pixel values to be processed within a preset numerical range.
[0060] The image preprocessing module may be used to adjust the image pixel values of the facial image to be processed. The value range is the pixel value range to which the pixel points of the facial image to be processed belong. The preset value range may be a pre-set pixel value range. Optionally, the preset value range may be a range from 0 to 255.
[0061] Specifically, the image preprocessing module of the target image recognition model adjusts the numerical range corresponding to the pixel value of the facial image to be processed to obtain the pixel value to be processed within the preset numerical range. Optionally, the pixel value of the facial image to be processed can be processed by absolute value, and the negative pixel value can be adjusted to a positive number to adapt to the subsequent pulse coding processing.
[0062] For example, in conjunction with the above examples, see Figure 3 , taking the facial image to be processed as a user's facial image with a resolution of 416×416×3 as an example for explanation. According to the image preprocessing module Preprocssing of the Spiking-Yolov3 network model, the user's facial image is processed by absolute value, and the negative pixel values are converted into positive numbers to adapt to the subsequent pulse coding.
[0063] S230, a pulse generation module based on the target image recognition model converts the pixel value to be processed into a pulse signal to be processed.
[0064] The pulse generation module may be used to convert the pixel value into a pulse signal to be processed. The pulse signal to be processed may be used to represent information corresponding to the pixel value to be processed.
[0065] Specifically, all the pixel values to be processed corresponding to the facial image to be processed are converted into pulse signals to be processed by the pulse generation module, and are represented in the form of a pulse signal sequence. Each pulse signal to be processed in the pulse signal sequence carries the image information of the facial image to be processed.
[0066] Optionally, the method of converting the pixel value to be processed into the pulse signal to be processed can be: based on a preset mapping relationship between light intensity and pulse frequency, a preset space-time coding, and a preset grayscale level coding, using at least one pulse conversion parameter contained in the pulse generation module, the pixel value to be processed is converted into the pulse signal to be processed; wherein, at least one pulse conversion parameter is determined based on a preset activation function, membrane potential determination function, pulse emission frequency determination function, and pulse emission number determination function corresponding to a preset convolutional neural network model.
[0067] Among them, the preset mapping relationship between light intensity and pulse frequency can be used to represent the corresponding relationship between the brightness value corresponding to the pixel point in the facial image to be processed and the pulse frequency. Optionally, the pixel point with higher light intensity corresponds to a higher pulse frequency; the pixel point with lower light intensity corresponds to a lower pulse frequency. The preset spatiotemporal coding can be used to represent the distribution of the pulse signal to be processed in time and space. The preset grayscale level coding can be used to convert the pixel value (grayscale value) to be processed into the pulse signal to be processed.
[0068] At least one pulse conversion parameter is determined by various functions used to determine model parameters in a preset convolutional neural network model. The various functions include: a preset activation function, a membrane potential determination function, a pulse emission frequency determination function, a pulse emission number determination function, etc. The preset activation function may be a function used to calculate the output value of a certain neuron in a certain layer in a preset convolutional neural network model. In the case where the neuron in the preset convolutional neural network model is a pulse neuron, the activation value of the neuron determined by the preset activation function is approximately equal to the discharge rate of the pulse neuron. The membrane potential determination function may be a function used to determine the membrane potential of the neuron assuming that the neuron in the preset convolutional neural network model is a pulse neuron. The pulse emission frequency determination function may be a function used to determine the pulse emission frequency of the neuron assuming that the neuron in the preset convolutional neural network model is a pulse neuron. The pulse emission number determination function may be a function used to determine the number of pulses assuming that the neuron in the preset convolutional neural network model is a pulse neuron.
[0069] Specifically, according to the preset mapping relationship between light intensity and pulse frequency, the preset spatiotemporal coding and the preset grayscale level coding, each pixel value to be processed is converted into a pulse signal to be processed using at least one pulse conversion parameter included in the pulse generation module.
[0070] For example, in conjunction with the above examples, see Figure 3 In the process of converting the pixel value to be processed into a pulse signal by pulse coding, thereby obtaining a pulse signal sequence corresponding to the facial image to be processed, the preset mapping relationship between the light intensity of the pixel point of the pixel value to be processed and the pulse frequency, the preset spatiotemporal coding of the pulse signal, and the preset grayscale level coding can be considered to convert the pixel value to be processed into the excitation state of the pulse neuron, that is, the pulse signal to be processed. Based on this, the facial image to be processed can be represented by a pulse signal sequence composed of the pulse signals to be processed.
[0071] For example, the neurons of the preset convolutional neural network model are replaced with spiking neurons, and synapses are used to connect the spiking neurons, so that the preset convolutional neural network model is mapped to the spiking neural network model. For a preset convolutional neural network model with L layers, the weights from the l-1 layer to the l layer are set to W l , with a bias of b l , l∈{1,2,…,L}. The network structure of the preset convolutional neural network model can be as follows Figure 5 As shown. In the preset convolutional neural network model, the preset activation function of neuron i can be:
[0072]
[0073] in, represents the output value (activation value) of the i-th neuron in the l-th layer, represents the weight from the jth neuron in the l-1th layer to the ith neuron in the lth layer, M i-1 Represents the number of neurons in the l-1th layer. represents the input signal of the l-1 layer. b is the bias, which represents the initial value of the neuron when there is no initial input signal. For example, Corresponds to Figure 6 x in i , then the calculation process of the preset convolutional neural network model can be as follows Figure 6 The output value of the current layer is determined by the input x0, x1, x2 of the previous layer and the weight W0 and bias b from the previous layer to the current layer.
[0074] The membrane potential determination function can be used to determine the membrane potential of a neuron. Optionally, the membrane potential determination function can be as follows,
[0075]
[0076] in
[0077] in, represents the membrane potential of all neurons in layer l at time t, represents the membrane potential of the lth layer of neurons at time t-1, V thr represents the threshold of membrane potential, It represents the output pulse of the i-th neuron at time t, and its value is 0 or 1. A value of 1 indicates that a pulse is sent, and a value of 0 indicates that no pulse is sent.
[0078] Maximum incentive rate r max Indicates the maximum number of times each neuron is stimulated within a preset time interval. The shorter the preset time interval, the higher the maximum stimulation rate of the neuron.
[0079]
[0080] Wherein, Δt represents a preset time interval.
[0081] The pulse signal emitted by the neuron depends on the feature changes of each image in the first layer. The pulse emission frequency determination function can be expressed as:
[0082]
[0083]
[0084] Among them, r i l(t) represents the pulse firing frequency of the i-th neuron in the l-th layer at time t, that is, the discharge rate. represents the cumulative number of pulses fired by the ith neuron in the lth layer at time t, Represents the pulse output value of the i-th neuron in the l-th layer at time t. It can be determined whether a pulse signal is sent at time t.
[0085] Based on the above, an example diagram of the preset convolutional neural network model mapped to the spiking neural network model can be found in Figure 7 .
[0086] At activation value Approximately the firing rate r of the spiking neuron i l When the input signal of the spiking neuron of the spiking neural network model exceeds the threshold V thr When the pulse signal is triggered, the membrane potential needs to be quickly restored after the pulse signal is sent. Under the premise of averaging the pulse emission frequency of the pulse neuron and the activation value of the preset convolutional neural network model, the membrane potential can be restored by directly resetting or subtracting the threshold reset. The following is the membrane potential recovery function corresponding to the method of subtracting the threshold reset:
[0087]
[0088]
[0089] Among them, V i l (t) represents the membrane potential of the ith neuron in layer l at time t, V i l (t-1) represents the membrane potential of the ith neuron in the lth layer at time t-1, represents the discharge intensity of the ith neuron in the lth layer, Represents the output pulse of the i-th neuron in the l-th layer at time t.
[0090]
[0091]
[0092] Based on the above, we can know the neuron activation value of the preset convolutional neural network model The firing rate of the spiking neuron r i l There is a certain relationship. Indicates the discharge rate error.
[0093]
[0094] in, The membrane potential of the ith neuron in the lth layer changes with the number of neuron discharges. Changing and changing situations, represents the discharge intensity of the ith neuron in the lth layer. By subtracting the threshold reset pulse signal, Retained to the next pulse, suitable for complex network structures.
[0095] In the case where it is determined that there is a certain relationship between the neuron activation value of the preset convolutional neural network model and the discharge rate of the spiking neuron, the convolution layer and the pooling layer of the spiking neural network model can be adjusted accordingly.
[0096] According to the function corresponding to the convolution in the preset convolutional neural network model x i Indicates the input analog value, W i Represents the weight corresponding to each layer, and b represents the bias. Since the spiking neural network model cannot display negative values, the bias is set to 0, and the convolution of the spiking neural network model can be expressed as:
[0097]
[0098]
[0099] Among them, X i,j (t) represents the feature map of the convolution output of the jth neuron in the i-th layer, A i+q,j+q represents the input pulse signal of the i-1th layer, K pq Represents the convolution kernel weight, which is used to represent the weight of each position in the convolution operation, and its value range is (-k, k). The convolution kernel weight can be calculated as (2k+1)*(2k+1).
[0100] The pooling layer is mainly used to reduce the dimension of the feature map to avoid the network being too complex and causing overfitting. Through the downsampling processing of the pooling layer, the feature map of the final output of the preset convolutional neural network model and the pulse neural network model can be made consistent with the preset size. There are two pooling methods for the pulse pooling layer: maximum pooling and average pooling. Maximum pooling can better extract image feature information. Average pooling has less interference with the background. If the pulse sequence output by a single pulse neuron is a single column, the maximum pooling method can be used, such as Figure 8 Based on the above, the process of converting the preset convolutional neural network model (CNN model) into a pulse neural network model (SNN model) is realized. Fig. 9 , Fig. 9This is an example diagram of the conversion from CNN model to SNN model. Fig. 9 In the CNN model, the processing flow is as follows: after the image preprocessing module preprocesses the facial image to be processed, the filter in the convolution layer extracts the features of the facial image to be processed to obtain the corresponding feature map, and then the feature map is downsampled by the pooling layer to reduce the size of the feature map, so as to reduce the amount of calculation and retain important image feature information. After that, it is processed by the convolution layer and the pooling layer to obtain the feature image to be processed.
[0101] The processing flow of the SNN model is as follows: after the image preprocessing module preprocesses the facial image to be processed, the pixel value to be processed corresponding to the facial image to be processed is obtained. According to the pulse generation module, the pixel value to be processed is converted into a pulse signal through pulse coding and pulse conversion parameters to obtain a pulse signal sequence corresponding to the facial image to be processed. Among them, each pulse signal carries the image information of the facial image to be processed. Afterwards, the SNN model simulates the convolution layer of the CNN model, and realizes feature extraction through pulse signal propagation and adjustment of pulse neuron weights. Afterwards, a pooling operation is performed to reduce the resolution of the feature map. The above process is carried out by threshold balancing, which can ensure that the pulse neurons of the pulse neural network model can match the floating-point activation values of the preset convolutional neural network model while maintaining the sparsity of feature information transmission.
[0102] For example, a spiking neural network model has 14.2 million synapses, and each synapse consumes α microjoules of energy when processing feature information. Assuming that the spiking neural network model can process 742 images per second, the energy consumed by the spiking neural network model per second can be expressed as follows:
[0103] P SNN =1.42×10 7 ×742×α
[0104] Among them, if α = 0.37, then P SNN ≈0.0039W. When the preset convolutional neural network model processes the same number of images per unit time, it consumes 30 to 40W of energy. Under the same conditions, the energy consumption ratio is η=P CNN / P SNN ≈8974. Based on this, the spiking neural network model has low power consumption performance. Correspondingly, the target image recognition model determined based on the spiking neural network model and the preset target detection model can also achieve low power consumption.
[0105] S240, the pulse neuron module based on the target image recognition model performs deep pulse processing on the pulse signal to be processed to obtain at least two target pulse signals corresponding to the image features.
[0106] Among them, deep pulse processing can be understood as deep extraction of image features. The target pulse signal can be used to characterize the image features of the facial image to be processed.
[0107] Specifically, the pulse signal to be processed is subjected to deep pulse processing by using multiple residual submodules and deep convolution submodules of the pulse neuron module of the target image recognition model to obtain at least two target pulse signals.
[0108] For example, in conjunction with the above examples, see Figure 3 The spiking neuron module Spiking Neurons is composed of multiple residual submodules Res1, Res2, Res8, Res4 and a deep convolution submodule DBL. The spiking neuron module Spiking Neurons performs deep spiking processing on the pulse signal to be processed to obtain at least two target pulse signals.
[0109] Optionally, the pulse neuron module includes at least a first processing branch and a second processing branch, and the first processing branch and the second processing branch are respectively used to extract different image features corresponding to the facial image to be processed; the first processing branch is described from the input-output perspective and includes: a deep convolution submodule, at least two residual submodules, at least two deep convolution submodules and a convolution layer; the second processing branch is described from the input-output perspective and includes: a deep convolution submodule, at least two residual submodules, at least two deep convolution submodules, an upsampling submodule, a feature splicing submodule, at least two deep convolution submodules and a convolution layer.
[0110] Among them, the deep convolution submodule is used to extract image features. The residual submodule is used to extract the residual information corresponding to the feature map. The upsampling module is used to perform upsampling processing to enlarge the corresponding feature map. The feature splicing submodule is used to splice features of different scales to integrate different image feature information and improve the image recognition accuracy.
[0111] Optionally, the first processing branch based on the pulse neuron module performs deep pulse processing on the pulse signal to be processed, including: performing feature extraction processing on the pulse signal to be processed based on a deep convolution sub-module and at least two residual sub-modules in turn to obtain features to be spliced; performing feature extraction processing on the spliced features based on at least two deep convolution sub-modules to obtain features to be convolved; inputting the features to be convolved into the convolution layer to obtain a target pulse signal corresponding to the image features.
[0112] Optionally, the second processing branch based on the pulse neuron module performs deep pulse processing on the pulse signal to be processed, including: based on the deep convolution sub-module and at least two residual sub-modules, performing feature extraction processing on the pulse signal to be processed in turn to obtain features to be spliced; based on at least two deep convolution sub-modules, performing feature extraction processing on the features to be spliced to obtain features to be fused; upsampling the features to be fused and performing feature splicing processing on the features to be spliced to obtain features to be used; based on at least two deep convolution sub-modules and convolution layers, performing convolution processing on the features to be used in turn to obtain target pulse signals corresponding to the image features.
[0113] The feature to be spliced may be a feature after the pulse signal to be processed is processed by the deep convolution submodule and at least two residual submodules in sequence. The feature to be spliced is characterized in the form of a pulse signal. The feature to be fused may be obtained by extracting the feature to be spliced by at least two deep convolution submodules. The feature to be used may be obtained by splicing the upsampled feature to be fused with the feature to be spliced.
[0114] Specifically, the pulse signal to be processed is subjected to feature extraction processing in turn through the deep convolution submodule and at least two residual submodules to obtain features to be spliced. The features to be spliced are subjected to feature extraction according to at least two deep convolution submodules to obtain features to be fused, the features to be fused are subjected to upsampling processing, and the features after upsampling processing are subjected to feature splicing processing with the features to be spliced to obtain features to be used. The features to be used are subjected to convolution processing in turn according to at least two deep convolution submodules and convolution layers to obtain target pulse signals corresponding to image features.
[0115] For example, in conjunction with the above examples, see Figure 3 , Figure 3The pulse neuron module includes four processing branches. The first processing branch and the second processing branch are used as examples for explanation. The pulse signal to be processed is processed by the deep convolution submodule DBL of the first processing branch and at least two residual submodules Res1, Res2, Res8 and Res8 to obtain the features to be spliced. The features to be spliced are passed through the residual submodule Res4 and the deep convolution submodule DBL of the first processing branch, and the deep convolution submodule DBL of the second processing branch to obtain the features to be fused. The features to be fused are input into the feature splicing submodule after upsampling, so that the feature splicing submodule performs feature splicing on the features to be fused and the features to be spliced after the upsampling process to obtain the features to be used. Based on at least two deep convolution submodules DBL×5 and DEL and the convolution layer Cov, the features to be used are convolved in turn to obtain the target pulse signals corresponding to the image features. Based on the above, the target pulse signals corresponding to different image features can be obtained through different processing branches of the pulse neuron module to obtain different feature images to be processed, that is, Figure 3 y1 to y4 in .
[0116] Optionally, the pulse neuron module also includes a pulse pooling layer, which is used to downsample the features processed by each deep convolution sub-module, and the downsampling processing includes at least one of maximum pooling processing and average pooling processing.
[0117] Among them, a pulse pooling layer can be spliced after each deep convolution submodule of the pulse neuron module to downsample the features processed by the deep convolution submodule, that is, to remove the redundant information of the image features after each convolution processing. The maximum pooling process can be understood as a pooling method that selects the maximum value in a local area. The average pooling process can be understood as a pooling method that calculates the average value in a local area.
[0118] S250, a pulse counter module based on a target image recognition model analyzes and processes at least two target pulse signals to obtain at least two feature images to be processed.
[0119] The pulse counter module is used to determine at least one feature image corresponding to the facial image to be processed.
[0120] Specifically, each target pulse signal is statistically analyzed and processed by the pulse counter module to obtain at least two feature images to be processed.
[0121] For example, in conjunction with the above examples, see Figure 3 , the target pulse signal is counted and analyzed through the Spiking Counter module, and the feature image to be processed corresponding to each target pulse signal is output, that is, Figure 3y1, y2, y3 and y4 in y1, y2, y3 and y4 represent feature maps of different scales.
[0122] S260: Perform multi-feature fusion processing on at least two feature images to be processed to obtain a target image, so as to determine object information of the object to be identified based on the target image.
[0123] The technical solution of this embodiment is to obtain a facial image to be processed of an object to be identified, and adjust the numerical range corresponding to the pixel value of the facial image to be processed based on the image preprocessing module of the target image recognition model to obtain the pixel value to be processed within the preset numerical range. The pixel value to be processed is converted into a pulse signal to be processed based on the pulse generation module. The pulse neuron module performs deep pulse processing on the pulse signal to be processed to obtain at least two target pulse signals corresponding to the image features. The pulse counter module analyzes and processes at least two target pulse signals to obtain at least two feature images to be processed. The target image recognition model determined by the preset target detection model and the pulse neural network model can realize accurate recognition of the facial image to be processed in a complex environment. By performing multi-feature fusion processing on at least two feature images to be processed, a target image is obtained, and the object information of the object to be identified is determined according to the target image, thereby realizing the determination of the identity information of the object to be identified. The present invention solves the problems of low efficiency and low recognition accuracy of traditional convolutional neural networks in complex environments, and determines the model parameters of the pulse neural network model by presetting the model parameters of the convolutional neural network model. The target image recognition model obtained based on the pulse neural network model and the preset target detection model not only meets the needs of accurately identifying facial images in complex environments, but also improves the efficiency of image recognition, reduces the power consumption of image processing, and improves the user experience.
[0124] Embodiment 3
[0125] Fig.10 FIG. 1 is a schematic diagram of the structure of a facial image recognition device provided by Embodiment 3 of the present invention. Fig.10 As shown, the device includes: an image acquisition module 310, a feature image determination module 320 and a feature fusion module 330.
[0126] The image acquisition module 310 is used to acquire a facial image to be processed of an object to be identified; the feature image determination module 320 is used to perform recognition processing on the facial image to be processed based on a target image recognition model, and determine at least two feature images to be processed corresponding to the object to be identified, wherein the target image recognition model is determined based on a preset target detection model and a pulse neural network model, and the model parameters of the pulse neural network model are determined based on the model parameters of a preset convolutional neural network model; the feature fusion module 330 is used to perform multi-feature fusion processing on at least two feature images to be processed to obtain a target image, so as to determine the object information of the object to be identified based on the target image.
[0127] The technical solution of this embodiment obtains a facial image to be processed of an object to be identified, uses a target image recognition model to perform recognition processing on the facial image to be processed, and determines at least two feature images to be processed corresponding to the object to be identified. The target image recognition model determined by the preset target detection model and the pulse neural network model can accurately identify the facial image to be processed in a complex environment. By performing multi-feature fusion processing on at least two feature images to be processed, a target image is obtained, and the object information of the object to be identified is determined according to the target image, thereby realizing the determination of the identity information of the object to be identified. The present invention solves the problems of low efficiency and low recognition accuracy of traditional convolutional neural networks in complex environments, and determines the model parameters of the pulse neural network model by presetting the model parameters of the convolutional neural network model. The target image recognition model obtained according to the pulse neural network model and the preset target detection model not only meets the needs of accurately identifying facial images in complex environments, but also improves the efficiency of image recognition and enhances user experience.
[0128] On the basis of the above embodiments, optionally, the preset target detection model includes a feature extraction module and a detection result determination module, and the target image recognition model is determined based on the preset target detection model and the pulse neural network model, including: splicing the image preprocessing module and the pulse generation module before the feature extraction module of the preset target detection model; converting the convolution kernel parameters of the preset target detection model into model parameters of the pulse neural network model to obtain a pulse neuron module corresponding to the feature extraction module and a pulse counter module corresponding to the detection result determination module; based on the image preprocessing module, the pulse generation module, the pulse neuron module and the pulse counter module, the target image recognition model is obtained.
[0129] Optionally, the target image recognition model includes an image preprocessing module, a pulse generation module, a pulse neuron module and a pulse counter module, and the feature image determination module includes: a pixel value adjustment unit, which is used to adjust the numerical range corresponding to the pixel value of the facial image to be processed based on the image preprocessing module, so as to obtain the pixel value to be processed within a preset numerical range; a pixel value conversion unit, which is used to convert the pixel value to be processed into a pulse signal to be processed based on the pulse generation module; a target pulse signal determination unit, which is used to perform deep pulse processing on the pulse signal to be processed based on the pulse neuron module, so as to obtain at least two target pulse signals corresponding to the image features; and a feature image determination unit, which is used to analyze and process at least two target pulse signals based on the pulse counter module, so as to obtain at least two feature images to be processed.
[0130] Optionally, the model parameters of the pulse neural network model include at least one pulse conversion parameter corresponding to the pulse generation module, and a pixel value conversion unit, which is used to convert the pixel value to be processed into a pulse signal to be processed based on a preset mapping relationship between light intensity and pulse frequency, a preset space-time coding, and a preset grayscale level coding, using at least one pulse conversion parameter contained in the pulse generation module; wherein at least one pulse conversion parameter is determined based on a preset activation function, a membrane potential determination function, a pulse emission frequency determination function, and a pulse emission number determination function corresponding to the preset convolutional neural network model.
[0131] Optionally, the pulse neuron module includes at least a first processing branch and a second processing branch, and the first processing branch and the second processing branch are respectively used to extract different image features corresponding to the facial image to be processed; the first processing branch is described from the input-output perspective and includes: a deep convolution submodule, at least two residual submodules, at least two deep convolution submodules and a convolution layer; the second processing branch is described from the input-output perspective and includes: a deep convolution submodule, at least two residual submodules, at least two deep convolution submodules, an upsampling submodule, a feature splicing submodule, at least two deep convolution submodules and a convolution layer.
[0132] Optionally, the second processing branch based on the pulse neuron module performs deep pulse processing on the pulse signal to be processed, including: based on the deep convolution sub-module and at least two residual sub-modules, performing feature extraction processing on the pulse signal to be processed in turn to obtain features to be spliced; based on at least two deep convolution sub-modules, performing feature extraction processing on the features to be spliced to obtain features to be fused; upsampling the features to be fused and performing feature splicing processing on the features to be spliced to obtain features to be used; based on at least two deep convolution sub-modules and convolution layers, performing convolution processing on the features to be used in turn to obtain target pulse signals corresponding to the image features.
[0133] Optionally, the pulse neuron module also includes a pulse pooling layer, which is used to downsample the features processed by each deep convolution sub-module, and the downsampling processing includes at least one of maximum pooling processing and average pooling processing.
[0134] The facial image recognition device provided in the embodiment of the present invention can execute the facial image recognition method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0135] Embodiment 4
[0136] Fig.11 1 is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0137] like Fig.11 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0138] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0139] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a facial image recognition method.
[0140] In some embodiments, the facial image recognition method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the facial image recognition method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the facial image recognition method in any other appropriate manner (e.g., by means of firmware).
[0141] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0142] The computer programs for implementing the facial image recognition method of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0143] Embodiment 5
[0144] Embodiment 5 of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a processor to execute a facial image recognition method, the method comprising:
[0145] Acquire a facial image to be processed of an object to be identified; perform identification processing on the facial image to be processed based on a target image recognition model to determine at least two feature images to be processed corresponding to the object to be identified, wherein the target image recognition model is determined based on a preset target detection model and a pulse neural network model, and the model parameters of the pulse neural network model are determined based on the model parameters of a preset convolutional neural network model; perform multi-feature fusion processing on at least two feature images to be processed to obtain a target image, so as to determine the object information of the object to be identified based on the target image.
[0146] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0147] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0148] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0149] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0150] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0151] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A facial image recognition method, characterized in that: include: Obtain a facial image to be processed of an object to be identified; Performing recognition processing on the facial image to be processed based on a target image recognition model to determine at least two feature images to be processed corresponding to the object to be recognized, wherein the target image recognition model is determined based on a preset target detection model and a spiking neural network model, and model parameters of the spiking neural network model are determined based on model parameters of a preset convolutional neural network model; Multi-feature fusion processing is performed on the at least two feature images to be processed to obtain a target image, so as to determine the object information of the object to be identified based on the target image.
2. The method according to claim 1, characterized in that The preset target detection model includes a feature extraction module and a detection result determination module, and the target image recognition model is determined based on the preset target detection model and the spiking neural network model, including: An image preprocessing module and a pulse generation module are spliced before the feature extraction module of the preset target detection model; Convert the convolution kernel parameters of the preset target detection model into model parameters of the pulse neural network model to obtain a pulse neuron module corresponding to the feature extraction module and a pulse counter module corresponding to the detection result determination module; Based on the image preprocessing module, the pulse generating module, the pulse neuron module and the pulse counter module, a target image recognition model is obtained.
3. The method according to claim 1, characterized in that The target image recognition model includes an image preprocessing module, a pulse generation module, a pulse neuron module and a pulse counter module. The target image recognition model is used to perform recognition processing on the facial image to be processed, and at least two feature images to be processed corresponding to the object to be recognized are determined, including: Based on the image preprocessing module, the numerical range corresponding to the pixel value of the facial image to be processed is adjusted to obtain the pixel value to be processed within a preset numerical range; Based on the pulse generating module, the pixel value to be processed is converted into a pulse signal to be processed; Performing deep pulse processing on the pulse signal to be processed based on the pulse neuron module to obtain at least two target pulse signals corresponding to the image features; The at least two target pulse signals are analyzed and processed based on the pulse counter module to obtain at least two feature images to be processed.
4. The method according to claim 3, characterized in that The model parameters of the pulse neural network model include at least one pulse conversion parameter corresponding to the pulse generation module, and the step of converting the pixel value to be processed into a pulse signal to be processed based on the pulse generation module includes: According to a preset mapping relationship between light intensity and pulse frequency, a preset spatiotemporal coding, and a preset grayscale coding, the pixel value to be processed is converted into a pulse signal to be processed by using at least one pulse conversion parameter included in the pulse generation module; Among them, the at least one pulse conversion parameter is determined based on a preset activation function, a membrane potential determination function, a pulse emission frequency determination function, and a pulse emission quantity determination function corresponding to a preset convolutional neural network model.
5. The method according to claim 3, characterized in that: The spiking neuron module comprises at least a first processing branch and a second processing branch, wherein the first processing branch and the second processing branch are respectively used to extract different image features corresponding to the facial image to be processed; The first processing branch is described from the perspective of input and output and includes: a depth convolution submodule, at least two residual submodules, at least two depth convolution submodules and a convolution layer; The second processing branch is described from the input and output perspective and includes: a deep convolution submodule, at least two residual submodules, at least two deep convolution submodules, an upsampling submodule, a feature splicing submodule, at least two deep convolution submodules and a convolution layer.
6. The method according to claim 5, characterized in that The second processing branch based on the pulse neuron module performs deep pulse processing on the pulse signal to be processed, including: Based on the deep convolution submodule and the at least two residual submodules, feature extraction processing is performed on the pulse signal to be processed in sequence to obtain features to be spliced; Performing feature extraction processing on the features to be spliced based on the at least two deep convolution submodules to obtain features to be fused; Perform feature splicing processing on the features to be fused after upsampling processing and the features to be spliced to obtain the features to be used; Based on the at least two deep convolution submodules and the convolution layer, the features to be used are sequentially convolved to obtain a target pulse signal corresponding to the image feature.
7. The method according to claim 5, characterized in that The pulse neuron module also includes a pulse pooling layer, which is used to downsample the features processed by each of the deep convolution sub-modules, and the downsampling processing includes at least one of maximum pooling processing and average pooling processing.
8. A facial image recognition device, characterized in that: include: An image acquisition module is used to acquire a facial image to be processed of an object to be identified; A feature image determination module, used to perform recognition processing on the facial image to be processed based on a target image recognition model, and determine at least two feature images to be processed corresponding to the object to be recognized, wherein the target image recognition model is determined based on a preset target detection model and a spiking neural network model, and the model parameters of the spiking neural network model are determined based on the model parameters of a preset convolutional neural network model; The feature fusion module is used to perform multi-feature fusion processing on the at least two feature images to be processed to obtain a target image, so as to determine the object information of the object to be identified based on the target image.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the facial image recognition method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the facial image recognition method according to any one of claims 1 to 7 when executed.