Low-resolution face recognition method and device, electronic equipment and medium

By deploying a student model trained in knowledge distillation on the end-side device, the problems of insufficient accuracy of low-resolution image recognition and limitation of computing resources are solved, efficient and real-time facial recognition is achieved, and bandwidth and server burden are reduced.

CN119399814APending Publication Date: 2025-02-07E-SURFING DIGITAL LIFE TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411540616.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

In the prior art, in the problems of insufficient recognition accuracy of low-resolution images, limitation of computing resources, bandwidth and excessive server burden, it is difficult to achieve real-time and efficient face recognition on end-side devices.

Method used

By acquiring multiple face image sample pairs, the teacher model and student model are constructed, and the student model is used to use knowledge distillation technology to enable the student model to learn the representation ability of the teacher model, and the student model is deployed on the end-side device for face recognition.

Benefits of technology

It improves the face recognition accuracy of low-resolution images, reduces bandwidth consumption and server burden, and improves the real-time and reliability of face recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119399814A_ABST
    Figure CN119399814A_ABST
Patent Text Reader

Abstract

The invention discloses a low-resolution face recognition method and device, electronic equipment and a medium, and the method comprises the steps: obtaining a plurality of face image sample pairs which comprise high-resolution face images and corresponding low-resolution face images; constructing a teacher model and a corresponding student model, and training the teacher model according to the high-resolution face image to obtain a face recognition teacher model; respectively inputting the face image sample pair into a face recognition teacher model and a student model, and enabling the student model to learn the characterization capability of the face recognition teacher model through knowledge distillation to obtain a face recognition student model; and deploying the face recognition student model to an end side device, and performing face recognition through the end side device. According to the method, the face recognition precision of the low-resolution image is improved, the bandwidth consumption and the server burden are reduced, the real-time performance and the reliability of face recognition are improved, and the method can be widely applied to the technical field of artificial intelligence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a low-resolution face recognition method, device, electronic equipment and medium. Background Art

[0002] In face recognition technology, it can be divided into limited scenarios and non-limited scenarios according to different application scenarios. Limited scenarios such as access control and face payment require the cooperation of the person being identified, and the image quality obtained is high. The face recognition accuracy in this scenario is high. However, most of the real scenes are non-limited scenes, such as monitoring and drone photography. These application scenarios have problems such as long camera distance and poor shooting angle, and the image quality obtained is often poor.

[0003] For the processing and recognition of such low-resolution images, the current mainstream technical solutions are divided into the following two types:

[0004] 1) Traditional image enhancement techniques, such as denoising and sharpening. Denoising is to use Gaussian filtering and median filtering to remove noise in the image, thereby improving image quality. Sharpening is to enhance the edges and details of the image through techniques such as Laplace sharpening and high-pass filtering to improve image quality. These methods have limited ability to restore details, especially in low-resolution images, where image detail information is severely lost and cannot significantly improve recognition accuracy.

[0005] 2) Recognition methods based on deep learning. Modern deep learning methods such as convolutional neural networks perform well in high-resolution images and can extract complex image features. High-level features are extracted through multi-layer convolution operations for classification. However, in low-resolution images, the model may not be able to extract enough effective features, resulting in reduced recognition accuracy. If you want to improve recognition accuracy, you can only use a larger model or a super-resolution model, but these models usually have high requirements for computing resources and cannot be applied to end-side devices for real-time processing. Images need to be sent to the cloud for processing. This will increase bandwidth costs and the computing burden of the server, and there will be time delays, which may affect the real-time performance of the system in high-concurrency scenarios. .

[0006] In summary, although the existing technology has solved the problem of low-resolution image recognition to a certain extent, the following problems still exist:

[0007] 1) Insufficient recognition accuracy of low-resolution images. Traditional image enhancement technology and existing high-resolution recognition models do not work well when processing low-quality images, which are common in end-side scenarios.

[0008] 2) Computing resource limitations. Deep learning-based recognition methods, such as convolutional neural networks, usually require special processing methods, such as super-resolution processing, when processing low-resolution images, which requires high computing resources. For end-side devices (such as smartphones, edge computing devices, etc.), their computing power is limited and it is difficult to efficiently run complex deep learning models, resulting in a slow recognition process and failure to meet real-time requirements.

[0009] 3) Bandwidth and server burden issues. Although cloud processing methods can use powerful computing resources for low-resolution face recognition, they require a lot of bandwidth to transmit image data. This not only increases bandwidth costs, but may also cause network delays and affect real-time performance. In addition, cloud processing increases the computing burden and cost of the server, limiting the scalability and economy of the system. Summary of the invention

[0010] The purpose of the present invention is to solve one of the technical problems existing in the prior art to at least a certain extent.

[0011] To this end, an object of an embodiment of the present invention is to provide a low-resolution face recognition method, which improves the face recognition accuracy of low-resolution images, reduces bandwidth consumption and server burden, and improves the real-time and reliability of face recognition.

[0012] Another object of an embodiment of the present invention is to provide a low-resolution face recognition device.

[0013] In order to achieve the above technical objectives, the technical solutions adopted by the embodiments of the present invention include:

[0014] On the one hand, an embodiment of the present invention provides a low-resolution face recognition method, comprising the following steps:

[0015] Acquire a plurality of facial image sample pairs, wherein the facial image sample pairs include a high-resolution facial image and a corresponding low-resolution facial image;

[0016] Constructing a teacher model and a corresponding student model, and training the teacher model according to the high-resolution face image to obtain a face recognition teacher model;

[0017] Inputting the face image sample pairs into the face recognition teacher model and the student model respectively, and making the student model learn the representation ability of the face recognition teacher model through knowledge distillation to obtain the face recognition student model;

[0018] The face recognition student model is deployed to an end-side device, and face recognition is performed through the end-side device.

[0019] Furthermore, in one embodiment of the present invention, the step of obtaining a plurality of face image sample pairs specifically includes:

[0020] Acquire a plurality of preset high-resolution facial images, and determine a true label of each of the high-resolution facial images;

[0021] Downsampling and Gaussian blurring the high-resolution face image to obtain the corresponding low-resolution face image;

[0022] The face image sample pair is generated according to the high-resolution face image, the corresponding low-resolution face image and the true label.

[0023] Further, in one embodiment of the present invention, the training of the teacher model according to the high-resolution face image to obtain the face recognition teacher model specifically includes:

[0024] Inputting the high-resolution face image into the teacher model to obtain a face recognition result;

[0025] Determine a first loss value according to the face recognition result, the true label and a preset first loss function;

[0026] The model parameters of the teacher model are updated according to the first loss value to obtain the face recognition teacher model.

[0027] Further, in one embodiment of the present invention, the face image sample pairs are respectively input into the face recognition teacher model and the student model, and the student model is made to learn the representation ability of the face recognition teacher model through knowledge distillation to obtain the face recognition student model, which specifically includes:

[0028] Inputting the high-resolution face image into the face recognition teacher model to obtain a first probability distribution;

[0029] Inputting the corresponding low-resolution face image into the student model to obtain a second probability distribution;

[0030] Determine a second loss value according to the first probability distribution, the second probability distribution, the true label, and a preset second loss function;

[0031] The model parameters of the student model are updated according to the second loss value to obtain the face recognition student model.

[0032] Further, in one embodiment of the present invention, the second loss function includes a KL divergence loss function, an improved cross entropy loss function and a constrained loss function, wherein the improved cross entropy loss function is obtained by changing a fixed interval parameter of the cross entropy loss function to a learnable interval parameter related to the sample category, and the constrained loss function is as follows:

[0033]

[0034] Among them, L m represents the function value of the constraint loss function, N represents the number of face image sample pairs, represents the learnable interval parameter associated with the sample category of the i-th face image sample pair.

[0035] Further, in one embodiment of the present invention, determining the second loss value according to the first probability distribution, the second probability distribution, the true label and a preset second loss function specifically includes:

[0036] Determine a KL divergence loss value according to the first probability distribution, the second probability distribution, and the KL divergence loss function;

[0037] Determine a cross entropy loss value according to the second probability distribution, the true label, and the improved cross entropy loss function;

[0038] Determining a constraint loss value according to the learnable interval parameter and the constraint loss function;

[0039] The KL divergence loss value, the cross entropy loss value and the constraint loss value are weighted and summed according to a preset weight coefficient to obtain the second loss value.

[0040] Further, in one embodiment of the present invention, the deploying the face recognition student model to a terminal-side device and performing face recognition through the terminal-side device specifically includes:

[0041] Performing quantization and pruning processing on the face recognition student model and then deploying it to the end-side device;

[0042] The low-resolution image to be identified is obtained through the terminal device, and face recognition is performed on the low-resolution image to be identified, and then the recognition result is uploaded to the cloud.

[0043] On the other hand, an embodiment of the present invention provides a low-resolution face recognition device, comprising:

[0044] A sample acquisition module, used to acquire a plurality of face image sample pairs, wherein the face image sample pairs include a high-resolution face image and a corresponding low-resolution face image;

[0045] A teacher model training module is used to construct a teacher model and a corresponding student model, and train the teacher model according to the high-resolution face image to obtain a face recognition teacher model;

[0046] A student model training module, used for inputting the face image sample pairs into the face recognition teacher model and the student model respectively, and making the student model learn the representation ability of the face recognition teacher model through knowledge distillation to obtain a face recognition student model;

[0047] The face recognition module is used to deploy the face recognition student model to the terminal side device and perform face recognition through the terminal side device.

[0048] On the other hand, an embodiment of the present invention provides an electronic device, comprising a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein the program, when executed by the processor, realizes the low-resolution face recognition method as described above.

[0049] On the other hand, an embodiment of the present invention further provides a storage medium, which is a computer-readable storage medium used for computer-readable storage, and 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 low-resolution face recognition method as described above.

[0050] The advantages and beneficial effects of the present invention will be partly given in the following description, partly become apparent from the following description, or be understood through the practice of the present invention:

[0051] The embodiment of the present invention obtains multiple face image sample pairs, the face image sample pairs include high-resolution face images and corresponding low-resolution face images, constructs a teacher model and a corresponding student model, trains the teacher model according to the high-resolution face images, obtains a face recognition teacher model, inputs the face image sample pairs into the face recognition teacher model and the student model respectively, enables the student model to learn the representation ability of the face recognition teacher model through knowledge distillation, obtains a face recognition student model, deploys the face recognition student model to a terminal device, and performs face recognition through the terminal device. The embodiment of the present invention compresses the knowledge of the teacher model into the student model through the knowledge distillation technology, thereby improving the recognition ability of the student model on low-resolution images; uses a student model with a smaller number of parameters for face recognition, which requires less computing resources, so that the face recognition model can run efficiently on the terminal device; completes the recognition process completely on the terminal device, reducing the data transmission requirements and server computing burden; the embodiment of the present invention improves the face recognition accuracy of low-resolution images, reduces bandwidth consumption and server burden, and improves the real-time and reliability of face recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solution in the embodiments of the present invention, the following introduction is made to the drawings required for use in the embodiments of the present invention. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solution of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0053] Figure 1 A flowchart of a low-resolution face recognition method provided by an embodiment of the present invention;

[0054] Figure 2 A schematic diagram of the training process of a teacher model and a student model provided in an embodiment of the present invention;

[0055] Figure 3 A step flow chart of step S101 provided in an embodiment of the present invention;

[0056] Figure 4 A step flow chart of step S102 provided in an embodiment of the present invention;

[0057] Figure 5 A step flow chart of step S103 provided in an embodiment of the present invention;

[0058] Figure 6 A step flow chart of step S1033 provided in an embodiment of the present invention;

[0059] Figure 7A step flow chart of step S104 provided in an embodiment of the present invention;

[0060] Figure 8 A schematic diagram of the structure of a low-resolution face recognition device provided by an embodiment of the present invention;

[0061] Fig. 9 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention;

[0062] Fig.10 A schematic diagram of the structure of a storage medium provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0063] Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limitations on the present application. It should be noted that, although the functional module division is performed in the system schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order from the module division in the system schematic diagram or the flow chart. For the step numbers in the following embodiments, they are only set for the convenience of explanation, and the order between the steps is not limited in any way. The execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0064] In the description of the present invention, the meaning of "a plurality" is two or more. If there is a description of the first or the second, it is only for the purpose of distinguishing the technical features, and it cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features. In addition, unless otherwise defined, all technical and scientific terms used in this document have the same meaning as those commonly understood by technicians in the technical field of this application. The terms used in this document are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0065] The low-resolution face recognition method provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a set-top box, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured 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 low-resolution face recognition method, etc., but is not limited to the above forms.

[0066] 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 electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. 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, etc. 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 through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0067] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user 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 these data will comply with the relevant laws, regulations, and standards of the relevant countries and regions. 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.

[0068] like Figure 1 FIG. 1 is a flowchart of a low-resolution face recognition method according to an embodiment of the present invention. Figure 1 The embodiment of the present invention provides a low-resolution face recognition method, which specifically includes the following steps:

[0069] S101, obtaining a plurality of face image sample pairs, where the face image sample pairs include a high-resolution face image and a corresponding low-resolution face image;

[0070] S102, constructing a teacher model and a corresponding student model, training the teacher model according to high-resolution face images, and obtaining a face recognition teacher model;

[0071] S103, inputting the face image sample pairs into the face recognition teacher model and the student model respectively, and making the student model learn the representation ability of the face recognition teacher model through knowledge distillation, thereby obtaining the face recognition student model;

[0072] S104: deploy the face recognition student model to the end-side device, and perform face recognition through the end-side device.

[0073] Specifically, Figure 2 FIG. 1 is a schematic diagram of the training process of the teacher model and the student model provided by an embodiment of the present invention. The main steps of the low-resolution face recognition method of the embodiment of the present invention are as follows:

[0074] 1) Training sample preparation: First, a batch of high-resolution face images are collected, then each image is downsampled and Gaussian blurred to generate low-resolution images, and finally these low-resolution images are paired with their corresponding high-resolution versions to form face image sample pairs.

[0075] 2) Train the teacher model. Select a model with a high number of parameters to ensure its recognition effect, and then use a large amount of high-resolution data to train the model so that it can recognize high-resolution images with high accuracy.

[0076] 3) Train the student model. Select a model with fewer parameters. During the training process, the parameters of the teacher model remain fixed. Input the face image sample pairs into the teacher model and the student model respectively to obtain the corresponding features. Through the loss function constraint, the student model learns the representation effect of the teacher model.

[0077] 4) Student model deployment and inference. The trained student model is deployed on the end-side device after quantization and pruning. The end-side device processes the recognition results in real time and sends them to the background device.

[0078] It is understandable that the existing technology has low recognition accuracy when processing low-resolution images. The embodiment of the present invention compresses the knowledge of the teacher model into the student model through knowledge distillation technology, thereby improving the recognition ability of the student model on low-resolution images; when the existing technology runs complex deep learning models on the end-side device, the computing resources are limited and it is difficult to meet the real-time requirements. The embodiment of the present invention uses a student model with a smaller number of parameters for face recognition, which requires less computing resources, so that the face recognition model can run efficiently on the end-side device; the existing technology relies on cloud computing and requires a large amount of bandwidth to transmit image data, which increases bandwidth costs and server burdens. The embodiment of the present invention completes the recognition process completely on the end-side device, reducing data transmission requirements and server computing burdens. In summary, the embodiment of the present invention improves the face recognition accuracy of low-resolution images, reduces bandwidth consumption and server burdens, and improves the real-time and reliability of face recognition.

[0079] like Figure 3 FIG. 1 is a flowchart of step S101 provided in an embodiment of the present invention, referring to FIG. Figure 3 As an optional implementation, a plurality of face image sample pairs are obtained, which specifically includes:

[0080] S1011, obtaining a plurality of preset high-resolution face images, and determining a true label of each high-resolution face image;

[0081] S1012, downsampling and Gaussian blurring the high-resolution face image to obtain a corresponding low-resolution face image;

[0082] S1013: Generate a face image sample pair according to the high-resolution face image, the corresponding low-resolution face image and the true label.

[0083] Specifically, a high-resolution face image is downsampled by bicubic interpolation and processed by Gaussian blur to generate a corresponding low-resolution image. Then, the low-resolution image is paired with its corresponding high-resolution image to form a face image sample pair.

[0084] like Figure 4 FIG. 1 is a flow chart of step S102 provided in an embodiment of the present invention, referring to FIG. Figure 4 As an optional implementation, a teacher model is trained based on high-resolution face images to obtain a face recognition teacher model, which specifically includes:

[0085] S1021, inputting the high-resolution face image into the teacher model to obtain a face recognition result;

[0086] S1022, determining a first loss value according to the face recognition result, the true label, and a preset first loss function;

[0087] S1023. Update the model parameters of the teacher model according to the first loss value to obtain a face recognition teacher model.

[0088] Specifically, a model with a higher number of parameters is selected as the teacher model, such as Resnet50, high-resolution face images are used as the training data set, and Arcface, a loss function commonly used in face recognition, is adopted for training to obtain a teacher model that can accurately recognize high-resolution faces.

[0089] like Figure 5 FIG. 1 is a flow chart of step S103 provided in an embodiment of the present invention, referring to FIG. Figure 5 As an optional implementation method, the face image sample pairs are respectively input into the face recognition teacher model and the student model, and the student model is made to learn the representation ability of the face recognition teacher model through knowledge distillation to obtain the face recognition student model, which specifically includes:

[0090] S1031, inputting the high-resolution face image into the face recognition teacher model to obtain a first probability distribution;

[0091] S1032, inputting the corresponding low-resolution face image into the student model to obtain a second probability distribution;

[0092] S1033, determining a second loss value according to the first probability distribution, the second probability distribution, the true label, and a preset second loss function;

[0093] S1034. Update the model parameters of the student model according to the second loss value to obtain a face recognition student model.

[0094] Specifically, the trained teacher model parameters are fixed, and a pair of high-resolution and low-resolution samples are input into the teacher model and the student model respectively to obtain the facial features of the two images. Since the teacher model is already able to recognize faces well, the first probability distribution output by it can be regarded as the real facial features. The second loss value is calculated based on the first probability distribution output by the teacher model, the second probability distribution output by the student model, and the true label of the sample, and the student model is updated and optimized based on the second loss value.

[0095] Further as an optional implementation, the second loss function includes a KL divergence loss function, an improved cross entropy loss function and a constrained loss function, the improved cross entropy loss function is obtained by changing the fixed interval parameter of the cross entropy loss function to a learnable interval parameter related to the sample category, and the constrained loss function is as follows:

[0096]

[0097] Among them, L mrepresents the function value of the constraint loss function, N represents the number of face image sample pairs, represents the learnable interval parameter associated with the sample category of the i-th face image sample pair.

[0098] like Figure 6 FIG. 1 is a flow chart of step S1033 provided in an embodiment of the present invention, referring to FIG. Figure 6 , further as an optional implementation, determining the second loss value according to the first probability distribution, the second probability distribution, the true label and the preset second loss function specifically includes:

[0099] S10331. Determine a KL divergence loss value according to the first probability distribution, the second probability distribution, and the KL divergence loss function;

[0100] S10332. Determine a cross entropy loss value according to the second probability distribution, the true label, and the improved cross entropy loss function;

[0101] S10333. Determine a constraint loss value according to a learnable interval parameter and a constraint loss function;

[0102] S10334. Perform weighted summation on the KL divergence loss value, the cross entropy loss value, and the constraint loss value according to a preset weight coefficient to obtain a second loss value.

[0103] Specifically, the second loss function of the embodiment of the present invention includes a KL divergence loss function, an improved cross entropy loss function and a constraint loss function, which are described below respectively.

[0104] The KL divergence loss is used to make the output of the student model close to the output of the teacher model, thereby achieving the effect of the teacher guiding the student model to learn. The KL divergence loss function is as follows:

[0105]

[0106] Among them, L logit represents the divergence loss value, N is the number of samples in a batch, C is the number of sample categories, T i (j; t) is the first probability distribution output by the teacher model when the distillation temperature is t, which is calculated by the softmax function. The formula is as follows:

[0107]

[0108] S i (i; t) is the probability distribution of the student model output, which is also calculated by the softmax function and will not be described here.

[0109] The classification loss of the student model is calculated by the improved cross entropy loss function (Arcface). The original cross entropy loss function is as follows:

[0110]

[0111] The original cross entropy loss first normalizes the weights and removes the bias term on the linear layer, and finally adds an interval parameter m. The role of s is to stabilize the training. The scaling hyperparameter set, and the interval parameter m is also a set hyperparameter. Its role is to explicitly increase the difficulty of training, so that the feature representation obtained by the model is more aggregated and more representative of the real face features.

[0112] The embodiment of the present invention improves the compression interval m in the cross entropy loss function. Since the number of facial samples of each category during training is different, it is obviously unreasonable to apply the same feature compression strength to them. For categories with a large number of samples, the richer their representation in the feature space, the more they can represent the real facial features, so a smaller compression strength should be given. For categories with a small number of samples, the deviation from the real facial features may be greater, so a greater compression strength should be given. The present invention changes the interval hyperparameter m in the cross entropy loss function to a learnable parameter related to the sample category. where y i The boundary of each category can be adaptively adjusted according to the specific characteristics and sample distribution of each category, so that the improved cross entropy loss function used in the end can be obtained:

[0113]

[0114] At the same time, in order to constrain the learnable parameters To prevent it from getting smaller and smaller during the update process, the present invention designs a constraint loss function

[0115] Finally, the present invention uses the total second loss function L total =L arc-m +αL m +βL logit To iteratively optimize the model, where α and β are preset weight parameters, multiple batches of training are performed, and after the model is stable, the final student model used to recognize low-resolution faces can be obtained.

[0116] like Figure 7 FIG. 1 is a flow chart of step S104 provided in an embodiment of the present invention, referring to FIG. Figure 7 As an optional implementation, the face recognition student model is deployed to the end-side device, and face recognition is performed through the end-side device, which specifically includes:

[0117] S1041. Perform quantization and pruning processing on the face recognition student model and then deploy it to the end-side device;

[0118] S1042. Obtain a low-resolution image to be identified through a terminal device, perform face recognition on the low-resolution image to be identified, and then upload the recognition result to the cloud.

[0119] Specifically, the obtained student model is quantized and pruned and then deployed on the end-side device. After capturing the image, the end-side device can perform local processing and recognition and send the recognition result directly back to the cloud, without having to send the video back to the cloud for recognition.

[0120] The above is an explanation of the method steps of the embodiment of the present invention. It can be recognized that the embodiment of the present invention compresses the knowledge of the teacher model into the student model through knowledge distillation technology, thereby improving the recognition ability of the student model on low-resolution images; using a student model with a smaller number of parameters for face recognition, the demand for computing resources is less, so that the face recognition model can run efficiently on the end-side device; the recognition process is completed entirely on the end-side device, reducing the data transmission requirements and server computing burden; the embodiment of the present invention improves the face recognition accuracy of low-resolution images, reduces bandwidth consumption and server burden, and improves the real-time and reliability of face recognition.

[0121] Compared with the prior art, the embodiments of the present invention also have the following advantages:

[0122] 1) The present invention uses knowledge distillation technology to compress high-precision large model knowledge into a small model, and guides the small model (student model) to learn through the large model (teacher model), so that the small model can have higher recognition ability on low-resolution images. In this way, the small model can learn the representation ability of the large model, improve the recognition accuracy of low-resolution face images, and overcome the problem of low recognition accuracy of existing technologies on low-resolution images.

[0123] 2) The present invention improves the Arcface loss function by introducing a class-related learnable parameter, so that samples of different classes differ in the strength of feature compression, so as to improve the model's ability to characterize various samples. Through this improvement, the model can more adaptively adjust the compression strength of various samples during the training process, improve the accuracy and stability of feature representation, and enable the model to show higher recognition accuracy in practical applications.

[0124] 3) The present invention converts high-resolution face images into low-resolution images through bicubic interpolation downsampling and Gaussian blur processing, and pairs them with high-resolution images to generate model training sample pairs. This method makes the training samples closer to the actual application scenarios, helps to improve the adaptability and recognition effect of the model in different environments, and solves the problem of insufficient low-resolution image samples in the prior art.

[0125] 4) After training the student model, the present invention performs quantization and pruning on the model so that it can run efficiently on the end-side device, and only needs to send the recognition results to the cloud. This method reduces the computational complexity and memory usage of the model, allowing the model to run efficiently on resource-constrained devices, improving the real-time performance of the system. At the same time, it reduces the demand for data transmission, saves bandwidth consumption and server computing resources, and reduces the system operating costs.

[0126] like Figure 8 FIG. 1 is a schematic diagram of the structure of a low-resolution face recognition device provided by an embodiment of the present invention, referring to FIG. Figure 8 , an embodiment of the present invention provides a low-resolution face recognition device, comprising:

[0127] A sample acquisition module, used to acquire a plurality of face image sample pairs, wherein the face image sample pairs include a high-resolution face image and a corresponding low-resolution face image;

[0128] The teacher model training module is used to construct a teacher model and a corresponding student model, and train the teacher model based on high-resolution face images to obtain a face recognition teacher model;

[0129] The student model training module is used to input the face image sample pairs into the face recognition teacher model and the student model respectively, and through knowledge distillation, the student model learns the representation ability of the face recognition teacher model to obtain the face recognition student model;

[0130] The face recognition module is used to deploy the face recognition student model to the end-side device and perform face recognition through the end-side device.

[0131] The contents of the above method embodiments are all applicable to the present device embodiments. The functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0132] The embodiment of the present invention also provides an electronic device, the electronic device comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and the program is executed by the processor to realize the above-mentioned low-resolution face recognition method. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0133] like Fig. 9 FIG. 1 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Fig. 9 , an embodiment of the present invention provides an electronic device, including:

[0134] The processor 901 may be implemented by 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 invention;

[0135] The memory 902 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 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the low-resolution face recognition method of the embodiment of the present invention;

[0136] Input / output interface 903, used to implement information input and output;

[0137] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0138] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);

[0139] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0140] like Fig.10 FIG. 1 is a schematic diagram of a storage medium according to an embodiment of the present invention. Fig.10The embodiment of the present invention further provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs 1001, and the one or more programs 1001 can be executed by one or more processors to implement the above-mentioned low-resolution face recognition method.

[0141] 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 disposed 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.

[0142] The embodiment of the present invention also discloses a computer program product or a computer program, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes Figure 1 The method shown.

[0143] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the above-mentioned boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.

[0144] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified to the contrary, one or more of the above-mentioned functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0145] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the 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, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the above methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0146] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0147] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the above-mentioned program is printed, since the above-mentioned program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or processing in other suitable ways as necessary, and then stored in a computer memory.

[0148] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0149] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0150] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

[0151] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. A low-resolution face recognition method, characterized in that: The following steps are involved: Acquire a plurality of facial image sample pairs, wherein the facial image sample pairs include a high-resolution facial image and a corresponding low-resolution facial image; Constructing a teacher model and a corresponding student model, and training the teacher model according to the high-resolution face image to obtain a face recognition teacher model; Inputting the face image sample pairs into the face recognition teacher model and the student model respectively, and making the student model learn the representation ability of the face recognition teacher model through knowledge distillation, thereby obtaining a face recognition student model; The face recognition student model is deployed to an end-side device, and face recognition is performed through the end-side device.

2. A low-resolution face recognition method according to claim 1, characterized in that: The step of obtaining a plurality of face image sample pairs specifically includes: Acquire a plurality of preset high-resolution facial images, and determine a true label of each of the high-resolution facial images; Downsampling and Gaussian blurring the high-resolution face image to obtain the corresponding low-resolution face image; The face image sample pair is generated according to the high-resolution face image, the corresponding low-resolution face image and the true label.

3. A low-resolution face recognition method according to claim 2, characterized in that: The method of training the teacher model according to the high-resolution face image to obtain a face recognition teacher model specifically includes: Inputting the high-resolution face image into the teacher model to obtain a face recognition result; Determine a first loss value according to the face recognition result, the true label and a preset first loss function; The model parameters of the teacher model are updated according to the first loss value to obtain the face recognition teacher model.

4. A low-resolution face recognition method according to claim 2, characterized in that: The face image sample pairs are input into the face recognition teacher model and the student model respectively, and the student model is made to learn the representation ability of the face recognition teacher model through knowledge distillation to obtain the face recognition student model, which specifically includes: Inputting the high-resolution face image into the face recognition teacher model to obtain a first probability distribution; Inputting the corresponding low-resolution face image into the student model to obtain a second probability distribution; Determine a second loss value according to the first probability distribution, the second probability distribution, the true label, and a preset second loss function; The model parameters of the student model are updated according to the second loss value to obtain the face recognition student model.

5. A low-resolution face recognition method according to claim 4, characterized in that: The second loss function includes a KL divergence loss function, an improved cross entropy loss function, and a constraint loss function. The improved cross entropy loss function is obtained by changing the fixed interval parameter of the cross entropy loss function to a learnable interval parameter related to the sample category. The constraint loss function is as follows: Among them, L m represents the function value of the constraint loss function, N represents the number of face image sample pairs, represents the learnable interval parameter associated with the sample category of the i-th face image sample pair.

6. A low-resolution face recognition method according to claim 5, characterized in that: The determining of the second loss value according to the first probability distribution, the second probability distribution, the true label and a preset second loss function specifically includes: Determine a KL divergence loss value according to the first probability distribution, the second probability distribution, and the KL divergence loss function; Determine a cross entropy loss value according to the second probability distribution, the true label, and the improved cross entropy loss function; Determining a constraint loss value according to the learnable interval parameter and the constraint loss function; The KL divergence loss value, the cross entropy loss value and the constraint loss value are weighted and summed according to a preset weight coefficient to obtain the second loss value.

7. A low-resolution face recognition method according to any one of claims 1 to 6, characterized in that: The step of deploying the face recognition student model to a terminal device and performing face recognition through the terminal device specifically includes: Performing quantization and pruning processing on the face recognition student model and then deploying it to the end-side device; The low-resolution image to be identified is obtained through the terminal-side device, and face recognition is performed on the low-resolution image to be identified, and then the recognition result is uploaded to the cloud.

8. A low-resolution face recognition device, characterized in that: include: A sample acquisition module, used to acquire a plurality of face image sample pairs, wherein the face image sample pairs include a high-resolution face image and a corresponding low-resolution face image; A teacher model training module is used to construct a teacher model and a corresponding student model, and train the teacher model according to the high-resolution face image to obtain a face recognition teacher model; A student model training module, used for inputting the face image sample pairs into the face recognition teacher model and the student model respectively, and making the student model learn the representation ability of the face recognition teacher model through knowledge distillation to obtain a face recognition student model; The face recognition module is used to deploy the face recognition student model to the terminal side device and perform face recognition through the terminal side device.

9. An electronic device, characterized in that: The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the steps of the low-resolution face recognition method as described in any one of claims 1 to 7 are realized.

10. A storage medium, the storage medium being a computer-readable storage medium, used for computer-readable storage, characterized in that: 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 steps of the low-resolution face recognition method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Microscope light slice mineral identification model generation method and device and electronic equipment

    CN121392850A