Face recognition method, device and equipment and storage medium
By dividing the face recognition model into multiple sub-models and determining the target sample sub-training set for deletion and retraining when receiving a candidate deletion request, the problem of high computing power consumption during the model forgetting process is solved, and the training efficiency and business processing efficiency are improved.
Patent Information
- Application Number
- CN202310720333.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-16
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2043-06-16
AI Technical Summary
In the existing technology, face recognition models consume a lot of computing power during the model forgetting process, resulting in low training efficiency, affecting the business processing efficiency and user experience of financial business systems.
The pre-trained face recognition model is divided into multiple pre-trained sub-models, and the sample sub-training sets corresponding to each pre-trained sub-model are obtained. After receiving candidate deletion requests exceeding the quantity threshold, the target sample sub-training set is determined in the sample sub-training set according to the request set, and the target deletion request is determined, and then the sample face image is deleted in the target sample sub-training set to obtain the forgotten sub-training set, and the pre-trained sub-model is retrained using the forgotten sub-training set.
Effectively reduce the number of retraining times, lower the computing power overhead of the model forgetting process, improve training efficiency, and enhance the business processing efficiency and user experience of the financial business system.
Smart Images

Figure CN116704581B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to, but is not limited to, the field of financial technology, and in particular to a face recognition method, apparatus, device, and storage medium. Background Art
[0002] With the gradual maturity of pattern recognition technology, biometric identification of biological individuals based on biological signs has begun to be applied and promoted in the field of identity recognition. Many payment platforms have launched quick payment methods such as face-swiping payment based on facial recognition.
[0003] When processing financial industry-related business, financial business systems usually use facial recognition to achieve identity authentication. Financial business systems can be insurance systems, banking systems, trading systems, and order systems. Facial recognition is a biometric identification technology that uses facial feature information to identify people. In order to improve the recognition accuracy of facial recognition, it is usually necessary to train the facial recognition model with real facial data. The trained facial recognition model will retain the memory of the corresponding data. When the user requests to delete their facial data, it is necessary to delete the facial data in the server and forget the facial recognition model.
[0004] Currently, when a face recognition model is subjected to model forgetting, the corresponding face data is deleted from the training set of the financial business system, and the face recognition model is retrained using the processed training set to achieve model forgetting. However, the data volume of the training set of the financial business system is usually large, and the face recognition model requires a lot of computing power during the model forgetting process, resulting in low training efficiency. The face recognition model cannot be used normally during the model forgetting process, which affects the business processing efficiency of the financial business system and affects the user experience. Summary of the Invention
[0005] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0006] The embodiments of the present application provide a face recognition method, apparatus, device and storage medium, which can reduce the computing power overhead of the face recognition model during the model forgetting process and improve the training efficiency, thereby improving the business processing efficiency of the financial business system and ensuring user experience.
[0007] To achieve the above-mentioned purpose, the first aspect of an embodiment of the present application proposes a face recognition method, comprising: obtaining a pre-trained face recognition model and multiple sample sub-training sets, wherein the pre-trained face recognition model includes multiple pre-trained sub-models, the sample sub-training sets correspond to the pre-trained sub-models, the pre-trained sub-models are trained by the corresponding sample sub-training sets, and any of the sample sub-training sets includes multiple sample face images; receiving multiple candidate deletion requests, and arranging the multiple received candidate deletion requests in chronological order of reception time to form a request set, wherein the candidate deletion requests correspond one-to-one to the sample face images; when the first number of the candidate deletion requests in the request set is greater than or equal to A preset quantity threshold is set, and according to the request set, a target sample sub-training set is determined in each of the sample sub-training sets, and the candidate deletion request corresponding to the target sample sub-training set is used as a target deletion request; the target deletion request in the request set is deleted, and according to the target deletion request, the corresponding sample face image in the target sample sub-training set is deleted to obtain a forgotten sub-training set; according to the forgotten sub-training set, the corresponding pre-trained sub-model is retrained, and the pre-trained face recognition model is adjusted according to the retraining result to obtain a target face recognition model; a face image to be recognized is obtained, and the face image to be recognized is input into the target face recognition model to obtain a face recognition result.
[0008] In some embodiments, the method of retraining the corresponding pre-trained sub-model according to the forgotten sub-training set and adjusting the pre-trained face recognition model according to the retraining result to obtain a target face recognition model includes: detecting whether the candidate deletion request is received until a stop instruction is received; if the candidate deletion request is received, inserting the candidate deletion request into the request set in the order of reception time, and re-executing the step of determining the target sample sub-training set in each of the sample sub-training sets according to the request set when the first number of the candidate deletion requests in the request set is greater than or equal to a preset number threshold, and using the candidate deletion request corresponding to the target sample sub-training set as the target deletion request to delete the corresponding sample face image in the target sample sub-training set to obtain multiple forgotten sub-training sets; retraining the corresponding pre-trained sub-model according to each of the forgotten sub-training sets in turn to obtain the forgotten sub-model corresponding to each of the pre-trained sub-models; adjusting the pre-trained face recognition model according to all the forgotten sub-models to obtain a target face recognition model.
[0009] In some embodiments, obtaining a pre-trained face recognition model and multiple sample sub-training sets includes: obtaining a pre-trained face recognition model and a sample training set; splitting the sample training set according to a preset number of sub-models to obtain multiple sample sub-training sets, wherein the number of the sample sub-training sets is the number of sub-models, and there is no intersection between any two of the sample sub-training sets.
[0010] In some embodiments, the pre-trained face recognition model is trained through the following steps: obtaining an initial face recognition model and a sample identity label of each of the sample face images; splitting the initial face recognition model according to the number of sub-models to obtain multiple initial sub-models, wherein the initial sub-models correspond one-to-one to the sample sub-training sets; for any of the initial sub-models, training the initial sub-model according to the corresponding sample sub-training set and the sample identity label to obtain the pre-trained sub-model; and obtaining a pre-trained face recognition model based on all the pre-trained sub-models.
[0011] In some embodiments, when the first number of the candidate deletion requests in the request set is greater than or equal to a preset number threshold, a target sample sub-training set is determined in each of the sample sub-training sets according to the request set, and the candidate deletion requests corresponding to the target sample sub-training set are used as target deletion requests, including: when the first number of the candidate deletion requests in the request set is greater than or equal to a preset number threshold, a second number of the candidate deletion requests corresponding to each of the sample sub-training sets is determined according to the request set; the sample sub-training set corresponding to the second number with the largest value is used as the target sample sub-training set; and the candidate deletion requests corresponding to the target sample sub-training set are used as the target deletion requests.
[0012] In some embodiments, the target face recognition model includes multiple target sub-models, wherein the target sub-models correspond one-to-one to the pre-trained sub-models; obtaining the face image to be recognized and inputting the face image to be recognized into the target face recognition model to obtain the face recognition result includes: obtaining the face image to be recognized; inputting the face image to be recognized into each of the target sub-models; performing feature extraction on the face image to be recognized through the target sub-models and outputting a feature vector; performing fusion processing on the feature vectors output by each of the target sub-models, and classifying the fusion results to obtain a face recognition result.
[0013] To achieve the above-mentioned purpose, the second aspect of the embodiment of the present application proposes a model training method, comprising: obtaining a pre-trained face recognition model and multiple sample sub-training sets, wherein the pre-trained face recognition model includes multiple pre-trained sub-models, the sample sub-training sets correspond to the pre-trained sub-models, the pre-trained sub-models are trained by the corresponding sample sub-training sets, and any of the sample sub-training sets includes multiple sample face images; receiving multiple candidate deletion requests, and arranging the received multiple candidate deletion requests in chronological order of reception time to form a request set, wherein the candidate deletion requests correspond one-to-one to the sample face images; when the request The first number of the candidate deletion requests in the set is greater than or equal to a preset number threshold. According to the request set, a target sample sub-training set is determined in each of the sample sub-training sets, and the candidate deletion request corresponding to the target sample sub-training set is used as a target deletion request; the target deletion request in the request set is deleted, and according to the target deletion request, the corresponding sample face image in the target sample sub-training set is deleted to obtain a forgotten sub-training set; according to the forgotten sub-training set, the corresponding pre-trained sub-model is retrained, and the pre-trained face recognition model is adjusted according to the retraining result to obtain a target face recognition model.
[0014] To achieve the above-mentioned purpose, the third aspect of the embodiment of the present application proposes a face recognition device, including: a first acquisition unit, used to acquire a pre-trained face recognition model and multiple sample sub-training sets, wherein the pre-trained face recognition model includes multiple pre-trained sub-models, the sample sub-training sets correspond to the pre-trained sub-models, the pre-trained sub-models are trained by the corresponding sample sub-training sets, and any of the sample sub-training sets includes multiple sample face images; a first receiving unit, used to receive multiple candidate deletion requests, and arrange the received multiple candidate deletion requests in chronological order of reception time to form a request set, wherein the candidate deletion requests correspond one-to-one to the sample face images; a first judgment unit, used to determine when the first number of the candidate deletion requests in the request set is greater than or equal to the pre-trained number. A quantity threshold is set, and a target sample sub-training set is determined in each of the sample sub-training sets according to the request set, and the candidate deletion request corresponding to the target sample sub-training set is used as a target deletion request; a first deletion unit is used to delete the target deletion request in the request set, and delete the corresponding sample face image in the target sample sub-training set according to the target deletion request to obtain a forgotten sub-training set; a first retraining unit is used to retrain the corresponding pre-trained sub-model according to the forgotten sub-training set, and adjust the pre-trained face recognition model according to the retraining result to obtain a target face recognition model; a first recognition unit is used to obtain a face image to be recognized, and input the face image to be recognized into the target face recognition model to obtain a face recognition result.
[0015] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it implements the face recognition method described in the first aspect or the model training method described in the second aspect.
[0016] To achieve the above-mentioned purpose, the fifth aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium, and the storage medium stores a computer program. When the computer program is executed by the processor, it implements the face recognition method described in the first aspect above, or the model training method described in the second aspect above.
[0017] The face recognition method, apparatus, device and storage medium proposed in the present application, the embodiment of the present application includes: obtaining a pre-trained face recognition model and multiple sample sub-training sets, wherein the pre-trained face recognition model includes multiple pre-trained sub-models, the sample sub-training sets correspond to the pre-trained sub-models, the pre-trained sub-models are trained by the corresponding sample sub-training sets, and any of the sample sub-training sets includes multiple sample face images; receiving multiple candidate deletion requests, and arranging the multiple received candidate deletion requests in chronological order of reception time to form a request set, wherein the candidate deletion requests correspond one-to-one to the sample face images; when the first number of the candidate deletion requests in the request set is greater than or equal to the pre-trained A quantity threshold is set, and according to the request set, a target sample sub-training set is determined in each of the sample sub-training sets, and the candidate deletion request corresponding to the target sample sub-training set is used as a target deletion request; the target deletion request in the request set is deleted, and according to the target deletion request, the corresponding sample face image in the target sample sub-training set is deleted to obtain a forgotten sub-training set; according to the forgotten sub-training set, the corresponding pre-trained sub-model is retrained, and the pre-trained face recognition model is adjusted according to the retraining result to obtain a target face recognition model; a face image to be recognized is obtained, and the face image to be recognized is input into the target face recognition model to obtain a face recognition result. According to the solution provided in the embodiment of the present application, the pre-trained face recognition model is divided into multiple pre-trained sub-models, and the sample sub-training sets corresponding to each pre-trained sub-model are obtained, and then a candidate deletion request is received. After receiving the candidate deletion request exceeding the quantity threshold, the target sample sub-training set is determined in the sample sub-training set according to the request set, and the target deletion request is determined. Then, in the target sample sub-training set, the sample face image corresponding to the target deletion request is deleted to obtain a forgotten sub-training set, and then the pre-trained sub-model is retrained using the forgotten sub-training set. By setting a quantity threshold, the model forgetting operation is performed only when the candidate deletion request is greater than the quantity threshold. This can effectively reduce the number of retraining times and reduce the computing power overhead of the model forgetting process. In addition, each time the model forgetting operation is performed, only the forgotten sub-training set is used to retrain the corresponding pre-training sub-model, and there is no need to process all the sample face images. This can further reduce the computing power overhead of the model forgetting process, effectively improve the training efficiency, thereby improving the business processing efficiency of the financial business system and ensuring user experience.
[0018] Other features and advantages of the present application will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present application. The purposes and other advantages of the present application can be achieved and obtained through the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings are used to provide a further understanding of the technical solutions of the present application, constitute a part of the specification, and are used to explain the technical solutions of the present application together with the embodiments of the present application, and do not constitute a limitation on the technical solutions of the present application.
[0020] Figure 1 is a flowchart of a face recognition method provided by an embodiment of the present application;
[0021] Figure 2 is a flowchart of a method for retraining a pre-trained sub-model provided by another embodiment of the present application;
[0022] Figure 3 is a flowchart of a method for obtaining a sample sub-training set provided by another embodiment of the present application;
[0023] Figure 4 is a flowchart of a method for pre-training a face recognition model provided by another embodiment of the present application;
[0024] Figure 5 is a flowchart of a method for determining a target sample sub-training set provided by another embodiment of the present application;
[0025] Figure 6 is a flowchart of a method for obtaining a face recognition result provided by another embodiment of the present application;
[0026] Figure 7 is a flowchart of a model training method provided by another embodiment of the present application;
[0027] Figure 8 is a structural schematic diagram of a face recognition device provided by another embodiment of the present application;
[0028] Figure 9 is a structural schematic diagram of a model training device provided by another embodiment of the present application;
[0029] Figure 10 is a hardware structural schematic diagram of an electronic device provided by another embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to make the objects, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and do not limit the present application.
[0031] In the description of the present application, the meaning of several is one or more, the meaning of multiple is two or more, greater than, less than, more than, etc. are understood as not including the number, above, below, etc. are understood as including the number.
[0032] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and the like in the specification, claims, or accompanying drawings are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.
[0033] First, let’s analyze some of the terms used in this application:
[0034] Artificial Intelligence (AI) is a new technical discipline that studies and develops theories, methods, technologies, and application systems for simulating, extending, and expanding human intelligence. A branch of computer science, AI seeks to understand the essence of intelligence and create new intelligent machines that can respond in a manner similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thinking. It also encompasses theories, methods, technologies, and application systems that use digital computers or digital computer-controlled machines to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results.
[0035] Currently, when a face recognition model is subjected to model forgetting, the corresponding face data is deleted from the training set of the financial business system, and the face recognition model is retrained using the processed training set to achieve model forgetting. However, the data volume of the training set of the financial business system is usually large, and the face recognition model requires a lot of computing power during the model forgetting process, resulting in low training efficiency. The face recognition model cannot be used normally during the model forgetting process, which affects the business processing efficiency of the financial business system and affects the user experience.
[0036] In response to the problem that a face recognition model consumes a lot of computing power during the model forgetting process, has low training efficiency, and affects user experience, the present application provides a face recognition method, apparatus, device, and storage medium, the method comprising: obtaining a pre-trained face recognition model and multiple sample sub-training sets, wherein the pre-trained face recognition model includes multiple pre-training sub-models, the sample sub-training sets correspond to the pre-training sub-models, the pre-training sub-models are trained by the corresponding sample sub-training sets, and any sample sub-training set includes multiple sample face images; receiving multiple candidate deletion requests, and arranging the received multiple candidate deletion requests in chronological order of receipt to form a request set, wherein the candidate deletion requests correspond one-to-one to the sample face images; When the first number of candidate deletion requests in the request set is greater than or equal to a preset number threshold, a target sample sub-training set is determined in each sample sub-training set according to the request set, and the candidate deletion request corresponding to the target sample sub-training set is used as a target deletion request; the target deletion request in the deletion request set is deleted, and according to the target deletion request, the corresponding sample face image in the target sample sub-training set is deleted to obtain a forgotten sub-training set; according to the forgotten sub-training set, the corresponding pre-trained sub-model is retrained, and the pre-trained face recognition model is adjusted according to the retraining result to obtain a target face recognition model; the face image to be recognized is obtained, and the face image to be recognized is input into the target face recognition model to obtain a face recognition result. According to the solution provided in the embodiment of the present application, the pre-trained face recognition model is divided into multiple pre-trained sub-models, and the sample sub-training sets corresponding to each pre-trained sub-model are obtained, and then a candidate deletion request is received. After receiving the candidate deletion request exceeding the quantity threshold, the target sample sub-training set is determined in the sample sub-training set according to the request set, and the target deletion request is determined. Then, in the target sample sub-training set, the sample face image corresponding to the target deletion request is deleted to obtain a forgotten sub-training set, and then the pre-trained sub-model is retrained using the forgotten sub-training set. By setting a quantity threshold, the model forgetting operation is performed only when the candidate deletion request is greater than the quantity threshold. This can effectively reduce the number of retraining times and reduce the computing power overhead of the model forgetting process. In addition, each time the model forgetting operation is performed, only the forgotten sub-training set is used to retrain the corresponding pre-training sub-model, and there is no need to process all the sample face images. This can further reduce the computing power overhead of the model forgetting process, effectively improve the training efficiency, thereby improving the business processing efficiency of the financial business system and ensuring user experience.
[0037] The face recognition method, apparatus, device, and storage medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the face recognition method in the embodiments of the present application is described.
[0038] The face recognition method provided in the embodiment of the present application relates to the field of financial technology. The face recognition method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or as a server cluster or distributed system composed of multiple physical servers, or as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the face recognition method, etc., but is not limited to the above forms.
[0039] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0040] It should be noted that in each specific embodiment of the present application, when it comes to the need to perform relevant processing based on data related to the user's identity or characteristics, such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of such data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0041] The embodiments of the present application are further described below with reference to the accompanying drawings.
[0042] like Figure 1 As shown, Figure 1This is a flowchart of a face recognition method provided by one embodiment of the present application. The face recognition method includes but is not limited to the following steps:
[0043] Step S110, obtaining a pre-trained face recognition model and multiple sample sub-training sets, wherein the pre-trained face recognition model includes multiple pre-training sub-models, the sample sub-training sets correspond to the pre-training sub-models, the pre-training sub-models are trained by the corresponding sample sub-training sets, and any sample sub-training set includes multiple sample face images;
[0044] Step S120, receiving multiple candidate deletion requests, and arranging the received multiple candidate deletion requests in chronological order of receipt to form a request set, wherein the candidate deletion requests correspond one-to-one to the sample face images;
[0045] Step S130: When the first number of candidate deletion requests in the request set is greater than or equal to a preset number threshold, a target sample sub-training set is determined from each sample sub-training set according to the request set, and the candidate deletion requests corresponding to the target sample sub-training set are used as target deletion requests;
[0046] Step S140, deleting the target deletion request in the request set, and deleting the corresponding sample face image in the target sample sub-training set according to the target deletion request, to obtain a forgotten sub-training set;
[0047] Step S150: retraining the corresponding pre-trained sub-model based on the forgotten sub-training set, and adjusting the pre-trained face recognition model based on the re-training result to obtain a target face recognition model;
[0048] Step S160: Obtain a face image to be recognized, and input the face image to be recognized into a target face recognition model to obtain a face recognition result.
[0049] It is understandable that when dealing with financial industry-related businesses, face recognition is usually used to achieve identity authentication. In order to improve the recognition accuracy of the face recognition model, a large amount of user face data is needed to train the face recognition model. The trained face recognition model will retain the memory of the face data. When the user requests to delete his face data, a candidate deletion request is received from the target user. When the first number of candidate deletion requests is greater than or equal to the number threshold, the target sample sub-training set is determined, and the target deletion request is determined in the request set. Then, the sample face image corresponding to the target deletion request is deleted from the target sample sub-training set to obtain a forgotten sub-training set, and the forgotten sub-training set is used to retrain the pre-trained sub-model, so that the memory of the corresponding sample face image retained by the pre-trained sub-model gradually becomes smaller. When the memory of the corresponding sample face image is reduced to a negligible level, the retraining of the pre-trained sub-model is terminated, and then the target face recognition model is determined, and the model forgetting of the face recognition model is realized. When the target face recognition model is used to identify the face image to be identified, The target user's facial data will not be leaked; based on this, by dividing the pre-trained face recognition model into multiple pre-trained sub-models, and obtaining the sample sub-training sets corresponding to each pre-trained sub-model, and then receiving candidate deletion requests, after receiving candidate deletion requests exceeding the quantity threshold, the target sample sub-training set is determined in the sample sub-training set according to the request set, and the target deletion request is determined, and then in the target sample sub-training set, the sample face image corresponding to the target deletion request is deleted to obtain the forgotten sub-training set, and then the pre-trained sub-model is retrained using the forgotten sub-training set. By setting the quantity threshold, the model forgetting operation is performed only when the candidate deletion request is greater than the quantity threshold, which can effectively reduce the number of retraining times and reduce the computing power overhead of the model forgetting process. In addition, each time the model forgetting operation is performed, only the forgotten sub-training set is used to retrain the corresponding pre-training sub-model, and there is no need to process all the sample face images. This can further reduce the computing power overhead of the model forgetting process, effectively improve the training efficiency, thereby improving the business processing efficiency of the financial business system and ensuring user experience.
[0050] Taking the banking system as an example, when users apply for or obtain credit cards through the banking system, facial recognition is usually used to achieve identity authentication. The banking system usually needs to use real facial data to train the facial recognition model. When the user requests to delete his or her facial data, the facial recognition model needs to be forgotten.
[0051] For example, when a user needs to apply for a loan, the user accesses the bank system through the terminal, and the bank system sends an authentication instruction to the terminal. After receiving the authentication instruction, the terminal will display an authentication permission prompt on the terminal screen. After obtaining the user's permission or consent, the terminal can obtain the user's face image to be identified and send the face image to be identified to the bank system. The bank system uses the face recognition model to authenticate the user's identity. Only after the authentication is passed can the subsequent loan application process be carried out. The face recognition model of the bank system is a pre-trained face recognition model. The pre-trained face recognition model includes multiple pre-trained sub-models. The pre-trained sub-models of the bank system are trained by the corresponding sample sub-training sets. In order to ensure the accuracy of the face recognition model of the bank system, a large number of sample face images are required for training. The first number of candidate deletion requests in the request set is greater than or equal to the number threshold, the corresponding sample face images in the target sample sub-training set are deleted, and the forgotten sub-training set is obtained, and the corresponding pre-trained sub-model is retrained. Then, the pre-trained face recognition model is adjusted and processed according to the retraining result to obtain the target face recognition model. The model forgetting operation is performed only when the candidate deletion request is greater than the number threshold, which can effectively reduce the number of retraining and reduce the computing power overhead of the model forgetting process. Moreover, each time the model forgetting operation is performed, only the forgotten sub-training set is used to retrain the corresponding pre-trained sub-model, and there is no need to process all the sample face images. This can further reduce the computing power overhead of the model forgetting process and effectively improve the training efficiency, thereby improving the loan business processing efficiency of the banking system and ensuring user experience.
[0052] It should be noted that for the S pre-trained sub-models of the banking system, there are correspondingly S sample sub-training sets, and the i-th pre-trained sub-model M i From the i-th sample sub-training set D i After training, candidate deletion requests are received, the quantity threshold is set to μ, the first quantity of the request set is K, and when K ≥ μ, the target sample sub-training set is determined, and the target deletion request is determined in the request set, and then the target sample sub-training set is deleted, and the pre-trained sub-model is retrained.
[0053] In specific practice, financial industry-related businesses include but are not limited to: business business, payment business, transaction business, securities business, banking business, tax business, credit card business, shopping business and insurance business.
[0054] In addition, refer to Figure 2 In one embodiment, Figure 1 Step S150 in the illustrated embodiment includes but is not limited to the following steps:
[0055] Step S210, detecting whether a candidate deletion request is received, until a stop instruction is received;
[0056] Step S220: If a candidate deletion request is received, the candidate deletion request is inserted into the request set in the order of the time of receipt, and the step of determining a target sample sub-training set from each sample sub-training set according to the request set and treating the candidate deletion request corresponding to the target sample sub-training set as the target deletion request is re-executed when the first number of candidate deletion requests in the request set is greater than or equal to the preset number threshold, so as to delete the corresponding sample face images in the target sample sub-training set and obtain multiple forgotten sub-training sets;
[0057] Step S230, retraining the corresponding pre-trained sub-models in sequence according to the respective forgotten sub-training sets to obtain the forgotten sub-models corresponding to the respective pre-trained sub-models;
[0058] Step S240: Adjust the pre-trained face recognition model according to all forgotten sub-models to obtain a target face recognition model.
[0059] It is understandable that before receiving the stop instruction, candidate deletion requests will continue to be received, and the steps of deleting the sample face images in the target sample sub-training set will be executed cyclically. For example, the number threshold is set to μ, the current first number is K, and K ≥ μ, and the target sample sub-training set is determined in the sample sub-training set of the bank system. Assume that the target sample sub-training set is D x , the number of target deletion requests corresponding to the target sample sub-training set is R, the target deletion requests in the deletion request set are deleted, and the target sample sub-training set D x Perform deletion processing. The current first number is K-R1. If N candidate deletion requests are received, when K-R1+N≥μ, the target sample sub-training set is determined again in the sample sub-training set. Assume that the target sample sub-training set is D y , the number of target deletion requests corresponding to the target sample sub-training set is R2, the target deletion requests in the deletion request set are deleted, and the target sample sub-training set D y Perform deletion processing and cyclically execute the steps of deleting the sample face images in the target sample sub-training set until a stop instruction is received. Then, according to each deleted target sample sub-training set, retrain the corresponding pre-training sub-model to obtain each forgotten sub-model, and then obtain the target face recognition model.
[0060] It should be noted that, in any two deletion processes, the target deletion requests corresponding to the two deletion processes are used to delete the sample face images in the same target sample sub-training set, and the target sample sub-training set can repeatedly perform deletion processing.
[0061] In addition, refer to Figure 3 In one embodiment, Figure 1 Step S110 in the illustrated embodiment includes but is not limited to the following steps:
[0062] Step S310, obtaining a pre-trained face recognition model and a sample training set;
[0063] Step S320: split the sample training set according to the preset number of sub-models to obtain multiple sample sub-training sets, wherein the number of sample sub-training sets is the number of sub-models, and there is no intersection between any two sample sub-training sets.
[0064] It is understandable that we first obtain the sample training set D full , the sample training set is split by the number of sub-models. Assuming that the number of sub-models of the banking system is S, S sample sub-training sets are obtained, which can make the sample sub-training sets and pre-training sub-models correspond one to one. The relationship between the sample training set and the sample sub-training sets is:
[0065]
[0066] Among them, ∪ represents the set union operation, D i is the i-th sample sub-training set.
[0067] In addition, refer to Figure 4 In one embodiment, Figure 1 The training steps of the pre-trained face recognition model in step S110 in the illustrated embodiment include but are not limited to the following steps:
[0068] Step S410, obtaining an initial face recognition model and a sample identity label of each sample face image;
[0069] Step S420: splitting the initial face recognition model according to the number of sub-models to obtain multiple initial sub-models, wherein the initial sub-models correspond one-to-one to the sample sub-training sets;
[0070] Step S430: For any initial sub-model, the initial sub-model is trained according to the corresponding sample sub-training set and sample identity labels to obtain a pre-trained sub-model;
[0071] Step S440: Obtain a pre-trained face recognition model based on all pre-trained sub-models.
[0072] It can be understood that the initial face recognition model is first obtained, and the initial face recognition model is split according to the number of sub-models. Assuming that the number of sub-models of the banking system is S, S initial sub-models are obtained, which can make the sample sub-training set and the initial sub-model correspond one-to-one. For any initial sub-model, the sample sub-training set and the corresponding sample identity label are used as training data to train the initial sub-model to obtain a pre-trained sub-model, and then a pre-trained face recognition model is obtained. The relationship between the pre-trained face recognition model and the pre-trained sub-model is:
[0073] Among them, M i is the i-th pre-trained sub-model.
[0074] In addition, refer to Figure 5 In one embodiment, Figure 1 Step S130 in the illustrated embodiment includes but is not limited to the following steps:
[0075] Step S510: When the first number of candidate deletion requests in the request set is greater than or equal to a preset number threshold, determine the second number of candidate deletion requests corresponding to each sample sub-training set according to the request set;
[0076] Step S520, taking the sample sub-training set corresponding to the second number with the largest value as the target sample sub-training set;
[0077] Step S530: taking the candidate deletion request corresponding to the target sample sub-training set as the target deletion request.
[0078] It can be understood that when the first number is greater than or equal to the number threshold, it is necessary to determine the target sample sub-training set and the target deletion request. First, based on the sample face image corresponding to the candidate deletion request in the request set, the sample sub-training set is traversed to determine the second number of candidate deletion requests corresponding to each sample sub-training set. Then, in each sample sub-training set, the sample sub-training set with the largest second number is used as the target sample sub-training set. Since the target sample sub-training set corresponds to the largest number of candidate deletion requests, the pre-trained sub-model corresponding to the target sample sub-training set is used as the target model in the current retraining process, and the target deletion request is determined.
[0079] It should be noted that, since the candidate deletion requests correspond one-to-one to the sample facial images, in a sample sub-training set, it is possible to determine the sample facial images in the sample sub-training set that correspond to each candidate deletion request, and the number of sample facial images with the corresponding relationship is taken as the second number. Therefore, the candidate deletion request corresponding to the sample sub-training set refers to the candidate deletion request in the request set that corresponds to the sample sub-training set, and the target deletion request refers to the candidate deletion request in the request set that corresponds to the target sample sub-training set.
[0080] In addition, refer to Figure 6 ,In one embodiment, the target face recognition model includes a plurality of target ,sub-models, wherein the target sub-models correspond one to one other to the pre-trained ,sub-models; Figure 1 Step S160 in the illustrated embodiment includes but is not limited to the following steps:
[0081] Step S610, obtaining a face image to be recognized;
[0082] Step S620, inputting the face image to be recognized into each target sub-model;
[0083] Step S630, extracting features from the face image to be recognized using the target sub-model and outputting a feature vector;
[0084] Step S640: Fusing the feature vectors output by each target sub-model and classifying the fusion results to obtain a face recognition result.
[0085] It can be understood that in the recognition process of the face image to be recognized, the face image to be recognized is input into each target sub-model respectively. For example, the S target sub-models of the banking system respectively output corresponding feature vectors, and then all feature vectors are fused to obtain a fusion vector. For the face image x to be recognized input into the banking system, the fusion result is: Among them, P(x) is the fusion result, M i (x) is the feature vector output by the i-th target sub-model, and then the fusion result is classified through the linear layer to obtain the face recognition result.
[0086] like Figure 7 As shown, Figure 7 This is a flowchart of a model training method provided by one embodiment of the present application. The model training method includes but is not limited to the following steps:
[0087] Step S710: obtaining a pre-trained face recognition model and multiple sample sub-training sets, wherein the pre-trained face recognition model includes multiple pre-training sub-models, the sample sub-training sets correspond to the pre-training sub-models, the pre-training sub-models are trained by the corresponding sample sub-training sets, and any sample sub-training set includes multiple sample face images;
[0088] Step S720: receiving multiple candidate deletion requests, and arranging the received multiple candidate deletion requests in chronological order of receipt to form a request set, wherein the candidate deletion requests correspond one-to-one to the sample facial images;
[0089] Step S730: When the first number of candidate deletion requests in the request set is greater than or equal to a preset number threshold, a target sample sub-training set is determined from each sample sub-training set according to the request set, and the candidate deletion requests corresponding to the target sample sub-training set are used as target deletion requests;
[0090] Step S740: deleting the target deletion request in the request set, and deleting the corresponding sample face image in the target sample sub-training set according to the target deletion request to obtain a forgotten sub-training set;
[0091] Step S750, retraining the corresponding pre-training sub-model according to the forgetting sub-training set, and adjusting the pre-training face recognition model according to the retraining result to obtain a target face recognition model.
[0092] It can be understood that the specific implementation of the model training method is based on the same inventive concept as the above-mentioned face recognition method, so that the model training method divides the pre-training face recognition model into a plurality of pre-training sub-models, obtains a sample sub-training set corresponding to each pre-training sub-model, then receives a candidate deletion request, and after receiving more than a number threshold of candidate deletion requests, determines a target sample sub-training set in the sample sub-training set according to the request set, and determines a target deletion request. Then, in the target sample sub-training set, delete the sample face image corresponding to the target deletion request to obtain a forgetting sub-training set, and then retrain the pre-training sub-model using the forgetting sub-training set. By setting a number threshold, the model forgetting operation is only performed when the candidate deletion request is greater than the number threshold, which can effectively reduce the number of retraining and reduce the computing power consumption of the model forgetting process. In addition, each time the model forgetting operation is performed, only the corresponding pre-training sub-model is retrained using the forgetting sub-training set, without processing all sample face images, which can further reduce the computing power consumption of the model forgetting process and effectively improve the training efficiency, thereby improving the business processing efficiency of the financial business system and ensuring user experience.
[0093] It should be noted that the detailed principles of steps S710 to S750 can be referred to the explanation of steps S110 to S150 above, which will not be repeated here.
[0094] In addition, with reference to Figure 8 The present application also provides a face recognition device 800, comprising:
[0095] The first obtaining unit 810 is configured to obtain a pre-training face recognition model and a plurality of sample sub-training sets, wherein the pre-training face recognition model comprises a plurality of pre-training sub-models, the sample sub-training set corresponds to the pre-training sub-model, the pre-training sub-model is trained by the corresponding sample sub-training set, and each sample sub-training set comprises a plurality of sample face images.
[0096] The first receiving unit 820 is configured to receive a plurality of candidate deletion requests and arrange the received plurality of candidate deletion requests in the order of receiving time to form a request set, wherein the candidate deletion request corresponds to the sample face image one by one.
[0097] The first judging unit 830 is configured to, when the first number of candidate deletion requests in the request set is greater than or equal to a preset number threshold, determine a target sample sub-training set in each sample sub-training set according to the request set, and take the candidate deletion request corresponding to the target sample sub-training set as a target deletion request.
[0098] A first deletion unit 840 is configured to delete a target deletion request from the request set, and delete the corresponding sample face image from the target sample sub-training set according to the target deletion request to obtain a forgotten sub-training set;
[0099] A first retraining unit 850 is configured to retrain the corresponding pretrained sub-model based on the forgotten sub-training set, and adjust the pretrained face recognition model based on the retraining result to obtain a target face recognition model;
[0100] The first recognition unit 860 is used to obtain a face image to be recognized, and input the face image to be recognized into a target face recognition model to obtain a face recognition result.
[0101] It is understandable that the specific implementation of the face recognition device 800 is basically the same as the specific embodiment of the above-mentioned face recognition method, and will not be repeated here.
[0102] In addition, reference Figure 9 , the present application also provides a model training device 900, comprising:
[0103] A second acquisition unit 910 is configured to acquire a pre-trained face recognition model and multiple sample sub-training sets, wherein the pre-trained face recognition model includes multiple pre-training sub-models, the sample sub-training sets correspond to the pre-training sub-models, the pre-training sub-models are trained using the corresponding sample sub-training sets, and any sample sub-training set includes multiple sample face images;
[0104] A second receiving unit 920 is configured to receive multiple candidate deletion requests and arrange the received multiple candidate deletion requests in chronological order to form a request set, wherein the candidate deletion requests correspond one to one with the sample face images;
[0105] A second determining unit 930 is configured to, when a first number of candidate deletion requests in the request set is greater than or equal to a preset number threshold, determine a target sample sub-training set from each sample sub-training set based on the request set, and use the candidate deletion requests corresponding to the target sample sub-training set as the target deletion requests;
[0106] A second deleting unit 940 is configured to delete a target deletion request in the request set, and delete the corresponding sample face image in the target sample sub-training set according to the target deletion request to obtain a forgotten sub-training set;
[0107] The second retraining unit 950 is used to retrain the corresponding pre-trained sub-model according to the forgotten sub-training set, and adjust the pre-trained face recognition model according to the retraining result to obtain the target face recognition model.
[0108] It can be understood that the specific implementation of the model training device 900 is basically the same as the specific embodiment of the above-mentioned model training method, and will not be repeated here.
[0109] In addition, refer to Figure 10 , Figure 10 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:
[0110] The processor 1001 can be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0111] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1002 and are called by the processor 1001 to execute the face recognition method of the embodiment of the present application, for example, to execute the above-described Figure 1 Steps S110 to S160 of the method, Figure 2 Steps S210 to S240 of the method, Figure 3 Steps S310 to S320 of the method, Figure 4 Method steps S410 to S440, Figure 5 Method steps S510 to S530, Figure 6 The method steps S610 to S640 in the embodiment of the present invention are performed, or the model training method of the embodiment of the present invention is performed, for example, the method steps S610 to S640 described above are performed. Figure 7 Method steps S710 to S750;
[0112] Input / output interface 1003, used to implement information input and output;
[0113] Communication interface 1004, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0114] Bus 1005 , which transmits information between various components of the device (e.g., processor 1001 , memory 1002 , input / output interface 1003 , and communication interface 1004 );
[0115] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .
[0116] The embodiment of the present application also provides a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned face recognition method, for example, to execute the above-described Figure 1 Steps S110 to S160 of the method, Figure 2 Steps S210 to S240 of the method, Figure 3 Steps S310 to S320 of the method, Figure 4 Method steps S410 to S440, Figure 5 Method steps S510 to S530, Figure 6 or implement the above model training method, for example, executing the above described steps S610 to S640. Figure 7 Method steps S710 to S750 in .
[0117] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0118] The face recognition method, apparatus, device and storage medium provided by the embodiments of the present application are as follows: obtaining a pre-trained face recognition model and multiple sample sub-training sets, wherein the pre-trained face recognition model includes multiple pre-trained sub-models, the sample sub-training sets correspond to the pre-trained sub-models, the pre-trained sub-models are trained by the corresponding sample sub-training sets, and any sample sub-training set includes multiple sample face images; receiving multiple candidate deletion requests, and arranging the received multiple candidate deletion requests in chronological order of reception time to form a request set, wherein the candidate deletion requests correspond to the sample face images one by one; when the first number of candidate deletion requests in the request set is greater than the equal number of candidate deletion requests, Based on a preset quantity threshold, according to a request set, a target sample sub-training set is determined in each sample sub-training set, and a candidate deletion request corresponding to the target sample sub-training set is used as a target deletion request; the target deletion request in the deletion request set is deleted, and according to the target deletion request, the corresponding sample face image in the target sample sub-training set is deleted to obtain a forgotten sub-training set; according to the forgotten sub-training set, the corresponding pre-trained sub-model is retrained, and the pre-trained face recognition model is adjusted according to the retraining result to obtain a target face recognition model; a face image to be recognized is obtained, and the face image to be recognized is input into the target face recognition model to obtain a face recognition result. Based on this, by dividing the pre-trained face recognition model into multiple pre-trained sub-models, and obtaining the sample sub-training sets corresponding to each pre-trained sub-model, and then receiving candidate deletion requests, after receiving candidate deletion requests exceeding the quantity threshold, the target sample sub-training set is determined in the sample sub-training set according to the request set, and the target deletion request is determined, and then in the target sample sub-training set, the sample face image corresponding to the target deletion request is deleted to obtain the forgotten sub-training set, and then the pre-trained sub-model is retrained using the forgotten sub-training set. By setting the quantity threshold, the model forgetting operation is performed only when the candidate deletion request is greater than the quantity threshold, which can effectively reduce the number of retraining times and reduce the computing power overhead of the model forgetting process. In addition, each time the model forgetting operation is performed, only the forgotten sub-training set is used to retrain the corresponding pre-training sub-model, and there is no need to process all the sample face images. This can further reduce the computing power overhead of the model forgetting process, effectively improve the training efficiency, thereby improving the business processing efficiency of the financial business system and ensuring user experience.
[0119] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0120] It will be understood by those skilled in the art that Figures 1 to 7The technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than those shown in the figures, or a combination of certain steps, or different steps.
[0121] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0122] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.
[0123] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application 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 clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0124] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0125] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, 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 units, which can be electrical, mechanical or other forms.
[0126] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0127] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0128] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store programs.
[0129] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.
Claims
1. A face recognition method, characterized in that: include: Obtaining a pre-trained face recognition model and multiple sample sub-training sets, wherein the pre-trained face recognition model includes multiple pre-training sub-models, the sample sub-training sets correspond to the pre-training sub-models, the pre-training sub-models are trained by the corresponding sample sub-training sets, and any of the sample sub-training sets includes multiple sample face images; receiving a plurality of candidate deletion requests, and arranging the received plurality of candidate deletion requests in chronological order of receipt to form a request set, wherein the candidate deletion requests correspond one-to-one to the sample facial images; When the first number of the candidate deletion requests in the request set is greater than or equal to a preset number threshold, a target sample sub-training set is determined in each of the sample sub-training sets according to the request set, and the candidate deletion requests corresponding to the target sample sub-training set are used as target deletion requests; when the first number of the candidate deletion requests in the request set is greater than or equal to the preset number threshold, a target sample sub-training set is determined in each of the sample sub-training sets according to the request set, and the candidate deletion requests corresponding to the target sample sub-training set are used as target deletion requests, including: when the first number of the candidate deletion requests in the request set is greater than or equal to the preset number threshold, traversing the sample sub-training sets according to the sample face images corresponding to the candidate deletion requests in the request set, and determining the second number of candidate deletion requests corresponding to each of the sample sub-training sets; using the sample sub-training set corresponding to the second number with the largest value as the target sample sub-training set; using the candidate deletion requests corresponding to the target sample sub-training set as the target deletion request; Deleting the target deletion request in the request set, and deleting the corresponding sample face image in the target sample sub-training set according to the target deletion request to obtain a forgotten sub-training set; Retraining the corresponding pre-trained sub-model according to the forgotten sub-training set, and adjusting the pre-trained face recognition model according to the re-training result to obtain a target face recognition model; the target face recognition model includes a plurality of target sub-models, wherein the target sub-models correspond one-to-one to the pre-trained sub-models; Acquire a face image to be recognized, and input the face image to be recognized into the target face recognition model to obtain a face recognition result; the acquiring the face image to be recognized, and inputting the face image to be recognized into the target face recognition model to obtain a face recognition result, includes: acquiring a face image to be recognized; inputting the face image to be recognized into each of the target sub-models; performing feature extraction on the face image to be recognized through the target sub-models and outputting a feature vector; performing fusion processing on the feature vectors output by each of the target sub-models, and performing classification processing on the fusion result to obtain a face recognition result.
2. The method according to claim 1, characterized in that The method of retraining the corresponding pre-trained sub-model according to the forgotten sub-training set and adjusting the pre-trained face recognition model according to the re-training result to obtain a target face recognition model includes: detecting whether the candidate deletion request is received until a stop instruction is received; If the candidate deletion request is received, the candidate deletion request is inserted into the request set in order of reception time, and the step of re-performing when the first number of the candidate deletion requests in the request set is greater than or equal to a preset number threshold, determining a target sample sub-training set in each of the sample sub-training sets according to the request set, and using the candidate deletion request corresponding to the target sample sub-training set as the target deletion request, so as to delete the corresponding sample face images in the target sample sub-training set, thereby obtaining a plurality of the forgotten sub-training sets; According to each of the forgotten sub-training sets, the corresponding pre-trained sub-models are retrained in sequence to obtain the forgotten sub-models corresponding to each of the pre-trained sub-models; The pre-trained face recognition model is adjusted according to all the forgotten sub-models to obtain a target face recognition model.
3. The method according to claim 1, characterized in that The obtaining of a pre-trained face recognition model and a plurality of sample sub-training sets includes: Obtain pre-trained face recognition models and sample training sets; The sample training set is split according to a preset number of sub-models to obtain multiple sample sub-training sets, wherein the number of the sample sub-training sets is the number of sub-models, and there is no intersection between any two of the sample sub-training sets.
4. The method according to claim 3, characterized in that The pre-trained face recognition model is trained through the following steps: Obtaining an initial face recognition model and a sample identity label for each of the sample face images; Splitting the initial face recognition model according to the number of sub-models to obtain a plurality of initial sub-models, wherein the initial sub-models correspond one-to-one to the sample sub-training sets; For any of the initial sub-models, training the initial sub-model according to the corresponding sample sub-training set and the sample identity label to obtain the pre-trained sub-model; Based on all the pre-trained sub-models, a pre-trained face recognition model is obtained.
5. A model training method, characterized in that: include: Obtaining a pre-trained face recognition model and multiple sample sub-training sets, wherein the pre-trained face recognition model includes multiple pre-training sub-models, the sample sub-training sets correspond to the pre-training sub-models, the pre-training sub-models are trained by the corresponding sample sub-training sets, and any of the sample sub-training sets includes multiple sample face images; receiving a plurality of candidate deletion requests, and arranging the received plurality of candidate deletion requests in chronological order of receipt to form a request set, wherein the candidate deletion requests correspond one-to-one to the sample facial images; When the first number of the candidate deletion requests in the request set is greater than or equal to a preset number threshold, a target sample sub-training set is determined in each of the sample sub-training sets according to the request set, and the candidate deletion requests corresponding to the target sample sub-training set are used as target deletion requests; when the first number of the candidate deletion requests in the request set is greater than or equal to the preset number threshold, a target sample sub-training set is determined in each of the sample sub-training sets according to the request set, and the candidate deletion requests corresponding to the target sample sub-training set are used as target deletion requests, including: when the first number of the candidate deletion requests in the request set is greater than or equal to the preset number threshold, traversing the sample sub-training sets according to the sample face images corresponding to the candidate deletion requests in the request set, and determining the second number of candidate deletion requests corresponding to each of the sample sub-training sets; using the sample sub-training set corresponding to the second number with the largest value as the target sample sub-training set; using the candidate deletion requests corresponding to the target sample sub-training set as the target deletion request; Deleting the target deletion request in the request set, and deleting the corresponding sample face image in the target sample sub-training set according to the target deletion request to obtain a forgotten sub-training set; According to the forgotten sub-training set, the corresponding pre-trained sub-model is retrained, and the pre-trained face recognition model is adjusted according to the retraining result to obtain a target face recognition model, wherein the target face recognition model includes multiple target sub-models, wherein the target sub-models correspond one-to-one to the pre-trained sub-models.
6. A face recognition device, characterized in that: include: a first acquisition unit, configured to acquire a pre-trained face recognition model and a plurality of sample sub-training sets, wherein the pre-trained face recognition model includes a plurality of pre-trained sub-models, the sample sub-training sets correspond to the pre-trained sub-models, the pre-trained sub-models are trained by the corresponding sample sub-training sets, and any of the sample sub-training sets includes a plurality of sample face images; a first receiving unit, configured to receive a plurality of candidate deletion requests, and arrange the received plurality of candidate deletion requests in chronological order of receipt to form a request set, wherein the candidate deletion requests correspond one-to-one to the sample facial images; A first judgment unit is used to determine, when the first number of the candidate deletion requests in the request set is greater than or equal to a preset number threshold, a target sample sub-training set in each of the sample sub-training sets according to the request set, and use the candidate deletion requests corresponding to the target sample sub-training set as the target deletion request; when the first number of the candidate deletion requests in the request set is greater than or equal to the preset number threshold, determine, according to the request set, a target sample sub-training set in each of the sample sub-training sets, and use the candidate deletion requests corresponding to the target sample sub-training set as the target deletion request, including: when the first number of the candidate deletion requests in the request set is greater than or equal to the preset number threshold, traversing the sample sub-training sets according to the sample face images corresponding to the candidate deletion requests in the request set, and determining the second number of candidate deletion requests corresponding to each of the sample sub-training sets; using the sample sub-training set corresponding to the second number with the largest value as the target sample sub-training set; and using the candidate deletion requests corresponding to the target sample sub-training set as the target deletion request; a first deleting unit, configured to delete the target deletion request in the request set, and delete the corresponding sample face image in the target sample sub-training set according to the target deletion request, to obtain a forgotten sub-training set; a first retraining unit, configured to retrain the corresponding pretrained sub-model according to the forgotten sub-training set, and adjust the pretrained face recognition model according to the retraining result to obtain a target face recognition model, wherein the target face recognition model includes a plurality of target sub-models, wherein the target sub-models correspond one-to-one to the pretrained sub-models; The first recognition unit is used to obtain a face image to be recognized, and input the face image to be recognized into the target face recognition model to obtain a face recognition result; the obtaining of the face image to be recognized, and inputting the face image to be recognized into the target face recognition model to obtain a face recognition result, includes: obtaining a face image to be recognized; inputting the face image to be recognized into each of the target sub-models; performing feature extraction on the face image to be recognized through the target sub-model and outputting a feature vector; performing fusion processing on the feature vectors output by each of the target sub-models, and classifying the fusion results to obtain a face recognition result.
7. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it implements the face recognition method according to any one of claims 1 to 4, or the model training method according to claim 5.
8. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the face recognition method according to any one of claims 1 to 4 or the model training method according to claim 5 is implemented.
Citation Information
Patent Citations
Face recognition model forgetting method and system based on ensemble learning
CN115984946A