Method and apparatus for updating biometric library, and computer device
Patent Information
- Application Number
- CN202510434940.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2045-04-08
AI Technical Summary
然而,这种方式不仅增加了用户的操作成本,还难以适用于大规模应用场景,尤其是在需要长期维护用户身份数据的系统(如银行身份认证、安防监控、智能门禁等)中,重新采集的难度和成本极高
[0010]According to the biometric database update method provided in this application, during the registration stage, biometric features of the registration image are extracted through a recognition model, and the registration image is compressed through an encoding model to generate compressed features. These compressed features are then stored in the biometric database along with the biometric features. Using compressed features instead of storing the original image reduces the storage space of the biometric database, improves storage efficiency, and avoids processing high-resolution images during subsequent restoration, reducing computational load and improving real-time performance. When the recognition model is updated, the compressed features are decompressed through a decoding model to generate a restored image matching the original registration image. Biometric features are then re-extracted based on the updated recognition model to replace the old features in the biometric database, achieving adaptive data updates. This eliminates the need to re-collect user biometric features, ensuring the biometric database always matches the latest recognition model, thereby improving the accuracy, stability, and adaptability of the recognition process.
Smart Images

Figure CN120412008B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of biometric identification, and in particular relates to a method, apparatus and computer equipment for updating a biometric database. Background Technology
[0002] In the field of biometrics, identity verification or individual identification can be achieved by collecting and storing the biometric features of an object. The performance of the identification model directly determines the accuracy and robustness of identity verification. With the optimization and upgrading of identification algorithms, new identification models typically possess stronger feature extraction capabilities and higher recognition accuracy. Data in biometric databases is usually registered and stored based on older identification models. When the identification model is updated, the original features may no longer match the features extracted by the new model, leading to a decrease in recognition accuracy or even identity verification failure.
[0003] In related technologies, updating biometric databases typically relies on user re-registration, which involves re-collecting biometric features and storing the updated features. However, this approach not only increases the operational costs for users but is also difficult to apply to large-scale application scenarios, especially in systems that require long-term maintenance of user identity data (such as bank identity authentication, security monitoring, and smart access control), where the difficulty and cost of re-collection are extremely high. Summary of the Invention
[0004] This application aims to address at least one of the technical problems existing in the related art. To this end, this application proposes a method, apparatus, and computer equipment for updating a biometric database to improve the accuracy, stability, and adaptability of biometric identification.
[0005] In a first aspect, this application provides a method for updating a biometric database, the method comprising:
[0006] Biometric features are extracted from the registered image using a recognition model, and the registered image is compressed using an encoding model to generate compressed features; the registered image is obtained by collecting data from specific parts of the object.
[0007] The biometric features and compressed features are associated and stored in a biometric database;
[0008] When the recognition model is updated, the compressed features in the biometric database are decompressed by the decoding model to obtain a restored image that matches the registered image.
[0009] The reconstructed image is subjected to feature extraction using the updated recognition model to obtain new biometric features. The original biometric features in the biometric feature library are then replaced with the new biometric features to update the biometric feature library.
[0010] According to the biometric database update method provided in this application, during the registration stage, biometric features of the registration image are extracted through a recognition model, and the registration image is compressed through an encoding model to generate compressed features. These compressed features are then stored in the biometric database along with the biometric features. Using compressed features instead of storing the original image reduces the storage space of the biometric database, improves storage efficiency, and avoids processing high-resolution images during subsequent restoration, reducing computational load and improving real-time performance. When the recognition model is updated, the compressed features are decompressed through a decoding model to generate a restored image matching the original registration image. Biometric features are then re-extracted based on the updated recognition model to replace the old features in the biometric database, achieving adaptive data updates. This eliminates the need to re-collect user biometric features, ensuring the biometric database always matches the latest recognition model, thereby improving the accuracy, stability, and adaptability of the recognition process.
[0011] According to one embodiment of this application, the encoding model and the decoding model are obtained in advance through joint training; the joint training steps include:
[0012] Acquire sample images;
[0013] The sample images are compressed using an encoding model to obtain sample compression features, and an encoding loss corresponding to the encoding model is constructed based on the sample compression.
[0014] The sample compression features are decompressed by the decoding model to obtain the sample reconstruction image, and the decoding loss corresponding to the decoding model is determined based on the error between the sample reconstruction image and the sample image.
[0015] The encoding loss and decoding loss are combined to obtain the encoding-decoding loss, and the encoding model and decoding model are jointly trained based on the encoding-decoding loss to obtain the trained encoding model and decoding model.
[0016] In the above embodiments, compared to independently trained encoding and decoding models, joint training ensures that the encoding model retains the most critical texture information, enabling the decoding model to more accurately recover the original image features and improve the adaptability of the biometric database. Furthermore, by optimizing the encoding and decoding losses, information loss due to compression is reduced, ensuring that features can still be effectively utilized by subsequent recognition models even under compression, thus improving recognition accuracy. When the recognition model is updated, the stored compressed features can be directly restored using the decoding model, and features can be re-extracted without re-collecting biometric features, reducing maintenance costs.
[0017] Secondly, this application provides a biometric database updating device, the device comprising:
[0018] The registration module is used to extract biometric features from the registration image through a recognition model and to compress the registration image through an encoding model to generate compressed features; the registration image is obtained by collecting data from specific parts of the object.
[0019] The registration module is also used to associate and store the biometric features and compressed features in a biometric database;
[0020] The update module is used to decompress the compressed features in the biometric database by decoding the model when the recognition model is updated, so as to obtain a restored image that matches the registered image.
[0021] The update module is further configured to extract features from the restored image using the updated recognition model to obtain new biometric features, and replace the original biometric features in the biometric feature library with the new biometric features to update the biometric feature library.
[0022] According to the biometric database update device provided in this application, during the registration stage, biometric features of the registration image are extracted through a recognition model, and the registration image is compressed through an encoding model to generate compressed features. These compressed features are then stored in the biometric database along with the biometric features. By storing compressed features instead of the original image, the storage space of the biometric database is reduced, storage efficiency is improved, and high-resolution image processing is avoided during subsequent restoration, reducing the computational load in the recognition process and improving the real-time performance of recognition. When the recognition model is updated, the compressed features can be decompressed through a decoding model to generate a restored image that matches the original registration image. Biometric features are then re-extracted based on the updated recognition model to replace the old features in the biometric database, achieving adaptive data updates. This eliminates the need to re-collect the user's biometric features, ensuring that the biometric database always matches the latest recognition model, thereby improving the accuracy, stability, and adaptability of recognition.
[0023] Thirdly, this application provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the biometric database update method as described in the first aspect above.
[0024] Fourthly, this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the biometric database update method as described in the first aspect above.
[0025] Fifthly, this application provides a chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the biometric database update method as described in the first aspect above.
[0026] In a sixth aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method for updating the biometric database as described in the first aspect above.
[0027] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0028] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0029] Figure 1 This is a schematic diagram illustrating an application scenario of the biometric database update method provided in some embodiments of this application;
[0030] Figure 2 This is a flowchart illustrating the method for updating a biometric database provided in some embodiments of this application;
[0031] Figure 3 This is a schematic diagram of palm vein image acquisition provided in some embodiments of this application;
[0032] Figure 4 This is a schematic diagram of the structure of the coding model provided in some other embodiments of this application;
[0033] Figure 5 This is a schematic diagram of the structure of the decoding model provided in some embodiments of this application;
[0034] Figure 6 This is a schematic diagram of a registration phase scenario provided in some embodiments of this application;
[0035] Figure 7 This is a schematic diagram of a model update phase provided in some embodiments of this application;
[0036] Figure 8 This is a schematic diagram illustrating the principle of updating the biometric database provided in some embodiments of this application;
[0037] Figure 9 This is a schematic diagram of the structure of the biometric database updating device provided in some embodiments of this application;
[0038] Figure 10 This is a schematic diagram of the structure of a computer device provided in some embodiments of this application. Detailed Implementation
[0039] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0040] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used in the description of this application is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms "comprising" and "having," and any variations thereof, in the description, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the description, claims, or accompanying drawings of this application are used to distinguish different objects, not to describe a specific order or hierarchy.
[0041] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.
[0042] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," and "attachment" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0043] In this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, in this application, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0044] In this application, "multiple" refers to two or more (including two), and similarly, "multiple groups" refers to two or more (including two), and "multiple pieces" refers to two or more (including two).
[0045] The following description, in conjunction with the accompanying drawings, details the method for updating the biometric database provided in this application through specific embodiments and application scenarios.
[0046] The biometric database updating method provided in this application can be applied to, for example... Figure 1 In the application scenario shown, the acquisition device 10 can acquire images of specific parts of an object (such as the face, eyes, palm, or fingers) and transmit them to the computer device 20 via a wired or wireless network. The acquisition device 10 is, for example, a camera or an image acquisition device integrated with a camera. The computer device 20 can be independent of the acquisition device 10, or it can be integrated with the acquisition device 10.
[0047] During the registration phase, computer device 20 uses the image acquired by acquisition device 10 as the input registration image, extracts biometric features from the registration image through a recognition model, compresses the registration image through an encoding model to generate compressed features, and then associates and stores the biometric features and compressed features in a biometric database. This achieves the registration and storage of the object's biometric features in the database.
[0048] Subsequently, in scenarios requiring biometric verification, the acquisition device 20 can acquire the image to be identified and extract features from the image using a recognition model to perform identification and obtain the identification result.
[0049] The recognition model can be deployed in computer device 20. Computer device 20 can be a terminal device or a server, in which case the recognition model can be deployed offline locally or online on the server, or it can be remotely invoked through computer device 20.
[0050] Recognition models can be updated and iterated with each version. When a new recognition model is adopted, the old biometric database becomes inapplicable. Therefore, when the recognition model is updated, the computer device 20 can decompress the compressed features in the biometric database using a decoding model to obtain a restored image that matches the registered image. Then, the updated recognition model is used to extract features from the restored image to obtain new biometric features. The original biometric features in the biometric database are then replaced with the new biometric features, thereby achieving synchronous updates to the biometric database. This ensures the validity of the biometric database without the need for re-collection of data, thus solving the problem in related technologies where the biometric database registered based on the old recognition model is inaccurate or invalid after the recognition model is updated.
[0051] The biometric database update method provided in this application can be applied in a variety of technical fields, especially in scenarios involving identity authentication, data storage optimization, or model upgrades, such as biometric identification and identity verification, security and monitoring, financial and payment security, corporate attendance and information security, medical information management, personal devices and smart homes, etc.
[0052] The biometric database update method provided in this application can be applied to computer devices, specifically executed by hardware or software within the computer device. The computer device includes terminal devices and / or servers.
[0053] For example, terminal devices include, but are not limited to, one or more of various desktop computers, laptops, smartphones, tablets, in-vehicle terminals, IoT devices, or portable wearable devices. IoT devices may include one or more of smart speakers, smart TVs, smart air conditioners, or smart in-vehicle devices. Portable wearable devices may include one or more of smartwatches, smart bracelets, or head-mounted devices. Servers may be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers that provide 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, and big data and artificial intelligence platforms.
[0054] The biometric database updating method provided in this application can be executed by a computer device. The following description uses a computer device as an example to illustrate the biometric database updating method provided in this application.
[0055] like Figure 2 As shown, the method for updating the biometric database includes steps 210 to 240.
[0056] Step 210: Extract biometric features from the registered image using a recognition model, and compress the registered image using a coding model to generate compressed features; the registered image is obtained by collecting data from specific parts of the object.
[0057] The registration image serves as the initial image for establishing identity authentication. It is typically captured from a specific part of the object and used for subsequent comparison. The object refers to the target entity for image capture or recognition, which can be a biological individual such as a human, cat, or dog. A specific part of the object is a part of the object with unique physiological characteristics that can be used for identity recognition, including but not limited to fingers, palms, face, or eyes.
[0058] Accordingly, computer devices can extract features from registered images using locally deployed or invoked recognition models to obtain biometric features corresponding to the object. These biometric features include the object's unique physiological characteristics, such as fingerprints, palm prints / palm veins, facial features, or irises.
[0059] For example, the network architecture of the recognition model may be, but is not limited to, one or more neural networks such as Convolutional Neural Network (CNN), Vision Transformer (VIT), Scale-Invariant Feature Transform (SIFT).
[0060] It's easy to understand that when the input data, structure, or parameters of a recognition model change, the model is usually retrained or optimized to upgrade or iterate, thereby improving recognition accuracy. However, when the recognition model is updated, the existing biometric database stores biometric features obtained based on the old model. Directly applying these features to the new model will lead to a significant drop in recognition accuracy.
[0061] Therefore, in addition to extracting the biometric features of the registration image through the recognition model in this embodiment, the computer device also compresses the registration image through the encoding model to obtain the compressed features corresponding to the registration image.
[0062] The encoding model refers to a model used for feature compression of registered images. Its function is to extract and encode key information in the image to reduce storage and computational burden. For example, the encoding model can be one or more of CNN encoders, variational autoencoders, etc.
[0063] Compression processing refers to the process of compressing information from a registered image using an encoding model to generate compressed features. Compressed features are low-dimensional representations obtained by compressing the registered image using an encoding model. These features retain key information about the image while significantly reducing storage and computational costs.
[0064] Computer devices can extract features from registered images using locally deployed or invoked encoding models to extract low-dimensional feature representations, thereby compressing the features in the registered image to obtain compressed features. For example, the compressed features can be one-dimensional features.
[0065] Step 220: Associate and store the biometric features and compressed features in the biometric database.
[0066] Among them, the biometric database refers to a database used to store information related to the biometric characteristics of an object, which usually includes biometric characteristics extracted during the registration phase.
[0067] In this embodiment of the application, in addition to biometric features, the computer device also stores compressed features in the biometric feature library as a backup of the registered image, so that the biometric features can be reconstructed and updated in the event of an upgrade or update of the recognition model.
[0068] Specifically, computer devices associate and store biometric features and compressed features in a biometric database. For example, biometric features and compressed features of the same object can be stored together as entries. Each object is assigned a unique identifier, which serves as an index so that the computer device can quickly find the biometric features and compressed features corresponding to the object.
[0069] Step 230: When the recognition model is updated, the compressed features in the biometric database are decompressed by the decoding model to obtain a restored image that matches the registered image.
[0070] The restored image refers to the image obtained by decoding the compressed features through a decoding model. This image should be as close as possible to the original registered image so as to facilitate the subsequent updating of the original biometric features in the biometric database.
[0071] A decoding model is a model used to recover compressed features into an approximate original image so that features can be re-extracted when the recognition model is updated. For example, a decoding model can be one or more of a CNN decoder, a Generative Adversarial Network (GAN), etc.
[0072] It should be noted that the network structures of the encoding model and the decoding model do not need to be the same. That is, they can have the same network structure or different network structures (including the network layers and the connection relationships between network layers).
[0073] Corresponding to the compression process, decompression refers to the process of restoring compressed features through a decoding model to obtain a reconstructed image that matches the registered image. Matching the reconstructed image with the registered image essentially means making the reconstructed image as similar as possible to the registered image, so that the biometric database can be updated without re-collecting new registered images of the object.
[0074] Specifically, when updating the identification model, all biometric features stored in the biometric database need to be updated. This process can be parallel, synchronous, or sequential, depending on the computing power and processing resources of the computer device. The computer device can extract any biometric feature from the biometric database and decompress it using a locally deployed or invoked decoding model to generate a reconstructed image. Since the biometric database also stores the object's unique identifier, the computer device can obtain a reconstructed image that matches the corresponding registered image.
[0075] Step 240: Extract features from the restored image using the updated recognition model to obtain new biometric features, and replace the original biometric features in the biometric feature database with the new biometric features to update the biometric feature database.
[0076] After obtaining the restored image, the computer device can re-extract features using the updated recognition model to update the biometric features corresponding to the registered image.
[0077] Specifically, the computer device extracts features from the reconstructed image using an updated recognition model to obtain new biometrics. Since the reconstructed image matches a registered image, the computer device can determine the object to which the new biometrics belong. The computer device can then identify the object's original biometrics in a biometric database and replace the original biometrics with the new ones. The original biometrics can be obtained by extracting features from the reconstructed or registered image using a previous version of the recognition model.
[0078] Therefore, by updating each biometric feature in the biometric database, the database itself is updated. The updated biometric database can be adapted to the updated recognition model, and feature recognition and identity verification using the updated recognition model and updated biometric features are more accurate.
[0079] The biometric database update method provided in this application, during the registration phase, extracts biometric features from the registration image through a recognition model, compresses the registration image through an encoding model to generate compressed features, and stores these compressed features along with the biometric features in the biometric database. Using compressed features instead of storing the original image reduces the storage space of the biometric database, improves storage efficiency, and avoids processing high-resolution images during subsequent restoration, reducing computational load and improving real-time performance. When the recognition model is updated, the compressed features can be decompressed through a decoding model to generate a restored image matching the original registration image. Biometric features are then re-extracted based on the updated recognition model to replace the old features in the biometric database, achieving adaptive data updates. This eliminates the need to re-collect user biometric features, ensuring the biometric database always matches the latest recognition model, thereby improving the accuracy, stability, and adaptability of the recognition process.
[0080] To reduce storage footprint and improve computational efficiency, registered images are typically compressed for storage. However, if compressed features are directly used for reconstruction after subsequent recognition model updates, the fidelity may be insufficient, leading to the loss of crucial information during feature extraction. Therefore, the performance of the encoding and decoding models is critical to recognition accuracy.
[0081] Therefore, in some embodiments, the joint training steps include steps 310 to 340:
[0082] Step 310: Obtain sample images;
[0083] Step 320: Compress the sample images using the coding model to obtain sample compression features, and construct the coding loss corresponding to the coding model based on the sample compression.
[0084] Step 330: Decompress the sample compression features using the decoding model to obtain the sample reconstruction image, and determine the decoding loss corresponding to the decoding model based on the error between the sample reconstruction image and the sample image.
[0085] Step 340: Combine the encoding loss and decoding loss to obtain the encoding and decoding loss, and then jointly train the encoding model and decoding model based on the encoding and decoding loss to obtain the trained encoding model and decoding model.
[0086] Here, sample images refer to the input images used for training. These sample images are obtained by collecting images of specific parts of the object. Sample images are usually labeled with category labels to identify the object to which the biometric features belong.
[0087] Specifically, computer devices can acquire a large number of sample images from a database, ensuring that the samples cover different categories and feature distributions to enhance the model's generalization ability. These images can originate from registered images of different objects.
[0088] In some embodiments, a specific part of the object includes the palm; therefore, the above method further includes: acquiring an original image containing the palm of the object; and extracting the central region of the palm from the original image to obtain a sample image. For example, a computer device acquires an original image acquired by an acquisition device, which may contain noise. The computer device can preprocess the original image, such as image enhancement or grayscale processing, to remove noise and highlight the palm vein texture. Then, the computer device extracts a preset central region of the palm, crops the original image, and obtains a sample image. Thus, by extracting the central region of the palm, background interference is removed, improving the accuracy of palm vein feature extraction, and the cropped image is smaller, reducing redundant information and making subsequent processing more efficient. For example, as... Figure 3 As shown, the computer device can acquire image samples of N hands, with an average of M images for each hand, and crop a portion of the image from the central region of the hand as sample images for model training.
[0089] Computer equipment compresses sample images using a coding model to be trained, generating compressed sample features that preserve key texture information in a low-dimensional space. The equipment can then construct a coding loss corresponding to the coding model based on these compressed features. For example, the equipment can predict the sample's category based on these features, obtain the predicted category, and compare it with the category label carried by the sample image to determine the coding loss. Alternatively, the equipment can calculate the entropy estimate of the compressed sample features and construct a coding loss based on this estimate to optimize the compression efficiency of the coding model.
[0090] Next, the computer equipment decompresses the compressed features of the sample using the decoding model to be trained, in order to recover a sample reconstruction image that is as close as possible to the original image, enabling it to effectively match the key features of the original sample image. For the decoding model, the computer equipment can construct a decoding loss by calculating the error between the reconstructed sample image and the original sample image, allowing the decoding model to more accurately restore the image structure and texture details. The error between the reconstructed sample image and the original sample image can be their standard deviation, squared difference, or mean squared error (MSE), etc.
[0091] Therefore, computer equipment jointly optimizes the encoding loss and decoding loss to simultaneously improve the compression capability of the encoding model and the restoration quality of the decoding model, so that the two maintain information consistency during the compression-decompression process and adapt to the needs of biometric recognition tasks.
[0092] In this method, the computer equipment uses the joint encoding loss and decoding loss to jointly train the encoding and decoding model. This can be achieved by combining the encoding loss and decoding loss to obtain a total encoding and decoding loss, and then using this total encoding and decoding loss to jointly train the encoding and decoding models, resulting in well-trained encoding and decoding models. For example, the encoding and decoding loss can be the sum or weighted sum of the encoding loss and decoding loss, etc.
[0093] In one example, the computer device maps the input sample image to a low-dimensional latent variable space using an encoder to obtain compressed sample features. It then calculates the probability distribution of these compressed features and uses KL (Kullback-Leibler) divergence to calculate the encoding loss, optimizing the encoder's feature representation capability. Next, the computer device decodes the compressed sample features back to the original image space using a decoder, generating a reconstructed sample image. The mean squared error between this reconstructed image and the input sample image is calculated to optimize the decoder's reconstruction capability. Thus, by minimizing the weighted sum of the encoding and decoding losses and optimizing the model parameters through gradient descent, the device ensures that the encoding model efficiently compresses features while simultaneously guaranteeing that the decoding model accurately reconstructs them.
[0094] In another example, generative adversarial networks (GANs) can be used to improve decoding quality. That is, a computer compresses the input image using an arbitrary encoding model to generate sample compression features, and then decodes it using a decoding model to generate a reconstructed image. In the decoding model, the computer can train a discriminative model to distinguish the decoded image from the original image, and optimize the decoding model to make the reconstructed image as close as possible to the real image. Thus, by jointly optimizing the encoding loss, decoding loss, and adversarial loss, the compression ratio and decoding quality of the model can be improved.
[0095] In the above embodiments, compared to independently trained encoding and decoding models, joint training ensures that the encoding model retains the most critical texture information, enabling the decoding model to more accurately recover the original image features and improve the adaptability of the biometric database. Furthermore, by optimizing the encoding and decoding losses, information loss due to compression is reduced, ensuring that features can still be effectively utilized by subsequent recognition models even under compression, thus improving recognition accuracy. When the recognition model is updated, the stored compressed features can be directly restored using the decoding model, and features can be re-extracted without re-collecting biometric features, reducing maintenance costs.
[0096] In this embodiment, the original biometric features of the registered image and the compressed features are stored. A key challenge is how to retain crucial information affecting recognition accuracy to the greatest extent possible during compression while simultaneously improving storage efficiency. If common encoding methods are used for data compression without optimization for the distribution characteristics of biometric features, the compressed data may lose important feature information, affecting recognition accuracy and making it difficult to balance compression efficiency and encoding quality.
[0097] Therefore, in the training phase, step 320 above involves constructing the encoding loss corresponding to the encoding model based on sample compression, including steps 3201 to 3202:
[0098] Step 3201: Determine the probability distribution of the sample compression features in the noisy latent space;
[0099] Step 3202: Based on the probability distribution, determine the entropy estimate corresponding to the sample compression features to obtain the coding loss corresponding to the coding model; the entropy estimate characterizes the compression rate of the sample image compression processing.
[0100] In machine learning or deep learning models, latent space refers to the low-dimensional space obtained after mapping the input data through the encoder. Noisy latent space, on the other hand, introduces noise during the training phase. For image compression tasks, feature vectors in the noisy latent space typically carry key information about the compressed image, facilitating efficient storage and processing.
[0101] For example, the encoding model is used to estimate the probability distribution of the noisy latent space vector. After training to obtain the relevant parameters of the probability distribution, the latent space is quantized during the testing phase, and then lossless compression is performed using the probability distribution. In order to model the differentiability of this quantization operation during training, uniform noise is generally added in the interval [-0.5, 0.5]. In practice, TensorFlow functions such as tfc.ContinuousBatchedEntropyModel can be used to add uniform noise. This function adds noise to the latent space to obtain the noisy latent space and calculates the rate (the average number of bits required to represent the encoded latent space). This rate can be used as part of the loss function.
[0102] A probability distribution is a mathematical function that describes the probability of a random variable taking a value. In image compression tasks, compressed features are usually represented as vectors in the latent space. The occurrence of these features is not completely random but follows certain statistical laws, which can usually be described by probability distributions. These probability distributions reflect the distributional characteristics of compressed features and are the basis for calculating entropy estimation.
[0103] Entropy estimation is used to measure the uncertainty or information content of an information source. In image compression, entropy represents the minimum average number of bits required to compress the data. The entropy estimate measures the minimum amount of information required for encoding a given compression feature, i.e., the efficiency of data compression. A smaller entropy estimate means the compressed data has higher redundancy and can be stored with fewer bits; a larger entropy estimate indicates more complex data that requires more bits to store.
[0104] Compression rate refers to the ratio between the size of the compressed data and the original data, and is commonly used to measure the effectiveness of data compression. A lower compression rate means that the compressed data occupies less storage space.
[0105] Specifically, the computer device determines the probability distribution of the sample compression features in the noisy latent space. This probability distribution characterizes the statistical properties of the sample compression features in the latent variable space, providing a basis for subsequent entropy estimation. Based on the probability distribution, the computer device calculates the entropy estimate of the sample compression features. This entropy estimate reflects the average number of bits required for the sample during compression, i.e., it measures the compression rate.
[0106] Based on the entropy estimate, the computer device can construct the encoding loss corresponding to the encoding model to minimize the encoding complexity of the compressed features and improve information storage efficiency. Therefore, by combining the encoding loss with optimization of the encoding model, it can adaptively adjust the data representation during compression to achieve a balance between storage overhead and information preservation, thereby improving the quality of subsequent decoding and recovery.
[0107] For example, the noise latent space vector is denoted by S, and its probability distribution follows a Gaussian distribution based on priors. Therefore, the probability can be calculated by the difference of the cumulative distribution function (CDF), expressed as:
[0108]
[0109] Wherein, P(S) i Let represent the probability value of the i-th dimension of the eigenvector in the noise latent space, Φ represent the CDF of the standard normal distribution, μ be the mean, and σ be the standard deviation. Since the noise latent space is a discrete vector, the above formula means that the probability of Si is considered as a continuous CDF in [S]. i -0.5,S i The integral area within the interval [+0.5].
[0110] The coding rate is essentially an entropy estimate of the noisy latent space vector S, i.e., the average information content, which is the average number of bits required to compress this vector. Higher probabilities require fewer bits, and lower probabilities require more bits. Therefore, for example, the coding loss R can be expressed as:
[0111]
[0112] Where N represents the dimension of the noise latent space vector, P(S i That is, the probability of the i-th dimension.
[0113] In the above embodiments, by minimizing the encoding loss, the storage representation of compressed features is optimized, reducing data storage requirements and improving the storage efficiency of the biometric database. This ensures that the storage cost is effectively reduced during compression, while also ensuring that important information for biometric identification is retained after decompression, thereby improving the reliability and adaptability of identification.
[0114] When reconstructing compressed data using a decoding model, it is often necessary to evaluate the quality of the reconstructed image to ensure it is as close as possible to the original image. However, due to information loss, quantization errors, or limitations in model generalization ability, there is usually some error between the reconstructed image and the original image. To optimize the decoding model and enable it to generate higher-quality reconstructed images, it is typically necessary to define a decoding loss based on the reconstruction error and minimize this loss during model training to improve decoding performance.
[0115] Therefore, in some embodiments, step 330 above determines the decoding loss corresponding to the decoding model based on the error between the sample restored image and the sample image, including steps 3301 to 3303:
[0116] Step 3301: Determine the image size of the sample image; the image size of the restored sample image is the same as that of the sample image;
[0117] Step 3302: For any pixel in the sample restored image, determine the absolute error between the pixel in question and the pixel in the sample image that matches the pixel in question.
[0118] Step 3303: Based on the image size and each absolute error, obtain the decoding loss corresponding to the decoding model.
[0119] When acquiring a sample image, the computer device can determine its image size, which includes the image's length and width. The image size is used to compare the consistency between the reconstructed image and the sample image, and also to ensure that the reconstructed image and the sample image are the same size, allowing for pixel-level error calculation.
[0120] For each pixel in the reconstructed image, the computer device determines its corresponding matching pixel in the sample image and calculates the absolute error between the two. A pixel in the reconstructed image matching a pixel in the sample image can mean that they are located at the same position in the image, etc. For example, the absolute error can be expressed as:
[0121] |I1(i,j)-I2(i,j)|(3)
[0122] Where I1(i,j) represents the pixel located at (i,j) in the sample reconstructed image, and I2(i,j) represents the pixel located at (i,j) in the sample image.
[0123] Then, the computer can determine the absolute error for all pixels, and by combining this with the image size, the decoding loss corresponding to the decoding model can be obtained. This decoding loss can measure the accuracy of the decoding model in reconstructing the image, and minimizing this loss during model training improves the reconstruction quality.
[0124] For example, the decoding loss O can be expressed as:
[0125]
[0126] Where M is the image width and N is the image height.
[0127] In the above embodiments, by calculating the decoding loss at the pixel level, the difference between the sample-reconstructed image and the sample image can be accurately evaluated. This allows the training process to be optimized more intuitively for image quality, improving the generalization ability of the decoding model and enabling it to generate higher-quality reconstructed images. Furthermore, by employing pixel-by-pixel error calculation and normalizing it in conjunction with the overall image size, the computational complexity is low, making it easy to implement within a deep learning framework.
[0128] In conjunction with the above embodiments, in some embodiments, the encoding loss and decoding loss are combined in step 340 to obtain the encoding-decoding loss, including steps 3401 to 3402:
[0129] Step 3401: Determine the first weight corresponding to the encoding loss and the second weight corresponding to the decoding loss;
[0130] Step 3402: Based on the first weight and the second weight, the encoding loss and decoding loss are weighted to obtain the encoding and decoding loss.
[0131] The computer equipment sets a first weight to adjust the proportion of encoding loss and a second weight to adjust the proportion of decoding loss, thereby adjusting the balance between encoding quality, restoration quality and speed during the encoding and decoding process.
[0132] The first and second weights can be fixed values, such as empirical values, or dynamically adjusted parameters, such as those optimized through learning or adaptively adjusted during the model's training phase. For example, the first and second weights can be hyperparameters during training and are iteratively optimized as the training process progresses.
[0133] For example, the encoding / decoding loss L can be expressed as:
[0134] L 编解码 =αR+(1-α)O (5)
[0135] Where R is the encoding loss, O is the decoding loss, and α is a hyperparameter used to adjust the weights.
[0136] In the above embodiments, by using weighted calculation, the model can achieve the optimal trade-off between compression ratio and restoration quality, adapt to different application requirements, and avoid overfitting that may be caused by optimizing the encoding loss or decoding loss separately, so that the encoding model and decoding model are more accurate after training.
[0137] In the field of biometric recognition, the training quality of the recognition model directly affects the system's recognition accuracy. Traditional recognition model training typically relies on a large amount of sample data and improves the model's discriminative ability by optimizing the loss function. However, in practical applications, recognition models may face problems such as insufficient inter-class discrimination and unstable intra-class features, leading to a decrease in recognition accuracy. Therefore, in some embodiments, the training steps of the recognition model include steps 410 to 440:
[0138] Step 410: Obtain multiple sample images;
[0139] Step 420: Extract features from each sample image using the recognition model to be trained, and obtain multiple sample features;
[0140] Step 430: Based on the sample category to which each of the multiple sample features belongs, determine the inter-class loss and intra-class loss corresponding to the multiple sample features respectively;
[0141] Step 440: Determine the recognition loss based on the inter-class loss and intra-class loss, and train the recognition model based on the recognition loss to obtain the trained recognition model.
[0142] In this process, the computer device acquires multiple sample images, similar to the embodiments described above, and will not be repeated here. Then, the computer device extracts features from each sample image using the recognition model to be trained, obtaining the individual sample features corresponding to each sample image. For example, if the recognition model uses a deep learning model, networks such as CNN and ViT can be used to extract high-dimensional feature vectors to obtain the sample features.
[0143] On the one hand, computer equipment calculates inter-class loss based on the sample categories to which multiple sample features belong, aiming to keep sample features from different categories as far apart as possible, thereby improving discriminative ability. Specifically, computer equipment can calculate the distance between sample features of different categories to measure inter-class separability and obtain the inter-class loss. For example, computer equipment can use softmax variants based on center distance, such as Additive Angular Margin Loss (ArcFace), Sphere Face loss, or Cosine Margin Loss (CosFace), to ensure that sample features of different categories have a large angular interval.
[0144] On the other hand, computer equipment calculates intra-class losses based on the sample categories to which multiple sample features belong, thereby aggregating features of samples within the same category as much as possible to improve model stability. Specifically, computer equipment can calculate the density of features of samples within the same category to enhance intra-class consistency. For example, clustering losses, such as center loss, triplet loss, or contrastive loss, can be used to ensure that features of samples within the same category are clustered together as much as possible.
[0145] Therefore, the computer device combines the inter-class loss and intra-class loss to obtain the recognition loss corresponding to the recognition model.
[0146] For example, the recognition loss can be expressed as:
[0147] L total =λL1+(1-λ)L2 (6)
[0148] Where L1 is the inter-class loss, L2 is the intra-class loss, and L... total To identify the loss, λ is a third weight used to adjust the importance of the two. For example, λ can be a hyperparameter during training and iteratively optimized as training progresses.
[0149] Then, the computer device trains the recognition model based on this recognition loss, and finally obtains the trained recognition model. For example, based on the recognition loss, the computer device optimizes the recognition model parameters through gradient descent (such as stochastic gradient descent (SGD), adaptive moment estimation optimizer (Adam), etc.) until the model converges, and obtains the trained recognition model.
[0150] In one example, the computer device uses ArcFace as the inter-class loss and cosine loss as the intra-class loss. The training process is as follows: Palm vein images containing multiple objects are acquired, with each image corresponding to an identity label (i.e., a class label). The computer device uses ResNet as the recognition model, extracting a 512-dimensional feature vector from each image and calculating the ArcFace loss to ensure a large angular gap between palm vein features of different identities. Furthermore, the computer device calculates the cosine loss to bring palm vein feature points of the same identity closer to their class center. Thus, the computer device combines the inter-class and intra-class losses to train the model, ultimately obtaining a high-precision palm vein recognition model.
[0151] It should be noted that the recognition model can be trained alone or jointly trained with the encoding and decoding models; this application does not impose any restrictions on this.
[0152] In the above embodiments, by simultaneously optimizing inter-class separation and intra-class tightness, the recognition model can maintain high discriminative ability when facing similar categories, while enhancing the separability of samples from different categories and reducing overfitting to specific data distributions, making its performance more robust on unseen samples. Furthermore, by introducing a reasonable loss weighting strategy, it is ensured that the model does not overemphasize any one type of loss during training, thereby improving convergence speed and stability.
[0153] In deep learning-based biometric and classification tasks, the model's discriminative ability depends on the distribution of the feature space. Traditional training methods typically use only cross-entropy loss to optimize the model, but this can lead to scattered features for samples of the same class and overlapping features for samples of different classes, thus affecting recognition accuracy. Therefore, in some embodiments, step 430 above determines the inter-class and intra-class losses corresponding to multiple sample features based on their respective sample classes, including steps 4301 to 4304:
[0154] Step 4301: Determine the first cosine similarity between each sample feature and the category center of its respective sample category;
[0155] Step 4302: Based on the first cosine similarity and a preset angular interval, obtain the inter-class loss corresponding to the features of multiple samples;
[0156] Step 4303: Determine the second cosine similarity between each sample feature and other sample features of the same sample category;
[0157] Step 4304: Based on the second cosine similarity, obtain the intra-class loss corresponding to multiple sample features.
[0158] For inter-class loss, the computer calculates the cosine similarity between each sample feature and its class center, which is used as the first cosine similarity. The class center can be obtained by calculating the mean vector of all sample features in that class. Based on the cosine similarity, a preset angular interval is applied to maintain a certain distance between the cosine similarities of features from different classes in the angular space, thereby enhancing class discriminability.
[0159] For example, the inter-class loss L1 can be expressed as:
[0160]
[0161] Where N is the number of samples in a batch, yi represents the true class label of the i-th sample, and θ yi is the angle between the feature vector of the i-th sample and the corresponding class weight vector, m is the angle interval, and s is the scaling factor.
[0162] Where cos represents the cosine of the angle between the weight vector and the feature vector, that is, L2 normalizing the weights of the fully connected layer of the classification layer so that the weight vectors are distributed on the unit hypersphere, and L2 normalizing the feature vectors so that the inner product of the feature vector and the weight vector is equal to cos(θ). j This transforms the classification problem into an angle optimization problem. That is:
[0163]
[0164] Where W represents the weight vector of the fully connected classification layer, and x is the sample feature output by the recognition model.
[0165] Angle θ between target categories yi Add a fixed angular interval m, that is, optimize the target from θ yi Transform into cos(θ) yi This forces the feature vectors of samples of the same class to be more compact in angular space, and the intervals between samples of different classes to be larger.
[0166] Since the normalized feature-weight inner product is limited to [-1, 1], direct use risks gradient vanishing. Therefore, a scaling factor s (typically 30 or higher) is set to amplify log(*) to enhance the discriminative power of the Softmax probability distribution. The amplified log(*) makes the probability of the correct class closer to 1 and the probability of the incorrect class closer to 0, thus accelerating convergence.
[0167] For intra-class loss, the computer calculates the cosine similarity between features of different samples within the same class, using this as the second cosine similarity. By optimizing the intra-class loss function, the cosine similarity between features of samples within the same class is increased, thereby improving intra-class consistency. For example, a center loss can be used to constrain feature aggregation within the same class, or a triplet loss can be used to further optimize intra-class compactness.
[0168] For example, in this embodiment of the application, feature aggregation of the same category is constrained by cosine loss. Therefore, the intra-class loss L2 can be expressed as:
[0169]
[0170] Here, x1 and x2 represent the sample features corresponding to two images of the same hand in a batch, and b represents the number of image pairs belonging to the same hand in a batch; the intra-class loss L2 represents the average cosine value between vectors of the same class in a batch. Since the vectors have been L2 normalized, the cosine value is represented as the inner product; this loss function can further constrain the angle between samples of the same class, so that they can be better aggregated together.
[0171] In the above embodiments, by optimizing the inter-class loss, the discriminative power of features of different categories is improved; by optimizing the intra-class loss, the features of samples of the same category are made more closely related, thereby improving the recognition accuracy. The setting of the above loss function can not only improve the accuracy and generalization ability of the model, but also improve the convergence speed of the model and reduce the computational cost.
[0172] In the identification phase following the registration phase (which can be before or after the model update), the biometric database update method provided in this application further includes steps 510 to 540:
[0173] Step 510: Acquire images of specific parts of the target object to be identified;
[0174] Step 520: Extract features from the image to be recognized using the recognition model to obtain the recognition features;
[0175] Step 530: Compare the similarity between the identified features and the biometric features stored in the biometric feature database to obtain the target biometric feature with the highest similarity.
[0176] Step 540: Based on the preset category corresponding to the target biometric features, obtain the recognition result corresponding to the image to be recognized.
[0177] In this process, computer equipment acquires images of specific parts of the target object using acquisition devices, which are then used as images to be identified. For example, the image to be identified could be an image of the palm veins of the object.
[0178] Then, the computer device processes the image to be identified using a pre-trained recognition model, extracting recognition features. The computer device searches a biometric database for the biometric feature closest to the features of the image to be identified. This can be done by calculating the similarity between the feature to be identified and the biometric features stored in the database; this similarity can be cosine similarity, Euclidean distance, etc. If the similarity reaches a preset threshold, the computer device selects the biometric feature with the highest similarity, i.e., the target biometric feature, as the matching result.
[0179] Therefore, the computer device determines the identity information of the image to be identified based on the preset category of the target biometric feature. For example, if the preset category of the target biometric feature corresponds to object A, the output matching result is that the current image to be identified belongs to object A. If the similarity does not reach a preset threshold, the computer device determines that the identity is unregistered.
[0180] In the above embodiments, similarity calculation based on the biometric database can improve the accuracy of identity recognition. Furthermore, since the biometric database is updated as the model is updated, the recognition is more reliable and stable.
[0181] The following example will illustrate this point.
[0182] Taking palm vein features as an example, the registered image and sample image are the acquired palm vein images.
[0183] The function of the encoding model is to compress and encode the input image into a smaller-dimensional latent vector space. Therefore, the input is image data, and the output is a one-dimensional vector, i.e., compressed features. For example, as... Figure 4 As shown in the figure, the structure of the encoding model includes multiple convolutional layers (Conv2D) and dense layers (Dense).
[0184] The decoding model functions inversely to the encoding model; it decodes low-dimensional vectors to obtain image data. Therefore, its input is compressed features, and its output is the decompressed and restored image. For example, as... Figure 5 As shown in the figure, the structure of the decoding model includes multiple deconvolutional layers (Conv2DTranspose) and dense layers.
[0185] During the registration phase, such as Figure 6 As shown, the computer device deploys the recognition model and encoding model into the palm vein registration machine, collects images of the subject's palm, obtains biometric features through the recognition model, and obtains compressed features through the encoding model. The computer device combines the biometric features and compressed features and uploads them to the server database, i.e., the biometric database.
[0186] The performance of palm vein recognition largely depends on the performance of the recognition model. As application data accumulates, the recognition model inevitably needs to be retrained. Before retraining, the old model is used; after retraining, the new model is used. In some scenarios, the structure of the old and new models remains unchanged after the update, only the weights are updated. However, because their outputs no longer belong to the same distribution, the feature similarity obtained from the same image through the old and new models is very low. Since the palm vein image is compressed to low-dimensional features (compressed features) during the registration phase and stored in the biometric database, it is equivalent to indirectly storing the palm vein image in the database with minimal space usage. Therefore, when the recognition model is updated, the decoding and recognition models need to be deployed on a server. The compressed features in the biometric database are extracted, decoded by the decoding model to obtain an approximate original palm image (reconstructed image). This reconstructed image is then processed by the updated recognition model to obtain new biometric features, thereby updating the old biometric features in the biometric database. For example, as shown... Figure 7 As shown, each object has a corresponding ID, Feature 1 represents biometric features, and Feature 2 represents compressed features. Feature 1 is typically 1024 or 2048 bytes in size, while Feature 2 is typically within 1024 bytes. Neural Network 1 represents the recognition model, and Neural Network 3 represents the decoding model. Subsequently, the computer device can deploy the updated recognition model to the registration or recognition machine.
[0187] The method for updating the biometric database provided in this application, such as Figure 8 As shown, three neural network models are constructed to extract and transform features from the input image. The recognition model (neural network 1) extracts high-level features (feature 1), which are used to measure the similarity between different images. The encoding model (neural network 2) extracts low-level features (feature 2) and reduces dimensionality. The decoding model (neural network 3) recovers image features (feature 3) that are similar to the original input image from the low-level features. During the training phase, neural network 2 maps feature 2 to a noisy latent space with added noise using an entropy model, and then uses neural network 3 to restore feature 3. During the registration phase, high-level and low-level features are obtained and stored together in a biometric database. In the recognition phase, real-time semantic features are obtained for the real-time image and compared with the high-level features in the biometric database to obtain the recognition result. In the model upgrade and update phase, low-level features are retrieved from the biometric database, decompressed to obtain an approximate image, and then processed by the upgraded recognition model to obtain new high-level features, which are then updated in the biometric database.
[0188] The above method adds two models to the conventional recognition model, but these two models only need to run once during registration and upgrades, without affecting the recognition process time. Furthermore, by compressing the image to generate a 1k vector, the feature model can be continuously iterated and upgraded with minimal space increase. By constructing a separate network structure similar to image compression and restoration to reconstruct new features after feature model updates, the training of the feature model does not need to consider changes in output distribution, greatly reducing training difficulty. Moreover, the image compression and restoration model only needs to be trained once and does not require manual annotation of training samples, facilitating engineering applications.
[0189] The biometric database update method provided in this application can be executed by a biometric database update device. This application uses an example of a biometric database update device executing the biometric database update method to illustrate the biometric database update device provided in this application.
[0190] This application also provides a biometric database updating device, applied to computer equipment. For example... Figure 9 As shown, the biometric database update device includes a registration module 901 and an update module 902. Wherein:
[0191] The registration module is used to extract biometric features from the registration image through a recognition model and to compress the registration image through an encoding model to generate compressed features; the registration image is obtained by collecting data from specific parts of the object.
[0192] The registration module is also used to associate and store biometric features and compressed features in a biometric database;
[0193] The update module is used to decompress the compressed features in the biometric database by decoding the model when the recognition model is updated, so as to obtain a restored image that matches the registered image.
[0194] The update module is also used to extract features from the restored image using the updated recognition model, obtain new biometric features, and replace the original biometric features in the biometric feature library with the new biometric features to update the biometric feature library.
[0195] According to the biometric database update apparatus provided in this application embodiment, during the registration stage, biometric features of the registration image are extracted through a recognition model, and the registration image is compressed through an encoding model to generate compressed features. These compressed features are then stored together with the biometric features in the biometric database. By storing compressed features instead of the original image, the storage space of the biometric database is reduced, storage efficiency is improved, and high-resolution image processing is avoided during subsequent restoration, reducing the computational load in the recognition process and improving the real-time performance of recognition. When the recognition model is updated, the compressed features can be decompressed through a decoding model to generate a restored image that matches the original registration image. Biometric features are then re-extracted based on the updated recognition model to replace the old features in the biometric database, achieving adaptive data updates. This eliminates the need to re-collect the user's biometric features, ensuring that the biometric database always matches the latest recognition model, thereby improving the accuracy, stability, and adaptability of recognition.
[0196] In some embodiments, the encoding model and the decoding model are obtained in advance through joint training; the above-mentioned apparatus further includes a training module for acquiring sample images; compressing the sample images through the encoding model to obtain sample compression features, and constructing an encoding loss corresponding to the encoding model based on the sample compression; decompressing the sample compression features through the decoding model to obtain sample reconstruction images, and determining the decoding loss corresponding to the decoding model based on the error between the sample reconstruction images and the sample images; jointly obtaining the encoding and decoding losses to obtain the encoding and decoding losses, and jointly training the encoding model and the decoding model based on the encoding and decoding losses to obtain the trained encoding model and decoding model.
[0197] In some embodiments, the training module is further configured to determine the probability distribution of sample compression features in the noisy latent space; based on the probability distribution, determine the entropy estimate corresponding to the sample compression features to obtain the encoding loss corresponding to the encoding model; the entropy estimate characterizes the compression rate of the sample image compression processing.
[0198] In some embodiments, the training module is further configured to determine the image size of the sample image; the image size of the sample reconstruction image is the same as that of the sample image; for any pixel in the sample reconstruction image, the absolute error between the targeted pixel and the pixel in the sample image that matches the targeted pixel is determined; based on the image size and each absolute error, the decoding loss corresponding to the decoding model is obtained.
[0199] In some embodiments, the training module is further configured to acquire multiple sample images; extract features from each sample image using the recognition model to be trained to obtain multiple sample features; determine the inter-class loss and intra-class loss corresponding to each of the multiple sample features based on the sample category to which they belong; determine the recognition loss based on the inter-class loss and intra-class loss; and train the recognition model based on the recognition loss to obtain a trained recognition model.
[0200] In some embodiments, the training module is further configured to determine the first cosine similarity between each sample feature and the class center of its respective sample category; to obtain the inter-class loss corresponding to the multiple sample features based on a preset angular interval of the first cosine similarity; to determine the second cosine similarity between each sample feature and other sample features of the same sample category; and to obtain the intra-class loss corresponding to the multiple sample features based on the second cosine similarity.
[0201] In some embodiments, a specific part of the object includes the palm; the above-described device further includes an acquisition module for acquiring an original image containing the palm of the object; and extracting the central region of the palm in the original image to obtain a sample image.
[0202] In some embodiments, the above-described apparatus further includes a recognition module for acquiring an image of a specific part of a target object to be recognized; extracting features from the image to be recognized using a recognition model to obtain recognition features; comparing the recognition features with biometric features stored in a biometric database to obtain the target biometric feature with the highest similarity; and obtaining a recognition result corresponding to the image to be recognized based on a preset category corresponding to the target biometric feature.
[0203] The biometric database updating device in this application embodiment can be a computer device or a component within the computer device, such as an integrated circuit or a chip. The computer device can be a terminal device or a server. For example, the computer device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle computer device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.
[0204] The biometric database update device in this application embodiment can be a device with an operating system. This operating system can be a Microsoft (Windows) operating system, an Android operating system, an iOS operating system, or other possible operating systems; this application embodiment does not specifically limit it.
[0205] The biometric database update device provided in this application embodiment can realize the various processes implemented in each method embodiment, and will not be described again here to avoid repetition.
[0206] In some embodiments, such as Figure 10 As shown, this application embodiment also provides a computer device 1000, including a processor 1001, a memory 1002, and a computer program stored in the memory 1002 and executable on the processor 1001. When the program is executed by the processor 1001, it implements the various processes of the above-described method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here.
[0207] It should be noted that the computer devices in this application embodiment include the mobile computer devices and non-mobile computer devices described above.
[0208] This application also provides a non-transitory computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described biometric database update method embodiment and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0209] The processor is the processor in the computer device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0210] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method for updating the biometric database.
[0211] The processor is the processor in the computer device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0212] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described biometric database update method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0213] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0214] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0215] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0216] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
[0217] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0218] Unless otherwise specified, all embodiments and optional embodiments of this application can be combined to form new technical solutions.
[0219] Unless otherwise specified, all technical features and optional technical features of this application may be combined to form new technical solutions.
[0220] Unless otherwise specified, all steps of this application may be performed sequentially or randomly, preferably sequentially. For example, the method includes steps (a) and (b), indicating that the method may include steps (a) and (b) performed sequentially, or it may include steps (b) and (a) performed sequentially. For example, the mention that the method may also include step (c) indicates that step (c) may be added to the method in any order; for example, the method may include steps (a), (b), and (c), or it may include steps (a), (c), and (b), or it may include steps (c), (a), and (b), etc.
[0221] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for updating a biometric database, characterized in that, The method includes: Biometric features are extracted from the registered image using a recognition model, and the registered image is compressed using an encoding model to generate compressed features; the registered image is obtained by collecting data from specific parts of the object. The biometric features and compressed features are associated and stored in a biometric database; When the recognition model is updated, the compressed features in the biometric database are decompressed by the decoding model to obtain a restored image that matches the registered image. The reconstructed image is subjected to feature extraction using the updated recognition model to obtain new biometric features. The original biometric features in the biometric feature library are then replaced with the new biometric features to update the biometric feature library.
2. The method according to claim 1, characterized in that, The encoding model and the decoding model are obtained in advance through joint training; the joint training steps include: Acquire sample images; The sample images are compressed using an encoding model to obtain sample compression features, and an encoding loss corresponding to the encoding model is constructed based on the sample compression. The sample compression features are decompressed by the decoding model to obtain the sample reconstruction image, and the decoding loss corresponding to the decoding model is determined based on the error between the sample reconstruction image and the sample image. The encoding loss and decoding loss are combined to obtain the encoding-decoding loss, and the encoding model and decoding model are jointly trained based on the encoding-decoding loss to obtain the trained encoding model and decoding model.
3. The method according to claim 2, characterized in that, The encoding loss corresponding to the encoding model constructed based on the sample compression includes: Determine the probability distribution of the sample compression features in the noisy latent space; Based on the probability distribution, an entropy estimate corresponding to the sample compression feature is determined to obtain the encoding loss corresponding to the encoding model; the entropy estimate characterizes the compression rate of the sample image compression processing.
4. The method according to claim 2, characterized in that, The step of determining the decoding loss corresponding to the decoding model based on the error between the sample reconstructed image and the sample image includes: Determine the image size of the sample image; the restored sample image has the same image size as the sample image. For any pixel in the sample restored image, determine the absolute error between the targeted pixel and the pixel in the sample image that matches the targeted pixel; Based on the image size and each absolute error, the decoding loss corresponding to the decoding model is obtained.
5. The method according to claim 1, characterized in that, The training steps of the recognition model include: Acquire multiple sample images; The recognition model to be trained extracts features from each sample image to obtain multiple sample features; Based on the sample category to which each of the multiple sample features belongs, the inter-class loss and intra-class loss corresponding to the multiple sample features are determined respectively; The recognition loss is determined based on the inter-class loss and intra-class loss, and the recognition model is trained based on the recognition loss to obtain a trained recognition model.
6. The method according to claim 5, characterized in that, The step of determining the inter-class loss and intra-class loss corresponding to each of the multiple sample features based on their respective sample categories includes: Determine the first cosine similarity between each sample feature and the class center of its respective sample category; Based on the preset angular interval of the first cosine similarity, the inter-class loss corresponding to the multiple sample features is obtained; Determine the second cosine similarity between each sample feature and other sample features of the same sample category; Based on the second cosine similarity, the intra-class loss corresponding to the multiple sample features is obtained.
7. The method according to any one of claims 1 to 6, characterized in that, The specific part of the object includes the palm; the method further includes: Acquire the raw image containing the palm of the object; The central region of the palm in the original image is extracted to obtain a sample image.
8. The method according to claim 1, characterized in that, The method further includes: Acquire images of specific parts of the target object to be identified; The recognition features are obtained by extracting features from the image to be recognized using a recognition model; The identification features are compared with the biometric features stored in the biometric feature database to obtain the target biometric feature with the highest similarity. Based on the preset category corresponding to the target biometric feature, the recognition result corresponding to the image to be recognized is obtained.
9. A biometric database updating device, characterized in that, The device includes: The registration module is used to extract biometric features from the registration image through a recognition model and to compress the registration image through an encoding model to generate compressed features; the registration image is obtained by collecting data from specific parts of the object. The registration module is also used to associate and store the biometric features and compressed features in a biometric database; The update module is used to decompress the compressed features in the biometric database by decoding the model when the recognition model is updated, so as to obtain a restored image that matches the registered image. The update module is further configured to extract features from the restored image using the updated recognition model to obtain new biometric features, and replace the original biometric features in the biometric feature library with the new biometric features to update the biometric feature library.
10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method for updating the biometric database as described in any one of claims 1-8.
Citation Information
Patent Citations
User biological characteristic database updating method and device
CN103942334A
Biological feature recognition device and method and biological feature template registration method
CN105975837A