A face recognition method, system, electronic device and storage medium
By constructing and eliminating positive and negative sample pairs of face images, using contrast learning technology to remove face recognition irrelevant information, solving the problem of convergence in face recognition model training, improving recognition performance and providing a new contrast learning method.
Patent Information
- Application Number
- CN202110003723.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-04
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2041-01-04
AI Technical Summary
Existing facial recognition technology is difficult to effectively remove the identity ID-independent information in the feature space of the face image, which makes it difficult to converge model training and cannot be effectively applied to face recognition tasks.
By constructing positive and negative sample pairs, information that is not related to face recognition is eliminated from the feature space of the face image by using contrast learning. The specific steps include constructing positive samples using face images with the same ID at different angles. Yes, negative sample pairs are constructed using face images of different IDs of the same angle, and they are supervised and trained separately to eliminate irrelevant information such as angles.
It improves the performance of the face recognition model, provides a new contrast learning idea, and can more effectively remove identity-independent information from the feature space of the face image, improving recognition accuracy.
Smart Images

Figure CN112613480B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of face recognition technology, and in particular to a face recognition method, system, electronic device and storage medium. Background Art
[0002] Face recognition refers to a biometric technology that identifies people based on their facial features. A series of related technologies that use a camera or camera to collect images or video streams containing faces, automatically detect and track faces in the image, and then perform facial recognition on the detected faces are usually called portrait recognition or facial recognition. In Caffe's twin neural network, the loss function used is contrastive loss, which can effectively process the relationship between paired data in the twin neural network. The expression of contrastive loss is as follows:
[0003]
[0004] Where d = ||an-bn||2, represents the Euclidean distance of the two sample features, y is the label of whether the two samples match, y = 1 means that the two samples are similar or matched, y = 0 means they do not match, and margin is the set threshold. If the Euclidean distance of the originally similar samples in the feature space is large, it means that the current model is not good, so the loss is increased; when the samples are dissimilar, if the Euclidean distance in the feature space is small, the loss value will increase. The paper "Momentum Contrast for Unsupervised Visual Representation Learning" proposes an unsupervised visual representation contrast learning method, which organizes the data set into query and key, and uses two encoders to extract features from the query and key images and conduct contrast learning. Contrast learning is compared to the process of looking up a dictionary, and the dictionary is regarded as a queue. Momentum is introduced to update the two endocers. The trained encoder can be applied to downstream tasks. These methods improve the performance of face recognition by designing some loss functions, but they do not eliminate some features in the feature space of face images that are not related to identity ID (such as face angle information). For example, the paper "Momentum Contrast for Unsupervised Visual Representation Learning" proposed an unsupervised contrastive learning method, but the above paper uses different pictures enhanced from the same picture data as positive sample pairs and different pictures as negative sample pairs. In the face recognition task, different images of the same ID belong to the same category, so it is difficult to converge the model training without supervision. Therefore, the unsupervised contrastive learning method proposed in the paper "Momentum Contrast for Unsupervised Visual Representation Learning" cannot be effectively applied to the face recognition problem.
[0005] Therefore, in response to the above situation, the present invention proposes a face recognition method, system, electronic device and storage medium. The present invention uses a contrastive learning method to perform more effective supervision from other angles on information in face images that is not related to identity features, and removes this information from the feature space of face images, thereby improving the performance of the face recognition model and providing a new contrastive learning idea. Summary of the invention
[0006] The embodiments of the present application provide a face recognition method, system, electronic device and storage medium to at least solve the problem of subjective factors in related technologies.
[0007] The present invention provides a face recognition method, comprising:
[0008] Construction step: construct at least two sample pairs based on the face image;
[0009] Elimination step: Use contrastive learning to eliminate information irrelevant to face recognition from the sample pairs.
[0010] In the above-mentioned face recognition method, at least two of the sample pairs include at least a positive sample pair and a negative sample pair.
[0011] The above-mentioned face recognition method, the construction step includes:
[0012] Positive sample pair construction step: using face images of the same ID from different angles to form the positive sample pairs;
[0013] Negative sample pair construction step: Use face images with different IDs at the same angle to form the negative sample pairs.
[0014] In the above-mentioned face recognition method, the elimination step includes using the learning method to supervise each other to train the positive sample pairs and the negative sample pairs, and eliminating the information irrelevant to the face angle from the positive sample pairs and the negative sample pairs.
[0015] The present invention provides a face recognition system, characterized in that it is applicable to the face recognition method described above, and the face recognition system comprises:
[0016] Construction unit: construct at least two sample pairs according to the face image;
[0017] Elimination unit: uses contrastive learning to eliminate information irrelevant to face recognition from the sample pair.
[0018] In the above-mentioned face recognition system, at least two of the sample pairs include at least a positive sample pair and a negative sample pair.
[0019] In the above-mentioned face recognition system, the construction unit comprises:
[0020] Positive sample pair construction module: uses face images of the same ID from different angles to form the positive sample pairs;
[0021] Negative sample pair construction module: face images with different IDs at the same angle are organized into the negative sample pairs.
[0022] In the above-mentioned face recognition system, the elimination unit uses the learning method to supervise each other to train the positive sample pairs and the negative sample pairs, and eliminates the information irrelevant to the face angle from the positive sample pairs and the negative sample pairs.
[0023] Furthermore, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a face recognition method as described in any one of the above items when executing the computer program.
[0024] The present invention provides an electronic device readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by the processor, any of the above-mentioned face recognition methods is implemented.
[0025] Compared with the related art, the present invention proposes a face recognition method, system, electronic device and storage medium. The present invention uses a contrastive learning method to perform more effective supervision from other angles on information in face images that is not related to identity features, and removes this information from the feature space of the face image, thereby improving the performance of the face recognition model and providing a new contrastive learning idea.
[0026] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0028] Figure 1 is a flow chart of a face recognition method according to an embodiment of the present application;
[0029] Figure 2 is a flow chart of positive sample pair comparison learning according to an embodiment of the present application;
[0030] Figure 3 is a flow chart of negative sample pair comparison learning according to an embodiment of the present application;
[0031] Figure 4 It is a structural schematic diagram of the face recognition system of the present invention;
[0032] Figure 5 is a framework diagram of an electronic device according to an embodiment of the present application.
[0033] Wherein, the accompanying drawings are marked as follows:
[0034] Building blocks: 31;
[0035] Elimination units: 32;
[0036] Positive sample pair building block: 311;
[0037] Negative sample pair building module: 312;
[0038] 81: processor;
[0039] 82: memory;
[0040] 83: Communication interface;
[0041] 80: Bus. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0043] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.
[0044] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0045] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0046] The present invention is based on alternative supervised contrastive learning for face recognition, which is briefly introduced below.
[0047] Face recognition refers to a biometric technology that identifies people based on their facial features. A series of related technologies that use cameras or cameras to collect images or video streams containing faces, automatically detect and track faces in images, and then perform facial recognition on the detected faces are usually called portrait recognition or facial recognition. Face recognition The research on face recognition systems began in the 1960s. After the 1980s, it was improved with the development of computer technology and optical imaging technology. It really entered the primary application stage in the late 1990s, and was mainly implemented by the United States, Germany and Japan. The key to the success of a face recognition system lies in whether it has a cutting-edge core algorithm and whether the recognition results have a practical recognition rate and recognition speed. The "face recognition system" integrates artificial intelligence, machine recognition, machine learning, model theory, expert system, video image processing and other professional technologies. At the same time, it needs to combine the theory and implementation of intermediate value processing. It is the latest application of biometric recognition. The realization of its core technology shows the transformation from weak artificial intelligence to strong artificial intelligence. Traditional face recognition technology is mainly based on face recognition based on visible light images, which is also a familiar recognition method with a research and development history of more than 30 years. However, this method has insurmountable defects. Especially when the ambient light changes, the recognition effect will drop sharply and cannot meet the needs of the actual system. Solutions to the lighting problem include three-dimensional image face recognition and thermal imaging face recognition. However, these two technologies are far from mature and the recognition effect is not satisfactory. A rapidly developing solution is multi-light source face recognition technology based on active near-infrared images. It can overcome the influence of light changes and has achieved excellent recognition performance. The overall system performance in terms of accuracy, stability and speed exceeds that of three-dimensional image face recognition. This technology has developed rapidly in the past two or three years, making face recognition technology gradually become practical. The face is innate like other biological features of the human body (fingerprints, irises, etc.). Its uniqueness and good characteristics that are not easy to be copied provide the necessary premise for identity authentication. Compared with other types of biometrics, face recognition has the following characteristics: non-mandatory: users do not need to cooperate with face acquisition equipment specifically, and can obtain face images almost unconsciously. This sampling method is not "mandatory"; non-contact: users do not need to directly contact the device to obtain face images; concurrency: multiple faces can be sorted, judged and recognized in actual application scenarios; in addition, it also meets the visual characteristics: "identifying people by appearance", as well as simple operation, intuitive results, good concealment and other characteristics. The face recognition system mainly includes four components, namely: face image acquisition and detection, face image preprocessing, face image feature extraction, matching and recognition. Face image acquisition: Different face images can be collected through the camera lens, such as static images, dynamic images, different positions, different expressions, etc. can be well collected.When the user is within the shooting range of the acquisition device, the acquisition device will automatically search and capture the user's face image. Face detection: In practice, face detection is mainly used for preprocessing of face recognition, that is, accurately calibrating the position and size of the face in the image. The pattern features contained in the face image are very rich, such as histogram features, color features, template features, structural features and Haar features. Face detection is to pick out the useful information and use these features to achieve face detection. The mainstream face detection method uses the Adaboost learning algorithm based on the above features. The Adaboost algorithm is a method for classification. It combines some relatively weak classification methods to form a new and strong classification method. In the face detection process, the Adaboost algorithm is used to select some rectangular features (weak classifiers) that best represent the face, and the weak classifier is constructed into a strong classifier in a weighted voting manner. Then, several trained strong classifiers are connected in series to form a cascaded classifier, which effectively improves the detection speed of the classifier. Face image preprocessing: Face image preprocessing is the process of processing images based on face detection results and ultimately serving feature extraction. The original images obtained by the system are often not used directly due to various restrictions and random interference. They must be preprocessed with grayscale correction, noise filtering, etc. in the early stage of image processing. For face images, the preprocessing process mainly includes light compensation, grayscale transformation, histogram equalization, normalization, geometric correction, filtering, and sharpening of face images. Face image feature extraction: The features that can be used by face recognition systems are usually divided into visual features, pixel statistical features, face image transformation coefficient features, face image algebraic features, etc. Face feature extraction is performed on certain features of the face. Face feature extraction, also known as face representation, is the process of feature modeling of the face. Face feature extraction methods can be summarized into two categories: one is a knowledge-based representation method; the other is a representation method based on algebraic features or statistical learning. The knowledge-based representation method mainly obtains feature data that is helpful for face classification based on the shape description of facial organs and the distance characteristics between them. Its feature components usually include the Euclidean distance, curvature and angle between feature points. The face is composed of parts such as eyes, nose, mouth, chin, etc. The geometric description of these parts and the structural relationship between them can be used as an important feature for identifying faces. These features are called geometric features. Knowledge-based face representation mainly includes methods based on geometric features and template matching. Face image matching and recognition: The feature data of the extracted face image is searched and matched with the feature template stored in the database. By setting a threshold, when the similarity exceeds this threshold, the matching result is output. Face recognition is to compare the face features to be identified with the obtained face feature templates, and judge the identity information of the face based on the degree of similarity.This process can be divided into two categories: one is confirmation, which is a one-to-one image comparison process; the other is recognition, which is a one-to-many image matching and comparison process.
[0048] Face recognition requires the accumulation of a large amount of face image-related data collected to verify the algorithm and continuously improve the recognition accuracy. Such data include A Neural Network Face Recognition Assignment (neural network face recognition data), orl face database, MIT Biological and Computational Learning Center face recognition database, Essex University School of Computer and Electronic Engineering face recognition data, etc. Existing face recognition systems can achieve satisfactory results when users cooperate and the collection conditions are relatively ideal. However, when users do not cooperate and the collection conditions are not ideal, the recognition rate of existing systems will drop sharply. For example, when comparing faces, there are discrepancies with the faces stored in the system, such as shaving, changing hairstyle, adding glasses, and changing expressions, which may cause the comparison to fail.
[0049] Face recognition is considered to be one of the most difficult research topics in the field of biometric recognition and even in the field of artificial intelligence. The difficulty of face recognition is mainly caused by the characteristics of the face as a biometric feature. The difference between different individuals in facial similarity is not large. The structure of all faces is similar, and even the structure and appearance of facial organs are very similar. Such characteristics are beneficial for using faces for positioning, but they are not conducive to using faces to distinguish human individuals. The appearance of the face is very unstable. People can produce many expressions through changes in the face, and the visual image of the face is also very different from different observation angles. In addition, face recognition is also affected by many factors such as lighting conditions (such as day and night, indoors and outdoors, etc.), many facial coverings (such as masks, sunglasses, hair, beards, etc.), age, etc. In face recognition, the first type of changes should be magnified as a standard for distinguishing individuals, while the second type of changes should be eliminated because they can represent the same individual. The first type of changes are usually called inter-class differences, and the second type of changes are called intra-class differences. For faces, intra-class variations are often greater than inter-class variations, making it extremely difficult to use inter-class variations to distinguish individuals when disturbed by intra-class variations. There are many other factors in face images that affect the identity characteristics of faces, such as angle information features in face images, light features in images, etc., which are irrelevant to face identity features. If this information can be separated from face identity features by a comparison method, the performance of face recognition will be significantly improved. Some recent contrastive learning methods are exploring some unsupervised, semi-supervised or self-supervised scenarios. For example, patent CN111339988A involves a video face recognition method based on dynamic interval loss function and probability features, including the following steps: step S1: training a recognition network through a face recognition training set; step S2: using a trained recognition network as a feature extraction module, and training an uncertainty module through the same training set; step S3: using the learned uncertainty as the importance of the feature, the input video feature set is aggregated to obtain the aggregated features; step S4: using the mutual likelihood score to compare the aggregated features to complete the final recognition. This method can effectively identify faces in videos. For example, in patent CN111274947A, a multi-task multi-cue face recognition method, system and storage medium are disclosed, the method includes: performing face detection on the acquired picture, obtaining the face frame image, and obtaining the coordinates of the key points of the face according to the feature point detection and positioning, intercepting and obtaining the face feature part area set, inputting the face feature part area set into the corresponding feature part neural network for feature extraction, fusing the extracted feature vectors to obtain the overall face feature vector, and using cosine similarity for calculation to obtain the face recognition result.The present invention distinguishes different characteristic parts of the face, and inputs them into respective face recognition networks for feature extraction, and fuses the features to perform face recognition. Since this method utilizes partial areas of the face and does not rely solely on the face, the present invention still has a good recognition effect when the face is obscured, but does not remove information other than the identity features of the face in the image. For the task of face recognition, different images of the same ID actually belong to the same category, so it may be simpler and more effective to use contrastive learning to directly improve the performance of face recognition.
[0050] The present invention proposes a face recognition method, system, electronic device and storage medium. The present invention uses a contrastive learning method to perform more effective supervision from other angles on information in a face image that is not related to identity features, and removes this information from the feature space of the face image, thereby improving the performance of the face recognition model and providing a new contrastive learning idea. The following uses face recognition as an example to illustrate the embodiments of the present application.
[0051] Embodiment 1
[0052] This embodiment provides a face recognition method. Figure 1-Figure 3 , Figure 1 is a flow chart of a face recognition method according to an embodiment of the present application; Figure 2 is a flow chart of positive sample pair comparison learning according to an embodiment of the present application; Figure 3 : is a negative sample pair comparison learning flow chart according to an embodiment of the present application. As shown in the figure, the face recognition method includes the following steps:
[0053] Construction step S1: construct at least two sample pairs according to the face image;
[0054] Elimination step S2: using a contrastive learning method to eliminate information irrelevant to face recognition from the sample pairs.
[0055] In an embodiment, the at least two sample pairs include at least a positive sample pair and a negative sample pair.
[0056] In the embodiment, the construction step S1 includes:
[0057] Positive sample pair construction step S11: using face images of the same ID at different angles to form the positive sample pair;
[0058] Negative sample pair construction step S12: using face images with different IDs at the same angle to form the negative sample pair.
[0059] In the specific implementation, in the construction step S1, the face images of the same ID will have very different angles. This feature can be used to organize positive sample pairs, and face images of different IDs at the same angle can also form a negative sample pair. The identity information of the face is different, and the information such as the face angle is as consistent as possible.
[0060] In an embodiment, the elimination step S2 includes using the learning method to supervise each other to train the positive sample pairs and the negative sample pairs, and eliminating the information irrelevant to the face angle from the positive sample pairs and the negative sample pairs.
[0061] In the specific implementation, the above positive and negative sample pair comparison learning flow chart is as follows Figure 2 , Figure 3 As shown. In the positive sample pair contrast learning, unlike the general self-supervised and unsupervised contrast learning methods, in this type of positive sample pair, the two images are not data enhancements of one image, but face images taken from different angles of the same ID. Although the angles are different, they still belong to the same ID. By using the contrast learning method, different angles supervise each other, so that the similarity of the final feature matrices of the two networks is as high as possible, thereby eliminating irrelevant information such as angles. In the negative sample pair contrast learning, unlike the general self-supervised and unsupervised contrast learning methods, in this type of positive sample pair, the two images are not data enhancements of one image, but face images taken from the same angle of different IDs. Even if the angle information of the face is consistent, the identity information of the face is still inconsistent. By using the contrast learning method, the two images supervise each other, so that the similarity of the final feature matrices of the two networks is as low as possible, thereby eliminating information irrelevant to the face angle.
[0062] Therefore, the present invention proposes a face recognition method, system, electronic device and storage medium. The present invention uses a contrastive learning method to perform more effective supervision from other angles on information in face images that is not related to identity features, and removes this information from the feature space of the face image, thereby improving the performance of the face recognition model and providing a new contrastive learning idea.
[0063] Embodiment 2
[0064] Please refer to Figure 4 , Figure 4 FIG. 1 is a schematic diagram of the structure of the face recognition system of the present invention. Figure 4 As shown, the face recognition system of the invention is applicable to the above-mentioned face recognition method, and the face recognition system includes:
[0065] Construction unit 31: construct at least two sample pairs according to the face image;
[0066] Elimination unit 32: uses contrastive learning to eliminate information irrelevant to face recognition from the sample pairs.
[0067] In this embodiment, the at least two sample pairs include at least a positive sample pair and a negative sample pair.
[0068] In this embodiment, the construction unit 31 includes:
[0069] Positive sample pair construction module 311: using face images of the same ID at different angles to form the positive sample pairs;
[0070] Negative sample pair construction module 312: uses face images with different IDs at the same angle to form the negative sample pairs.
[0071] In this embodiment, the elimination unit 32 uses the learning method to supervise each other to train the positive sample pairs and the negative sample pairs, and eliminates the information irrelevant to the face angle from the positive sample pairs and the negative sample pairs.
[0072] Embodiment 3
[0073] In combination with FIG5 , this embodiment discloses a specific implementation of an electronic device. The electronic device may include a processor 81 and a memory 82 storing computer program instructions.
[0074] Specifically, the processor 81 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0075] Among them, the memory 82 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 82 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 82 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 82 may be inside or outside the data processing device. In a specific embodiment, the memory 82 is a non-volatile memory. In a specific embodiment, the memory 82 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (Erasable ProgrammableRead-Only Memory, FPROM for short), an electrically erasable PROM (Electrically Erasable ProgrammableRead-Only Memory, EFPROM for short), an electrically alterable ROM (Electrically Alterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0076] The memory 82 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 81 .
[0077] The processor 81 implements any face recognition method in the above embodiments by reading and executing computer program instructions stored in the memory 82 .
[0078] In some of the embodiments, the electronic device may further include a communication interface 83 and a bus 80. Figure 5 As shown, the processor 81, the memory 82, and the communication interface 83 are connected via a bus 80 and communicate with each other.
[0079] The communication interface 83 is used to implement communication between the modules, devices, units and / or equipment in the embodiment of the present application. The communication port 83 can also implement data communication with other components such as: external devices, image / data acquisition equipment, databases, external storage, and image / data processing workstations.
[0080] The bus 80 includes hardware, software or both, and couples the components of the electronic device to each other. The bus 80 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 80 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, bus 80 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0081] Electronic devices can be connected to the face recognition system to achieve integration Figure 1-Figure 3 Describe the method.
[0082] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0083] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A face recognition method, It is characterized in that include: Construction step: construct at least two sample pairs based on the face image; Elimination step: using contrastive learning to eliminate information irrelevant to face recognition from the sample pairs; Wherein, at least two of the sample pairs include at least a positive sample pair and a negative sample pair, and the construction step includes: Positive sample pair construction step: using face images of the same ID from different angles to form the positive sample pairs; Negative sample pair construction step: using face images with different IDs from the same angle to form the negative sample pair; The elimination step includes using the learning method to supervise each other to train the positive sample pair and the negative sample pair, and eliminating the information irrelevant to the face angle from the positive sample pair and the negative sample pair; In positive sample pair contrast learning, in this type of positive sample pair, the two images are not data enhancements of one image, but face images taken from different angles of the same ID. Using contrast learning, different angles supervise each other, so that the final feature matrices of the two networks are as similar as possible, thereby eliminating angle-irrelevant information; In the contrastive learning of negative sample pairs, in this type of negative sample pairs, the two images are not data enhancements of one image, but face images taken from the same angle from different IDs. Using the contrastive learning method, the two images supervise each other, making the similarity of the final feature matrices of the two networks as low as possible, thereby eliminating information irrelevant to the face angle.
2. A face recognition system, It is characterized in that The face recognition method according to claim 1 above, wherein the face recognition system comprises: Construction unit: construct at least two sample pairs according to the face image; Elimination unit: using contrastive learning to eliminate information irrelevant to face recognition from the sample pair; Wherein, at least two of the sample pairs include at least a positive sample pair and a negative sample pair, and the construction unit includes: Positive sample pair construction module: uses face images of the same ID from different angles to form the positive sample pairs; Negative sample pair construction module: using face images with different IDs from the same angle to form the negative sample pairs; The elimination unit uses the learning method to supervise and train the positive sample pairs and the negative sample pairs respectively, and eliminates the information irrelevant to the face angle from the positive sample pairs and the negative sample pairs; In positive sample pair contrast learning, in this type of positive sample pair, the two images are not data enhancements of one image, but face images taken from different angles of the same ID. Using contrast learning, different angles supervise each other, so that the final feature matrices of the two networks are as similar as possible, thereby eliminating angle-irrelevant information; In the contrastive learning of negative sample pairs, in this type of negative sample pairs, the two images are not data enhancements of one image, but face images taken from the same angle from different IDs. Using the contrastive learning method, the two images supervise each other, making the similarity of the final feature matrices of the two networks as low as possible, thereby eliminating information irrelevant to the face angle.
3. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, It is characterized in that When the processor executes the computer program, the face recognition method as claimed in claim 1 is implemented.
4. An electronic device readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the face recognition method as claimed in claim 1 is implemented.
Citation Information
Patent Citations
Multi-task multi-clue face recognition method and system and storage medium
CN111274947A
Video face recognition method based on dynamic interval loss function and probability characteristics
CN111339988A
Surveillance video character identity identification system and method thereof fusing facial multi-angle feature
CN106503687A
Face recognition method and device, apparatus and storage medium
CN109002790A
Face-feature point detection method, device, compute device and storage medium
CN109389030A
Cited By
Detecting face morphing by one-to-many face recognition
US20250005912A1
