Liveness detection method and apparatus, computer device, and storage medium
By super-resolution processing and feature analysis of palmar bone joint images, the problem of insufficient accuracy of live detection in the prior art is solved, and higher recognition accuracy and safety are achieved.
Patent Information
- Application Number
- PCT/CN2024/100960
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-08
- Filing Date
- 2024-06-24
- Publication Date
- 2025-04-17
AI Technical Summary
In the existing palm recognition technology, the accuracy of live body detection is insufficient, making it difficult to effectively distinguish between real palms and imitations.
By acquiring palm bone joint images, super-resolution processing is performed to improve image resolution, and in vivo detection is performed using computer equipment.
It improves the accuracy of live detection, reduces the feasibility of imitating palms, and enhances the reliability and safety of biometric technology.
Smart Images

Figure CN2024100960_17042025_PF_FP_ABST
Abstract
Description
Liveness detection method, device, computer equipment and storage medium
[0001] This application claims priority to Chinese patent application number 202311292964.3, filed on October 8, 2023, entitled “Liveness Detection Method, Device, Computer Equipment and Storage Medium,” the entire contents of which are incorporated herein by reference. Technical Field
[0002] The embodiments of the present application relate to the field of computer technology, and in particular to a liveness detection method, apparatus, computer equipment, and storage medium. Background Art
[0003] Palm recognition technology, which uses palm features to identify people, is becoming increasingly popular in our daily lives. To ensure the security of palm recognition technology, liveness detection is required during the palm recognition process to ensure that the recognized palm is live.
[0004] Summary of the Invention
[0005] The embodiments of the present application provide a method, apparatus, computer device, and storage medium for detecting a living body, which can improve the accuracy of detecting a living body.
[0006] In one aspect, a method for detecting a living body is provided, the method comprising:
[0007] The computer device acquires a first palm bone joint image, wherein the first palm bone joint image includes palm bones and joint soft tissues between the palm bones;
[0008] The computer device performs super-resolution processing on the first palm bone joint image to obtain a second palm bone joint image, wherein the resolution of the second palm bone joint image is greater than the resolution of the first palm bone joint image;
[0009] The computer device obtains palm features corresponding to the second palm bone joint image;
[0010] The computer device determines a discrimination result based on the palm features, and the discrimination result is used to indicate whether the first palm bone joint image is a living palm bone joint image, where the living palm bone joint image refers to a palm bone joint image obtained by photographing a real palm.
[0011] In another aspect, a living body detection device is provided, comprising:
[0012] An image acquisition module, configured to acquire a first palm bone joint image, wherein the first palm bone joint image includes the palm bones and the joint soft tissues between the palm bones;
[0013] a super-resolution processing module, configured to perform super-resolution processing on the first palm bone joint image to obtain a second palm bone joint image, wherein the resolution of the second palm bone joint image is greater than the resolution of the first palm bone joint image;
[0014] a liveness detection module, configured to obtain palm features corresponding to the second palm bone joint image;
[0015] The liveness detection module is also used to determine a discrimination result based on the palm features, and the discrimination result is used to indicate whether the first palm bone joint image is a live palm bone joint image, and the live palm bone joint image refers to a palm bone joint image obtained by photographing a real palm.
[0016] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the liveness detection method as described in the above aspects.
[0017] On the other hand, a computer-readable storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the operations performed by the liveness detection method as described in the above aspects.
[0018] On the other hand, a computer program product is provided, including a computer program, wherein the computer program is loaded and executed by a processor to implement the operations performed by the living body detection method as described in the above aspects.
[0019] In another aspect, a palm scanning device is provided, comprising:
[0020] X-ray camera, magnetic resonance imaging equipment or ultrasound imaging equipment for obtaining images of palm bone joints;
[0021] The radio frequency circuit is used to send the palm bone joint image to a server, and the server is used to perform liveness detection based on the palm bone joint image. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0023] FIG1 is a schematic diagram of an implementation environment provided by an embodiment of the present application.
[0024] FIG2 is a flow chart of a liveness detection method provided in an embodiment of the present application.
[0025] FIG3 is a flow chart of another liveness detection method provided in an embodiment of the present application.
[0026] FIG4 is a schematic diagram of a palm scanning device provided in an embodiment of the present application.
[0027] FIG5 is a schematic diagram of a super-resolution processing method provided in an embodiment of the present application.
[0028] FIG6 is a schematic diagram of a convolution method provided in an embodiment of the present application.
[0029] FIG7 is a flowchart of a super-resolution model training method provided in an embodiment of the present application.
[0030] FIG8 is a flowchart of a method for training a liveness detection model provided in an embodiment of the present application.
[0031] FIG9 is an architecture diagram of a liveness detection method provided in an embodiment of the present application.
[0032] FIG10 is a schematic structural diagram of a living body detection device provided in an embodiment of the present application.
[0033] FIG11 is a schematic structural diagram of another living body detection device provided in an embodiment of the present application.
[0034] FIG12 is a schematic structural diagram of a terminal provided in an embodiment of the present application.
[0035] FIG13 is a schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0037] It is understood that the terms "first," "second," and the like used herein may be used to describe various concepts herein, but unless otherwise specified, these concepts are not limited by these terms. These terms are merely used to distinguish one concept from another. For example, a first palmar skeletal joint image may be referred to as a second palmar skeletal joint image, and similarly, a second palmar skeletal joint image may be referred to as a first palmar skeletal joint image, without departing from the scope of this application.
[0038] Here, "at least one" refers to one or more than one. For example, the at least one image can be one image, two images, three images, or any other integer greater than or equal to one. "Multiple" refers to two or more than two. For example, the multiple images can be two images, three images, or any other integer greater than or equal to two. "Each" refers to each of the at least one. For example, "each image" refers to each image in the multiple images. If the multiple images are three images, "each image" refers to each of the three images.
[0039] In this application, when biometric recognition technologies such as palm recognition technology are involved and the above embodiments of this application are applied to specific products or technologies, the relevant data collection, use and processing processes should comply with national laws and regulations. Before collecting palm bone joint images or other biometric images, the information processing rules should be informed and the target object's separate consent should be obtained. Facial information should be processed strictly in accordance with the requirements of laws and regulations and personal information processing rules, and technical measures should be taken to ensure the security of relevant data.
[0040] Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also involves studying the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.
[0041] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, pre-trained models, operating / interaction systems, and mechatronics. Pre-trained models, also known as large models or basic models, can be fine-tuned and widely applied to downstream tasks across various AI disciplines. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0042] Machine learning (ML) is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is at the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of AI. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning by demonstration. Pretrained models are the latest development in deep learning, integrating these techniques.
[0043] Computer vision (CV) is the science of making machines "see." Specifically, it refers to using cameras and computers to replace the human eye in identifying and measuring objects, and then performing further image processing to create images more suitable for human observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, attempting to build artificial intelligence systems capable of extracting information from images or multidimensional data. Large model technology has brought significant changes to the development of computer vision technology. Pre-trained models in the field of vision, such as Swin-Transformer, ViT (Vision Transformer), V-MoE (Vision MoE), and MAE (Masked Auto Encoder), can be fine-tuned to quickly and widely apply to specific downstream tasks. Computer vision technology generally includes image processing, image recognition, image semantic understanding, image retrieval, OCR (Optical Character Recognition), video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D (3 Dimensions) technology, virtual reality, augmented reality, simultaneous positioning and mapping, and common biometric recognition technology.
[0044] The following describes the liveness detection method provided in the embodiment of the present application based on artificial intelligence technology and computer vision technology.
[0045] The liveness detection method provided in the embodiment of the present application can be used in a computer device. Optionally, the computer device is a terminal or a server. Optionally, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal is a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, smart terminal, etc., but is not limited to this.
[0046] In one possible implementation, the computer program involved in the embodiments of the present application can be deployed and executed on a computer device, or on multiple computer devices located at one location, or on multiple computer devices distributed at multiple locations and interconnected through a communication network. Multiple computer devices distributed at multiple locations and interconnected through a communication network can constitute a blockchain system.
[0047] In one possible implementation, the computer device used to train the super-resolution model and the liveness detection model in the embodiment of the present application is a node in the blockchain system. The node can store the trained super-resolution model and the liveness detection model in the blockchain. Thereafter, the node or the node corresponding to other devices in the blockchain can perform super-resolution processing on the image through the super-resolution model, or perform liveness detection on the image through the liveness detection model.
[0048] In one possible implementation, the computer device used for liveness detection on an image in an embodiment of the present application is a node in a blockchain system. The node can store the image and the image identification results in the blockchain. Thereafter, the node or the node corresponding to other devices in the blockchain can query the image or image identification results stored in the blockchain.
[0049] Figure 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application. Referring to Figure 1, the implementation environment includes: a palm scanning device 101 and a server 102. The palm scanning device 101 and the server 102 are connected via a wireless or wired network. The palm scanning device 101 collects a first palm bone joint image, sends the first palm bone joint image to the server 102, and the server 102 receives the first palm bone joint image. The method provided in the embodiment of the present application is used to perform super-resolution processing on the first palm bone joint image to obtain a second palm bone joint image. Based on the second palm bone joint image, liveness detection is performed to obtain a discrimination result, which is used to indicate whether the first palm bone joint image is a live palm bone joint image.
[0050] Optionally, if the discrimination result indicates that the first palm bone joint image is a non-live palm bone joint image, the server 102 sends an identification error message to the palm scanning device 101, and the palm scanning device 101 displays the identification error message to the user to prompt the user that the palm recognition has failed. If the discrimination result indicates that the first palm bone joint image is a live palm bone joint image, the server 102 may further perform identity recognition based on the first palm bone joint image. If the recognition is successful, the server 102 returns a recognition success message to the palm scanning device 101; if the recognition is unsuccessful, the server 102 returns an identification error message to the palm scanning device 101.
[0051] The liveness detection method provided in the embodiments of the present application can be applied to any scenario of detecting a live palm.
[0052] For example, in the scenario of palm payment, in order to confirm the true identity of the user making the payment, palm recognition technology is used, and liveness detection is performed during the palm recognition process. First, the user places his palm on the scanning area of the palm scanning device, and the palm scanning device collects the palm bone joint image. Then, the method provided in the embodiment of the present application is used to perform liveness detection on the palm bone joint image. If the palm bone joint image is determined to be a living palm bone joint image according to the liveness detection result, identity recognition can be further performed based on the palm bone joint image. After successful recognition, the fee to be paid can be automatically deducted to complete the palm payment. If the palm bone joint image is determined to be a non-living palm bone joint image according to the liveness detection result, the palm payment fails.
[0053] In the palm payment scenario, the palm scanning device is a device that makes payments by scanning the palm. The palm scanning device has the functions of collecting palm bone joint images, performing liveness detection on the palm bone joint images, and making payments based on the palm bone joint images. The palm scanning device can be configured for use by users at any location where payment is required, such as stores, supermarkets, and tourist attractions. Optionally, the palm scanning device can also have the functions of collecting other biometric images in addition to palm bone joint images, performing liveness detection on the biometric images, and making payments based on the biometric images. The biometric images may include facial images, fingerprint images, iris images, etc., which are not limited in the embodiments of the present application.
[0054] In addition, the liveness detection method provided in the embodiments of the present application can also be applied to access control systems, security authentication systems, intelligent transportation systems, or other systems that require user identity authentication to ensure the security of the palm recognition process.
[0055] FIG2 is a flow chart of a liveness detection method provided in an embodiment of the present application. The embodiment of the present application is executed by a computer device. Referring to FIG2 , the method includes the following steps.
[0056] 201. A computer device obtains a first palmar skeleton joint image, where the first palmar skeleton joint image includes palmar bones and joint soft tissues between the palmar bones.
[0057] The computer device obtains a first palm skeletal joint image, which is obtained by capturing the user's palm. In the embodiment of the present application, it is necessary to perform liveness detection on the first palm skeletal joint image. Liveness detection is a biometric recognition technology whose purpose is to verify whether the captured first palm skeletal joint image is a live palm skeletal joint image. A live palm skeletal joint image refers to a palm skeletal joint image obtained by photographing a real palm. In other words, it is to detect whether the palm used by the user is a real palm, so as to distinguish a real palm from an imitation such as a palm model or a palm photo.
[0058] The first palm bone joint image includes the palm bones and the joint soft tissue between the palm bones. The shape, size, texture and other features of the palm bones and joint soft tissue can be used for liveness detection.
[0059] 202. The computer device performs super-resolution processing on the first palm bone joint image to obtain a second palm bone joint image, wherein the resolution of the second palm bone joint image is greater than the resolution of the first palm bone joint image.
[0060] After acquiring the first palmar skeletal joint image, the computer device performs super-resolution processing on the first palmar skeletal joint image. Super-resolution processing is a technique for reconstructing a low-resolution image into a high-resolution image, which can improve image clarity and detail. Therefore, the resolution of the second palmar skeletal joint image obtained through super-resolution processing is greater than that of the first palmar skeletal joint image. Aside from the resolution, the content of the second palmar skeletal joint image is identical to that of the first palmar skeletal joint image.
[0061] In one possible implementation, the computer device may perform super-resolution processing on the first palm bone joint image through a super-resolution model. For example, the super-resolution model may be SRCNN (Super Resolution Convolutional Neural Network), CNN (Convolutional Neural Network), VIT (Vision Transformer), etc. Among them, the process of performing super-resolution processing through the super-resolution model can refer to the embodiment shown in Figure 3 below, which is not described in detail here. In another possible implementation, the computer device may also use a reconstruction-based super-resolution algorithm or an enhanced edge super-resolution algorithm for super-resolution processing, which is not limited in the embodiments of the present application.
[0062] 203. The computer device obtains palm features corresponding to the second palm bone joint image.
[0063] Since the content of the second palm bone joint image is the same as that of the first palm bone joint image, the result of liveness detection on the second palm bone joint image can represent the result of liveness detection on the first palm bone joint image, and the resolution of the second palm bone joint image is greater than that of the first palm bone joint image, and the computer device can more easily capture the detailed information in the second palm bone joint image. Therefore, in the embodiment of the present application, liveness detection is performed on the second palm bone joint image to determine whether the first palm bone joint image is a live palm bone joint image.
[0064] The computer device obtains palm features corresponding to the second palm bone joint image, and the palm features are used to represent the features of the palm bones and joint soft tissues in the second palm bone joint image, such as the shape, size or texture of the palm bones and joint soft tissues.
[0065] 204. The computer device determines a discrimination result based on the palm features, where the discrimination result is used to indicate whether the first palm bone joint image is a live palm bone joint image. The live palm bone joint image refers to a palm bone joint image obtained by photographing a real palm.
[0066] Because the palm features can represent the features of the palm bones and joint soft tissue in the palm bone joint image, and there are differences between the features of the palm bones and joint soft tissue in the palm bone joint image of a living person and the features of the palm bones and joint soft tissue in the palm bone joint image of a non-living person, the computer device can determine a discrimination result based on the palm features, and the discrimination result is used to indicate whether the first palm bone joint image is a palm bone joint image of a living person. In other words, based on the discrimination result, it can be determined whether the first palm bone joint image is a palm bone joint image obtained by photographing a real palm.
[0067] Since the second palm skeleton joint image is an image obtained by super-resolution processing of the first palm skeleton joint image, the content of the second palm skeleton joint image is the same as that of the first palm skeleton joint image. Therefore, the discrimination result obtained based on the palm features of the second palm skeleton joint image can indicate whether the first palm skeleton joint image is a living palm skeleton joint image.
[0068] In related technologies, liveness detection is performed using features such as palm shape or palm prints. However, using high-precision palm images can easily imitate palm shapes and palm prints similar to real palms, making it difficult to distinguish between live and non-live palms. Therefore, the accuracy of liveness detection is not high enough.
[0069] The method provided in the embodiment of the present application uses the palm bones and joint soft tissues in the palm bone joint image to perform liveness detection of the palm. Since the palm bones and joint soft tissues of the real palm are extremely complex, it is difficult to imitate the palm bones and joint soft tissues. The difference between the imitated non-living palm bone joint image and the real living palm bone joint image is large. Therefore, the accuracy of liveness detection using the palm bone joint image is high. Considering that the palm bone joint image contains more detailed information, the palm bone joint image is additionally super-resolution processed to obtain a palm bone joint image with higher resolution. The palm bone joint image with higher resolution is used for liveness detection, so that the liveness detection process does not ignore the detailed information, thereby further improving the accuracy of liveness detection.
[0070] The embodiment of FIG. 2 is merely a brief description of the liveness detection method. For a more detailed process of the liveness detection method, please refer to the embodiment shown in FIG. 3 below.
[0071] FIG3 is a flowchart of another liveness detection method provided in an embodiment of the present application. The embodiment of the present application is executed by a computer device. Referring to FIG3 , the method includes the following steps.
[0072] 301. A computer device obtains a first palmar skeleton joint image, where the first palmar skeleton joint image includes palmar bones and joint soft tissues between the palmar bones.
[0073] A computer device acquires a first palm skeletal joint image. In one possible implementation, the computer device is a palm scanning device, and the first palm skeletal joint image is a palm joint image acquired by the computer device by scanning a user's palm. In another possible implementation, the computer device is a server, and the server is communicatively connected to the palm scanning device. After acquiring the first palm skeletal joint image, the palm scanning device transmits the first palm skeletal joint image to the computer device (i.e., the server).
[0074] Alternatively, the palm scanning device may be an X-ray camera, a magnetic resonance imaging device, or an ultrasonic imaging device. For example, an X-ray camera can image the bones and soft tissue of the user's palm to obtain an image of the palm bones and joints. Additionally, the palm scanning device may include hardware such as a built-in infrared camera or depth sensor to capture images of the palm bones and joints.
[0075] Taking the palm scanning device as an X-ray camera as an example, FIG4 is a schematic diagram of a palm scanning device provided by an embodiment of the present application. As shown in FIG4 , the palm scanning device includes a light-emitting component and an imaging component. The light-emitting component is located at the top and the imaging component is located at the bottom. There is a certain space between the light-emitting component and the imaging component. The user extends the palm of the hand into the space between the light-emitting component and the imaging component. The light-emitting component emits X-rays downward. After penetrating the user's palm, the imaging component below receives the X-rays that have penetrated the palm and forms an image, thereby obtaining an image of the palm bones and joints. Among them, the imaging principle of X-rays is to obtain the internal structure and information of the object by passing the X-rays through the object to generate a transmission image. The propagation and absorption of X-rays in human tissues vary according to the density of the tissue. For example, bones and joint soft tissues have a greater absorption capacity for X-rays, so in the X-ray image, bones and joint soft tissues appear white or gray, so the image of bones and joint soft tissues can be clearly captured. In addition, since the palm bones and joint soft tissues have different morphological changes at different angles and postures, and are also affected by factors such as shooting angle, light, and hand occlusion, after collecting the palm bone joint image, the quality of the palm bone joint image can also be judged to determine whether the palm bone joint image is clear and complete. If the quality of the palm bone joint image does not meet the standard, the user can be prompted to adjust the palm angle and re-collect the palm bone joint image.
[0076] In an embodiment of the present application, the palm is captured by an X-ray camera, a magnetic resonance imaging device or an ultrasonic angiography device to obtain a first palm bone joint image, thereby performing liveness detection on the first palm bone joint image. The X-ray camera, the magnetic resonance imaging device or the ultrasonic angiography device are successfully applied to the field of liveness detection, realizing a new liveness detection method.
[0077] In the embodiments of the present application, liveness detection is performed using images of palm bones and joints. Compared to features such as palm prints or blood vessels, the bones and joint soft tissues in a real palm are extremely complex and non-replicable. In particular, the joint soft tissues are almost impossible to imitate, making it extremely difficult to create a palm model with bones and joint soft tissues similar to those in a real palm. On the one hand, the difficulty of imitation increases the cost of imitating the palm model and reduces the possibility of an attacker launching an attack. On the other hand, the difficulty of imitation results in a significant difference between the bones and joint soft tissues in the palm model and those in a real palm, reducing the difficulty of distinguishing between images of live palm bones and joints and those of non-live palm bones and joints, thereby improving the accuracy of liveness detection.
[0078] 302. The computer device performs super-resolution processing on the first palm bone joint image using a super-resolution model to obtain a second palm bone joint image, wherein the resolution of the second palm bone joint image is greater than the resolution of the first palm bone joint image.
[0079] In an embodiment of the present application, a computer device performs super-resolution processing through a super-resolution model, inputs a first palm bone joint image into the super-resolution model, and the super-resolution model outputs a second palm bone joint image. For example, the super-resolution model is SRCNN, which is an algorithm model built based on CNN for super-resolution processing of images. The training process of the super-resolution model can be seen in the embodiment shown in FIG7 below, which will not be described here.
[0080] In one possible implementation, the super-resolution model includes a first feature extraction network, a feature mapping network, and an image reconstruction network. The process of performing super-resolution processing by the computer device using the super-resolution model includes the following steps 3021 to 3023.
[0081] 3021. The computer device obtains a first image feature corresponding to the first palm bone joint image through a first feature extraction network.
[0082] The first feature extraction network is used to extract image features corresponding to the input image and describe the image with the image features.
[0083] Optionally, the first feature extraction network includes a convolutional network, which can be regarded as a filter. The first feature extraction network may include one or more filters, wherein one filter is a two-dimensional matrix, and the number of filters is equal to the number of dimensions of the first palm bone joint image. The number of dimensions of the image refers to the number of dimensions included in the pixel value at each position in the image. Optionally, the first palm bone joint image is a one-dimensional image, that is, the pixel value at each position in the first palm bone joint image includes the pixel value of one dimension, such as the pixel value of each pixel point in the grayscale image includes the grayscale value of the pixel point, then the first feature extraction network includes one two-dimensional matrix. Optionally, the first palm bone joint image is a three-dimensional image, that is, the pixel value at each position in the first palm bone joint image includes the pixel value of three dimensions, such as the pixel value of each pixel point in the RGB image includes the red brightness value, the green brightness value and the blue brightness value, then the first feature extraction network includes three two-dimensional matrices. Optionally, each filter also corresponds to a bias matrix. The computer device uses a filter to perform convolution processing on the first palm bone joint image, and fuses the convolution processing result with the bias matrix to obtain a first image feature.
[0084] For example, when the first feature extraction network includes multiple filters, each filter corresponds to the pixel value of a dimension in the first palm bone joint image. Then, each filter is used to perform convolution processing on the pixel value of the corresponding dimension in the first palm bone joint image, and the result of the convolution processing is fused with the bias matrix corresponding to the filter to obtain the image feature of the dimension, and the image features of multiple dimensions are combined into the first image feature.
[0085] For example, referring to FIG5 , the size of the first palm bone joint image 501 is f1×f1×n1, indicating that the first palm bone joint image 501 includes f1×f1 pixels, and each pixel includes pixel values of n1 dimensions. The size of the filter in the first feature extraction network is f2×f2×n1, and the filter also corresponds to a bias matrix of size f2×f2×n1, indicating that there are n1 filters and n1 bias matrices in the first feature extraction network, and the size of each filter and each bias matrix is f2×f2. The computer device uses the filter to convolve the first palm bone joint image 501, adds the convolution result to the bias matrix, and obtains the first image feature 502. The size of the first image feature 502 is f3×f3×n1. Among them, the size of f3 depends on the size of the first palm bone joint image 501, the size of the filter, and the convolution step size.
[0086] Optionally, the process of the computer device obtaining the first image feature corresponding to the first palm bone joint image through the first feature extraction network can be expressed by the following formula (1).
[0087] F1(Y)=max(0,W1*Y+B1); formula (1)
[0088] Wherein, F1(Y) represents the first image feature, W1 represents the filter in the first feature extraction network, Y represents the first palm bone joint image, B1 represents the bias matrix in the first feature extraction network, and max(·) represents taking the maximum value. The purpose of taking the maximum value of 0 and W1*Y+B1 is to ensure that the feature in the first image feature is not less than 0.
[0089] 3022. The computer device maps the first image feature to a second image feature through a feature mapping network, where the number of dimensions of the second image feature is greater than the number of dimensions of the first image feature.
[0090] Among them, the feature mapping network is used to map image features with a smaller number of dimensions to image features with a larger number of dimensions, so as to increase the number of dimensions of the image features, so that the image reconstructed based on the image features with increased number of dimensions contains more detail information.
[0091] Optionally, the feature mapping network includes a convolutional network, which can be regarded as a filter, and one filter is a two-dimensional matrix. The feature mapping network may include multiple groups of filters, and the number of filters is equal to the number of dimensions of the first image feature. Optionally, the first image feature is a one-dimensional image feature, that is, the number of features at each position in the first image feature is one, then each group of filters is composed of one two-dimensional matrix. Optionally, the first image feature is a three-dimensional image feature, that is, the number of features at each position in the first image feature is three, then each group of filters is composed of three two-dimensional matrices. Optionally, each filter also corresponds to a bias matrix. The computer device uses the filter to perform convolution processing on the first image feature, and fuses the result of the convolution processing with the bias matrix to obtain the second image feature.
[0092] For example, when the feature mapping network includes multiple groups of filters, each group of filters corresponds to a dimension in the first palm bone joint image, and therefore corresponds to a feature of a dimension in the first image feature. Each group of filters is used to perform convolution processing on the features of the corresponding dimension in the first image feature, and the result of the convolution processing is fused with the bias matrix corresponding to the filter to obtain the image feature on the dimension, and the image features on multiple dimensions are combined to form the second image feature.
[0093] For example, referring to Figure 5 , the size of first image feature 502 is f3×f3×n1, indicating that the first image feature includes f3×f3 locations, each of which includes features of n1 dimensions. The size of the filter in the feature mapping network is f4×f4×n1×n2, and the filter also corresponds to a bias matrix of size f4×f4×n1×n2, indicating that the feature mapping network contains n1×n2 filters and n1×n2 bias matrices, and that each filter and each bias matrix has a size of f4×f4. The computer device convolves the first image feature 502 with the filter and adds the convolution result with the bias matrix to obtain a second image feature 503. The size of second image feature 503 is f5×f5×n1×n2. The size of f5 depends on the size of first image feature 502, the size of the filter, and the convolution step size.
[0094] Optionally, the process of mapping the first image feature to the second image feature by the computer device through the feature mapping network can be expressed by the following formula (2).
[0095] F2(Y)=max(0,W2*F1(Y)+B2); formula (2)
[0096] Where F2(Y) represents the second image feature, W2 represents the filter in the feature mapping network, F1(Y) represents the first image feature, B2 represents the bias matrix in the feature mapping network, and max(·) represents taking the maximum value. The purpose of taking the maximum value of 0 and W2*F1(Y)+B2 is to ensure that the feature in the second image feature is not less than 0.
[0097] 3023. The computer device reconstructs a second palm bone joint image based on the second image features through an image reconstruction network.
[0098] The image reconstruction network is used to reconstruct an image with the image features based on the input image features.
[0099] The first image feature has the same number of dimensions as the first palm skeletal joint image, and the second image feature has a larger number of dimensions than the first image feature. This means that the second image feature has a larger number of dimensions than the first palm skeletal joint image. Therefore, the second palm skeletal joint image reconstructed based on the second image feature contains more detailed information and has a higher resolution than the first palm skeletal joint image.
[0100] In one possible implementation, by setting the filter size and convolution step size, the size of the second image feature in each dimension can be made equal to the size of the first palm bone joint image in each dimension, that is, f5 = f1. In another possible implementation, by setting the filter size and convolution step size, the size of the second image feature in each dimension can be made larger than the size of the first palm bone joint image in each dimension, that is, f5 > f1.
[0101] Optionally, step 3023 includes: merging the features on multiple dimensions in the second image feature to obtain a second palm bone joint image, so that the number of dimensions of the second palm bone joint image is equal to the number of dimensions of the first palm bone joint image. For example, referring to Figure 5, the size of the first palm bone joint image 501 is f1×f1×n1, and the size of the second image feature 503 is f5×f5×n1×n2. Every n2 features of the features of n1×n2 dimensions in the second image feature 503 are merged into one feature, and the number of dimensions after merging is n1. Moreover, since the pixel value on each dimension of the second palm bone joint image is obtained by merging the features on multiple dimensions in the second image feature, more features are integrated, and therefore the pixel value is more accurate, thereby achieving a higher resolution effect of the second palm bone joint image.
[0102] Optionally, the image reconstruction network can determine the features on each dimension after merging based on the features on multiple dimensions in a mean manner. Or the image reconstruction network can determine the features on each dimension after merging based on the features on multiple dimensions in a convolution processing manner. For example, the image reconstruction network includes a convolution network, and the convolution network can be regarded as a filter, and one filter is one two-dimensional matrix. Referring to Figure 5, the size of the second image feature 503 is f5×f5×n1×n2, the size of the filter of the image reconstruction network is f6×f6×n1×n2, and the filter also corresponds to a bias matrix of size f6×f6×n1×n2. The computer device uses the filter to convolve the second image feature 503, and adds the convolution result to the bias matrix to obtain the second palm bone joint image 504. The size of the second palm bone joint image 504 is f7×f7×n1, which achieves the effect of merging the features of n1×n2 dimensions in the second image feature 503 to obtain features of n1 dimension. The size of f7 depends on the size of the second image feature 503, the size of the filter, and the convolution step size. Optionally, by setting the filter size and the convolution step size, the size of the second palmar skeletal joint image 504 in each dimension (such as f7×f7 above) can be made equal to the size of the first palmar skeletal joint image 501 in each dimension (such as f1×f1 above). When n1 is equal to 1, the second palmar skeletal joint image is a one-dimensional image. When n1 is equal to 3, the second palmar skeletal joint image is a three-dimensional image.
[0103] Optionally, the process of the computer device reconstructing the second palm bone joint image based on the second image features through the image reconstruction network can be expressed by the following formula (3).
[0104] F3(Y)=W3*F2(Y)+B3; formula (3)
[0105] Among them, F3(Y) represents the second palm bone joint image, W3 represents the filter in the image reconstruction network, F2(Y) represents the second image feature, and B3 represents the bias matrix in the image reconstruction network.
[0106] In summary, the convolution operation is used in the above steps 3021-3023. The calculation process of the convolution operation can be seen in Figure 6. Figure 6 is a schematic diagram of a convolution method provided in an embodiment of the present application. As shown in Figure 6, the large matrix on the left is the input data 601 (for example, the first palm bone joint image, the first image feature or the second image feature), and each numerical value in the input data 601 represents the pixel value of a pixel point. The small matrix on the right is the filter 602, and each numerical value in the filter 602 represents the parameter of the filter. The filter 602 convolves the area of the input data 601 with the same size as the filter 602 to obtain a numerical value 6, which represents the pixel value of a pixel point in the convolution result. By setting different convolution step sizes, the filter 602 is used to move sequentially on the input data 601, and an area of the same size as the filter 602 is selected, so that different numbers of areas can be divided in the input data 601. According to the convolution step size, each divided area is convolved with the filter 602 separately, and the convolution results of multiple areas constitute the convolution result of the entire input data 601 and the filter 602.
[0107] In an embodiment of the present application, on the one hand, in order to reduce the requirements for the palm scanning environment, reduce the cost of the palm scanning device, and reduce the network transmission pressure, the palm scanning device collects a first palm bone joint image with a lower resolution. On the other hand, considering that directly using the first palm bone joint image with a lower resolution for liveness detection may ignore more detailed information in the image, after obtaining the first palm bone joint image, the first palm bone joint image is super-resolution processed to obtain a second palm bone joint image with a higher resolution. The second palm bone joint image is subsequently used for liveness detection, so that the liveness detection process can rely on more detailed information, which is conducive to improving the accuracy of liveness detection.
[0108] 303. The computer device obtains palm features corresponding to the second palm bone joint image through the liveness detection model.
[0109] In the embodiment of the present application, a computer device performs liveness detection using a liveness detection model. A second palm skeletal joint image is input into the liveness detection model, which then outputs a discrimination result. For example, the liveness detection model may be a CNN. The training process of the liveness detection model can be seen in the embodiment shown in FIG8 below and will not be described here.
[0110] Among them, the liveness detection model includes a second feature extraction network. After the computer device inputs the second palm bone joint image into the liveness detection model, the second feature extraction network in the liveness detection model obtains the palm features corresponding to the second palm bone joint image.
[0111] In one possible implementation, the second feature extraction network includes a convolution layer and a pooling layer. The convolution layer performs convolution processing on the second palm bone joint image to obtain a convolution result, and then the pooling layer performs pooling processing on the convolution result to reduce the number of dimensions, thereby obtaining palm features. The palm features are used to represent the features of the palm bones and joint soft tissues in the second palm bone joint image, such as the shape, size or texture of the palm bones and joint soft tissues.
[0112] 304. The computer device determines a discrimination result based on the palm features through a liveness detection model. The discrimination result is used to indicate whether the first palm bone joint image is a live palm bone joint image. The live palm bone joint image refers to a palm bone joint image obtained by photographing a real palm.
[0113] The liveness detection model includes a classification network. After obtaining palm features, the second feature extraction network in the liveness detection model inputs the palm features into the classification network. The computer device uses the classification network to determine a discrimination result based on the palm features. Because the palm features can represent the characteristics of the palm bones and joint soft tissue in the palm skeletal joint image, and the characteristics of the palm bones and joint soft tissue in the palm skeletal joint image of a living person are different from those in the palm skeletal joint image of a non-living person, the classification network can determine the discrimination result based on the palm features.
[0114] In one possible implementation, the classification network is a softmax (an activation function) classifier, which is not limited in the embodiment of the present application.
[0115] In one possible implementation, the discrimination result is a value between 0 and 1, indicating a probability that the first palm skeletal joint image is a live palm skeletal joint image. If the discrimination result is greater than a target threshold, the first palm skeletal joint image can be considered to be a live palm skeletal joint image. If the discrimination result is not greater than the target threshold, the first palm skeletal joint image can be considered to be a non-live palm skeletal joint image. The target threshold is a value between 0 and 1, for example, 0.5, 0.6, or 0.7.
[0116] In one possible implementation, the classification network is a binary classification network. The discrimination result is 0 or 1. When the discrimination result is 0, it indicates that the first palm bone joint image is a non-living palm bone joint image. When the discrimination result is 1, it indicates that the first palm bone joint image is a living palm bone joint image.
[0117] 305. The computer device obtains a label result of the first palm bone joint image, where the label result is used to indicate whether the first palm bone joint image is a true result of a living body palm bone joint image.
[0118] The first palm bone joint image is an image captured by a palm scanning device. Steps 301 to 304 are the process of the computer device performing liveness detection on the first palm bone joint image, and are also the process of the liveness detection model performing liveness detection on the second palm bone joint image. In addition to using the liveness detection model to perform liveness detection on the second palm bone joint image to determine whether the first palm bone joint image is a live palm bone joint image, manual judgment can also be used to determine whether the first palm bone joint image is a live palm bone joint image. The result determined by manual judgment can be called the label result of the first palm bone joint image. The label result is used to indicate the true result of whether the first palm bone joint image is a live palm bone joint image, that is, the label result is accurate and will not make any mistakes.
[0119] 306. When the discrimination result is inconsistent with the labeling result, the computer device determines the first palm bone joint image and the labeling result as a training sample, or determines the second palm bone joint image and the labeling result as a training sample.
[0120] The computer device compares the discrimination result obtained by the liveness detection model with the accurate label result. If the discrimination result is inconsistent with the label result, it means that an error occurs in the liveness detection process of the liveness detection model. The computer device then determines the first metacarpal bone joint image and label result as a training sample, or determines the second metacarpal bone joint image and label result as a training sample.
[0121] The inconsistency between the discrimination result and the labeling result means that the situation represented by the discrimination result is different from the situation represented by the labeling result. For example, the discrimination result indicates that the first palm skeletal joint image is a living palm skeletal joint image, but the labeling result indicates that the first palm skeletal joint image is a non-living palm skeletal joint image. Alternatively, the discrimination result indicates that the first palm skeletal joint image is a non-living palm skeletal joint image, but the labeling result indicates that the first palm skeletal joint image is a living palm skeletal joint image.
[0122] 307. The computer device trains a liveness detection model based on the training samples.
[0123] In the embodiment of the present application, since it is impossible to predict all possible attack methods and imitation palm types, the liveness detection model obtained by training is at risk of overfitting, and thus there is a situation where the liveness detection model makes an error in the discrimination result of the palm bone joint image. In the case where the liveness detection model makes an error in the discrimination result of the palm bone joint image, it means that some features in the palm bone joint image have not been learned by the liveness detection model. Therefore, the palm bone joint image and the corresponding label result are used as training samples, and the training samples collected in a real environment are used to continue training the liveness detection model, thereby continuously training and tuning the liveness detection model to improve the generalization ability and accuracy of the liveness detection model. Among them, the process of training the liveness detection model based on the training samples can be seen in the embodiment shown in Figure 8 below.
[0124] The method provided in the embodiment of the present application uses the palm bones and joint soft tissues in the palm bone joint image to perform palm liveness detection. Since the palm bones and joint soft tissues of the real palm are extremely complex, it is difficult to imitate the palm bones and joint soft tissues. The difference between the imitated non-living palm bone joint image and the real living palm bone joint image is large. Therefore, the accuracy of liveness detection using the palm bone joint image is high. Considering that the palm bone joint image contains more detailed information, the palm bone joint image is additionally super-resolution processed to obtain a palm bone joint image with higher resolution. The palm bone joint image with higher resolution is used for liveness detection, so that the liveness detection process does not ignore the detailed information, thereby further improving the accuracy of liveness detection.
[0125] Moreover, the liveness detection based on the palm bones and joint soft tissues in the embodiment of the present application is less susceptible to forgery and hacking than liveness detection based on features such as palm prints. This can effectively avoid the risk of biometric technology being stolen or cracked, thereby improving the reliability and security of biometric technology.
[0126] In addition, in the embodiment of the present application, a super-resolution model including a first feature extraction network, a feature mapping network and an image reconstruction network is used to perform super-resolution processing on the first palm bone joint image to obtain a second palm bone joint image. The network architecture of the super-resolution model is simple, which improves processing efficiency and ensures that the second palm bone joint image contains more detailed information, thereby improving the effect of super-resolution processing and thus improving the accuracy of liveness detection.
[0127] In addition, in the embodiment of the present application, a liveness detection model including a second feature extraction network and a classification network is used to perform liveness detection on the second palm bone joint image. The network architecture of the liveness detection model is simple, and the judgment results can be obtained quickly without complex operations, thereby improving processing efficiency.
[0128] Figure 7 is a flowchart of a super-resolution model training method provided in an embodiment of the present application. The embodiment of the present application is executed by a computer device. Referring to Figure 7, the method includes the following steps.
[0129] 701. A computer device obtains a first sample palm bone joint image and a second sample palm bone joint image, wherein the content of the first sample palm bone joint image and the content of the second sample palm bone joint image are the same, and the resolution of the second sample palm bone joint image is greater than the resolution of the first sample palm bone joint image.
[0130] The first sample palm bone joint image and the second sample palm bone joint image have different resolutions but the same content. Therefore, the first sample palm bone joint image and the second sample palm bone joint image can be used to perform supervised training on a super-resolution model.
[0131] The first sample palm bone joint image and the second sample palm bone joint image may be living body palm bone joint images or non-living body palm bone joint images, which is not limited in this embodiment of the present application.
[0132] 702. The computer device obtains a first sample image feature corresponding to the first sample palm bone joint image through a first feature extraction network in the super-resolution model.
[0133] 703. The computer device maps the first sample image feature to a second sample image feature through a feature mapping network in the super-resolution model, where the number of dimensions of the second sample image feature is greater than the number of dimensions of the first sample image feature.
[0134] 704. The computer device reconstructs a predicted palm bone joint image based on the second sample image features through the image reconstruction network in the super-resolution model.
[0135] The process of processing the first sample palm bone joint image to obtain the predicted palm bone joint image in steps 702 to 704 is the same as the process of processing the first palm bone joint image to obtain the second palm bone joint image in steps 3021 to 3023 above, and will not be repeated here.
[0136] 705. The computer device trains a super-resolution model based on the predicted palm bone joint image and the second sample palm bone joint image.
[0137] The predicted palm bone joint image is a higher resolution image predicted by the super-resolution model, and the second sample palm bone joint image is a real higher resolution image. Therefore, the smaller the difference between the predicted palm bone joint image and the second sample palm bone joint image, the more accurate the predicted palm bone joint image is, that is, the more accurate the super-resolution model is. Therefore, the computer device trains the super-resolution model based on the predicted palm bone joint image and the second sample palm bone joint image to reduce the difference between the predicted palm bone joint image obtained based on the super-resolution model and the second sample palm bone joint image.
[0138] Optionally, the computer device trains a super-resolution model based on the difference between the predicted palm bone joint image and the second sample palm bone joint image to reduce the difference between the predicted palm bone joint image obtained based on the super-resolution model and the second sample palm bone joint image.
[0139] In one possible implementation, a computer device determines a first loss value based on a difference between a predicted palm skeletal joint image and a second sample palm skeletal joint image, and trains a super-resolution model based on the first loss value to reduce a first loss value obtained by the trained super-resolution model. The first loss value is positively correlated with the difference, and training the super-resolution model with the goal of reducing the first loss value can reduce the difference between the predicted palm skeletal joint image obtained based on the trained super-resolution model and the second sample palm skeletal joint image.
[0140] It should be noted that in order to train the super-resolution model, the computer device first obtains a training sample set, which includes multiple pairs of sample palm bone joint images, where each pair of sample palm bone joint images includes two sample palm bone joint images with identical content but different resolutions. The process of training the super-resolution model based on the training sample set includes multiple iterative processes, and in each iterative process, training is performed based on at least one pair of sample palm bone joint images. The embodiments of this application are described only using the first sample palm bone joint image and the second sample palm bone joint image as an example.
[0141] During the training of a super-resolution model, multiple iterations are required. In one possible implementation, super-resolution model training is stopped in response to the number of iterations reaching a first threshold; or in response to the first loss value obtained in the current iteration being no greater than a second threshold, super-resolution model training is stopped. The first and second thresholds are both arbitrary values.
[0142] The method provided in the embodiment of the present application uses a first sample palm bone joint image and a second sample palm bone joint image as training samples for supervised learning during the training of a super-resolution model. The super-resolution model is trained based on the predicted palm bone joint image and the second sample palm bone joint image predicted by the super-resolution model, so that the super-resolution model learns how to reconstruct a higher-resolution palm bone joint image based on a lower-resolution palm bone joint image, thereby improving the accuracy of the super-resolution model. Furthermore, the trained super-resolution model is subsequently used in practical applications for super-resolution processing, thereby improving the convenience and efficiency of super-resolution processing of palm bone joint images.
[0143] In addition, based on the difference between the predicted palm bone joint image and the second sample palm bone joint image, a first loss value is determined, and the first loss value is positively correlated with the difference. Based on the first loss value, the super-resolution model is trained to reduce the first loss value obtained by the trained super-resolution model, so that the super-resolution model can be trained with the goal of reducing the first loss value, which can quickly and effectively improve the accuracy of the super-resolution model and speed up the training.
[0144] FIG8 is a flowchart of a method for training a liveness detection model provided in an embodiment of the present application. The embodiment of the present application is executed by a computer device. Referring to FIG8 , the method includes the following steps.
[0145] 801. A computer device obtains a third sample palm bone joint image and a sample label result, where the sample label result is used to indicate whether the third sample palm bone joint image is a true result of a living body palm bone joint image.
[0146] The computer device generates a third sample palm bone joint image and a corresponding sample label result. The third sample palm bone joint image may be a live sample palm bone joint image, and the sample label result is used to indicate that the third sample palm bone joint image is a live palm bone joint image. For example, a value of 1 is determined as the sample label result. The third sample palm bone joint image may be a non-live sample palm bone joint image, and the sample label result is used to indicate that the third sample palm bone joint image is a non-live palm bone joint image. For example, a value of 0 is determined as the sample label result.
[0147] For example, when the third sample palm bone and joint image is a non-living sample palm bone and joint image, a high-precision palm model, a palm model without bones and joints, a palm model with simple built-in bones, and a palm model using other materials (metal, wood, etc.) as bones can be photographed to obtain the third sample palm bone and joint image, which constitutes a training sample of the non-living palm bone and joint image, so that the living detection model can learn the characteristics of the non-living palm bone and joint image.
[0148] For example, when the third sample palm bone joint image is a live sample palm bone joint image, real palms of people of different genders, ages, and sizes can be photographed to obtain third sample palm bone joint images, which constitute training samples of live palm bone joint images, so that the liveness detection model can learn the characteristics of live palm bone joint images.
[0149] In one possible implementation, a computer device obtains an original palm skeletal joint image, where the original palm skeletal joint image is an image that has not been super-resolution processed. The computer device determines the original palm skeletal joint image as a third sample palm skeletal joint image. Alternatively, the computer device performs super-resolution processing on the original palm skeletal joint image to obtain the third sample palm skeletal joint image.
[0150] That is, the training samples of the liveness detection model can be palm bone joint images that have been processed with super resolution, or palm bone joint images that have not been processed with super resolution.
[0151] In a possible implementation, the third sample palm bone joint image and sample label result may also be the training sample obtained in the above steps 305 to 307.
[0152] 802. The computer device obtains sample palm features corresponding to the third sample palm bone joint image through the second feature extraction network.
[0153] 803. The computer device determines a prediction result based on the sample palm features through a classification network. The prediction result is used to indicate whether the third sample palm bone joint image is a prediction result of a living body palm bone joint image.
[0154] The process of processing the third sample palm bone joint image to obtain the prediction and discrimination result in the above steps 802-803 is the same as the process of processing the second palm bone joint image to obtain the discrimination result in the above steps 303-304, and will not be repeated here.
[0155] 804. The computer device trains a liveness detection model based on the predicted discrimination results and the sample label results.
[0156] The predicted discrimination result is the result predicted by the liveness detection model, and the sample label result is the true result. Therefore, the smaller the difference between the predicted discrimination result and the sample label result, the more accurate the predicted discrimination result is, that is, the more accurate the liveness detection model is. Therefore, the computer device trains the liveness detection model based on the predicted discrimination result and the sample label result to reduce the difference between the predicted discrimination result obtained based on the liveness detection model and the sample label result.
[0157] Optionally, the computer device trains a liveness detection model based on the difference between the predicted discrimination result and the sample label result, so as to reduce the difference between the predicted discrimination result and the sample label result obtained based on the liveness detection model.
[0158] In one possible implementation, the computer device determines the first value as the second loss value when the predicted discrimination result is consistent with the sample label result, and determines the second value as the second loss value when the predicted discrimination result is inconsistent with the sample label result, wherein the second loss value is greater than the first value. The computer device trains the liveness detection model based on the second loss value to reduce the second loss value obtained by the trained liveness detection model.
[0159] Among them, the predicted discrimination result is consistent with the sample label result, which means that the situation represented by the discrimination result is the same as the situation represented by the label result; the predicted discrimination result is inconsistent with the sample label result, which means that the situation represented by the discrimination result is different from the situation represented by the label result.
[0160] For example, the first value is 0 and the second value is 1. When the predicted discrimination result is consistent with the sample label result, the second loss value is equal to 0. When the predicted discrimination result is inconsistent with the sample label result, the second loss value is equal to 1.
[0161] By setting the second loss value of the positive sample to a smaller first value and the second loss value of the negative sample to a larger second value, the liveness detection model can be trained with the goal of reducing the second loss value, so that the liveness detection model can learn the correct knowledge contained in the positive sample and the incorrect knowledge contained in the negative sample, which can quickly and effectively improve the accuracy of the liveness detection model and speed up the training.
[0162] It should be noted that to train the liveness detection model, the computer device first obtains a training sample set, which includes multiple groups of samples, each group of samples including a sample palm skeletal joint image and corresponding sample label results. The process of training the liveness detection model based on the training sample set includes multiple iterations, and in each iteration, training is performed based on at least one group of samples. The embodiments of this application only use one group of samples as an example for illustration.
[0163] During the training of the liveness detection model, multiple iterations are required. In one possible implementation, in response to the number of iterations reaching a first threshold, the training of the liveness detection model is stopped.
[0164] The method provided in the embodiment of the present application uses a third sample palm skeletal joint image and sample label results as a training sample for supervised learning during the training of a liveness detection model. Based on the predicted discrimination results and sample label results predicted by the liveness detection model, the liveness detection model is trained so that the liveness detection model learns how to distinguish whether a palm skeletal joint image is a live palm skeletal joint image based on the features in the palm skeletal joint image, thereby improving the accuracy of the liveness detection model. Furthermore, the trained liveness detection model is subsequently used in practical applications for liveness detection, thereby improving the convenience and efficiency of liveness detection of palm skeletal joint images.
[0165] Figure 9 is an architecture diagram of a liveness detection method provided in an embodiment of the present application. As shown in Figure 9, the liveness detection method provided in an embodiment of the present application can be divided into three stages from the perspective of the entire architecture, namely, the model training stage, the model usage stage, and the model tuning stage.
[0166] The model training phase includes the training process of the super-resolution model and the training process of the liveness detection model. The training process of the super-resolution model is based on a dataset of low-resolution palm bone joint images and high-resolution palm bone joint images. After initializing the network structure and network parameters of the super-resolution model, the dataset is used to train the super-resolution model, and the network parameters of the super-resolution model are adjusted using methods such as backpropagation algorithm and stochastic gradient descent. The training process of the liveness detection model is based on a dataset of palm bone joint images and corresponding label results. After initializing the network structure and network parameters of the liveness detection model, the dataset is used to train the liveness detection model, and the network parameters of the liveness detection model are adjusted using methods such as backpropagation algorithm and stochastic gradient descent.
[0167] During the model's usage phase, the user's palm is scanned with a palm scanning device, which captures images of the palm's skeletal joints. These images are then transmitted via the network to a backend server, which hosts a trained super-resolution model and liveness detection model. The server inputs the palm's skeletal joint images into the super-resolution model, which outputs higher-resolution images. This higher-resolution image is then input into the liveness detection model, which outputs a discrimination result.
[0168] During the model tuning stage, if it is found that the discrimination results output by the liveness detection model are inconsistent with the actual label results of the palm bone joint image, that is, the liveness detection model has made a detection error, the palm bone joint image with the error and the corresponding label results can be combined into a new data set, and the new data set can be used to continue training and tuning the liveness detection model to improve the generalization ability and accuracy of the liveness detection model.
[0169] FIG10 is a schematic diagram of the structure of a living body detection device provided in an embodiment of the present application. Referring to FIG10 , the device includes:
[0170] An image acquisition module 1001 is configured to acquire a first palmar skeleton joint image, where the first palmar skeleton joint image includes palmar bones and joint soft tissues between the palmar bones.
[0171] a super-resolution processing module 1002 for performing super-resolution processing on the first palm bone joint image to obtain a second palm bone joint image, wherein the resolution of the second palm bone joint image is greater than the resolution of the first palm bone joint image;
[0172] A liveness detection module 1003 is used to obtain palm features corresponding to the second palm bone joint image;
[0173] The liveness detection module 1003 is also used to determine a discrimination result based on palm features. The discrimination result is used to indicate whether the first palm bone joint image is a live palm bone joint image. The live palm bone joint image refers to a palm bone joint image obtained by photographing a real palm.
[0174] The liveness detection device provided in the embodiment of the present application uses the palm bones and joint soft tissues in the palm bone joint image to perform liveness detection of the palm. Since the palm bones and joint soft tissues of the real palm are extremely complex, it is difficult to imitate the palm bones and joint soft tissues. The difference between the imitated non-live palm bone joint image and the real live palm bone joint image is large. Therefore, the accuracy of liveness detection using the palm bone joint image is high. Considering that the palm bone joint image contains more detailed information, the palm bone joint image is additionally super-resolution processed to obtain a palm bone joint image with higher resolution. The palm bone joint image with higher resolution is used for liveness detection, so that the liveness detection process does not ignore the detailed information, thereby further improving the accuracy of liveness detection.
[0175] Optionally, the super-resolution model includes a first feature extraction network, a feature mapping network, and an image reconstruction network; and the super-resolution processing module 1002 is configured to:
[0176] Obtaining a first image feature corresponding to the first palm bone joint image through a first feature extraction network;
[0177] Mapping the first image feature to a second image feature through a feature mapping network, where the number of dimensions of the second image feature is greater than the number of dimensions of the first image feature;
[0178] The second palm bone joint image is reconstructed based on the second image features through the image reconstruction network.
[0179] Optionally, referring to FIG11 , the apparatus further includes a first training module 1004 configured to:
[0180] Acquire a first sample palm bone joint image and a second sample palm bone joint image, wherein the content of the first sample palm bone joint image and the content of the second sample palm bone joint image are the same, and the resolution of the second sample palm bone joint image is greater than the resolution of the first sample palm bone joint image;
[0181] Obtaining, through a first feature extraction network, first sample image features corresponding to the first sample palm bone joint image;
[0182] Mapping the first sample image feature to a second sample image feature through a feature mapping network, where the number of dimensions of the second sample image feature is greater than the number of dimensions of the first sample image feature;
[0183] Reconstructing and predicting the palm bone joint image based on the second sample image features through the image reconstruction network;
[0184] A super-resolution model is trained based on the predicted palm skeleton joint image and the second sample palm skeleton joint image.
[0185] Optionally, the first training module 1004 is configured to:
[0186] Determining a first loss value based on a difference between the predicted palm bone joint image and the second sample palm bone joint image, where the first loss value is positively correlated with the difference;
[0187] Based on the first loss value, the super-resolution model is trained so that the first loss value obtained by the trained super-resolution model is reduced.
[0188] Optionally, the liveness detection model includes a second feature extraction network and a classification network;
[0189] The step of obtaining palm features corresponding to the second palm bone joint image is performed by a second feature extraction network;
[0190] The step of determining the discrimination result based on the palm features is performed by the classification network.
[0191] Optionally, referring to FIG11 , the apparatus further includes a second training module 1005 for:
[0192] Obtaining a third sample palm bone joint image and a sample label result, where the sample label result is used to indicate whether the third sample palm bone joint image is a true result of a living palm bone joint image;
[0193] Obtaining sample palm features corresponding to the third sample palm bone joint image through the second feature extraction network;
[0194] Determining a prediction result based on the sample palm features through a classification network, where the prediction result is used to indicate whether the third sample palm bone and joint image is a prediction result of a living person's palm bone and joint image;
[0195] Based on the predicted discrimination results and sample label results, the liveness detection model is trained.
[0196] Optionally, the second training module 1005 is configured to:
[0197] Acquire an original palm bone joint image, where the original palm bone joint image is an image that has not been processed with super-resolution;
[0198] The original palm bone joint image is determined as the third sample palm bone joint image; or, the original palm bone joint image is super-resolution processed to obtain the third sample palm bone joint image.
[0199] Optionally, the second training module 1005 is configured to:
[0200] When the prediction and discrimination result is consistent with the sample label result, the first value is determined as the second loss value; when the prediction and discrimination result is inconsistent with the sample label result, the second value is determined as the second loss value, and the second value is greater than the first value;
[0201] Based on the second loss value, the living body detection model is trained so that the second loss value obtained by the trained living body detection model is reduced.
[0202] Optionally, referring to FIG11 , the device further includes:
[0203] The label result acquisition module 1006 is used to obtain the label result of the first palm bone joint image, and the label result is used to indicate whether the first palm bone joint image is a true result of a living body palm bone joint image;
[0204] A training sample determination module 1007 is configured to determine, when the discrimination result and the label result are inconsistent, the first palm bone joint image and the label result as a training sample, or the second palm bone joint image and the label result as a training sample;
[0205] The second training module 1005 is used to train a living body detection model based on training samples.
[0206] Optionally, the image acquisition module 1001 is used to capture the palm through an X-ray camera, a magnetic resonance imaging device or an ultrasonic imaging device to obtain the first palm bone joint image.
[0207] It should be noted that the liveness detection device provided in the above embodiment is merely an example of the division of the functional modules described above. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the liveness detection device provided in the above embodiment and the liveness detection method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0208] An embodiment of the present application further provides a computer device, which includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the operations performed in the liveness detection method of the above embodiment.
[0209] Optionally, the computer device is provided as a terminal. FIG12 shows a schematic diagram of the structure of a terminal 1200 provided in an exemplary embodiment of the present application. The terminal 1200 includes: a processor 1201 and a memory 1202.
[0210] The processor 1201 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. The processor 1201 may be implemented in at least one hardware form selected from the group consisting of a DSP (Digital Signal Processing), an FPGA (Field Programmable Gate Array), and a PLA (Programmable Logic Array). In some embodiments, the processor 1201 may also include an AI (Artificial Intelligence) processor configured to handle computational operations related to machine learning.
[0211] Memory 1202 may include one or more computer-readable storage media, which may be non-transitory. In some embodiments, the non-transitory computer-readable storage medium in memory 1202 is used to store at least one computer program, which is used by processor 1201 to implement the liveness detection method provided in the method embodiment of the present application.
[0212] In some embodiments, terminal 1200 may optionally include a peripheral device interface 1203 and at least one peripheral device. Processor 1201, memory 1202, and peripheral device interface 1203 may be connected via a bus or signal lines. Each peripheral device may be connected to peripheral device interface 1203 via a bus, signal lines, or circuit boards. Optionally, the peripheral device includes at least one of a radio frequency circuit 1204, a display screen 1205, a camera assembly 1206, an audio circuit 1207, and a power supply 1208.
[0213] The peripheral device interface 1203 may be used to connect at least one I / O (Input / Output)-related peripheral device to the processor 1201 and the memory 1202 .
[0214] RF circuit 1204 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. RF circuit 1204 communicates with communication networks and other communication devices using electromagnetic signals. RF circuit 1204 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals.
[0215] Display screen 1205 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1205 is a touch screen display, display screen 1205 is also capable of collecting touch signals on or above the surface of display screen 1205. The touch signals can be input as control signals to processor 1201 for processing. In this case, display screen 1205 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards.
[0216] The camera assembly 1206 is used to capture images or videos. Optionally, the camera assembly 1206 includes a front camera and a rear camera. The front camera is set on the front panel of the terminal 1200, and the rear camera is set on the back of the terminal 1200.
[0217] Audio circuit 1207 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and converts the sound waves into electrical signals that are input to processor 1201 for processing, or input to RF circuit 1204 for voice communication. The speaker is used to convert electrical signals from processor 1201 or RF circuit 1204 into sound waves. In some embodiments, audio circuit 1207 may also include a headphone jack.
[0218] Power supply 1208 is used to power various components in terminal 1200. Power supply 1208 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 1208 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0219] In some embodiments, the terminal 1200 further includes one or more sensors 1209 , including but not limited to: an acceleration sensor 1210 , a gyroscope sensor 1211 , a pressure sensor 1212 , an optical sensor 1213 , and a proximity sensor 1214 .
[0220] The acceleration sensor 1210 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 1200. For example, the acceleration sensor 1210 can be used to detect the components of gravity acceleration on the three coordinate axes.
[0221] The gyroscope sensor 1211 can detect the orientation and rotation angle of the terminal 1200. It can also work with the accelerometer 1210 to collect the user's 3D movements on the terminal 1200. Based on the data collected by the gyroscope sensor 1211, the processor 1201 can implement the following functions: motion sensing (for example, changing the UI based on the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0222] The pressure sensor 1212 can be provided on the side frame of the terminal 1200 and / or below the display screen 1205. When the pressure sensor 1212 is provided on the side frame of the terminal 1200, it can detect the user's gripping signal of the terminal 1200. The processor 1201 performs left and right hand recognition or shortcut operations based on the gripping signal collected by the pressure sensor 1212. When the pressure sensor 1212 is provided below the display screen 1205, the processor 1201 controls the operable controls on the UI interface based on the user's pressure operation on the display screen 1205. Operable controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0223] Optical sensor 1213 is used to detect ambient light intensity. In one embodiment, processor 1201 can control the display brightness of display screen 1205 based on the ambient light intensity detected by optical sensor 1213. Optionally, when the ambient light intensity is high, the display brightness of display screen 1205 is increased; when the ambient light intensity is low, the display brightness of display screen 1205 is decreased. In another embodiment, processor 1201 can also dynamically adjust the shooting parameters of camera assembly 1206 based on the ambient light intensity detected by optical sensor 1213.
[0224] Proximity sensor 1214, also known as a distance sensor, is provided on the front panel of terminal 1200. Proximity sensor 1214 is used to detect the distance between the user and the front of terminal 1200. In one embodiment, when proximity sensor 1214 detects that the distance between the user and the front of terminal 1200 is gradually decreasing, processor 1201 controls display screen 1205 to switch from the screen-on state to the screen-off state. When proximity sensor 1214 detects that the distance between the user and the front of terminal 1200 is gradually increasing, processor 1201 controls display screen 1205 to switch from the screen-off state to the screen-on state.
[0225] Those skilled in the art will understand that the structure shown in FIG12 does not constitute a limitation on the terminal 1200 , and the terminal 1200 may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0226] Optionally, the computer device is provided as a server. Figure 13 is a structural diagram of a server provided in an embodiment of the present application. The server 1300 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 1301 and one or more memories 1302, wherein the memory 1302 stores at least one computer program, and the at least one computer program is loaded and executed by the processor 1301 to implement the methods provided in the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The server may also include other components for implementing device functions, which will not be described in detail here.
[0227] An embodiment of the present application further provides a computer-readable storage medium, which stores at least one computer program. The at least one computer program is loaded and executed by a processor to implement the operations performed by the liveness detection method of the above embodiment.
[0228] An embodiment of the present application further provides a computer program product, including a computer program, which is loaded and executed by a processor to implement the operations performed by the liveness detection method of the above embodiment.
[0229] The present application also provides a palm scanning device, which includes:
[0230] X-ray camera, magnetic resonance imaging equipment or ultrasound imaging equipment for obtaining images of palm bone joints;
[0231] The radio frequency circuit is used to send palm bone joint images to a server, and the server is used to perform liveness detection based on the palm bone joint images.
[0232] The process of the server performing liveness detection based on the palm bone joint image is detailed in the above embodiment and will not be repeated here.
[0233] Optionally, the palm scanning device includes an X-ray camera;
[0234] The X-ray camera includes: a light emitting component and an imaging component;
[0235] The light emitting component is located at the upper part, and the imaging component is located at the lower part, with a space between the light emitting component and the imaging component;
[0236] The light emitting component is used to emit X-rays downwards to penetrate the palm located between the light emitting component and the imaging component;
[0237] The imaging component is used to receive X-rays that penetrate the palm and form an image to obtain an image of the palm bone joints.
[0238] For example, the structure of an X-ray camera is shown in FIG4 .
[0239] Optionally, the embodiment of the present application is applied to a palm payment scenario, and the palm scanning device is a palm payment device. When the user needs to pay, he places his palm in the space between the light-emitting component and the imaging component. Then, in the palm payment device, the light-emitting component emits X-rays downward, penetrating the palm located between the light-emitting component and the imaging component. The imaging component receives the X-rays after penetrating the palm and forms an image to obtain a palm bone joint image. The palm bone joint image is then sent to the server through the radio frequency circuit. After the server obtains the palm bone joint image, it performs super-resolution processing on the palm bone joint image to obtain a palm bone joint image with a higher resolution, obtains the palm features corresponding to the palm bone joint image with a higher resolution, and determines the discrimination result based on the palm features. If the discrimination result indicates that the palm bone joint image is a live palm bone joint image, identity recognition is performed based on the palm bone joint image to determine the user's account number, and the fee is paid from the user's account number. If the identification result indicates that the palm bone joint image is a non-living palm bone joint image, an identification error message is sent to the palm payment device, and the palm payment device displays the identification error message to prompt the user that the palm recognition has not passed.
[0240] In addition, the embodiments of the present application can also be applied to other scenarios, and the palm scanning device can be a device for realizing other functions besides palm payment. The embodiments of the present application do not limit the application scenarios of the palm scanning device. For example, in the scenario of opening the access control system with the palm, the palm scanning device is the verification device of the access control system. When the user needs to open the access control system, the palm scanning device scans the palm. After the palm scanning device obtains the palm bone joint image, it sends the palm bone joint image to the server. After the server obtains the palm bone joint image, it performs super-resolution processing on the palm bone joint image to obtain a palm bone joint image with a higher resolution, obtains the palm features corresponding to the palm bone joint image with a higher resolution, and then determines the discrimination result based on the palm features. If the discrimination result indicates that the palm bone joint image is a living palm bone joint image, identity recognition is performed based on the palm bone joint image to determine that the user is a user allowed to enter the access control system, and then the door lock of the access control system is opened. If the identification result indicates that the palm bone joint image is a non-living palm bone joint image, an identification error message is sent to the palm payment device, and the palm payment device displays or plays the identification error message to prompt the user that the palm recognition has not passed.
[0241] Optionally, the palm scanning device may further include a display screen. After the user places the palm in the space between the light-emitting component and the imaging component, an identification message, such as a recognition success message or a recognition failure message, may be displayed on the display screen so that the user can understand the recognition result.
[0242] Optionally, the palm scanning device may further include a camera component, which may capture images of the user, such as a face image or an iris image, and perform operations such as identity recognition and payment based on the captured images.
[0243] Optionally, the palm scanning device may further include an audio circuit, which includes a microphone. The microphone may be used to collect the user's voice, thereby performing voiceprint recognition based on the collected voice, so as to perform identity recognition, payment and other operations based on the recognized voiceprint.
[0244] Optionally, the palm scanning device may further include an audio circuit, which includes a speaker, through which voice messages may be played. For example, after recognizing the user's palm bone joint image, an identification message, such as a recognition success message or a recognition failure message, may be played through the speaker.
[0245] In addition, the palm scanning device may also include other components, such as one or more components shown in FIG. 12 , etc., which is not limited in the embodiment of the present application.
[0246] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0247] The above description is merely an optional embodiment of the embodiments of the present application and is not intended to limit the embodiments of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the embodiments of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for detecting a living body, the method comprising: The computer device acquires a first palm bone joint image, wherein the first palm bone joint image includes palm bones and joint soft tissues between the palm bones; The computer device performs super-resolution processing on the first palm bone joint image to obtain a second palm bone joint image, wherein the resolution of the second palm bone joint image is greater than the resolution of the first palm bone joint image; The computer device acquires palm features corresponding to the second palm bone joint image; The computer device determines a discrimination result based on the palm feature, and the discrimination result is used to indicate whether the first palm bone joint image is a living palm bone joint image, and the living palm bone joint image refers to a palm bone joint image obtained by photographing a real palm.
2. The method according to claim 1, wherein: The super-resolution model includes a first feature extraction network, a feature mapping network and an image reconstruction network; the computer device performs super-resolution processing on the first palm bone joint image to obtain a second palm bone joint image, including: The computer device obtains a first image feature corresponding to the first palm bone joint image through the first feature extraction network; The computer device maps the first image feature to a second image feature through the feature mapping network, wherein the number of dimensions of the second image feature is greater than the number of dimensions of the first image feature; The computer device reconstructs the second palm bone joint image based on the second image features through the image reconstruction network.
3. The method according to claim 2, wherein: The training process of the super-resolution model includes: Acquire a first sample palm bone joint image and a second sample palm bone joint image, wherein the content of the first sample palm bone joint image is the same as the content of the second sample palm bone joint image, and the resolution of the second sample palm bone joint image is greater than the resolution of the first sample palm bone joint image; Acquire, through the first feature extraction network, first sample image features corresponding to the first sample palm bone joint image; Mapping the first sample image feature to a second sample image feature through the feature mapping network, wherein the number of dimensions of the second sample image feature is greater than the number of dimensions of the first sample image feature; Reconstructing a predicted palm bone joint image based on the second sample image features through the image reconstruction network; The super-resolution model is trained based on the predicted palm bone joint image and the second sample palm bone joint image.
4. The method according to claim 3, wherein: The step of training the super-resolution model based on the predicted palm bone joint image and the second sample palm bone joint image comprises: Determine a first loss value based on a difference between the predicted palm bone joint image and the second sample palm bone joint image, wherein the first loss value is positively correlated with the difference; Based on the first loss value, the super-resolution model is trained to reduce the first loss value obtained by the trained super-resolution model.
5. The method according to any one of claims 1 to 4, wherein: The liveness detection model includes a second feature extraction network and a classification network; The step of obtaining, by the computer device, palm features corresponding to the second palm bone joint image is performed by the second feature extraction network; The step of determining the identification result based on the palm feature by the computer device is performed by the classification network.
6. The method according to claim 5, wherein: The training process of the living body detection model includes: Acquire a third sample palm bone joint image and a sample label result, wherein the sample label result is used to indicate whether the third sample palm bone joint image is a true result of a living body palm bone joint image; Acquire, through the second feature extraction network, sample palm features corresponding to the third sample palm bone joint image; Determining a prediction result based on the sample palm features through the classification network, wherein the prediction result is used to indicate whether the third sample palm bone joint image is a prediction result of a living body palm bone joint image; Based on the prediction and discrimination results and the sample label results, the living body detection model is trained.
7. The method according to claim 6, wherein: The step of acquiring a third sample palm bone joint image comprises: Acquire an original palm bone joint image, wherein the original palm bone joint image is an image that has not been processed by super resolution; The original palm bone joint image is determined as the third sample palm bone joint image; or, the original palm bone joint image is subjected to super-resolution processing to obtain the third sample palm bone joint image.
8. The method according to claim 6 or 7, wherein: The step of training the living body detection model based on the prediction and discrimination results and the sample label results includes: When the prediction and discrimination result is consistent with the sample label result, the first value is determined as the second loss value; when the prediction and discrimination result is inconsistent with the sample label result, the second value is determined as the second loss value, and the second value is greater than the first value; Based on the second loss value, the living body detection model is trained so that the second loss value obtained by the trained living body detection model is reduced.
9. The method according to any one of claims 5 to 8, wherein: After determining the identification result based on the palm feature, the method further includes: Obtaining a label result of the first palm bone joint image, wherein the label result is used to indicate whether the first palm bone joint image is a true result of a living body palm bone joint image; In the case that the discrimination result is inconsistent with the label result, determining the first palm bone joint image and the label result as a training sample, or determining the second palm bone joint image and the label result as a training sample; Based on the training samples, the living body detection model is trained.
10. The method according to any one of claims 1 to 9, wherein: The computer device acquires a first palm bone joint image, including: The computer device collects the palm through an X-ray camera, a magnetic resonance imaging device or an ultrasonic imaging device to obtain the first palm bone joint image.
11. A living body detection device, comprising: An image acquisition module, used for acquiring a first palm bone joint image, wherein the first palm bone joint image includes palm bones and joint soft tissues between the palm bones; A super-resolution processing module, used for performing super-resolution processing on the first palm bone joint image to obtain a second palm bone joint image, wherein the resolution of the second palm bone joint image is greater than the resolution of the first palm bone joint image; A liveness detection module, used for acquiring palm features corresponding to the second palm bone joint image; The liveness detection module is also used to determine a discrimination result based on the palm features, and the discrimination result is used to indicate whether the first palm bone joint image is a live palm bone joint image, and the live palm bone joint image refers to a palm bone joint image obtained by photographing a real palm.
12. A computer device, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the operations performed by the liveness detection method according to any one of claims 1 to 10.
13. A computer-readable storage medium, wherein at least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by a processor to implement the operations performed by the liveness detection method according to any one of claims 1 to 10.
14. A computer program product, comprising a computer program, wherein the computer program is loaded and executed by a processor to implement the operations performed by the liveness detection method according to any one of claims 1 to 10.
15. A palm scanning device, comprising: X-ray camera, magnetic resonance imaging device or ultrasound imaging device for obtaining images of palm bone joints; The radio frequency circuit is used to send the palm bone joint image to a server, and the server is used to perform liveness detection based on the palm bone joint image.
16. The palm scanning device according to claim 15, characterized in that: The palm scanning device includes the X-ray camera; The X-ray camera comprises: a light emitting component and an imaging component; The light emitting component is located at the upper part, the imaging component is located at the lower part, and there is a space between the light emitting component and the imaging component; The light emitting component is used to emit X-rays downwards to penetrate the palm between the light emitting component and the imaging component; The imaging component is used to receive the X-rays that penetrate the palm and form an image to obtain the palm bone joint image.
Citation Information
Patent Citations
Image processing method and device, computer equipment and storage medium
CN112801057A
Super-resolution reconstruction method based on attention mechanism
CN113706386A
Monocular-camera-based hand space interaction method and device for small target
CN115083016A
Identity recognition method and device, computer equipment and storage medium
CN116226817A
Palm feature processing method and device for identity authentication, equipment and medium
CN116758590A
Cited By
Living body verification method, device and equipment for medical service system and medium
CN122695694A