Face recognition method and system, equipment and medium

Through the improved facial recognition network model and binary feature point descriptor, the problems of facial recognition data security and recognition accuracy in the prior art are solved, and fast, accurate and secure facial recognition applications are realized, and the resistance of the patient is enhanced. Interference capability and identification efficiency.

CN119206812APending Publication Date: 2024-12-27SICHUAN ZHONGDIAN AOSTAR INFORMATION TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411153106.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Existing facial recognition technology has shortcomings in data security and identification accuracy, especially in the case of database leakage and illegal acquisition, which may lead to serious personal privacy leakage and identity theft.

Method used

The threshold method of neural network combined with binary strings is adopted, and the improved face recognition network model is used, using hollow convolution and FaceCNN neural network, combined with Center Loss cost function and BRISK algorithm, feature extraction and quadratic comparison of face images are performed. , ensure the security and reliability of key storage.

Benefits of technology

It significantly improves the accuracy and speed of face recognition, enhances anti-interference ability, ensures high recognition rate in noisy environments, and improves recognition efficiency and security through binary feature point descriptors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206812A_ABST
    Figure CN119206812A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of face recognition, and discloses a face recognition method and system, and the method comprises the steps: collecting a face image data set, and constructing a training set and a test set; constructing an improved face recognition network model; the training set and the loss function are adopted to guide the improved face recognition network model to learn, and the trained improved face recognition network model is output; and acquiring a face image, inputting the face image into the trained improved face recognition network model, generating a trained face image, storing the trained face image into a database of the face recognition system, acquiring a new face image, performing information comparison by extracting binary character strings to complete face recognition, and updating a storage result of the database. The system comprises a data collection unit, a model generation unit, a data storage unit and a secondary comparison unit. The invention also discloses an electronic device and a computer readable storage medium. According to the invention, rapid, accurate and safe face recognition application can be better realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of face recognition technology, and in particular to a face recognition method and system, equipment, and medium, which can better realize fast, accurate, and safe face recognition applications. Background Art

[0002] In recent years, face recognition technology has achieved rapid development. Thanks to its low equipment cost, this technology has been widely used in many fields of production and life. Face recognition technology is a biometric recognition technology based on personal facial features and digital information. It identifies individuals by analyzing and comparing different biometric differences.

[0003] Institutions that apply facial recognition technology can be divided into two main categories: public institutions and commercial institutions. Public institutions use facial recognition technology mainly to provide basic public services to the public, such as monitoring in public places such as roads, airports, and stations, aiming to provide security and post-investigation services. In contrast, commercial institutions use this technology more for commercial interests. Depending on the application scenario, the application of facial recognition technology can be further divided into personal privacy occasions and commercial occasions. Like all technologies, facial recognition technology also has limitations. In order to build a large enough database to store facial information, facial data must be widely collected, and this data belongs to extremely sensitive personal privacy. Once the database is leaked, a large amount of personal privacy information may quickly spread on the Internet, resulting in irreparable losses and damage. In addition, if an attacker illegally obtains a database storing facial images, they will be able to access many protected resources and may even steal the identity of a legitimate user.

[0004] The present invention provides a face recognition method and system, equipment and medium, which can better realize fast, accurate and safe face recognition applications based on an improved face recognition network model and performing secondary face comparison. Summary of the invention

[0005] The present invention provides a face recognition method, system, device and medium, which use a neural network combined with a binary string threshold method to ensure the security and reliability of key storage.

[0006] The present invention is implemented by the following technical solution: A face recognition method comprises the following steps:

[0007] Step S1, collect face image data sets and construct them into training sets and test sets;

[0008] Step S2, constructing an improved face recognition network model based on the dilated convolution and FaceCNN neural network, wherein the improved face recognition network model includes a feature extraction and enhancement module and a feature output module connected sequentially from front to back;

[0009] Step S3, using the training set and loss function to guide the learning of the improved face recognition network model, and outputting the trained improved face recognition network model;

[0010] Step S4, collect facial images, input the facial images into the trained improved facial recognition network model, generate trained facial images and store them in the database of the facial recognition system, collect new facial images, extract binary strings for information comparison, complete facial recognition and update the database storage results.

[0011] In order to better implement the present invention, further, the face image dataset includes a CK+ dataset and a Fer2013 dataset;

[0012] The CK+ dataset and the Fer2013 dataset were trained after label fusion, and divided into a training set and a test set according to a ratio of 8:2.

[0013] In order to better implement the present invention, further, the step S2 of constructing an improved face recognition network model based on dilated convolution and FaceCNN neural network includes:

[0014] Replace all convolutional layers except the first and last convolutional layers in the FaceCNN neural network with the atrous convolutional layers;

[0015] The linear rectification layer replaces all mixed pooling layers in the FaceCNN neural network except the mixed pooling layer after the first convolutional layer.

[0016] In order to better implement the present invention, further, the feature extraction and enhancement module and the feature output module connected in sequence from front to back in step S2 include:

[0017] The feature extraction and enhancement module includes a first convolution layer, a first maxout layer, a first mixed pooling layer, a first hole convolution layer, a first linear correction layer, a second hole convolution layer, a second linear correction layer, a third hole convolution layer, a third linear correction layer, a fourth hole convolution layer, a fourth linear correction layer, a second mixed pooling layer, a second convolution layer, a second maxout layer and a Dropout layer, which are sequentially connected from front to back;

[0018] The feature output module includes a fully connected layer, a Softmax layer and a Center Loss cost function layer;

[0019] The first mixed pooling layer includes a first average pooling layer and a first maximum pooling layer connected in parallel, and the second mixed pooling layer includes a second average pooling layer and a second maximum pooling layer connected in parallel.

[0020] In order to better implement the present invention, further, step S3 includes:

[0021] The loss function is a Center Loss cost function;

[0022] The Center Loss cost function is expressed as:

[0023]

[0024] Among them, m is the number of samples in the mini-batch, n is the number of categories, W is the weight of the fully connected layer, and b is the bias term.

[0025] x i is the feature vector of the i-th sample, belonging to the y-th i categories, is the center vector of the yi-th category, λ represents the ratio of adjusting the Center Loss cost function, represents the j-th column weight in the last fully connected layer.

[0026] In order to better implement the present invention, further, step S4 includes:

[0027] The loss value is attenuated by continuously iterating through preset hyperparameters until the number of iterations is equal to the maximum number of iterations, and then the training of the training set is terminated to generate trained face images and store them in the database of the face recognition system.

[0028] In order to better implement the present invention, further, step S4 also includes:

[0029] The Keras Facenet method is combined with the BRISK algorithm to extract binary feature point descriptors of the face images in the database and the new face images for information comparison.

[0030] The present invention also provides a face recognition system, including a data collection unit, a model generation unit, a data storage unit and a secondary comparison unit, wherein:

[0031] A data collection unit, used to collect face image data sets and construct them into training sets and test sets;

[0032] A model generation unit, used to construct an improved face recognition network model based on the dilated convolution and FaceCNN neural network, wherein the improved face recognition network model includes a feature extraction and enhancement module and a feature output module connected sequentially from front to back; used to guide the learning of the improved face recognition network model using the training set and the loss function, and output the trained improved face recognition network model;

[0033] A data storage unit, used for the data storage unit to collect face images, input the face images into the trained improved face recognition network model, generate trained face images and store them in the database of the face recognition system; and update the database storage results;

[0034] The secondary comparison unit is used to collect new face images and then extract binary strings for information comparison to complete face recognition.

[0035] The present invention also provides an electronic device, which includes a processor and a memory; the processor includes the face recognition system recorded in the second aspect above.

[0036] The present invention also provides a computer-readable storage medium, which includes instructions; when the instructions are executed on the electronic device described in the third aspect, the electronic device executes the method described in the first aspect.

[0037] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0038] (1) The present invention provides a face recognition method, system, device, and medium. Based on the improved face recognition network model, we can obtain more accurate and efficient face recognition results, significantly improving the accuracy and speed of recognition; in addition, the improved model also has stronger anti-interference ability and can maintain a high recognition rate in a noisy environment. Based on the improved face recognition network model, we can better realize fast, accurate, and secure face recognition applications;

[0039] (2) The present invention provides a face recognition method, system, device, and medium. The advantages of binary feature point descriptors are their simplicity and efficiency. They can process a large amount of image data in a short time and maintain high robustness under different image and viewing angle changes. In addition, due to their binary characteristics, these descriptors also have low resource consumption during storage and transmission. Using binary feature points for secondary image recognition helps to improve face recognition rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The present invention is further described in conjunction with the following drawings and embodiments, and all the concepts and innovations of the present invention should be regarded as the disclosed contents and the protection scope of the present invention.

[0041] Figure 1 A method flow chart of a face recognition method, system, device, and medium provided in an embodiment of the present application;

[0042] Figure 2 A structural diagram of a FaceCNN model in a face recognition method, system, device, and medium provided in an embodiment of the present application;

[0043] Figure 3 A structural diagram of an improved face recognition network model in a face recognition method, system, device, and medium provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the technical solutions 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. It should be understood that the described embodiments are only part of the embodiments of the present invention, not all of the embodiments, and therefore should not be regarded as limiting the scope of protection. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technical personnel in this field without making creative work are within the scope of protection of the present invention.

[0045] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "disposed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0046] Embodiment 1:

[0047] A face recognition method, system, device, and medium of this embodiment are as follows: Figure 1-Figure 3As shown in the figure, when processing image tasks, the traditional FaceCNN model first extracts features through convolution operations. As the network depth increases, the pooling layer will gradually reduce the image size. When the image needs to be restored to its original size through upsampling operations, it may cause the loss of internal data structure, including spatial hierarchical information and information related to small object reconstruction, which may limit the further significant improvement of network accuracy. Dilated convolution is a variant of standard convolution that introduces a dilation rate. The dilation rate determines the degree of dilation of the convolution kernel, that is, the spacing between the parameters in the convolution kernel. In standard convolution, the dilation rate is 1, which means that the convolution kernel is not dilated. Dilated convolution can expand the receptive field without the help of pooling layers, so that each convolution output contains a wider range of information, thereby improving the overall performance of the network, associating the local features of the previous layer to a wider field of view, and preventing the loss of small object features during information transmission.

[0048] like Figure 2 As shown in the figure, each convolution layer of FaceCNN is followed by a Maxout layer. Maxout is essentially a forward propagation network. It is a small network structure that converts linear input into nonlinear output. It can be regarded as the activation function layer of a deep convolutional network. FaceCNN uses a combination of maximum pooling and average pooling to retain the background information and texture information of the image to the greatest extent. The specific method is to perform maximum pooling and average pooling on the image after convolution operation and Maxout activation, and cascade the two pooling results as new feature outputs. FaceCNN performs Dropout operation before the Softmax layer. When training the deep network, a certain proportion of neurons are randomly discarded, while these neurons are retained during testing. This method is used to prevent overfitting of the model and improve the generalization ability of the model.

[0049] like Figure 3 As shown, in the improved face recognition network model, the feature extraction and enhancement module includes a first convolution layer, a first maxout layer, a first mixed pooling layer, a first hole convolution layer, a first linear correction layer, a second hole convolution layer, a second linear correction layer, a third hole convolution layer, a third linear correction layer, a fourth hole convolution layer, a fourth linear correction layer, a second mixed pooling layer, a second convolution layer, a second maxout layer and a Dropout layer, which are sequentially connected from front to back;

[0050] The feature output module includes a fully connected layer, a Softmax layer, and a Center Loss cost function layer;

[0051] The first mixed pooling layer includes a first average pooling layer and a first maximum pooling layer connected in parallel, and the second mixed pooling layer includes a second average pooling layer and a second maximum pooling layer connected in parallel.

[0052] The atrous convolution layer is used to associate the local features of the previous layer with a wider field of view to prevent the features of small targets from being lost during information transmission. At the same time, a linear correction layer is configured after each atrous convolution layer because the use of the ReLU activation function can effectively accelerate the training process, adjust the interdependence of parameters and improve classification accuracy.

[0053] Embodiment 2:

[0054] This embodiment is further optimized on the basis of embodiment 1. The CK+ dataset is an extension of the Cohn-Kanda (CK) dataset and was first released in 2010. This dataset is much larger than the JAFFE dataset and can be used voluntarily and free of charge. The CK+ dataset collects various expressions of 123 subjects from different countries, races, genders, and skin colors around the world, under the influence of different external environments and different lighting conditions.

[0055] Fer2013 is a very large dataset, including more than 30,000 48×48 grayscale images of facial expressions in different environments, different lighting and even different impressions. The dataset is divided into 28,708 test sets, including 7 basic expression labels. The advantages of Fer2013 are that it is easy to obtain and the amount of data is large enough, which are necessary for training the network.

[0056] The present invention merges the two datasets, Fer2013 dataset and CK+ dataset, into a super large dataset according to labels for unified training. After the merging, the training set and the test set are divided into a ratio of 8:2.

[0057] The other parts of this embodiment are the same as those of Embodiment 1, and thus will not be described in detail.

[0058] Embodiment 3:

[0059] This embodiment is further optimized on the basis of the above embodiment 1 or 2, and the Center Loss cost function is expressed as:

[0060]

[0061] Among them, m is the number of samples in the small batch, n is the number of categories, W is the weight of the fully connected layer, b is the bias term, W and b are learned by presetting hyperparameters such as learning rate, initial learning rate, and number of training iterations, x i is the feature vector of the i-th sample, belonging to the y-th i categories, It is the yth i The center vector of each category, λ represents the ratio of adjusting the Center Loss cost function, represents the j-th column weight in the last fully connected layer.

[0062] The other parts of this embodiment are the same as any of the above embodiments 1-2, so they are not repeated here.

[0063] Embodiment 4:

[0064] This embodiment is further optimized on the basis of any one of the above embodiments 1-3. The Keras Facenet method builds and trains the Facenet model in the Keras framework, so that users can easily apply this advanced facial recognition technology in their own projects.

[0065] The core idea of ​​the Facenet model is to map facial images to points in a high-dimensional space, where the distance between these points can reflect the similarity between faces. Specifically, the Facenet model extracts features of facial images through a convolutional neural network (CNN) and maps these features to an embedding space. In this embedding space, similar facial images are mapped to points that are closer, while dissimilar facial images are mapped to points that are farther away.

[0066] Based on the Facenet model, if a picture X is given, represented by X∈L, L represents a specific image set, it is converted into a set of feature vectors represented as: Represents a real number vector. For further classification, the distance between images is used. Given two feature vectors x and y corresponding to two images X and Y, the distance is defined as the distance between the corresponding feature vectors. These two vectors The distance between them is their difference The square of the norm, that is:

[0067]

[0068] Therefore, the distance d between the two images L (X, Y) can be expressed as:

[0069]

[0070] Among them, d represents the index, which is used to compare two pictures; Represents a definition; if d L (X, Y) is small enough, images X and Y are considered to be the same image, and this relationship is expressed as X≡Y; on the contrary, if d L When X, Y) is large enough, images X and Y are considered not to be the same image, and this relationship is expressed as X≡ / Y.

[0071] The other parts of this embodiment are the same as any one of the above embodiments 1-3, so they are not repeated here.

[0072] Embodiment 5:

[0073] This embodiment is further optimized on the basis of any one of the above embodiments 1-4. The binary feature point descriptor is a technology used in image processing and computer vision, which realizes fast matching and recognition by converting feature points in an image into binary descriptors. This descriptor is usually composed of a series of 0s and 1s, can efficiently represent the local information of feature points, and has significant advantages in calculation and storage.

[0074] Specifically, the binary feature point descriptor extracts key points in the image and generates a unique binary string for each key point that captures the local features around the key point.

[0075] The process of generating binary feature point descriptors usually includes the following steps: first, detect key points in the image, which are usually corners, edges or other significant features; second, sample the local area around each key point to extract its local features; then, convert these local features into binary form to form descriptors; finally, compare the binary descriptors of key points in different images to achieve fast matching and recognition.

[0076] The binary string is obtained by comparing the light and dark of the sampling points around the feature point area, and then concatenating these results into a complete binary string.

[0077] The two images confirmed by the Keras Facenet method are not completely accurate.

[0078] The present invention uses the Keras Facenet method in combination with the BRISK algorithm to match the face image in the database and the collected new face image again, that is, the collected new face image is first recognized by the improved face recognition network model, and successful recognition means that the new face image matches the face image in the database. However, in order to improve the accuracy and ensure the recognition rate at the same time, the present invention uses the Keras Facenet method in combination with the BRISK algorithm to extract the binary feature point descriptor on the new face image, extract the binary feature point descriptor on the face image matching the new face image in the database, and compare the binary feature point descriptors of the two images again for confirmation. If the recognition is consistent, the database remains unchanged. If the recognition is inconsistent, feedback of recognition failure is given and the new face is updated in the database.

[0079] The other parts of this embodiment are the same as any one of the above embodiments 1-4, so they are not repeated here.

[0080] Embodiment 6:

[0081] The present invention also provides a face recognition system matching the method, comprising a data collection unit, a model generation unit, a data storage unit and a secondary comparison unit.

[0082] The present invention also provides an electronic device, which includes a processor and a memory; the processor includes the face recognition system described above.

[0083] Embodiment 7:

[0084] The present invention also provides a computer-readable storage medium, which includes instructions; when the instructions are executed on the electronic device described in the above embodiment, the electronic device executes the method described in the above embodiment. Optionally, the computer-readable storage medium may be a memory.

[0085] The processor involved in the embodiments of the present application may be a chip. For example, it may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), or other integrated chips.

[0086] The memory involved in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0087] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0088] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0089] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0090] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0091] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one device or distributed on multiple devices. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0092] In addition, each functional module in each embodiment of the present application may be integrated into one device, or each module may exist physically separately, or two or more modules may be integrated into one device.

[0093] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing a computer program instruction on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or may contain one or more servers, data centers and other data storage devices that can be integrated with a medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0094] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification or equivalent change made to the above embodiment based on the technical essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A face recognition method, characterized in that: The following steps are involved: Step S1, collect face image data sets and construct them into training sets and test sets; Step S2, constructing an improved face recognition network model based on the dilated convolution and FaceCNN neural network, wherein the improved face recognition network model includes a feature extraction and enhancement module and a feature output module connected sequentially from front to back; Step S3, using the training set and loss function to guide the learning of the improved face recognition network model, and outputting the trained improved face recognition network model; Step S4, collect facial images, input the facial images into the trained improved facial recognition network model, generate trained facial images and store them in the database of the facial recognition system, collect new facial images, extract binary strings for information comparison, complete facial recognition and update the database storage results.

2. A face recognition method according to claim 1, characterized in that: The step S1 comprises: The face image datasets include the CK+ dataset and the Fer2013 dataset; The CK+ dataset and the Fer2013 dataset were trained after label fusion, and divided into a training set and a test set according to a ratio of 8:

2.

3. A face recognition method according to claim 1, characterized in that: The step S2 of constructing an improved face recognition network model based on dilated convolution and FaceCNN neural network includes: Replace all convolutional layers except the first and last convolutional layers in the FaceCNN neural network with the atrous convolutional layers; The linear rectification layer replaces all mixed pooling layers in the FaceCNN neural network except the mixed pooling layer after the first convolutional layer.

4. A face recognition method according to claim 1, characterized in that: The feature extraction and enhancement module and the feature output module connected in sequence from front to back in step S2 include: The feature extraction and enhancement module includes a first convolution layer, a first maxout layer, a first mixed pooling layer, a first hole convolution layer, a first linear correction layer, a second hole convolution layer, a second linear correction layer, a third hole convolution layer, a third linear correction layer, a fourth hole convolution layer, a fourth linear correction layer, a second mixed pooling layer, a second convolution layer, a second maxout layer and a Dropout layer, which are sequentially connected from front to back; The feature output module includes a fully connected layer, a Softmax layer and a Center Loss cost function layer; The first mixed pooling layer includes a first average pooling layer and a first maximum pooling layer connected in parallel, and the second mixed pooling layer includes a second average pooling layer and a second maximum pooling layer connected in parallel.

5. A face recognition method according to claim 1, characterized in that: The step S3 comprises: The loss function is a Center Loss cost function; The Center Loss cost function is expressed as: Among them, m is the number of samples in the mini-batch, n is the number of categories, W is the weight of the fully connected layer, b is the bias term, and x i is the feature vector of the i-th sample, belonging to the y-th i categories, It is the yth i The center vector of each category, λ represents the ratio of adjusting the Center Loss cost function, represents the j-th column weight in the last fully connected layer.

6. A face recognition method according to claim 1, characterized in that: The step S4 comprises: The loss value is attenuated by continuously iterating through preset hyperparameters until the number of iterations is equal to the maximum number of iterations, and then the training of the training set is terminated to generate trained face images and store them in the database of the face recognition system.

7. A face recognition method according to claim 1, characterized in that: The step S4 further comprises: The Keras Facenet method is combined with the BRISK algorithm to extract binary feature point descriptors of the face images in the database and the new face images for information comparison.

8. A face recognition system, characterized in that: It includes a data collection unit, a model generation unit, a data storage unit and a secondary comparison unit, wherein: A data collection unit, used to collect face image data sets and construct them into training sets and test sets; A model generation unit, used to construct an improved face recognition network model based on the dilated convolution and FaceCNN neural network, wherein the improved face recognition network model includes a feature extraction and enhancement module and a feature output module connected sequentially from front to back; used to guide the learning of the improved face recognition network model using the training set and the loss function, and output the trained improved face recognition network model; A data storage unit, used for the data storage unit to collect face images, input the face images into the trained improved face recognition network model, generate trained face images and store them in the database of the face recognition system; and update the database storage results; The secondary comparison unit is used to collect new face images and then extract binary strings for information comparison to complete face recognition.

9. An electronic device, characterized in that: It comprises a processor and a memory; the processor comprises the face recognition system as claimed in claim 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes instructions; when the instructions are executed on the electronic device as claimed in claim 9, the electronic device is caused to execute the method as claimed in any one of claims 1 to 7.