Method, device, equipment, medium and product for liveness detection

By acquiring and analyzing the coordinates and offset information of the center point of the video frame, the prosthetic attack of spliced ​​videos is solved, and the security risks caused by spliced ​​video attacks in the existing technology is improved, and the security of live detection and the accuracy of identity verification is improved. sex.

CN113392810BInactive Publication Date: 2024-11-19BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110771886.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-08
Publication Date
2024-11-19
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing live detection technology has security risks, and it is impossible to effectively identify prosthetic attacks of spliced ​​videos, resulting in impairment of identity verification security.

Method used

By obtaining the coordinates and offset information of the center point of the target video frame, the live detection results are determined, and the offset situation of the spliced ​​video is identified, thereby improving the safety of live detection.

Benefits of technology

Effectively identifying prosthetic attacks of spliced ​​videos improves the security of live detection and enhances the accuracy of identity verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113392810B_ABST
    Figure CN113392810B_ABST
Patent Text Reader

Abstract

The present disclosure provides methods, devices, equipment, media and products for liveness detection, which relate to the field of artificial intelligence technology, specifically computer vision and deep learning technology, and can be applied to scenarios such as face recognition. The specific implementation scheme is: obtaining a target video; for each video frame in the target video, determining the target center point coordinates of the video frame; based on the target center point coordinates of each video frame, determining the target offset information; based on the target offset information, determining the liveness detection result of the target video. This implementation method can improve the security of liveness detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, specifically the field of computer vision and deep learning technology, and can be applied to scenarios such as face recognition. Background Art

[0002] At present, liveness detection technology is often used in identity authentication scenarios to verify whether the user is actually the real person operating the system. It can effectively respond to attacks such as photos and improve the security of identity authentication.

[0003] In practice, it is found that there are cases where spliced ​​videos are used for prosthetic attacks, that is, spliced ​​videos are used to forge liveness rules, which causes the spliced ​​videos to pass liveness detection, which in turn causes certain security risks in liveness detection. Summary of the invention

[0004] The present disclosure provides a method, apparatus, device, medium and product for living body detection.

[0005] According to one aspect of the present disclosure, a method for liveness detection is provided, comprising: acquiring a target video; for each video frame in the target video, determining the coordinates of a target center point of the video frame; based on the coordinates of the target center point of each video frame, determining target offset information; and based on the target offset information, determining a liveness detection result of the target video.

[0006] According to another aspect of the present disclosure, there is provided an apparatus for liveness detection, comprising: a video acquisition unit configured to acquire a target video; a center point coordinate determination unit configured to determine, for each video frame in the target video, the target center point coordinates of the video frame; an offset determination unit configured to determine target offset information based on the target center point coordinates of each video frame; and a liveness detection unit configured to determine a liveness detection result of the target video based on the target offset information.

[0007] According to another aspect of the present disclosure, an electronic device is provided, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above methods for liveness detection.

[0008] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute any one of the above methods for liveness detection.

[0009] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the computer program implements any one of the above methods for living body detection.

[0010] According to the technology disclosed in the present invention, a method for liveness detection is provided, which can improve the safety of liveness detection.

[0011] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0013] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;

[0014] Figure 2 is a flow chart of an embodiment of a method for liveness detection according to the present disclosure;

[0015] Figure 3 is a schematic diagram of an application scenario of the method for liveness detection according to the present disclosure;

[0016] Figure 4 is a flow chart of another embodiment of a method for liveness detection according to the present disclosure;

[0017] Figure 5 is a schematic structural diagram of an embodiment of a device for living body detection according to the present disclosure;

[0018] Figure 6 The block diagram is a block diagram of an electronic device used to implement the method for living body detection according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0019] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0020] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0021] like Figure 1As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0022] The user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. The terminal devices 101, 102, 103 can be electronic devices such as mobile phones, computers, and tablets. Software that requires identity authentication, such as software for mobile payment, is installed in the terminal devices 101, 102, 103. When the user uses such software, in the scenario of face verification, the terminal devices 101, 102, 103 can use the camera to obtain the target video, and send the target video to the server 105 through the network 104 for liveness detection, and obtain the liveness detection result returned by the server 105.

[0023] Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices, including but not limited to televisions, smart phones, tablet computers, e-book readers, car computers, laptop computers, desktop computers, etc. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0024] The server 105 may be a server that provides various services. For example, after the terminal devices 101, 102, and 103 acquire the target video, the server 105 may acquire the target video acquired by the terminal devices 101, 102, and 103 through the network 104, and then determine the target center point coordinates of each video frame in the target video, determine the target offset information based on the target center point coordinates of each video frame, and then determine the liveness detection result based on the target offset information, and send the liveness detection result to the terminal devices 101, 102, and 103.

[0025] It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server 105 is software, it can be implemented as multiple software or software modules (for example, for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0026] It should be noted that the method for liveness detection provided in the embodiment of the present disclosure can be executed by the terminal devices 101, 102, 103, or by the server 105. Accordingly, the apparatus for liveness detection can be set in the terminal devices 101, 102, 103, or in the server 105.

[0027] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0028] Continue to refer Figure 2 , shows a process 200 of an embodiment of a method for liveness detection according to the present disclosure. The method for liveness detection of this embodiment includes the following steps:

[0029] Step 201, obtaining a target video.

[0030] In this embodiment, the execution subject (such as Figure 1 The terminal devices 101, 102, 103 or server 105 in the embodiment can obtain the target video stored locally, or can obtain the target video stored in other electronic devices based on the connection with other electronic devices, or can obtain the target video based on the real-time capture of the camera of the execution subject. The present embodiment does not limit the specific video acquisition method. Among them, the target video is a face verification video for liveness detection. When performing face verification, the user is often required to record a face verification video that meets the specified liveness rules. The specified liveness rules may include but are not limited to liveness actions such as blinking, shaking head, nodding, and specified lip movement states, etc., which are not limited in the present embodiment. Optionally, the target video can be a complete face verification video for liveness detection, or it can be a partial face verification video for liveness detection that captures the middle segment.

[0031] Step 202: for each video frame in the target video, determine the target center point coordinates of the video frame.

[0032] In this embodiment, the execution subject may split the acquired target video into several video frames, and then determine the corresponding target center point coordinates for each video frame. The target center point coordinates refer to the coordinates corresponding to the center point of the target face contained in the video frame. Specifically, the execution subject may perform face detection on each video frame in the target video, and determine the coordinates corresponding to the center point of the target face based on the result of face detection. The face detection method here may adopt various existing face detection methods, which are not limited in this embodiment. Optionally, for each video frame, the execution subject may detect the coordinates of the key points of the face corresponding to the video frame, and determine the face boundary coordinates from the key points of the face coordinates, and then determine the face center point coordinates based on the face boundary coordinates as the target center point coordinates of the video frame. Alternatively, for each video frame, after detecting the key points of the face corresponding to the video frame, the execution subject may perform an average operation on the key points of the face corresponding to the video frame to obtain the average coordinates, and determine the average coordinates as the target center point coordinates of the video frame. Further optionally, the execution subject may perform the operation of determining the target center point coordinates for all video frames of the target video, or may perform the operation of determining the target center point coordinates for some video frames of the target video, which is not limited in this embodiment.

[0033] In some optional implementations of this embodiment, for each video frame in the target video, determining the target center point coordinates of the video frame may include: determining a designated living body rule corresponding to the target video; determining the target object based on the designated living body rule; for each video frame in the target video, detecting the position information corresponding to the target object in the video frame; and obtaining the target center point coordinates of the target object in the video frame based on the position information. With this optional implementation, the execution subject may determine the target object based on the designated living body rule. For example, if the designated living body rule is blinking, the target object may be determined to be an eye, and further, in the video frame, the target center point coordinates of the target object are determined, thereby improving the accuracy of the target center point coordinates.

[0034] Step 203: Determine target offset information based on the target center point coordinates of each video frame.

[0035] In this embodiment, the execution subject can determine the offset information between adjacent video frames based on the target center point coordinates of each video frame, and then determine the target offset information based on the offset information between each adjacent video frame. The target offset information is used to describe the offset of the face center point coordinates in adjacent video frames, and its expression may include but is not limited to the offset value, offset level, offset content description, etc., which is not limited in this embodiment. The various video frames here can be all video frames of the target video, or they can be partial video frames of the target video, which is not limited in this embodiment.

[0036] Step 204: Determine a liveness detection result of the target video based on the target offset information.

[0037] In this embodiment, the liveness detection result is used to describe whether the target video passes the liveness detection. If it passes, it means that the face contained in the target video is a real live body. If it fails, it means that the face contained in the target video is a fake attack, such as a spliced ​​video. After obtaining the target offset information, the execution subject can determine whether the face offset in the target video indicates that the face offset value is large based on the target offset information. If yes, it means that the liveness detection result of the target video fails the detection. If no, it means that the liveness detection result of the target video passes the detection or waits for further detection. In the case of waiting for further detection, the execution subject can use other existing liveness recognition technologies to further identify the target video, and combine other existing liveness recognition technologies to further determine the final liveness detection result of the target video.

[0038] Continue to see Figure 3 , which shows a schematic diagram of an application scenario of the method for liveness detection according to the present disclosure. Figure 3 In the application scenario, the execution subject can obtain the target video 301 that needs to be detected for liveness, and the target video 301 includes video frames such as video frame 1, video frame 2, and video frame n. Further, the execution subject can determine the face center point coordinates corresponding to each video frame, and obtain the center point coordinate set 302. Among them, the center point coordinate set 302 includes the face center point coordinate 1 corresponding to video frame 1, the face center point coordinate 2 corresponding to video frame 2, and the face center point coordinate n corresponding to video frame n. Afterwards, the execution subject can determine the face offset value 303 based on the face center point coordinates corresponding to adjacent video frames. For example, the execution subject can calculate the offset value between the face center point coordinate 1 and the face center point coordinate 2, the offset value between the face center point coordinate 2 and the face center point coordinate 3, and the offset value between the face center point coordinate n-1 and the face center point coordinate n. The maximum value of these offset values ​​is then determined as the face offset value 303. Afterwards, the execution subject can obtain a liveness detection result 304 for the target video 301 based on the face offset value 303 .

[0039] The method for liveness detection provided by the above-mentioned embodiment of the present disclosure can determine the liveness detection result of the target video based on the target offset information corresponding to the video frame of the target video. Therefore, for the case of a prosthetic attack such as a spliced ​​video, it can be detected that the target offset information corresponding to the video frame of the spliced ​​video is large and exceeds the normal offset range, thereby identifying the spliced ​​video, and determining the liveness detection result of the spliced ​​video as a detection failure, thereby improving the security of liveness detection.

[0040] Continue to see Figure 4 , which shows a process 400 of another embodiment of the method for liveness detection according to the present disclosure. Figure 4 As shown, the method for liveness detection in this embodiment may include the following steps:

[0041] Step 401, obtaining a target video.

[0042] In this embodiment, for the detailed description of step 401, please refer to the detailed description of step 201, which will not be repeated here.

[0043] Step 402: Determine a set of intermediate video frames corresponding to the target video based on the inter-frame sequence of each video frame of the target video.

[0044] In this embodiment, the inter-frame order is the order obtained by sorting the video frames in the order of time points from early to late based on the time points corresponding to the video frames of the target video. The execution subject can select the video frames in a specified interval as the set of intermediate video frames corresponding to the target video based on the inter-frame order. For example, when the target video contains a total of 60 video frames, the execution subject can select the 15th to 45th video frames as the set of intermediate video frames corresponding to the target video.

[0045] Step 403: for each intermediate video frame in the intermediate video frame set, determine the coordinates of the facial key points corresponding to the intermediate video frame.

[0046] In this embodiment, the execution subject can perform key point detection on each intermediate video frame to obtain a number of key point coordinates. For example, the execution subject can use existing key point recognition technology to identify the coordinates corresponding to 72 key points corresponding to each intermediate video frame. For each intermediate video frame, the coordinates corresponding to the 72 key points are the coordinates of the face key points corresponding to the intermediate video frame.

[0047] Step 404: Determine the target center point coordinates of the intermediate video frame based on the facial key point coordinates.

[0048] In this embodiment, the execution subject can determine the extreme values ​​corresponding to the directions of each coordinate axis based on the coordinates of several facial key points to obtain the coordinates of the facial boundary points. For example, the execution subject can determine the coordinates corresponding to the maximum value in the y-axis direction, the coordinates corresponding to the maximum value in the -y-axis direction, the coordinates corresponding to the maximum value in the x-axis direction, and the coordinates corresponding to the maximum value in the -x-axis direction from the coordinates of several facial key points. Afterwards, the execution subject can determine the coordinates of the target center point of the intermediate video frame based on the coordinates of each facial boundary point. For example, the execution subject can calculate the average value of the maximum value in the y-axis direction and the maximum value in the -y-axis direction as the ordinate of the target center point coordinates, and calculate the average value of the maximum value in the x-axis direction and the maximum value in the -x-axis direction as the abscissa of the target center point coordinates.

[0049] Step 405 : for each intermediate video frame in the target video, determine the video resolution of the intermediate video frame.

[0050] In this embodiment, the execution subject may also determine the video resolution of each intermediate video frame in the target video, wherein different intermediate video frames may correspond to different video resolutions.

[0051] Step 406 , based on the video resolution, normalize the target center point coordinates of the intermediate video frame to obtain the normalized target center point coordinates.

[0052] In this embodiment, after determining the video resolution of the intermediate video frame, the execution subject may further normalize the target center point coordinates of the intermediate video frame according to the normalization formula to obtain the normalized target center point coordinates. The normalization formula is as follows:

[0053]

[0054] Where x refers to the horizontal coordinate of the target center point coordinate before normalization, y refers to the vertical coordinate of the target center point coordinate before normalization, w refers to the horizontal pixel value of the intermediate video frame, h refers to the vertical pixel value of the intermediate video frame, and x n Refers to the horizontal coordinate of the target center point after normalization, y n Refers to the ordinate of the target center point after normalization. That is, the target center point coordinates after normalization are (x n ,y n ).

[0055] Step 407 : for each group of adjacent video frames in each intermediate video frame, based on the target center point coordinates of the group of adjacent video frames, determine the offset information corresponding to the group of adjacent video frames.

[0056] In this embodiment, for each group of adjacent video frames in the middle video frame, the distance between the two target center point coordinates corresponding to the group of adjacent video frames can be calculated, and the offset information corresponding to the group of adjacent video frames can be determined based on the distance. The offset information is used to describe the offset between the group of adjacent video frames. The specific form of expression may include but is not limited to the offset value, offset level, offset content description, etc., which is not limited in this embodiment. The offset calculation of the target center point coordinates of each group of adjacent video frames can be calculated using the following formula:

[0057]

[0058] Among them, s n Indicates the offset value corresponding to the group of adjacent video frames, (x n ,y n ) represents the normalized target center coordinates of the nth video frame, (x n+1 ,y n+1 ) represents the normalized target center point coordinates of the n+1th video frame.

[0059] Step 408: Determine target offset information based on the offset information corresponding to each group of adjacent video frames.

[0060] In this embodiment, the execution subject may determine the offset information with the largest offset value from the offset information corresponding to each group of adjacent video frames as the target offset information. The execution subject may also calculate the average value of each offset value from the offset information corresponding to each group of adjacent video frames, and use the average value as the target offset information. The execution subject may also determine the median of the offset value from the offset information corresponding to each group of adjacent video frames, and use the median as the target offset information.

[0061] Step 409 , in response to determining that the target offset value is greater than a preset threshold, determining that the liveness detection result of the target video is detection failure.

[0062] In this embodiment, the target offset information includes a target offset value. The execution subject may also pre-set a threshold corresponding to the offset value, that is, the above-mentioned preset threshold. Among them, the preset threshold corresponds to the method for determining the target offset information. For the method of using the maximum offset value as the target offset information, the preset threshold may be set relatively high. For the method of using the average or median of each offset value as the target offset information, the preset threshold may be set relatively low. The execution subject may compare the target offset value with the preset threshold. If the target offset value is greater than the preset threshold, it means that the target center point of the target video has a high degree of offset, and there is a high probability that it is a spliced ​​video. At this time, it is determined that the liveness detection result is not passed. If the target offset value is less than or equal to the preset threshold, the liveness detection result of the target video can be directly determined as passed, or the liveness detection result of the target video can be first determined as pending, and then the target video is further determined in combination with other existing liveness detection methods to obtain the liveness detection result of the target video.

[0063] The method for liveness detection provided by the above-mentioned embodiment of the present disclosure can also determine the set of intermediate video frames based on the inter-frame sequence of each video frame of the target video, and determine the liveness detection result based on the analysis of the intermediate video frames. This process can reduce the influence of unstable video frames at the beginning and end of the target video on the liveness detection result, and can improve the accuracy of the liveness detection result. In addition, the execution subject can also normalize the target center point coordinates of the intermediate video frames based on the video resolution of each intermediate video frame, thereby reducing the influence of different video resolutions on the target center point coordinates, and can improve the accuracy of the target center point coordinates. In addition, the execution subject can also determine the target offset information based on the offset information corresponding to each group of adjacent video frames, and then compare the target offset value with the preset threshold value. When the target offset value is greater than the preset threshold value, it is determined that the liveness detection result is a failure to pass the detection. This process can more accurately identify the spliced ​​video, determine the liveness detection result of the spliced ​​video as a failure to pass the detection, and improve the safety of liveness detection.

[0064] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for living body detection. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to terminal equipment and servers.

[0065] like Figure 5 As shown, the apparatus 500 for living body detection of this embodiment includes: a video acquisition unit 501 , a center point coordinate determination unit 502 , an offset determination unit 503 and a living body detection unit 504 .

[0066] The video acquisition unit 501 is configured to acquire a target video.

[0067] The center point coordinate determining unit 502 is configured to determine the target center point coordinates of each video frame in the target video.

[0068] The offset determination unit 503 is configured to determine target offset information based on the target center point coordinates of each video frame.

[0069] The living body detection unit 504 is configured to determine a living body detection result of the target video based on the target offset information.

[0070] In some optional implementations of the present embodiment, the center point coordinate determination unit 502 is further configured to: determine a set of intermediate video frames corresponding to the target video based on the inter-frame order of each video frame of the target video; and for each intermediate video frame in the set of intermediate video frames, determine the target center point coordinates corresponding to the intermediate video frame.

[0071] In some optional implementations of this embodiment, the center point coordinate determination unit 502 is further configured to: for each video frame in the target video, determine the facial key point coordinates corresponding to the video frame; based on the facial key point coordinates, determine the target center point coordinates of the video frame.

[0072] In some optional implementations of the present embodiment, the above-mentioned device also includes: a resolution determination unit, configured to determine the video resolution of each video frame in the target video; a normalization processing unit, configured to normalize the target center point coordinates of the video frame based on the video resolution to obtain the normalized target center point coordinates.

[0073] In some optional implementations of this embodiment, the offset determination unit 503 is further configured to: for each group of adjacent video frames in each video frame, determine the offset information corresponding to the group of adjacent video frames based on the target center point coordinates of the group of adjacent video frames; and determine the target offset information based on the offset information corresponding to each group of adjacent video frames.

[0074] In some optional implementations of this embodiment, the target offset information includes a target offset value; and the liveness detection unit 504 is further configured to: in response to determining that the target offset value is greater than a preset threshold, determine that the liveness detection result of the target video is a detection failure.

[0075] It should be understood that the units 501 to 504 described in the apparatus 500 for detecting living bodies are respectively the same as those in the reference Figure 2Therefore, the operations and features described above for the method of using in-vehicle phone calls are also applicable to the device 500 and the units contained therein, and will not be described in detail here.

[0076] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0077] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0078] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0079] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0080] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0081] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as methods for liveness detection. For example, in some embodiments, the method for liveness detection may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the method for liveness detection described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform a method for liveness detection in any other appropriate manner (e.g., by means of firmware).

[0082] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0083] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0084] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0085] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0086] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0087] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0088] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0089] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for liveness detection, comprising: Get the target video; For each video frame in the target video, determining the target center point coordinates of the video frame includes: determining a designated living body rule corresponding to the target video; determining a target object based on the designated living body rule; for each video frame in the target video, detecting position information corresponding to the target object in the video frame; and obtaining the target center point coordinates of the video frame based on the position information; Determine target offset information based on target center point coordinates of each video frame, where the target offset information is used to describe the offset of target center point coordinates in adjacent video frames; Based on the target offset information, a liveness detection result of the target video is determined.

2. The method according to claim 1, wherein: The step of determining the target center point coordinates of each video frame in the target video includes: Determining a set of intermediate video frames corresponding to the target video based on an inter-frame sequence of each video frame of the target video; For each intermediate video frame in the intermediate video frame set, the coordinates of the target center point corresponding to the intermediate video frame are determined.

3. The method according to claim 1, wherein: The step of determining the target center point coordinates of each video frame in the target video includes: For each video frame in the target video, determining the coordinates of the facial key points corresponding to the video frame; Based on the facial key point coordinates, the target center point coordinates of the video frame are determined.

4. The method according to claim 1, wherein: The method further comprises: For each video frame in the target video, determining the video resolution of the video frame; Based on the video resolution, the target center point coordinates of the video frame are normalized to obtain the normalized target center point coordinates.

5. The method according to claim 1, wherein: The determining of target offset information based on the target center point coordinates of each video frame includes: For each group of adjacent video frames in the video frames, based on the target center point coordinates of the group of adjacent video frames, determining the offset information corresponding to the group of adjacent video frames; The target offset information is determined based on the offset information corresponding to each group of adjacent video frames.

6. The method according to claim 1, wherein: The target offset information includes a target offset value; as well as The determining, based on the target offset information, a liveness detection result of the target video includes: In response to determining that the target offset value is greater than a preset threshold, determining that a liveness detection result of the target video is detection failure.

7. A device for liveness detection, comprising: A video acquisition unit, configured to acquire a target video; The center point coordinate determination unit is configured to determine the target center point coordinates of each video frame in the target video; the center point coordinate determination unit is configured to: determine the designated living body rule corresponding to the target video; determine the target object based on the designated living body rule; for each video frame in the target video, detect the position information corresponding to the target object in the video frame; Based on the position information, obtaining the coordinates of the target center point of the video frame; An offset determination unit is configured to determine target offset information based on the target center point coordinates of each video frame, wherein the target offset information is used to describe the offset of the target center point coordinates in adjacent video frames; The living body detection unit is configured to determine a living body detection result of the target video based on the target offset information.

8. The device according to claim 7, wherein: The center point coordinate determination unit is further configured to: Determining a set of intermediate video frames corresponding to the target video based on an inter-frame sequence of each video frame of the target video; For each intermediate video frame in the intermediate video frame set, the coordinates of the target center point corresponding to the intermediate video frame are determined.

9. The device according to claim 7, wherein: The center point coordinate determination unit is further configured to: For each video frame in the target video, determining the coordinates of the facial key points corresponding to the video frame; Based on the facial key point coordinates, the target center point coordinates of the video frame are determined.

10. The device according to claim 7, wherein: The device also includes: A resolution determination unit, configured to determine, for each video frame in the target video, a video resolution of the video frame; The normalization processing unit is configured to perform normalization processing on the target center point coordinates of the video frame based on the video resolution to obtain the normalized target center point coordinates.

11. The device according to claim 7, wherein: The offset determination unit is further configured to: For each group of adjacent video frames in the video frames, based on the target center point coordinates of the group of adjacent video frames, determining the offset information corresponding to the group of adjacent video frames; The target offset information is determined based on the offset information corresponding to each group of adjacent video frames.

12. The device according to claim 7, wherein: The target offset information includes a target offset value; and The living body detection unit is further configured to: In response to determining that the target offset value is greater than a preset threshold, determining that a liveness detection result of the target video is detection failure.

13. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.