An image recognition method and related apparatus

By training multiple target teacher models with the same feature distribution through knowledge distillation, a target student model is obtained, which solves the problem of inaccurate feature extraction by a single teacher model and achieves higher face recognition accuracy.

CN117011904BActive Publication Date: 2025-11-14TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211037528.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-26
Publication Date
2025-11-14
Estimated Expiration
2042-08-26

AI Technical Summary

Technical Problem

In existing facial recognition systems, a single teacher model can only extract biometric features from one sampling point in a facial image, resulting in discrepancies between the recognition results and the actual facial images, leading to poor recognition accuracy.

Method used

Multiple target teacher models with identical feature distributions are used for knowledge distillation training to obtain a target student model. This model is then used to extract features from biological images to determine the recognition results.

Benefits of technology

It improves the accuracy of facial recognition by extracting features from multiple sampling points in biological images, thereby increasing the recognition accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117011904B_ABST
    Figure CN117011904B_ABST
Patent Text Reader

Abstract

This application discloses an image recognition method and related apparatus, which at least involve computer vision and machine learning technologies in artificial intelligence, and can also be applied to various scenarios such as cloud technology, artificial intelligence, smart transportation, and assisted driving. The method provided by this application can improve the accuracy of face recognition. The method mentioned above includes acquiring a biological image of a target object; and performing knowledge distillation training on the biological image samples based on multiple target teacher models to obtain a target student model, wherein each target teacher model has the same feature distribution; extracting features from the biological image based on the target student model to obtain the target biological features of the target object; and determining the recognition result based on the target biological features of the target object, wherein the recognition result is used to indicate the face recognition status of the target object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, specifically to an image recognition method and related apparatus. Background Technology

[0002] Currently, in facial recognition systems applied to security, payment, access control and other scenarios, higher requirements are placed on the running time and recognition accuracy of facial recognition models, that is, to obtain higher recognition accuracy with the least possible running time.

[0003] In related solutions, the main approach is to use a single teacher model to constrain the features of a student model, thereby enabling the student model to recognize facial images. However, since a single teacher model can only extract biometric features from a single sampling point in a facial image, the biometric features extracted from that single sampling point may not accurately represent the true characteristics of the facial image. Consequently, the facial recognition results obtained by the constrained student model differ from the actual facial images, resulting in poor recognition accuracy. Summary of the Invention

[0004] This application provides an image recognition method and related apparatus that can improve the accuracy of face recognition.

[0005] In a first aspect, embodiments of this application provide an image recognition method. The method includes acquiring a biological image of a target object; performing knowledge distillation training on the biological image samples based on multiple target teacher models to obtain a target student model, wherein each of the multiple target teacher models has the same feature distribution; performing feature extraction processing on the biological image based on the target student model to obtain target biometric features of the target object; and determining a recognition result based on the target biometric features of the target object, the recognition result being used to indicate the face recognition status of the target object.

[0006] Secondly, embodiments of this application provide a recognition device. This recognition device includes an acquisition unit and a processing unit. The acquisition unit is used to acquire a biological image of a target object. The processing unit is used to perform knowledge distillation training on the biological image samples based on multiple target teacher models to obtain a target student model, wherein each of the multiple target teacher models has the same feature distribution; the processing unit is used to extract features from the biological image of the target object based on the target student model to obtain the target biometric features of the target object. The processing unit is used to determine a recognition result based on the target biometric features of the target object, and the recognition result is used to indicate the face recognition status of the target object.

[0007] In some optional examples, the acquisition unit is used to acquire biological image samples. The processing unit is used to: extract features from the biological image samples based on a first teacher model to obtain a first biological feature, wherein the first teacher model is any target teacher model randomly selected from multiple target teacher models; extract features from the biological image samples based on a preset initial student model to obtain a second biological feature; calculate the difference between the first biological feature and the second biological feature to obtain a first loss value; and adjust the model parameters of the preset initial student model based on the first loss value to obtain a target student model.

[0008] In some alternative examples, the processing unit is used to: calculate the feature similarity between the first biometric and the second biometric; and determine a first loss value based on the feature similarity.

[0009] In some alternative examples, the processing unit is further configured to: extract features from biological images based on a first target model to obtain biological features corresponding to the first target model, wherein the first target model is a machine learning model obtained by iteratively training biological features of biological image samples as training targets and biological image samples as training data; calculate a first angle information between the biological features corresponding to the first target model and the target category center feature, and calculate a second angle information between the biological features corresponding to the first target model and the first category center feature, wherein the target category center feature is obtained from the feature centers of biological features of each category in the biological features corresponding to the first target model, and the first category center feature is different from the target category center feature; determine a second loss value based on the first angle information and the second angle information; and adjust the model parameters of the first target model based on the second loss value to obtain multiple target teacher models.

[0010] In some alternative examples, the processing unit is further configured to: extract features from the biological image based on a preset initial model to obtain the biological features corresponding to the preset initial model; determine the category center features of the preset initial model based on the feature centers of the biological features of each category in the biological features corresponding to the preset initial model; determine a first probability value based on the category center features of the preset initial model and the biological features corresponding to the preset initial model, the first probability value being the probability of the image category to which the biological image belongs; determine a third loss value based on the first probability value and a first label, the first label being used to indicate the category labeling of the biological image; and adjust the model parameters of the preset initial model based on the third loss value to obtain a first target model.

[0011] In some alternative examples, the processing unit is used to: compare the target biometrics of the target object with preset biometrics to determine the recognition result.

[0012] In some alternative examples, the processing unit is configured to initiate an image recognition request for a target object; and the acquisition unit is configured to acquire a biological image of the target object based on the image recognition request.

[0013] In some alternative examples, the acquisition unit is used to capture images of the target object based on a preset camera device and according to the image recognition request, so as to obtain a biological image of the target object.

[0014] In some other optional examples, biological images include human face images.

[0015] A third aspect of this application provides an identification device, including: a memory, an input / output (I / O) interface, and a processor. The memory stores program instructions. The processor executes the program instructions in the memory to perform the image recognition method corresponding to the embodiment of the first aspect described above.

[0016] A fourth aspect of this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method corresponding to the embodiments of the first aspect described above.

[0017] The fifth aspect of this application provides a computer program product containing instructions that, when run on a computer or processor, causes the computer or processor to execute the method described above for performing the implementation method of the first aspect.

[0018] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:

[0019] In this embodiment, a target student model is trained by knowledge distillation of biological image samples using multiple target teacher models with identical feature distributions. This target student model is then used to extract features from the biological image to obtain the target biometric features of the target object, thereby determining the recognition result. This recognition result can be used to indicate the face recognition status of the target object. By employing this method, instead of relying on a single teacher model to train the student model, multiple teacher models with identical feature distributions are used to train the student model. This allows the target student model trained in this embodiment to extract biometric features from multiple sampling points in the biological image of the target object, thereby improving the accuracy of face recognition. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 A schematic diagram illustrating the change in loss value during network optimization in the existing scheme is shown;

[0022] Figure 2 This illustration shows an application scenario provided by an embodiment of this application.

[0023] Figure 3 A flowchart of an image recognition method provided in an embodiment of this application is shown;

[0024] Figure 4 This illustration shows a schematic diagram of the training process for the target teacher model provided in an embodiment of this application;

[0025] Figure 5 This illustration shows a schematic diagram of the training process of the first target model provided in an embodiment of this application;

[0026] Figure 6 This paper illustrates another training process diagram of the target teacher model provided in an embodiment of this application;

[0027] Figure 7 A schematic diagram illustrating the training of the target student model provided in an embodiment of this application is shown;

[0028] Figure 8 A schematic diagram of the acquisition and recognition model provided in an embodiment of this application is shown;

[0029] Figure 9 A schematic diagram of the model deployment provided in an embodiment of this application is shown;

[0030] Figure 10 Another flowchart of the image recognition method provided in this application embodiment is shown;

[0031] Figure 11 A schematic diagram of one embodiment of the identification device provided in this application is shown;

[0032] Figure 12 A schematic diagram of the structure of the identification device provided in the embodiment of this application is shown. Detailed Implementation

[0033] This application provides an image recognition method and related apparatus that can improve the accuracy of face image recognition.

[0034] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0035] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0036] The image recognition method provided in this application is based on artificial intelligence (AI). Artificial intelligence is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results. In other words, artificial intelligence is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making functions.

[0037] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0038] In the embodiments of this application, the main artificial intelligence technologies involved include the aforementioned computer vision (CV) and machine learning (ML) technologies. For example, it may involve image recognition in computer vision technology; it may also involve deep learning in machine learning, including neural networks such as convolutional neural networks (CNNs).

[0039] The image recognition method provided in this application can be applied to recognition devices with data processing capabilities, such as terminal devices or servers, etc., without specific limitations in this application. Terminal devices may include, but are not limited to, smartphones, desktop computers, laptops, tablets, smart speakers, in-vehicle devices, smartwatches, etc. Servers may be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms, etc., without specific limitations in this application. Furthermore, the mentioned terminal devices and servers can be directly or indirectly connected through wired or wireless communication, without specific limitations in this application.

[0040] The aforementioned recognition devices possess the processing capabilities to implement computer vision technology. Computer vision technology is a science that studies how to enable machines to "see." More specifically, it refers to machine vision, which uses cameras and computers to replace human eyes for target recognition, trajectory tracking, and measurement, and further performs image processing to create images more suitable for human observation or transmission to instruments for detection. As a scientific discipline, computer vision researches related theories and technologies, attempting to establish artificial intelligence systems capable of extracting information from images or multidimensional data. Computer vision technology typically includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, 3D object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping (SLAM), and common biometric recognition technologies such as facial recognition and fingerprint recognition.

[0041] Furthermore, this recognition device can also possess machine learning capabilities. Machine learning is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, and many other disciplines. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning.

[0042] The image recognition method provided in this application uses an artificial intelligence model, which mainly involves the application of neural networks. The neural network is used to recognize the biological image of the target object, and the recognition result is used to indicate the face recognition status of the target object.

[0043] In recent years, the development of machine learning has shown three major trends: increasingly complex model structures, continuously deepening model layers, and the continuous development of massive datasets. However, with the increasing demand for edge computing using neural network models on mobile and embedded platforms, the limited resources of edge computing platforms necessitate that neural network models be as small as possible while maintaining high computational efficiency. To address this, academia and industry have proposed various types of model compression methods in recent years, such as model pruning and low-precision quantization of model parameters. Illustratively, a knowledge distillation method is proposed. This method uses a large neural network model trained on a large training dataset as the teacher network and a small neural network model as the student network. The student network is trained using the probability distribution vector output by the teacher model and manually labeled training data, overcoming the training difficulties of small neural network models on large datasets. After training, it can achieve test results close to or exceeding those of the teacher model on classification tasks. This method can be viewed as a knowledge transfer mechanism, transferring knowledge from the teacher model to the student model through training. After the migration was completed, the large and cumbersome teacher model was replaced by a student model designed to be fast and flexible, which greatly facilitated the deployment of neural network models on edge platforms.

[0044] However, in related solutions, the main approach is to use a single teacher model to constrain the features of the student model, thereby enabling the student model to recognize facial images. However, because a single teacher model can only extract biometric features from a single sampling point in a facial image, and the biometric features extracted from a single sampling point cannot accurately represent the true features of the facial image, the recognition results of the constrained student model differ from the actual facial images, resulting in poor recognition accuracy. Furthermore, directly training the student model with a large amount of data usually fails to obtain a model that meets the accuracy requirements. This is mainly because the student model, as a small neural network model, has a relatively small fitting ability and may get trapped in local minima of the constraint function during training. (See also...) Figure 1 This diagram illustrates the change in loss value during network optimization in existing schemes. For example... Figure 1 As shown, during the training of the student model, which is a small neural network model, its loss function gets trapped in the local minimum P2 of the constraint function, and it is impossible to optimize the loss function of the face recognition process to the global minimum P1 during training.

[0045] Based on this, in order to solve the aforementioned problems and improve recognition accuracy, this application provides an image recognition method and related apparatus. A target student model is obtained by knowledge distillation training on biological image samples using multiple target teacher models with identical feature distributions. This target student model is then used to extract features from the biological image to obtain the target biometric features of the target object, thereby determining the recognition result. This recognition result can be used to indicate the face recognition status of the target object. Through this method, instead of relying on a single teacher model to train the student model, multiple teacher models with identical feature distributions are used to train the student model. This allows the target student model trained in this application embodiment to extract biometric features from multiple sampling points in the biological image of the target object, thereby improving the accuracy of face recognition.

[0046] Figure 2 A schematic diagram of an application scenario provided by an embodiment of this application is shown.

[0047] like Figure 2 As shown in the diagram, the application scenario includes a terminal device and a server. The terminal device and the server can be connected directly or indirectly through wired or wireless communication, which is not limited in this application.

[0048] In addition, the terminal device can be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smartwatch, smart voice interaction device, smart home appliance, vehicle terminal, aircraft, etc., but is not limited to these. The term "terminal device" can refer to one of multiple terminals; this embodiment only uses a terminal device as an example. It should be noted that this application embodiment does not specifically limit the number or type of terminal devices.

[0049] A server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Servers are used to provide backend services for applications running on terminal devices.

[0050] Optionally, the aforementioned wireless or wired networks use standard communication technologies and / or protocols. The network is typically the Internet, but can be any network, including but not limited to local area networks (LANs), metropolitan area networks (MANs), wide area networks (WANs), mobile, wired or wireless networks, private networks, or any combination of virtual private networks. In some embodiments, technologies and / or formats including Hypertext Markup Language (HTML), Extensible Markup Language (XML), etc., are used to represent data exchanged over the network. Furthermore, conventional encryption technologies such as Secure Sockets Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), and Internet Protocol Security (IPsec) can be used to encrypt all or some links. In other embodiments, custom and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.

[0051] Indicatively, the image recognition method provided in this application embodiment can be performed by a server or by a terminal device. This application embodiment does not limit the executing entity of the image recognition method.

[0052] Furthermore, the methods provided in this application embodiment can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, and assisted driving, and are not specifically limited in this application embodiment.

[0053] The following description, with reference to the accompanying drawings and using a terminal device as the identification device, introduces a method for image recognition provided in an embodiment of this application.

[0054] Figure 3 A flowchart illustrating an image recognition method provided in an embodiment of this application is shown. Figure 3 As shown, the image recognition method may include the following steps:

[0055] 301. Obtain biological images of the target object.

[0056] In this example, the terminal device can initiate an image recognition request for a target object, and then obtain a biological image of the target object based on the image recognition request. For example, the terminal device can use a preset camera device to take a picture of the target object according to the image recognition request to obtain a biological image of the target object.

[0057] For example, the biometric image of the target object may include, but is not limited to, a facial image of the target object, etc., and is not specifically limited in the embodiments of this application. For example, taking a facial image as a biometric image, the facial image may include the faces of one or more target objects to be identified. The terminal device can perform identity recognition based on the facial image of one or more target objects in the facial image.

[0058] For example, the terminal device can be a client application with facial recognition functionality and a trained facial recognition model to recognize faces on the terminal device side. For instance, in the financial payment field, a target can use a smartphone to perform operations requiring identity verification, such as transferring funds, making payments, or modifying account information. Identity verification can be achieved by recognizing the target's facial image. In this process, the terminal device acquires the facial image to be detected and then uses the trained facial recognition model to recognize the face, obtaining the facial recognition result. Alternatively, the terminal device can be a client application with facial recognition functionality, and the server can have a trained facial recognition model deployed on it to recognize faces on the terminal device side. In this case, the terminal device can acquire the facial image to be detected and upload it to the server, or the server can directly access the facial images to be detected from its database. The server then uses the trained facial recognition model to recognize the face, obtaining the facial recognition result. The server can either return the facial recognition result to the terminal device or save it locally for other business applications or processing.

[0059] For example, a terminal device can capture facial images of a target object in a real-world scene using its built-in camera. Alternatively, the terminal device can capture facial images of a target object in a real-world scene using an external camera associated with the terminal. For instance, the terminal device can connect to an image acquisition device via a cable or network. The image acquisition device captures facial images of the target object in the real-world scene using its camera and transmits the captured facial images to the terminal device. The camera can be a monocular camera, a binocular camera, a depth camera, a 3D camera, etc., and is not specifically limited in this embodiment. The terminal device can capture facial images of a target object in a real-world scene, or it can capture existing images containing faces in a real-world scene, such as scanned copies of ID cards, and is not specifically limited in this embodiment.

[0060] 302. Based on multiple target teacher models, knowledge distillation training is performed on biological image samples to obtain target student models, wherein the feature distribution of each of the multiple target teacher models is the same.

[0061] In this example, the identical feature distribution of multiple target teacher models can be understood as aligning the feature spaces of these models. Then, by training the biological image sample using these aligned target teacher models with knowledge distillation, the feature distribution of the trained target student model can be constrained to match the intersection features of these multiple target teacher models. Furthermore, since each target teacher model extracts a feature that is a sample of the biological image, extracting the common distribution of the multiple target teacher models yields the intersection of their features, resulting in a more accurate feature distribution for the biological image. Therefore, constraining the feature distribution of the finally trained target student model to match the intersection features of the multiple target teacher models enables the target student model to extract more accurate biological features, laying the foundation for subsequent recognition results and thus improving recognition accuracy.

[0062] For example, the training process for the aforementioned target teacher model can be referred to as follows: Figure 4 The content of the illustrated embodiment is understood.

[0063] The following section provides a detailed description of the model training process for the target teacher model proposed in this application, using a terminal device as the execution subject. For example... Figure 4 As shown, the model training process for this target teacher model includes at least the following steps:

[0064] 401. Obtain biological image samples.

[0065] In this example, the terminal device can construct a [database / structure] by acquiring biological image samples of the target object.

[0066] Training sample set. In this way, during the training of the target teacher model, the terminal device can obtain biological image samples of the target object from this training sample set.

[0067] 402. Based on the first target model, feature extraction is performed on the biological image to obtain the biological features corresponding to the first target model. The first target model is a machine learning model obtained by iterative training with the biological features of the biological sample image as the training target and the biological image sample as the training data.

[0068] In this example, the first target model can be understood as a large neural network model. Furthermore, this first target model is a machine learning model obtained through iterative training using biological features of biological sample images as training targets and these biological image samples as training data.

[0069] For example, the training process for the first target model can be implemented as follows: Feature extraction is performed on the biological image based on a preset initial model to obtain the biological features corresponding to the preset initial model; then, based on the feature centers of each category of biological features in the biological features corresponding to the preset initial model, the category center features of the preset initial model are determined; then, based on the category center features of the preset initial model and the biological features corresponding to the preset initial model, a first probability value is determined, which can be understood as the probability of the image category to which the biological image belongs; based on the first probability value and a first label, a third loss value is determined, where the first label is used to indicate the category labeling of the biological image; finally, based on the third loss value, the model parameters of the preset initial model are adjusted to obtain the first target model.

[0070] For example, Figure 5 A schematic diagram illustrating the training process of the first target model provided in an embodiment of this application is shown. Figure 5 As shown, taking a face image as an example, the training of the first target model may involve at least a training data preparation module, a basic recognition network unit module, a category center storage module, a loss function calculation module, and an objective function optimization module. During training, the training data preparation module collects face images, combines them into a batch, and sends it to the basic recognition network unit module for processing. This basic recognition network unit model can extract spatial features from the face images, thus obtaining the biological features of the preset initial model. These biological features retain the spatial structural information of the face image. It should be noted that the basic recognition network unit module commonly uses a convolutional neural network model, which includes operations such as convolution calculation, ReLU nonlinear activation function calculation, and pooling calculation.

[0071] Additionally, the class center storage model can store the class center for each ID in the training data, i.e., the...

[0072] The initial model has a predefined class center feature with a shape of (d×m), where d is the feature dimension of a single training data point and m is the number of classes in the training data. Each class in the training data corresponds to a class center feature, which characterizes the overall features of the training data that are classified into that class. Therefore, the class center feature of the initial model can be determined based on the feature centers of the biometric features for each class corresponding to the initial model.

[0073] Because the goal is for the output of a deep neural network to be as close as possible to the actual predicted value, we can compare the current network's prediction with the desired target value and update the weight vector of each layer based on the difference. (Of course, there's usually an initialization process before the first update, where parameters are pre-configured for each layer in the deep neural network). For example, if the network's prediction is too high, the weight vector is adjusted to predict a lower value. This adjustment continues until the neural network can predict the actual target value. Therefore, it's necessary to predefine "how to compare the difference between the predicted and target values," which is the loss function or objective function. These are important equations used to measure the difference between the predicted and target values. Taking the loss function as an example, a higher output value (loss) indicates a greater difference, so training a deep neural network becomes a process of minimizing this loss as much as possible.

[0074] The loss function calculation module performs matrix calculations on the category center features of the preset initial model and the corresponding biometric features to obtain a first probability value. This first probability value can be understood as the probability value of the image category to which the face image belongs. Then, the loss function calculation module uses the first probability value and the manually labeled first label as input to the loss function to calculate a third loss value. The first label described can be understood as the category labeling of the manually labeled biometric image. It should be noted that the loss function here can include classification functions such as softmax and various softmax functions with added margins, or other types of objective functions, etc., and is not specifically limited in this embodiment.

[0075] The objective function optimization module can train and optimize the entire preset initial model based on the gradient descent algorithm until the training result meets the conditions for terminating model training. It should be noted that the described gradient descent algorithm can include stochastic gradient descent, stochastic gradient descent with a moving average, adaptive gradient, adaptive moment estimation, etc., and is not specifically limited in this embodiment. Furthermore, the conditions for terminating model training can include setting the number of training iterations to a preset value, or the loss value being less than a preset value, etc., and are not specifically limited in this application.

[0076] 403. Calculate the first angle information between the biofeature corresponding to the first target model and the target category center feature, and calculate the second angle information between the biofeature corresponding to the first target model and the first category center feature. The target category center feature is obtained from the feature center of each category of biofeature in the biofeature corresponding to the first target model. The first category center feature is different from the target category center feature.

[0077] The training process of the first target model described in this example can be referred to the aforementioned... Figure 5 The content described herein is for understanding purposes only and will not be elaborated upon here. Furthermore, after training the first target model, the biological image can be used as input to extract the corresponding biological features. The target category center feature is determined based on the feature centers of each category of biological features in the biological features corresponding to the first target model, and the corresponding first category center feature is determined based on the feature centers of each category of biological features in the biological features corresponding to other models. Since the biological features of the biological image cluster around the space of the target category center feature, the first angle information between the biological features corresponding to the first target model and the target category center feature is calculated, as well as the second angle information between the biological features corresponding to the first target model and the first category center features corresponding to other models.

[0078] 404. Determine the second loss value based on the first included angle information and the second included angle information.

[0079] In this example, after calculating the first and second included angles in step 403, the second loss value can be determined based on these included angles. For example, a loss function with margin constraints can be used as the loss model, such as:

[0080]

[0081] The terminal device can use the first and second included angle information as inputs to the loss model, and calculate the second loss value by applying the loss model to the first and second included angle information. It should be noted that in the above loss model, parameter N is the number of biological images, and y... i Let the category of the i-th biological image belong to label y. For the first included angle information, θ j This refers to the second included angle information; s, m1, and m2 are adjustable parameters; L margin-loss This is the second loss value.

[0082] It should be noted that in practical applications, the loss function can also be other types of loss functions, which are not limited in the embodiments of this application.

[0083] 405. Adjust the model parameters of the first target model based on the second loss value to obtain multiple target teacher models.

[0084] In this example, by adjusting the model parameters of the first target model using the calculated second loss value, multiple target teacher models can be obtained.

[0085] For example, Figure 6 A schematic diagram illustrating the training process of the target teacher model provided in an embodiment of this application is shown. Figure 6 As shown, taking a face image as an example, the training process for the target teacher model can involve at least the following modules: training data preparation module, recognition network unit module, category center storage module, random seed control module, loss function calculation module, loss hyperparameter control module, and objective function optimization module. During training, the training data preparation module collects face images, combines them into a batch, and sends it to the recognition network unit module for processing. This recognition network unit model can extract spatial features from the face images, thus obtaining the biometric features corresponding to the first target model. These biometric features retain the spatial structural information of the face image. Furthermore, the category center storage module can refer to the aforementioned... Figure 5 The content of the category-centered storage module described in the text will be understood and will not be elaborated upon here.

[0086] In addition, the random seed control module can randomly initialize the training model, and the initial random seed for each teacher model is different, which can enrich the diversity of the model.

[0087] The loss function calculation module calculates the first angle between the biometric feature corresponding to the first target model and the target class center feature, and the second angle between the biometric feature corresponding to the first target model and the first class center feature. Then, this module calculates the second loss value based on the first and second angle information. It should be noted that during actual training, only the parameters of the recognition network unit module need to be updated, while the class center storage unit modules in the training data only provide gradient calculations and do not participate in the parameter update process. Furthermore, in the loss deviation control module, this module can control the model's loss function, which is generally a loss function with margin constraints, such as the L described above. margin-lossThe content will be understood in detail here. When using this loss function, since the class center direction of the training data is fixed (i.e., using the class center feature of the first target model as a reference), the direction vector of each biological feature in the feature space can be determined, i.e., the distance between it and the class center feature of the first target model. Thus, during complementary training, by adjusting the parameters s, m1, and m2 in this loss function, the diversity of biological images in the feature space can be ensured, which can promote the first target model to learn complementary knowledge with other models. Therefore, by controlling the configuration of parameters s, m1, and m2 through this loss error control module, multiple target teacher models with different configurations can be trained.

[0088] It should be understood that the described target teacher model can also be understood as a large neural network model. For example, the feature distributions of each target teacher model in multiple target teacher models can be mapped to the same feature space, achieving feature space alignment, so that for the same biological image, the biological features extracted by these multiple target teacher models for the same biological image are all samples of the ideal features of the biological image.

[0089] After training multiple target teacher models through the above training process, these target teacher models can be used to guide the training of a target student model. For example, the image recognition method may further include: extracting features from a biological image based on a first teacher model to obtain a first biological feature, wherein the first teacher model is any target teacher model randomly selected from multiple target teacher models; extracting features from a biological image based on a preset initial student model to obtain a second biological feature; calculating the difference between the first biological feature and the second biological feature to obtain a first loss value; and iteratively training the preset initial student model based on the first loss value to obtain a target student model. For example, in calculating the difference between the first biological feature and the second biological feature to obtain the first loss value, the feature similarity between the first biological feature and the second biological feature can be calculated first, and then the first loss value can be determined based on this feature similarity.

[0090] For example, Figure 7 A training diagram of the target student model provided in an embodiment of this application is shown. For example... Figure 7 As shown, the process of training the target student model includes at least a training data preparation module, a preset initial learning model, a teacher model sampling control module, a teacher identification network unit module, a knowledge distillation loss function calculation module, and a knowledge distillation objective function optimization module. The training data preparation module described herein can be referenced from the preceding sections. Figure 6The content described herein will be understood and will not be repeated here. Additionally, the preset initial learning model can extract features from biological images to obtain second biological features.

[0091] The teacher model sampling control module is a random number generation module. The generated random numbers can be used as model numbers of target teacher models in the target teacher model pool, such as target teacher model 1 to target teacher model n, where n ≥ 2 and n is an integer. Furthermore, this teacher model sampling control module can randomly sample from multiple target teacher models in the target teacher model pool. For example, during the iterative training of the target student model, the relationship between the number of iterations and the sampling frequency of the randomly sampled target teacher models can be set to 3:1, that is, after 3 iterations of training, the target teacher model is resampled once, which can keep the model iteration in a stable state. It should be understood that in practical applications, the relationship between the number of iterations and the sampling frequency can also be set according to actual needs; this embodiment does not provide specific limitations.

[0092] After the teacher model sampling control module randomly samples a target teacher model, this sampled target teacher model (i.e., the first teacher model) can be used to extract features from the biological image, thereby obtaining the first biological feature. It should be noted that in each training iteration, only one target teacher model is sampled from the teacher model pool, which significantly reduces the forward training time. Furthermore, since the final target teacher model used for feature extraction is randomly sampled from the teacher model pool, it can constrain the target student model to learn the intersection of feature distributions among the various target teacher models.

[0093] In the knowledge distillation loss function calculation module, this module typically uses the cosine similarity loss function, which can be used to evaluate the similarity between the first biometric feature extracted by the first teacher model and the second biometric feature extracted by the preset initial student model. This cosine similarity loss function L... f =||F X -F Y ||2. Among them, F X As a second biological characteristic, F Y As the first biological characteristic, L f The loss function is the feature similarity. It should be noted that in practical applications, other loss functions can also be used, but this application does not specify any limitations.

[0094] Thus, after obtaining the feature similarity, this feature similarity can be determined as the first loss value. At this point, the knowledge distillation objective function optimization module can iteratively train and optimize the first loss value based on the gradient descent algorithm until the training result meets the condition for terminating model training. It should be noted that the described gradient descent algorithm can include stochastic gradient descent, stochastic gradient descent with a driving term, adaptive gradient, adaptive moment estimation, etc., and is not specifically limited in this embodiment. Furthermore, the condition for terminating model training can include setting the number of training iterations to meet a preset value, or the first loss value being less than a preset value, etc., and is not specifically limited in this application.

[0095] It should be noted that the execution order of steps 301 and 302 is specifically defined in this embodiment of the application. In practical applications, step 302 can be executed first, followed by step 301; or, steps 301 and 302 can be executed simultaneously.

[0096] 303. Based on the target student model, feature extraction is performed on biological images to obtain the target biological features of the target object.

[0097] Thus, after training the target student model, feature extraction from biological images using this model can yield the target biological features of the target object. For example, a terminal device can use this target student model to extract features from biological images to obtain the biological keypoint information of the target object, such as the location information of key points like the nose, mouth, and eyes, and then use this biological keypoint information as the target biological features of the target object. It should be noted that the number of model parameters in the described target student model is much smaller than the number of model parameters in the described target teacher model. Therefore, using the target student model to extract features from biological images can save time during the extraction process.

[0098] 304. Determine the recognition result based on the target biometric features of the target object. The recognition result is used to indicate the face recognition status of the target object.

[0099] In this example, after training the target student model, a biological image can be used as input to the model. Therefore, the target student model extracts the corresponding target biometric features, and then uses these biometric features to determine the corresponding recognition result. For example, as shown... Figure 8As shown, the process of obtaining the recognition model includes a model training phase and a model deployment phase. The model training phase involves training a preset initial model to obtain a first target model, then using this first target model to guide the training of multiple target teacher models. Finally, based on these multiple target teacher models, the preset initial student model is trained using knowledge distillation to obtain a trained target student model, which is the recognition model. The model deployment phase involves combining and deploying the relevant modules obtained in the module training phase to obtain a complete face recognition model, for example, such as... Figure 9 As shown, the image acquisition input module, image feature extraction module, and feature comparison search module are integrated. The image acquisition input module acquires biological images of the target object, such as facial images. Then, the image feature extraction module extracts features from the biological image to obtain the corresponding target biological features, such as facial image features. Next, the feature comparison search module compares the target biological features with preset biological features to determine the recognition result, thus completing the recognition of the target object's biological image. For example, the feature comparison search module compares the extracted target object's facial image with preset facial images to perform facial recognition. This recognition model is derived from a target teacher model and a target student model with stronger expressive capabilities through knowledge transfer. The feature distribution extracted by this model has a high similarity to the feature distributions of the target teacher model and the target student model, thus achieving higher recognition accuracy.

[0100] Figure 10 Another flowchart illustrating the image recognition method provided in this application is shown. Figure 10 As shown, the image recognition method may include the following steps: Feature extraction is performed on the biological image based on a preset initial model to obtain the biological features corresponding to the preset initial model. Then, based on the feature centers of each category of biological features in the biological features corresponding to the preset initial model, the category center features of the preset initial model are determined. Next, a first probability value is determined based on the category center features of the preset initial model and the biological features corresponding to the preset initial model. The first probability value is the probability of the biological image belonging to a particular image category. A third loss value is determined based on the first probability value and a first label, where the first label indicates the category labeling of the biological image. Finally, the model parameters of the preset initial model are adjusted based on the third loss value to obtain a first target model.

[0101] Thus, after obtaining the first target model, feature extraction is performed on the biological image based on the first target model to obtain the biological features corresponding to the first target model. Furthermore, a first angle information between the biological features corresponding to the first target model and the target category center features, and a second angle information between the biological features corresponding to the first target model and the first category center features are calculated. The target category center features are obtained from the feature centers of each category of biological features in the biological features corresponding to the first target model, and the first category center features are different from the target category center features. Then, a second loss value is determined based on the first and second angle information, and the model parameters of the first target model are adjusted based on the second loss value to obtain multiple target teacher models.

[0102] Then, biological image samples are acquired, and features are extracted from these samples based on a first teacher model to obtain a first biological feature. The first teacher model is any target teacher model randomly selected from multiple target teacher models. Furthermore, features are extracted from the biological image samples based on a preset initial student model to obtain a second biological feature. Then, the difference between the first and second biological features is calculated to obtain a first loss value. Based on this first loss value, the model parameters of the preset initial student model are adjusted to obtain the target student model.

[0103] Thus, after acquiring the biological image of the target object, feature extraction processing is performed on the biological image based on the target student model to obtain the target biometric features of the target object. Then, the recognition result is determined based on the target biometric features of the target object, and the recognition result is used to indicate the face recognition status of the target object.

[0104] In this embodiment, a target student model is trained by knowledge distillation of biological image samples using multiple target teacher models with identical feature distributions. This target student model is then used to extract features from the biological image to obtain the target biometric features of the target object, thereby determining the recognition result. This recognition result can be used to indicate the face recognition status of the target object. By employing this method, instead of relying on a single teacher model to train the student model, multiple teacher models with identical feature distributions are used to train the student model. This allows the target student model trained in this embodiment to extract biometric features from multiple sampling points in the biological image of the target object, thereby improving the accuracy of face recognition.

[0105] The foregoing primarily describes the solutions provided by the embodiments of this application from a methodological perspective. It is understood that to achieve the above functions, corresponding hardware structures and / or software modules are included to execute each function. Those skilled in the art should readily recognize that, based on the modules and algorithm steps described in conjunction with the embodiments disclosed in this application, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0106] This application embodiment can divide the device into functional modules according to the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0107] The identification device in the embodiments of this application will be described in detail below. Figure 11 This is a schematic diagram of one embodiment of the identification device provided in this application. Figure 11 As shown, the identification device may include an acquisition unit 1101 and a processing unit 1102.

[0108] The acquisition unit 1101 is used to acquire a biological image of the target object. For details, please refer to the preceding description. Figure 3 The content described in step 301 is for your understanding and will not be repeated here.

[0109] Processing unit 1102 is used to perform knowledge distillation training on biological image samples based on multiple target teacher models to obtain target student models, wherein the feature distribution of each of the multiple target teacher models is the same;

[0110] Processing unit 1102 is used to extract features from biological images based on a target student model to obtain the target biological features of the target object. The target student model is a model obtained by knowledge distillation of biological image samples based on multiple target teacher models, and the feature distributions of the multiple target teacher models are identical. Processing unit 1102 is also used to determine the recognition result based on the target biological features of the target object, and the recognition result is used to indicate the face recognition status of the target object.

[0111] In some optional examples, the acquisition unit 1101 is used to acquire biological image samples. The processing unit 1102 is further used to: extract features from the biological image samples based on a first teacher model to obtain a first biological feature, wherein the first teacher model is any target teacher model randomly selected from multiple target teacher models; extract features from the biological image samples based on a preset initial student model to obtain a second biological feature; calculate the difference between the first biological feature and the second biological feature to obtain a first loss value; and adjust the model parameters of the preset initial student model based on the first loss value to obtain a target student model.

[0112] In some alternative examples, the processing unit 1102 is used to: calculate the feature similarity between the first biometric feature and the second biometric feature; and determine a first loss value based on the feature similarity.

[0113] In some alternative examples, the processing unit 1102 is further configured to: extract features from biological images based on a first target model to obtain biological features corresponding to the first target model, wherein the first target model is a machine learning model obtained by iteratively training biological features of biological image samples as training targets and biological image samples as training data; calculate a first angle information between the biological features corresponding to the first target model and the target category center feature, and calculate a second angle information between the biological features corresponding to the first target model and the first category center feature, wherein the target category center feature is obtained from the feature centers of biological features of each category in the biological features corresponding to the first target model, and the first category center feature is different from the target category center feature; determine a second loss value based on the first angle information and the second angle information; and adjust the model parameters of the first target model based on the second loss value to obtain multiple target teacher models.

[0114] In some alternative examples, the processing unit 1102 is further configured to: extract features from a biological image based on a preset initial model to obtain biological features corresponding to the preset initial model; determine the category center features of the preset initial model based on the feature centers of biological features of each category in the biological features corresponding to the preset initial model; determine a first probability value based on the category center features of the preset initial model and the biological features corresponding to the preset initial model, the first probability value being the probability of the image category to which the biological image belongs; determine a third loss value based on the first probability value and a first label, the first label being used to indicate the category labeling of the biological image; and adjust the model parameters of the preset initial model based on the third loss value to obtain a first target model.

[0115] In some alternative examples, the processing unit 1102 is used to: perform feature comparison between the target biometrics of the target object and preset biometrics to determine the recognition result.

[0116] In some alternative examples, the processing unit 1102 is configured to initiate an image recognition request for a target object; and the acquisition unit 1101 is configured to acquire a biological image of the target object according to the image recognition request.

[0117] In some alternative examples, the acquisition unit 1101 is used to capture images of the target object based on a preset camera device and according to the image recognition request, so as to obtain a biological image of the target object.

[0118] In some other optional examples, biological images include human face images.

[0119] The identification device in the embodiments of this application has been described above from the perspective of modular functional entities. The identification device in the embodiments of this application will now be described below from the perspective of hardware processing. Figure 12 This is a schematic diagram of the identification device provided in an embodiment of this application. The identification device can vary considerably depending on its configuration or performance. The identification device may include at least one processor 1201, a communication line 1207, a memory 1203, and at least one communication interface 1204.

[0120] The processor 1201 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (server IC), or one or more integrated circuits used to control the execution of the program of the present application.

[0121] Communication line 1207 may include a path for transmitting information between the aforementioned components.

[0122] Communication interface 1204 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), etc.

[0123] The memory 1203 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions. The memory can exist independently and be connected to the processor via communication line 1207. The memory can also be integrated with the processor.

[0124] The memory 1203 stores computer execution instructions for implementing the scheme of this application, and its execution is controlled by the processor 1201. The processor 1201 executes the computer execution instructions stored in the memory 1203, thereby implementing the method provided in the above embodiments of this application.

[0125] Optionally, the computer execution instructions in the embodiments of this application may also be referred to as application code, and the embodiments of this application do not specifically limit this.

[0126] In a specific implementation, as one example, the identification device may include multiple processors, for example... Figure 12 Processors 1201 and 1202 are described herein. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor here may refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).

[0127] In a specific implementation, as one embodiment, the identification device may further include an output device 1205 and an input device 1206. The output device 1205 communicates with the processor 1201 and can display information in various ways. The input device 1206 communicates with the processor 1201 and can receive input from the target object in various ways. For example, the input device 1206 may be a mouse, a touch screen device, or a sensing device, etc.

[0128] The aforementioned identification device can be a general-purpose device or a dedicated device. In specific implementations, the identification device can be a server, terminal equipment, or other similar devices. Figure 12 Devices with similar structures. The embodiments of this application do not limit the type of the identification device.

[0129] It should be noted that Figure 12 The processor 1201 can call computer execution instructions stored in the memory 1203 to cause the identification device to perform actions such as... Figures 3 to 10 The method in the corresponding method embodiment.

[0130] Specifically, Figure 11 The function / implementation process of the processing unit 1102 can be achieved through... Figure 12 The processor 1201 in the memory calls the computer execution instructions stored in the memory 1203 to achieve this. Figure 11 The function / implementation process of the acquisition unit 1101 can be achieved through... Figure 12 It is implemented using the communication interface 1204.

[0131] This application also provides a computer storage medium storing a computer program for electronic data interchange, which causes a computer to perform some or all of the steps of any of the image recognition methods described in the above method embodiments.

[0132] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the image recognition methods described in the above method embodiments.

[0133] In the above embodiments, the implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, in the form of a computer program product.

[0134] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0135] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0136] The units described as separate components may or may not be physically separate. 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 the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0137] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0138] If the integrated unit is implemented as 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 this application, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0139] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, they can be implemented in whole or in part in the form of a computer program product.

[0140] A computer program product includes one or more computer instructions. When these computer instructions are loaded and executed on a computer, they generate, in whole or in part, the processes or functions according to embodiments of this application. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions may be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., SSDs), etc.

[0141] It is understood that in the specific implementation of this application, user information, user personal data and other related data are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0142] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for image recognition, characterized in that, include: Acquire biological images of the target object; The biological image samples were trained by knowledge distillation based on multiple target teacher models to obtain the target student model. Based on the target student model, feature extraction processing is performed on the biological image of the target object to obtain the target biological features of the target object; The identification result is determined based on the target biometric features of the target object, and the identification result is used to indicate the face recognition status of the target object; The model training process of the target teacher model includes: Based on the first target model, feature extraction is performed on the biological image to obtain the biological features corresponding to the first target model. The first target model is a machine learning model obtained by iterative training using the biological features of the biological image sample as the training target and the biological image sample as the training data. Calculate the first angle information between the biofeature corresponding to the first target model and the target category center feature, and calculate the second angle information between the biofeature corresponding to the first target model and the first category center feature. The target category center feature is obtained from the feature center of each category of biofeature in the biofeature corresponding to the first target model. The first category center feature is different from the target category center feature. The second loss value is determined based on the first included angle information and the second included angle information; Based on the second loss value, the model parameters of the first target model are adjusted to obtain multiple target teacher models.

2. The method according to claim 1, characterized in that, Based on knowledge distillation training of biological image samples using multiple target teacher models, target student models are obtained, including: Acquire the biological image samples; Based on the first teacher model, feature extraction is performed on the biological image sample to obtain the first biological feature, wherein the first teacher model is any target teacher model randomly selected from the plurality of target teacher models; Based on a preset initial student model, feature extraction is performed on the biological image samples to obtain a second biological feature; Calculate the difference between the first biometric feature and the second biometric feature to obtain a first loss value; The model parameters of the preset initial student model are adjusted based on the first loss value to obtain the target student model.

3. The method according to claim 2, characterized in that, The step of calculating the difference between the first biometric feature and the second biometric feature to obtain a first loss value includes: Calculate the feature similarity between the first biometric feature and the second biometric feature; The first loss value is determined based on the feature similarity.

4. The method according to claim 1, characterized in that, The method further includes: Based on a preset initial model, feature extraction is performed on the biological image to obtain the biological features corresponding to the preset initial model; Based on the feature centers of each category of biological features in the biological features corresponding to the preset initial model, determine the category center features of the preset initial model; A first probability value is determined based on the category center features of the preset initial model and the biological features corresponding to the preset initial model. The first probability value is the probability of the image category to which the biological image belongs. A third loss value is determined based on the first probability value and the first label, wherein the first label is used to indicate the category labeling of the biological image; The model parameters of the preset initial model are adjusted based on the third loss value to obtain the first target model.

5. The method according to any one of claims 1 to 3, characterized in that, The determination of the identification result based on the target biometrics of the target object includes: The target biometrics of the target object are compared with preset biometrics to determine the identification result.

6. The method according to any one of claims 1 to 3, characterized in that, The acquisition of biological images of the target object includes: Initiate an image recognition request for the target object; Obtain the biological image of the target object according to the image recognition request.

7. The method according to claim 6, characterized in that, The step of obtaining the biological image of the target object according to the image recognition request includes: Based on a preset camera device, the target object is photographed according to the image recognition request to obtain a biological image of the target object.

8. The method according to any one of claims 1 to 3, characterized in that, The bio-images include human face images.

9. An identification device, characterized in that, include: The acquisition unit is used to acquire biological images of the target object; The processing unit is used to perform knowledge distillation training on biological image samples based on multiple target teacher models to obtain the target student model. The processing unit is used to perform feature extraction processing on the biological image of the target object based on the target student model to obtain the target biological features of the target object. The processing unit is used to determine the recognition result based on the target biometric features of the target object, and the recognition result is used to indicate the face recognition status of the target object. The processing unit is further configured to: extract features from the biological image based on a first target model to obtain biological features corresponding to the first target model, wherein the first target model is a machine learning model obtained by iteratively training the biological features of the biological image sample as the training target and the biological image sample as the training data; calculate a first angle information between the biological features corresponding to the first target model and the target category center feature, and calculate a second angle information between the biological features corresponding to the first target model and the first category center feature, wherein the target category center feature is obtained from the feature center of each category of biological features in the biological features corresponding to the first target model, and the first category center feature is different from the target category center feature; determine a second loss value based on the first angle information and the second angle information; and adjust the model parameters of the first target model based on the second loss value to obtain multiple target teacher models.

10. The apparatus according to claim 9, characterized in that, The acquisition unit is used to acquire the biological image sample; The processing unit is used for: Based on the first teacher model, feature extraction is performed on the biological image sample to obtain the first biological feature, wherein the first teacher model is any target teacher model randomly selected from the plurality of target teacher models; Based on a preset initial student model, feature extraction is performed on the biological image samples to obtain a second biological feature; Calculate the difference between the first biometric feature and the second biometric feature to obtain a first loss value; The model parameters of the preset initial student model are adjusted based on the first loss value to obtain the target student model.

11. The apparatus according to claim 10, characterized in that, The processing unit is used for: Calculate the feature similarity between the first biometric feature and the second biometric feature; The first loss value is determined based on the feature similarity.

12. The apparatus according to claim 9, characterized in that, The processing unit is also used for: Based on a preset initial model, feature extraction is performed on the biological image to obtain the biological features corresponding to the preset initial model; Based on the feature centers of each category of biological features in the biological features corresponding to the preset initial model, determine the category center features of the preset initial model; A first probability value is determined based on the category center features of the preset initial model and the biological features corresponding to the preset initial model. The first probability value is the probability of the image category to which the biological image belongs. A third loss value is determined based on the first probability value and the first label, wherein the first label is used to indicate the category labeling of the biological image; The model parameters of the preset initial model are adjusted based on the third loss value to obtain the first target model.

13. The apparatus according to any one of claims 9 to 11, characterized in that, The processing unit is used for: The target biometrics of the target object are compared with preset biometrics to determine the identification result.

14. The apparatus according to any one of claims 9 to 11, characterized in that, The processing unit is used to initiate an image recognition request for the target object; The acquisition unit is used to acquire the biological image of the target object according to the image recognition request.

15. The apparatus according to claim 14, characterized in that, The acquisition unit is used to capture images of the target object based on a preset camera device and according to the image recognition request, so as to obtain a biological image of the target object.

16. The apparatus according to any one of claims 9 to 11, characterized in that, The bio-images include human face images.

17. An identification device, characterized in that, The identification device includes: an input / output (I / O) interface, a processor, and a memory, wherein the memory stores program instructions; The processor is configured to execute program instructions stored in the memory to perform the method as described in any one of claims 1 to 8.

18. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes instructions that, when executed on a computer device, cause the computer device to perform the method as described in any one of claims 1 to 8.

19. A computer program product, characterized in that, The finished computer program includes instructions that, when executed on a computer device or processor, cause the computer device or processor to perform the method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Model distillation method and device, electronic equipment and readable storage medium

    CN111695699A

  • Model distillation method, device and equipment based on multi-teacher model and storage medium

    CN114386604A