Living body detection method and device, electronic equipment, storage medium and program product
By analyzing the time-frequency diagram of the ultrasonic echo signal and identifying the energy distribution of the preset actions, it solves the problems of low efficiency and low accuracy of living body detection in the existing technology, achieves efficient and accurate living body detection, and prevents the forgery of identity features. use.
Patent Information
- Application Number
- CN202410659642.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2024-09-17
AI Technical Summary
Existing technologies are inefficient and low-precision in liveness detection, especially when facing forged identity features, it is difficult to effectively detect, and the use of multiple modalities requires more computing resources and data transmission.
By obtaining the ultrasonic echo signal of the detection object, determining its first time-frequency diagram, and identifying the preset actions performed by the detection object based on the energy information of the time-frequency diagram, using a single-modal time-frequency image sequence to determine the living body detection result, saving Computing and data transmission resources.
It improves the efficiency and accuracy of liveness detection, effectively prevents the threat of forged identity features, and reduces the consumption of computing resources.
Smart Images

Figure CN118657977A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of liveness recognition, and in particular to a liveness detection method, device, electronic device, storage medium and program product. Background Art
[0002] Authentication systems based on deep neural network technology have been widely used in various applications. During the identity authentication process, identity features can be forged through means such as photos, paper or electronic screen playback for identity authentication. For example, identity forgery detection can be performed based on means such as two-dimensional image pixel texture analysis. Summary of the invention
[0003] The embodiments of the present application provide a liveness detection method, device, electronic device, storage medium and program product, which can save computing resources in the liveness detection process and thus improve the efficiency and accuracy of liveness detection.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] An embodiment of the present application provides a liveness detection method, the method comprising: acquiring an ultrasonic echo signal collected when performing liveness detection on a detection object, and determining a first time-frequency graph of the ultrasonic echo signal, the first time-frequency graph comprising energy information of the ultrasonic echo signal; determining a time-frequency image sequence from the first time-frequency graph according to the energy information in the first time-frequency graph, the time-frequency image sequence comprising time-frequency images when the detection object performs a preset action; and determining a liveness detection result of the detection object based on the time-frequency image sequence.
[0006] An embodiment of the present application provides a living body detection device, including: a time-frequency diagram determination module, used to obtain an ultrasonic echo signal collected when performing living body detection on a detection object, and determine a first time-frequency diagram of the ultrasonic echo signal, wherein the first time-frequency diagram includes energy information of the ultrasonic echo signal; an image sequence determination module, used to determine a time-frequency image sequence from the first time-frequency diagram according to the energy information in the first time-frequency diagram, wherein the time-frequency image sequence includes time-frequency images when the detection object performs a preset action; and a detection module, used to determine a living body detection result of the detection object based on the time-frequency image sequence.
[0007] An embodiment of the present application provides an electronic device, which includes: a memory for storing computer-executable instructions or computer programs; and a processor for executing the computer-executable instructions or computer programs stored in the memory to implement the liveness detection method provided in the embodiment of the present application.
[0008] An embodiment of the present application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the liveness detection method provided in the embodiment of the present application when executed by a processor.
[0009] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, the liveness detection method provided in the embodiment of the present application is implemented.
[0010] The embodiments of the present application have the following beneficial effects:
[0011] When the detection object is subjected to liveness detection, the first time-frequency diagram of the collected ultrasonic signal can be determined. Since the detection object is a living body, in the process of identity authentication through liveness recognition, the detection object will follow the instruction of identity authentication to perform the preset action, resulting in the detection object and the emission source of the ultrasonic echo signal moving relative to each other, so the Doppler shift phenomenon will occur. The manifestation of the Doppler shift phenomenon on the first time-frequency diagram is the increase in the energy of the ultrasonic echo signal in the time-frequency image when the detection object performs the preset action. When the detection object is a non-living body, such as a photo or video, the Doppler shift phenomenon will not occur. Therefore, the time-frequency image sequence when the detection object performs the preset action can be determined according to the energy information in the first time-frequency diagram, and the liveness detection result can be obtained based on the time-frequency image sequence. The embodiment of the present application uses the energy distribution of a single mode in the first time-frequency diagram to identify the time-frequency image corresponding to the preset action, so as to determine the liveness detection result of the detection object, save computing and data transmission resources, and thus improve the detection efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is a structural diagram of the liveness detection system architecture provided in an embodiment of the present application;
[0013] Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0014] Figure 3 It is a first flow chart of the liveness detection method provided in an embodiment of the present application;
[0015] Figure 4 is a second flow chart of the liveness detection method provided in an embodiment of the present application;
[0016] Figure 5 is a third flow chart of the liveness detection method provided in an embodiment of the present application;
[0017] Figure 6 4 is a schematic diagram of a fourth process of a liveness detection method provided in an embodiment of the present application;
[0018] Figure 7 It is a schematic diagram of the training process of the living body detection model provided in the embodiment of the present application;
[0019] Figure 8 is a time-frequency diagram calculated from the collected ultrasonic echo signal provided in the embodiment of the present application;
[0020] Fig. 9 This is a time-frequency diagram after shielding the center frequency area provided in an embodiment of the present application.
[0021] It should be pointed out that the above-mentioned "first", "second", "third" and "fourth" are only used to distinguish different solutions, and do not represent the degree of superiority or inferiority of the solutions or the priority in the implementation process. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0023] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0024] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0025] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0026] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0027] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant laws and regulations when applied in examples, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the personal information subject.
[0028] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0029] 1) Liveness detection: also known as liveness recognition, is a technology that identifies whether an object is a living person rather than a machine. Liveness recognition methods generally include silent liveness, digital liveness, colorful liveness, motion liveness, etc.
[0030] 2) Time-frequency diagram: It is an image used to represent the changes of a signal in time and frequency. It usually segments the signal in time through methods such as short-time Fourier transform (STFT) and analyzes the frequency components in each time period to show the frequency changes of the signal over time.
[0031] 3) Energy value: In the time-frequency diagram, the energy value indicates the energy of the signal in different time periods and frequency ranges, reflecting the intensity or power distribution of the signal in the time-frequency domain.
[0032] 4) Doppler shift phenomenon: refers to the phenomenon that the frequency of the signal changes when the signal transceiver moves relative to the observer. This frequency change will cause the energy value of the signal in the time-frequency diagram to increase, because the change in frequency will make the energy distribution of the signal in the time-frequency diagram wider, thereby increasing the energy value.
[0033] 5) 3D Convolutional Neural Network Model: A deep learning model for processing three-dimensional data. Unlike traditional two-dimensional convolutional neural networks, the 3D convolutional neural network model can effectively process data with a time dimension, such as videos, medical images, meteorological data, etc. This model can better capture the three-dimensional features and correlations in the data when processing spatiotemporal information, thereby improving the analysis and recognition capabilities of three-dimensional data.
[0034] 6) Single modality: refers to the existence of only one type or form of pattern or feature in a system or data set. For example, in the embodiment of the present application, single modality means using only one type of data for liveness detection.
[0035] In the related art, the face identity authentication system based on deep neural network technology has been widely used in various applications. For financial business-related systems, when authenticating for applications such as banking, payment, and lending, the identity characteristics of the object can be forged by using photos, paper, or electronic screen playback, breaking through the face identity authentication system and threatening the property safety of the object. Forgery detection can be performed using means based on two-dimensional image pixel texture analysis, but it is difficult to detect high-definition screen display attacks due to limitations such as ambient light and pixel texture. In order to solve the above problems, the related art emits ultrasonic waves through the mobile phone speaker and analyzes the reflected echo received by the microphone to determine whether the current identity authentication scene is an attack. However, another modal data is generally required to assist in identifying the time-frequency map area of the corresponding action in the time-frequency map of the ultrasonic echo, such as identification through the sound of the object speaking. In the related art, the use of multiple modalities requires more data transmission, and the consistency of the two modalities in the time domain must be guaranteed, and the efficiency of liveness detection is low; and after obtaining the time-frequency map area of the corresponding action, the convolutional network of the two-dimensional image is used for training, and the accuracy of liveness detection is low.
[0036] Based on the problems existing in the related technology, the embodiments of the present application provide a liveness detection method, device, electronic device, storage medium and program product. The method is a liveness detection method for acoustic signals based on timing and feature selection, which can improve the accuracy of liveness detection and save computing resources in the liveness detection process, thereby improving the efficiency of liveness detection.
[0037] Among them, in the liveness detection method provided in the embodiment of the present application, first, the ultrasonic echo signal collected when the liveness detection is performed on the detection object is obtained, and the first time-frequency diagram of the ultrasonic echo signal is determined, and the first time-frequency diagram includes the energy information of the ultrasonic echo signal; then, according to the energy information in the first time-frequency diagram, the time-frequency image sequence is determined from the first time-frequency diagram, and the time-frequency image sequence includes the time-frequency images when the detection object performs a preset action; finally, based on the time-frequency image sequence, the liveness detection result of the detection object is determined.
[0038] The following describes an exemplary application of a liveness detection device provided in an embodiment of the present application, which is an electronic device for implementing a liveness detection method. The electronic device provided in an embodiment of the present application can be implemented as various types of terminals such as a laptop computer, a tablet computer, a desktop computer, a set-top box, a smart phone, an intelligent speaker, a smart watch, a smart TV, and a vehicle-mounted terminal, or it can be implemented as a server. Among them, the server can be an independent physical server, or it can be a server cluster or a distributed system composed of multiple physical servers, or it can be 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, content distribution networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. The terminal and the server can be directly or indirectly connected by wired or wireless communication, which is not limited in the embodiment of the present application. Below, an exemplary application of the liveness detection device when it is implemented as a terminal or a server will be described.
[0039] See also Figure 1 , Figure 1 It is a schematic diagram of the architecture of the liveness detection system provided in the embodiment of the present application. In order to perform the liveness detection operation, a liveness detection application can be provided, such as the liveness detection application can be an application dedicated to liveness detection, or it can be a functional module in other applications (such as a liveness detection module in a payment application, etc.). The liveness detection system 100 in the embodiment of the present application includes at least a terminal 400, a network 300 and a server 200, wherein the server 200 is a server of the liveness detection application. The server 200 can constitute the liveness detection device of the embodiment of the present application, that is, the liveness detection method of the embodiment of the present application is implemented by the server 200. The terminal 400 is connected to the server 200 via the network 300, and the network 300 can be a wide area network or a local area network, or a combination of the two.
[0040] See also Figure 1, the user can perform interactive operations on the client of the liveness detection application through the terminal 400, and the interactive operation can be, for example, clicking to perform liveness detection operations. After the client receives the interactive operation of the user, the terminal 400 displays prompt information on the client of the liveness detection application for prompting the user to perform a preset action, and the user starts to perform the preset action according to the prompt information. At the same time, the terminal 400 collects ultrasonic echo signals to encapsulate the ultrasonic echo signals into a liveness detection request, and sends the liveness detection request to the server 200 through the network 300. After receiving the liveness detection request, the server 200 responds to the liveness detection request sent by the terminal, obtains the ultrasonic echo signals collected when performing liveness detection on the detection object, and determines the first time-frequency diagram of the ultrasonic echo signals, the first time-frequency diagram including the energy information of the ultrasonic echo signals; the server 200 determines the time-frequency image sequence from the first time-frequency diagram according to the energy information in the first time-frequency diagram, the time-frequency image sequence including the time-frequency images when the detection object performs the preset action; the server 200 determines the liveness detection result of the detection object based on the time-frequency image sequence. The server 200 may also send the liveness detection result to the terminal 400 to display the liveness detection result to the user.
[0041] In some embodiments, the terminal 400 itself may also perform the liveness detection method of the embodiment of the present application, that is, after the terminal 400 receives the interactive operation input by the user through the client, the terminal 400 obtains the ultrasonic echo signal collected when performing liveness detection on the detection object, and determines the first time-frequency graph of the ultrasonic echo signal, the first time-frequency graph includes energy information of the ultrasonic echo signal; the terminal 400 determines the time-frequency image sequence from the first time-frequency graph according to the energy information in the first time-frequency graph, the time-frequency image sequence includes the time-frequency image when the detection object performs a preset action; the terminal 400 determines the liveness detection result of the detection object based on the time-frequency image sequence. The terminal 400 displays the liveness detection result to the user.
[0042] The liveness detection method provided in the embodiment of the present application can also be implemented based on a cloud platform and through cloud technology. For example, the server 200 can be a cloud server. The cloud server responds to the liveness detection request sent by the terminal, obtains the ultrasonic echo signal collected when performing liveness detection on the detection object, and determines the first time-frequency graph of the ultrasonic echo signal; or, the cloud server determines the time-frequency image sequence from the first time-frequency graph according to the energy information in the first time-frequency graph; or, the cloud server determines the liveness detection result of the detection object based on the time-frequency image sequence.
[0043] It should be noted here that cloud technology refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to achieve data computing, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool that is used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data require strong system backing support, which can be achieved through cloud computing.
[0044] See also Figure 2 , Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, Figure 2 The electronic device shown may be a liveness detection device, which includes: at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in the terminal 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 440 is not described in detail. Figure 2 Various buses are labeled as bus system 440 .
[0045] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0046] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0047] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.
[0048] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0049] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0050] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0051] A network communication module 452, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Authentication (WiFi), and Universal Serial Bus (USB), etc.;
[0052] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., display screen, speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);
[0053] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.
[0054] In some embodiments, the liveness detection device provided in the embodiments of the present application can be implemented in software. Figure 2A liveness detection device 455 stored in a memory 450 is shown, which may be software in the form of a program and a plug-in, etc., and includes the following software modules: a time-frequency diagram determination module 4551, an image sequence determination module 4552, and a detection module 4553. These modules are logical, and therefore can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0055] In other embodiments, the liveness detection device provided in the embodiments of the present application can be implemented in hardware. As an example, the device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the liveness detection method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), digital signal processors (Digital Signal Processor, DSP), programmable logic devices (Programmable Logic Device, PLD), complex programmable logic devices (Complex Programmable Logic Device, CPLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other electronic components.
[0056] It should be noted that in the example of the liveness detection method below, the face recognition scenario is used as an example. Based on the understanding of the following text, those skilled in the art can apply the liveness detection method provided in the embodiment of the present application to other scenarios based on biometric technology, such as fingerprint recognition scenarios, iris recognition scenarios, voiceprint recognition scenarios, etc.
[0057] Figure 3 This is a first flow chart of the liveness detection method provided in the embodiment of the present application. Figure 3 The steps shown are explained as Figure 3 As shown, the liveness detection method is described by taking the execution subject of the server as an example, and the method includes the following steps S101 to S103:
[0058] Step S101, acquiring an ultrasonic echo signal collected when performing liveness detection on a detection object, and determining a first time-frequency diagram of the ultrasonic echo signal.
[0059] The first time-frequency diagram includes energy information of the ultrasonic echo signal. In the first time-frequency diagram, the horizontal axis is time, the vertical axis is frequency, and the energy information represents the energy distribution of the ultrasonic echo signal in different time periods and frequency ranges. The energy information includes energy values in different time periods and frequency ranges, reflecting the intensity distribution of the ultrasonic echo signal in the time-frequency domain.
[0060] Here, the detection object is a target or individual undergoing liveness detection, and identity authentication is achieved by identifying the biometric features of the detection object. However, the detection object can be a living body or a non-living body. For example, the detection object is a user who is using a mobile terminal for face recognition identity authentication. In the case of forged identity features, the detection object can also be a photo, video, etc. of the user. The ultrasonic echo signal is an ultrasonic signal emitted by the sound sending module (such as a speaker) of the mobile terminal at a fixed transmission frequency in the direction of the detection object at the beginning of the liveness detection. After being reflected by the detection object, it is collected by the sound collection module (such as a microphone) of the mobile terminal. The embodiment of the present application does not specifically limit the transmission frequency of the ultrasonic echo signal, and the transmission frequency can be between 16KHz and 22KHz, which can be set based on actual conditions. The first time-frequency diagram is an image used to represent the change of the ultrasonic echo signal in time and frequency. The first time-frequency diagram can be obtained by processing the ultrasonic echo signal based on the Fourier transform method. The energy information of the ultrasonic echo signal is the energy characteristic of the ultrasonic echo signal, reflecting the intensity or power of the ultrasonic echo signal.
[0061] Exemplarily, the detection object turns on face recognition in the terminal, and the preset action instructions are displayed on the client interface of the terminal. The detection object nods or shakes its head based on the preset action instructions. At the same time, the speaker of the terminal transmits an ultrasonic signal to the detection object at a transmission frequency of f=17200Hz. The ultrasonic signal is reflected by the detection object to obtain an ultrasonic echo signal, and the microphone of the terminal collects the ultrasonic echo signal. The ultrasonic echo signal is Fourier transformed to obtain a first time-frequency diagram with time as the horizontal axis and frequency as the vertical axis, and the color represents the energy information.
[0062] In some embodiments, the energy information includes a correspondence between energy values and frequencies. Figure 4 , Figure 4 The first time-frequency diagram of the ultrasonic echo signal determined in step S101 is shown, which can be implemented by the following steps S1011 to S1013:
[0063] Step S1011, performing Fourier transform processing on the ultrasonic echo signal to obtain a second time-frequency diagram.
[0064] Here, the second time-frequency diagram is a time-frequency diagram directly obtained after the ultrasonic echo signal is processed by Fourier transform. The energy information includes energy values in different time periods and frequency ranges, reflecting the intensity distribution of the ultrasonic echo signal in the time-frequency domain. The energy value is in the range of 0 to 1, and is represented by different colors in the time-frequency diagram. That is, different colors correspond to different values in the [0,1] interval. In the second time-frequency diagram, each row corresponds to the energy value of a frequency, and each column corresponds to the energy value of a time. The embodiment of the present application does not specifically limit the process of Fourier transform processing. For example, the ultrasonic echo signal can be preprocessed first, such as removing noise, filtering, enhancing signal quality, etc. The preprocessed ultrasonic echo signal is Fourier transformed, the ultrasonic echo signal is converted from the time domain to the frequency domain, and the energy values of the ultrasonic echo signal at different frequencies are provided to obtain spectrum information. Short-time Fourier transform (STFT) processing is performed according to the obtained spectrum information: the ultrasonic echo signal is segmented in time to obtain multiple time windows, and Fourier transform is applied to each time window to obtain a second time-frequency diagram.
[0065] Step S1012: acquiring the center frequency of the ultrasonic echo signal, and determining a first frequency interval based on the center frequency and a preset frequency error.
[0066] Here, the center frequency is the transmission frequency of the ultrasonic echo signal. The embodiment of the present application does not specifically limit the preset frequency error, and can be set based on actual needs. The first frequency interval is a frequency interval with the difference between the center frequency and the frequency error as the first boundary point and the sum of the center frequency and the frequency error as the second boundary point. For example, if the center frequency is f=17200Hz and the preset frequency error is 8Hz, the first frequency interval is [f-8, f+8], that is, [17192, 17208].
[0067] Step S1013: masking the first energy value in the first frequency interval in the second time-frequency graph to obtain a first time-frequency graph.
[0068] Here, shielding processing refers to setting the first energy value in the first frequency interval in the second time-frequency graph to 0, or a value lower than the preset value. The embodiment of the present application does not limit the preset value, and can be set based on actual needs. For example, the preset value can be 0.002, and the first energy value in the first frequency interval in the second time-frequency graph can be set to 0.001.
[0069] In the embodiment of the present application, since the center frequency has a high energy value, it is impossible to reflect the correspondence between the energy value and the action performed by the detection object during face recognition. Therefore, it is necessary to shield the energy value in the center frequency range to improve the matching degree between the time-frequency image in the first time-frequency graph and the preset action performed by the detection object, thereby improving the accuracy of liveness detection.
[0070] In an embodiment of the present application, in step S1013, the first energy value located in the first frequency interval in the second time-frequency graph is shielded to obtain the first time-frequency graph, which can be achieved in the following way: first, the second energy value located in the second frequency interval in the second time-frequency graph is obtained; the frequency interval of the second time-frequency graph includes the first frequency interval and the second frequency interval; then, the second energy value is normalized to obtain a third energy value; finally, the first energy value located in the first frequency interval is set to the first preset value, and the second energy value located in the second frequency interval is set to the third energy value to obtain the first time-frequency graph.
[0071] Here, the frequency interval of the second time-frequency graph is composed of the first frequency interval and the second frequency interval, that is, the first frequency interval and the second frequency interval are complementary. The second frequency interval is the other frequency intervals in the second time-frequency graph except the first frequency interval. For example, the frequency interval of the second time-frequency graph is [17170, 17230], the first frequency interval is [17192, 17208], then the second frequency interval is [17170, 17192]∪[17208, 17230]. The first preset value is 0, or a value lower than the preset value. The embodiment of the present application does not limit the preset value, and can be set based on actual needs. Since the first energy value located in the first frequency interval is higher than the second energy value located in the second frequency interval, and the maximum value of the second energy value is less than 1, it is necessary to normalize the second energy value to obtain the third energy value. The third energy value is the energy value located in the second frequency interval in the first time-frequency graph, and the value range is 0 to 1. It should be noted that the embodiment of the present application does not limit the method of normalization processing, for example, the minimum-maximum normalization method can be used.
[0072] In the embodiment of the present application, the first energy value located in the first frequency interval is set to 0, and the remaining second energy value located in the second frequency interval is normalized to obtain a first time-frequency diagram. This can improve the degree of matching between the time-frequency image in the first time-frequency diagram and the preset action performed by the detection object, thereby improving the accuracy of living body detection.
[0073] Step S102: determining a time-frequency image sequence from the first time-frequency image according to energy information in the first time-frequency image.
[0074] The time-frequency image sequence includes time-frequency images when the detection object performs a preset action.
[0075] Here, the time-frequency image is a time-frequency image corresponding to the ultrasonic echo signal reflected when the detection object performs a preset action. The time-frequency images can be sorted according to the time relationship to obtain a time-frequency image sequence. After the first time-frequency image is cut according to the time window, multiple images are obtained, and the image whose time window corresponds to the time when the detection object is performing the preset action is screened out from the multiple images, which is the time-frequency image. The preset action is a pre-defined action or action sequence in the liveness detection process, which can be used for biometric recognition. For example, when recognizing a face, the detection object is required to blink, shake his head, open his mouth, etc. according to the requirements of the preset action.
[0076] In some embodiments, the energy information includes the corresponding relationship between the energy value and time and frequency. Figure 5 , Figure 5 It is shown that in step S102, according to the energy information in the first time-frequency graph, the time-frequency image sequence is determined from the first time-frequency graph, which can be achieved by the following steps S1021 to S1025:
[0077] Step S1021: determining a plurality of sliding window images in the first time-frequency graph based on a preset time step and window length.
[0078] Here, the horizontal axis of the first time-frequency graph is time, and the time step is the interval length of cutting the first time-frequency graph with the horizontal axis. The window length is the time length of each sliding window image cut from the first time-frequency graph. The horizontal axis of the first time-frequency graph is cut based on the preset time step and window length to obtain multiple time periods. The sliding window image is a time-frequency graph corresponding to each time period, that is, the horizontal axis is the time period, and the vertical axis is the time-frequency graph of the frequency interval. For any time period, the sliding window image of the time period is used to represent the energy value distribution of the ultrasonic echo signal at different times and frequencies in the time period. It should be noted that the embodiment of the present application does not limit the time step and window length, and can be set based on actual conditions. For example, the total duration of the first time-frequency graph is T, the time step is T / 6, and the window length is T / 3. Then the multiple sliding window images are the time-frequency graphs corresponding to the [0, T / 3], [T / 6, T / 2], [T / 3, 2T / 3], [T / 2, 5T / 6], and [2T / 3, T] time periods.
[0079] Step S1022: for each sliding window image, based on the energy value included in the sliding window image, determine the average energy value corresponding to the sliding window image.
[0080] Here, for each sliding window image, the energy value corresponding to each time and frequency in the sliding window image can be obtained, and the multiple energy values are added and divided by the number of the multiple energy values to obtain the average energy value corresponding to the sliding window image. For example, there are 100 energy values in the sliding window image of the [0, T / 3] time period, then the 100 energy values are added and the sum is divided by 100, which is the average energy value corresponding to the sliding window image of the [0, T / 3] time period.
[0081] Step S1023: obtaining a preset energy threshold, and determining an average energy value greater than or equal to the energy threshold as a target energy value.
[0082] Here, after obtaining the average energy value corresponding to each sliding window image, the average energy values corresponding to the multiple sliding window images can be sorted from large to small, and the average energy values below the preset energy threshold are removed, and the remaining average energy values are determined as the target energy value. The preset energy threshold is not limited in the embodiment of the present application, for example, it can be 0.2. Since the detection object will produce relative motion with the terminal that transmits the ultrasonic signal when performing the preset action, the Doppler frequency shift phenomenon is caused. The Doppler frequency shift phenomenon will cause the energy value in the second time-frequency diagram to increase, so the height of the average energy value represents the size of the frequency shift in the sliding window image, that is, the area where the average energy value is less than the energy threshold can be considered as the area where the detection object does not perform the preset action.
[0083] Step S1024: determining the sliding window images corresponding to at least two target energy values as the time-frequency images when the detection object performs the preset action.
[0084] Here, after obtaining the sliding window images corresponding to the multiple target energy values, N sliding window images can be randomly selected from the multiple sliding window images to determine the time-frequency images when the detection object performs the preset action. N is an integer greater than or equal to 2.
[0085] Step S1025: acquiring time information included in the time-frequency image, arranging the time-frequency image according to the time information, and obtaining a time-frequency image sequence.
[0086] Here, the time information included in the time-frequency image is the time range on the horizontal axis of the time-frequency image, that is, the time interval. For any two time-frequency images, the minimum endpoint value of the time interval in one time-frequency image can be compared with the minimum endpoint value of the time interval in the other time-frequency image, and the time-frequency image with the smaller minimum endpoint value is arranged before the time-frequency image with the larger minimum endpoint value, so as to obtain a time-frequency image sequence.
[0087] In some embodiments, multiple time-frequency image sequences may be determined from multiple sliding window images. The number of time-frequency images in each time-frequency image sequence is the same, but the time-frequency images are different.
[0088] The embodiment of the present application uses the single modal energy information of the time-frequency diagram, that is, determines multiple sliding window images corresponding to the actions performed by the detection object, and simultaneously uses random screening and combination to perform data enhancement technology to determine the time-frequency image sequence from the multiple sliding window images, thereby improving the efficiency and accuracy of living body detection.
[0089] Step S103: determining a liveness detection result of the detection object based on the time-frequency image sequence.
[0090] Here, the time-frequency image sequence can be input into a pre-trained liveness detection model for image classification to obtain a liveness detection result of the detection object.
[0091] In an embodiment of the present application, in step S103, determining the liveness detection result of the detection object based on the time-frequency image sequence can be achieved in the following manner: first, extracting features of the time-frequency image sequence based on the liveness detection model to obtain an image feature sequence; the image feature sequence includes image feature vectors of the time-frequency images arranged in chronological order; then, identifying the image feature sequence to obtain a liveness prediction result, the liveness prediction result includes a first probability and a second probability, the first probability being the probability that the detection object is a live body, and the second probability being the probability that the detection object is a non-live body; finally, determining the liveness detection result according to the maximum probability of the first probability and the second probability.
[0092] For example, the liveness detection model is a 3D convolutional neural network model. The time-frequency image sequence is input into the liveness detection model, and the feature extraction layer in the liveness detection model extracts features from the time-frequency image sequence to obtain an image feature sequence. The image feature sequence includes a feature vector corresponding to each time-frequency image. Recognition processing of the image feature sequence refers to outputting a liveness prediction result after processing by a convolutional layer, a pooling layer, and a fully connected layer in the liveness detection model. The liveness prediction result includes a first probability that the detection object is alive and a second probability that the detection object is not alive. For example, if the first probability that the detection object is alive is 0.8 and the second probability that the detection object is not alive is 0.2, then the maximum probability is the first probability 0.8, that is, the liveness detection result is that the detection object is alive.
[0093] The embodiment of the present application uses a 3D convolutional neural network model as a liveness detection model, which utilizes the temporal relationship between multiple time-frequency images in a time-frequency image sequence. Compared with the information of a single time-frequency image in a two-dimensional model, it has an additional time dimension, which can improve the accuracy of liveness detection.
[0094] In some embodiments, the training process of the liveness detection model can be achieved through the following steps: first, obtain a sample time-frequency diagram and a sample label, the sample time-frequency diagram is generated based on the sample ultrasonic echo signal collected when performing liveness detection on the sample object, and the sample label is used to mark the liveness information of the sample object; then, according to the energy information in the sample time-frequency diagram, determine the sample image sequence from the sample time-frequency diagram, and the sample image sequence includes the sample time-frequency images when the sample object performs a preset action; then, predict the sample image sequence based on the liveness detection model to obtain the sample liveness prediction result of the sample object; finally, based on the sample liveness prediction result and the sample label, train the liveness detection model to obtain a trained liveness detection model.
[0095] In an embodiment of the present application, a 3D neural network model is selected as a liveness detection model to be trained. The sample object may be a living object or a non-living object. The method for obtaining the sample time-frequency graph may refer to the method for obtaining the first time-frequency graph in the above step S101, which will not be repeated here. The sample label may be the liveness information of the sample object manually pre-labeled. For example, if the sample object is a living object, the sample label is 1; if the sample object is a non-living object, the sample label is 0. The process of determining the sample image sequence from the sample time-frequency graph according to the energy information in the sample time-frequency graph may refer to the specific implementation process of determining the time-frequency image sequence from the first time-frequency graph according to the energy information in the first time-frequency graph in the above step S102, which will not be repeated here. The sample image sequence is predicted using the liveness detection model to be trained to obtain the sample liveness prediction result of the sample object. Based on the sample liveness prediction results and sample labels, the cross entropy loss results are calculated, and the liveness detection model is trained using optimization algorithms such as Stochastic Gradient Descent (SGD) and Adaptive Moment Estimation (Adam) until the loss converges to obtain a trained liveness detection model.
[0096] The embodiment of the present application uses a 3D convolutional neural network model for training, utilizes the temporal relationship between multiple sample time-frequency images in a sample time-frequency image sequence, and then determines the liveness detection result through the trained liveness detection model. Compared with the information of a single time-frequency graph in a two-dimensional model, it has an additional time dimension, which can improve the accuracy of liveness detection.
[0097] In the embodiment of the present application, when performing liveness detection on the detection object, the first time-frequency graph of the collected ultrasonic signal can be determined. Since when the detection object is a living body, in the process of identity authentication through liveness recognition, the preset action will be performed following the instruction of identity authentication, resulting in the movement of the detection object and the emission source of the ultrasonic echo signal relative to each other, so the Doppler shift phenomenon will occur. The manifestation of the Doppler shift phenomenon on the first time-frequency graph is the increase in the energy of the ultrasonic echo signal in the time-frequency image when the detection object performs the preset action. When the detection object is a non-living body, such as a photo or video, the Doppler shift phenomenon will not occur. Therefore, the time-frequency image sequence when the detection object performs the preset action can be determined according to the energy information in the first time-frequency graph, and the liveness detection result can be obtained based on the time-frequency image sequence. The embodiment of the present application uses the energy distribution of a single mode in the first time-frequency graph to identify the time-frequency image corresponding to the preset action, so as to determine the liveness detection result of the detection object, save computing and data transmission resources, and thus improve the detection efficiency.
[0098] In some embodiments, see Figure 6 The liveness detection method provided in the embodiment of the present application further includes the following steps S201 to S203:
[0099] Step S201, obtaining an image to be detected and a verification image of a detection object.
[0100] Here, in the face recognition scenario, the image to be detected is one or more frames of face images acquired by the terminal through an image acquisition device (such as a camera). When the detection object is a living body, the verification image is a face image pre-registered by the detection object, which is used to compare with the image to be detected acquired by the terminal in real time to determine whether the image to be detected belongs to the responding user or a known identity.
[0101] Step S202 , performing target part recognition on the detection object based on the image to be detected and the verification image to obtain a target part recognition result of the detection object.
[0102] Here, in the face recognition scenario, the target part is the face. The image to be detected and the verification image can be compared, and the face recognition result obtained is the target part recognition result of the detection object. The similarity between the image to be detected and the verification image can be calculated. When the similarity is greater than or equal to a preset similarity threshold, the target part recognition result that the face recognition passes is obtained. When the similarity is less than the preset similarity threshold, the target part recognition result that the face recognition fails is obtained. The embodiment of the present application does not specifically limit the preset similarity threshold.
[0103] Step S203, determining the identity authentication result of the detection object according to the target part recognition result and the liveness detection result.
[0104] Here, when the target part recognition result is that face recognition passes, and the liveness detection result is that the detection object is live, the identity authentication result of the detection object is determined to be identity authentication success. Otherwise, when the target part recognition result is that face recognition fails, or the liveness detection result is that the detection object is not live, the identity authentication result of the detection object is determined to be identity authentication failure.
[0105] The embodiment of the present application combines the liveness detection result and the target part recognition result to jointly determine the identity authentication result of the detection object, which can effectively prevent the use of photos, videos or masks to forge identity authentication and improve the security of identity authentication.
[0106] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.
[0107] The embodiment of the present application provides a liveness detection method, which is a method for detecting liveness of acoustic signals based on timing and feature selection, and is applied to the action liveness recognition scenario. Based on the time-frequency graph generated by the action liveness, the energy distribution of a single mode of the time-frequency graph is used to identify the key parts of the corresponding action. At the same time, the time-series relationship between the key parts is used, and the 3D neural network is used as a model to learn the time-series dependency between actions. The trained model is used to classify the key parts in the time-frequency graph, and whether it is a live body is determined according to the label category. The specific implementation process of the liveness detection method provided by the embodiment of the present application is described below.
[0108] Figure 7 It is a schematic diagram of the training process of the liveness detection model provided in the embodiment of the present application. The liveness detection method provided in the embodiment of the present application adopts a 3D convolutional neural network model. Step S301, calculate time-frequency. First, data collection is performed to collect the time-frequency graph F of all facial movements of each user during liveness detection in the historical time period. The time-frequency graph F is saved in the form of a two-dimensional array, and the two-dimensional array means that each time-frequency graph is a grayscale image, including the height, width and color channel of the image, and the number of color channels is 1. Obtain the time-frequency graph A of all plane attack collection audio, that is, the time-frequency graph when using photos, time-frequency, etc. to forge liveness for detection. Train the classification labels of human faces and non-living bodies, the classification label of human faces is 0, and the classification label of non-living bodies is 1. The time dimension length of the 3D convolutional neural network model is N, N represents the number of image frames in the time dimension, and after the time-frequency graph is cut according to time slices (corresponding to the time-frequency image in the above embodiment), N represents the number of time slices input into the 3D convolutional neural network model at one time.
[0109] The calculation process of the time-frequency diagram is as follows: the mobile phone speaker sends an ultrasonic signal to the direction of the face at a fixed frequency. The frequency of the ultrasonic signal can be between 16KHz and 22KHz, which is predetermined by humans. The face nods and shakes its head, and the ultrasonic signal received by the microphone is collected. The time-frequency diagram of the collected ultrasonic signal (corresponding to the ultrasonic echo signal in the above embodiment) is calculated based on the short-time Fourier transform. The ultrasonic signal ( Figure 7 The frequency signal is Fourier transformed, and then the horizontal axis is time, the vertical axis is frequency, and the energy value is represented by color to obtain a time-frequency diagram. Figure 8 , Figure 8 It is a time-frequency diagram calculated from the collected ultrasonic echo signal provided in the embodiment of the present application, wherein the center frequency f of the signal transmitted by the mobile phone speaker is 17200 Hz. Figure 8 Each row in the chart corresponds to the spectrum energy value of a frequency, and the energy value near the center frequency f is higher. Since the center area is the transmitted frequency, the real frequency part is outside the center area, so it is necessary to shield the area above and below the center frequency f by 8Hz (experience value, which can be set and fine-tuned by yourself), that is, to set the energy value of the center area [f-8,f+8] to 0, and display the energy value of the remaining frequency bands, where the brighter area is the Doppler frequency shift phenomenon caused by face movement. Fig. 9 This is a time-frequency diagram after shielding the center frequency area provided in an embodiment of the present application.
[0110] Step S302, sliding window calculation. That is, key action area sequence calculation. Obtain the time-frequency image of all training data, and shield the area near the center frequency, such as Fig. 9As shown, the horizontal axis represents the time dimension and the vertical axis represents the frequency dimension. Take a time-frequency map I from the training set, whose label is L. Define the sliding window size in the time dimension (corresponding to the window length in the above embodiment) as 1 / 3 of the total time length (T) of the time-frequency map, denoted as blk_sz = T / 3. For each value of time t from 0 to T - blk_sz, with the step size (the increment value of t each time) being blk_sz / 2, i.e., T / 6, calculate the average energy value of the time-frequency map within each blk_sz time period (e.g., [0, T / 3], [T / 6, T / 2], [T / 3, 2T / 3], [T / 2, 5T / 6], [2T / 3, T]), and record it in the array E. The specific calculation process is as follows: a) t = 0. b) E = [], where [] represents the set of average energy values. c) Add mean(I[t:t+blk_sz]) to E, where I[t:t+blk_sz] refers to the time-frequency image within the time period from t to t+blk_sz, and mean is to take the average of the energy values in this time-frequency image. d) t = t + T / 6, if t < T - blk_sz, go back to step c. e) Sort the elements in E from largest to smallest, and remove the elements whose average energy value is lower than a given threshold (corresponding to the energy threshold in the above embodiment). The frequency shift energy of the time-frequency image with a low energy value is insufficient, and it is considered that it does not contain sufficient frequency shift features. The level of the energy value represents the magnitude of the frequency shift, and the area with a low energy value can be considered as no action or insufficient frequency shift caused by an action.
[0111] Step S303, key window sequence selection. That is, random data augmentation. According to the sliding window sequence corresponding to E, randomly select N sliding window images (denoted as d) from it as the input of the 3D neural network (each dimension includes time N, height H, width W, and channel C = 1). This process of randomly selecting N sliding window images is equivalent to a data augmentation. The same time-frequency map can provide multiple input data for the neural network.
[0112] Step S304, 3D convolutional neural network training. Input the N input data selected in step S303 into the 3D convolutional neural network model, and calculate the network output M(d). For each sliding window image d, the network output M(d) is a vector containing 2 elements, and each element corresponds to the probability that the sliding window image d is judged to be the corresponding classification label. Use the probability of the classification label in the network output M(d) and the true label of the sliding window image d to calculate the cross-entropy loss function L. According to the calculation result of the cross-entropy loss function, use the gradient descent method to calculate and update the weight parameters of the 3D convolutional neural network until the 3D convolutional neural network model converges to obtain a trained liveness detection model. If the number of iterations reaches the maximum preset number or the model does not converge, return to step S301.
[0113] After the liveness detection model is trained, a preprocessing method similar to that in the training phase can be used to obtain multiple sliding window sequences corresponding to key actions. Multiple groups (odd numbers) of N sliding window combinations can be randomly selected, and the trained liveness detection model can be used for reasoning, and the majority of the results are taken as the reasoning results, which are also the final liveness detection results.
[0114] The liveness detection method provided in the embodiment of the present application integrates the transmission and reception procedures of the acoustic signal in the face identity authentication application, collects a large number of real and attack audio files and performs preprocessing, obtains the screened audio signal data, and trains the 3D convolutional network classifier. In the actual reasoning application, the collected audio signal is preprocessed in the same way, and the trained classifier is used for classification, and the real liveness is judged according to the label category. The embodiment of the present application uses a single mode of the acoustic signal to select the time-frequency image area corresponding to the facial action. Compared with the related technology that relies on other voice or visual detection and positioning methods, the embodiment of the present application saves computing and data transmission resources and improves the efficiency of liveness detection. In addition, the embodiment of the present application uses a 3D neural network to consider the temporal relationship of the facial action reflected in the time-frequency image, which has an important dimension more than the related technology that relies on the information of a single time-frequency graph, which can improve the accuracy of liveness detection.
[0115] It is understandable that in the embodiments of the present application, related data such as user information is involved. When the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards.
[0116] The following is a description of an exemplary structure of a liveness detection device 455 provided in an embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the living body detection device 455 of the memory 450 may include: a time-frequency diagram determination module 4551, which is used to obtain the ultrasonic echo signal collected when the living body detection is performed on the detection object, and determine the first time-frequency diagram of the ultrasonic echo signal, and the first time-frequency diagram includes the energy information of the ultrasonic echo signal; an image sequence determination module 4552, which is used to determine the time-frequency image sequence from the first time-frequency diagram according to the energy information in the first time-frequency diagram, and the time-frequency image sequence includes the time-frequency images when the detection object performs a preset action; a detection module 4553, which is used to determine the living body detection result of the detection object based on the time-frequency image sequence.
[0117] In some embodiments, the energy information includes the corresponding relationship between the energy value and the frequency. The time-frequency diagram determination module 4551 is also used to perform Fourier transform processing on the ultrasonic echo signal to obtain a second time-frequency diagram; obtain the center frequency of the ultrasonic echo signal, and determine the first frequency interval based on the center frequency and a preset frequency error; shield the first energy value in the second time-frequency diagram located in the first frequency interval to obtain the first time-frequency diagram.
[0118] In some embodiments, the time-frequency diagram determination module 4551 is also used to obtain a second energy value located in a second frequency interval in the second time-frequency diagram; the frequency interval of the second time-frequency diagram includes a first frequency interval and a second frequency interval; the second energy value is normalized to obtain a third energy value; the first energy value located in the first frequency interval is set to a first preset value, and the second energy value located in the second frequency interval is set to a third energy value to obtain the first time-frequency diagram.
[0119] In some embodiments, the energy information includes the correspondence between the energy value and time and frequency. The image sequence determination module 4552 is also used to determine multiple sliding window images in the first time-frequency diagram based on a preset time step and window length; for each sliding window image, based on the energy value included in the sliding window image, determine the average energy value corresponding to the sliding window image; obtain a preset energy threshold, and determine the average energy value greater than or equal to the energy threshold as the target energy value; determine the sliding window images corresponding to at least two target energy values as the time-frequency images when the detection object performs a preset action; obtain the time information included in the time-frequency image, arrange the time-frequency image according to the time information, and obtain a time-frequency image sequence.
[0120] In some embodiments, the detection module 4553 is also used to extract features from the time-frequency image sequence based on the liveness detection model to obtain an image feature sequence; the image feature sequence includes image feature vectors of the time-frequency image arranged in chronological order; the image feature sequence is identified and processed to obtain a liveness prediction result, the liveness prediction result includes a first probability and a second probability, the first probability is the probability that the detection object is a live body, and the second probability is the probability that the detection object is a non-live body; the liveness detection result is determined according to the maximum probability of the first probability and the second probability.
[0121] In some embodiments, the liveness detection device 455 also includes a model training module, which is used to obtain a sample time-frequency diagram and a sample label, wherein the sample time-frequency diagram is generated based on a sample ultrasonic echo signal collected when performing liveness detection on a sample object, and the sample label is used to mark the liveness information of the sample object; according to the energy information in the sample time-frequency diagram, a sample image sequence is determined from the sample time-frequency diagram, and the sample image sequence includes sample time-frequency images when the sample object performs a preset action; the sample image sequence is predicted based on the liveness detection model to obtain a sample liveness prediction result of the sample object; based on the sample liveness prediction result and the sample label, the liveness detection model is trained to obtain a trained liveness detection model.
[0122] In some embodiments, the liveness detection device 455 also includes an identity authentication module, which is used to obtain the image to be detected and the verification image of the detection object; based on the image to be detected and the verification image, the target part of the detection object is identified to obtain the target part identification result of the detection object; according to the target part identification result and the liveness detection result, the identity authentication result of the detection object is determined.
[0123] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer-readable storage medium, and the processor executes the computer executable instruction, so that the electronic device performs the above-mentioned liveness detection method of the embodiment of the present application.
[0124] The present application embodiment provides a computer-readable storage medium, in which computer executable instructions or computer programs are stored. When the computer executable instructions or computer programs are executed by a processor, the processor will execute the living body detection method provided by the present application embodiment, for example, Figure 3 The liveness detection method is shown.
[0125] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
[0126] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0127] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0128] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0129] In summary, the embodiment of the present application selects the key area corresponding to the facial action according to the single mode of the acoustic signal time-frequency diagram, which saves computing resources and improves the efficiency of liveness detection. The key areas selected by multiple sliding windows are randomly selected and combined for data enhancement, and the time sequence relationship between the sliding windows of multiple key areas is relied on, and a 3D neural network is used as a model for training and reasoning, which improves the accuracy of liveness detection.
[0130] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A method for detecting a living body, characterized in that: The method comprises: Acquire an ultrasonic echo signal collected when performing liveness detection on a detection object, and determine a first time-frequency diagram of the ultrasonic echo signal, wherein the first time-frequency diagram includes energy information of the ultrasonic echo signal; determining a time-frequency image sequence from the first time-frequency image according to energy information in the first time-frequency image, wherein the time-frequency image sequence includes time-frequency images when the detection object performs a preset action; Based on the time-frequency image sequence, a liveness detection result of the detection object is determined.
2. The method according to claim 1, characterized in that The energy information includes a corresponding relationship between energy value and frequency; the first time-frequency diagram of the ultrasonic echo signal is determined, including: Performing Fourier transform processing on the ultrasonic echo signal to obtain a second time-frequency graph; Acquiring a center frequency of the ultrasonic echo signal, and determining a first frequency interval based on the center frequency and a preset frequency error; A shielding process is performed on the first energy value in the first frequency interval in the second time-frequency graph to obtain the first time-frequency graph.
3. The method according to claim 2, characterized in that The shielding process is performed on the first energy value in the first frequency interval in the second time-frequency graph to obtain the first time-frequency graph, including: Acquire a second energy value in a second frequency interval in the second time-frequency graph; the frequency interval of the second time-frequency graph includes the first frequency interval and the second frequency interval; Normalizing the second energy value to obtain a third energy value; The first energy value in the first frequency interval is set to a first preset value, and the second energy value in the second frequency interval is set to a third energy value, to obtain the first time-frequency graph.
4. The method according to claim 1, characterized in that: The energy information includes the corresponding relationship between energy value and time and frequency; The determining of the time-frequency image sequence from the first time-frequency map according to the energy information in the first time-frequency map comprises: Determining a plurality of sliding window images in the first time-frequency graph based on a preset time step and window length; For each sliding window image, based on the energy values included in the sliding window image, determine an average energy value corresponding to the sliding window image; Obtaining a preset energy threshold, and determining an average energy value greater than or equal to the energy threshold as a target energy value; Determine the sliding window images corresponding to at least two of the target energy values as the time-frequency images when the detection object performs a preset action; The time information included in the time-frequency image is acquired, and the time-frequency image is arranged according to the time information to obtain a time-frequency image sequence.
5. The method according to claim 1, characterized in that The determining the liveness detection result of the detection object based on the time-frequency image sequence includes: Perform feature extraction on the time-frequency image sequence based on a living body detection model to obtain an image feature sequence; the image feature sequence includes image feature vectors of the time-frequency images arranged in chronological order; Performing recognition processing on the image feature sequence to obtain the living body prediction result, wherein the living body prediction result includes a first probability and a second probability, wherein the first probability is a probability that the detection object is a living body, and the second probability is a probability that the detection object is a non-living body; The liveness detection result is determined according to a maximum probability between the first probability and the second probability.
6. The method according to claim 5, characterized in that The training process of the living body detection model includes the following steps: Acquire a sample time-frequency diagram and a sample label, wherein the sample time-frequency diagram is generated based on a sample ultrasonic echo signal collected when performing liveness detection on a sample object, and the sample label is used to mark liveness information of the sample object; determining a sample image sequence from the sample time-frequency graph according to energy information in the sample time-frequency graph, wherein the sample image sequence includes sample time-frequency images when the sample object performs the preset action; Predicting the sample image sequence based on a liveness detection model to obtain a sample liveness prediction result of the sample object; Based on the sample liveness prediction result and the sample label, the liveness detection model is trained to obtain the trained liveness detection model.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Acquire an image to be detected and a verification image of the detection object; Based on the image to be detected and the verification image, target part recognition is performed on the detection object to obtain a target part recognition result of the detection object; The identity authentication result of the detection object is determined according to the target part recognition result and the liveness detection result.
8. A living body detection device, characterized in that: The device comprises: a time-frequency diagram determination module, used to obtain an ultrasonic echo signal collected when performing a liveness detection on a detection object, and determine a first time-frequency diagram of the ultrasonic echo signal, wherein the first time-frequency diagram includes energy information of the ultrasonic echo signal; an image sequence determining module, configured to determine a time-frequency image sequence from the first time-frequency map according to energy information in the first time-frequency map, wherein the time-frequency image sequence includes time-frequency images when the detection object performs a preset action; A detection module is used to determine a liveness detection result of the detection object based on the time-frequency image sequence.
9. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions or computer programs; A processor, configured to implement the liveness detection method according to any one of claims 1 to 7 when executing the computer executable instructions or computer programs stored in the memory.
10. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the living body detection method according to any one of claims 1 to 7 is implemented.
11. A computer program product comprising computer executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the living body detection method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Living body detection method and device, computer equipment and storage medium
CN114821820A
Few-shot gesture recognition method
US20230326249A1
Millimeter wave radar-based gesture detection and recognition method
WO2023029390A1
Cited By
Liveness detection method and apparatus, device and storage medium
WO2026124040A1
