Face video detection method and device
By combining sparse optical flow algorithm and multimodal feature information, the problems of long detection time and low accuracy of face video detection are solved, and efficient and accurate recognition of fake face videos is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-13
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies are time-consuming, inefficient, and have low accuracy when detecting face videos, especially in terms of their effectiveness against deepfake videos.
The sparse optical flow algorithm is used to calculate the motion information of face video image frames, divide key regions, and use multimodal feature information for detection, including multi-frame motion information, single-frame frequency domain features and single-frame spatial domain features, to identify suspected risk image frames and perform feature extraction and judgment.
It significantly shortens the detection time, improves detection efficiency and accuracy, is highly targeted, and can effectively identify fake face videos.
Smart Images

Figure CN116798100B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to electronic information technology, and more particularly to methods and apparatus for detecting face videos. Background Technology
[0002] Facial recognition, as an important biometric technology, has been widely used for identity authentication in banking, hotels, transportation, and other fields. In recent years, various attacks targeting facial recognition systems have been proposed, especially the increasingly serious threat posed by deepfake videos. Deepfake videos refer to fake facial recognition videos created by attackers using deepfake tools to attack existing facial recognition systems, seriously threatening users' personal privacy and financial security. Therefore, it is necessary to detect facial videos to determine whether they are forged.
[0003] Currently, most methods for detecting faces in videos use the full face image as input and perform frame-by-frame or uniform frame-by-frame detection. At the feature level, they generally only utilize the RGB information of the image. This results in a time-consuming, inefficient, non-targeted, and low-accuracy detection process.
[0004] Therefore, a more effective method for detecting human faces in videos is needed. Summary of the Invention
[0005] This specification describes one or more embodiments of a method and apparatus for detecting face videos, which can more effectively detect forged face videos, thereby improving the security of face recognition.
[0006] According to the first aspect, a method for detecting face videos is provided, wherein the method includes:
[0007] Obtain the video of the face to be identified;
[0008] The motion information of at least two image frames in the video of the face to be identified is calculated using a sparse optical flow algorithm.
[0009] Based on the motion information of at least two image frames in the video of the face to be identified, the suspected risk image frames in the video of the face to be identified are determined;
[0010] Feature information of the suspected risk image frames is extracted in at least two modalities;
[0011] Based on the feature information of suspected risky image frames in at least two modalities, determine whether the face video to be identified is a fake face video.
[0012] The step of determining the suspected risk image frames in the face-to-be-identified video based on the motion information of at least two image frames in the face-to-be-identified video includes:
[0013] For the video of the face to be identified, extract the motion information of every two adjacent image frames;
[0014] Based on the motion information of every two adjacent image frames, the velocity vector of each pixel in each image frame is obtained;
[0015] For each image frame in the video of the face to be identified, it is determined whether the image frame is a suspected risk image frame in the video of the face to be identified based on the velocity vector of the pixel in each image frame and the average velocity vector of the pixels around the pixel.
[0016] The method further includes: dividing the face into at least two key regions;
[0017] The step of determining whether an image frame is a suspected risk image frame in the video of the face to be identified based on the velocity vector of a pixel in each image frame and the average velocity vector of all pixels surrounding that pixel includes:
[0018] For each key region included in an image frame, the difference between the velocity vector of each pixel in the key region and the average velocity vector of all other pixels in the key region is obtained; based on the differences of each pixel in the key region, the artifact risk index corresponding to the key region is obtained.
[0019] Based on the artifact risk index corresponding to each key region in an image frame, determine whether the image frame is a suspected risk image frame in the video of the face to be identified.
[0020] The step of obtaining the difference between the velocity vector of each pixel within the critical region and the average velocity vector of all other pixels within the critical region, and obtaining an artifact risk index corresponding to the critical region based on the differences of each pixel within the critical region, includes:
[0021] For each key region, the artifact risk index corresponding to that key region is calculated using the following formula:
[0022]
[0023] Where r is the artifact risk index of the key region, i and j are variables, and K is the number of pixels in the key region; V i V is the velocity vector of the i-th pixel within this critical region. j Let be the velocity vector of the j-th pixel within this critical region;
[0024] The step of determining whether an image frame is a suspected risk image frame in the video of the face to be identified based on the differences between the key regions in an image frame includes:
[0025] For an image frame, determine whether the artifact risk index corresponding to at least one key region of the image frame is greater than a pre-set index threshold corresponding to the key region. If so, determine that the image frame is a suspected risk image frame in the video of the face to be identified.
[0026] The at least two key regions include at least two of the following: the left eye region, the right eye region, the nose region, the mouth region, and the facial contour region.
[0027] The feature information of the suspected risk image frames in the at least two modalities includes at least two of the following: features of multi-frame motion information, single-frame frequency domain features, and single-frame spatial domain features.
[0028] The step of extracting feature information of the suspected risk image frame in at least two modalities includes at least two of the following:
[0029] Use the FlowNet2 optical flow model or the calcOpticalFlowPyrLK operator to extract features of multi-frame motion information;
[0030] The DCT transform can be used to calculate the frequency domain features of a single frame, or the FFT operator can be used to calculate the frequency domain features of a single frame.
[0031] Single-frame spatial features can be obtained by using RGB color information as single-frame spatial features, or by using YUV color space or image features filtered by the Sobel operator.
[0032] According to the second aspect, a face video detection device is provided, wherein the device includes:
[0033] The input module is configured to obtain the video of the face to be identified;
[0034] The sparse optical flow algorithm module is configured to use the sparse optical flow algorithm to calculate the motion information of at least two image frames in the video of the face to be identified.
[0035] The detection sequence generation module is configured to determine the suspected risk image frames in the face video to be identified based on the motion information of at least two image frames in the face video to be identified, and to form a detection sequence using each suspected risk image frame;
[0036] The feature information extraction module is configured to extract feature information of the suspected risk image frame in at least two modalities.
[0037] The judgment module is configured to determine whether the face video to be identified is a fake face video based on the feature information of suspected risky image frames in at least two modalities.
[0038] According to a third aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the methods described in any embodiment of this specification.
[0039] According to a fourth aspect, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method described in any embodiment of this specification.
[0040] The face video detection methods and apparatuses provided in the various embodiments of this specification, individually or in combination, have at least the following beneficial effects:
[0041] 1. In the embodiments of this specification, instead of using the full face image as the object to be detected for frame-by-frame detection or uniform frame sampling detection, the suspected risk image frames in the face video are first identified. Only a portion of the full face image, i.e. the suspected risk image frames, is used as the object to be detected for feature extraction and detection. Therefore, the detection time is greatly shortened and the efficiency is improved. Furthermore, the accuracy is higher because the detection is targeted only for suspected risk image frames.
[0042] 2. In the embodiments of this specification, when extracting features for detection, it does not only use single image RGB information for detection, but uses multimodal feature information for detection, that is, it detects from multiple dimensions, thereby further improving the accuracy of detection. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 This is a schematic diagram of the system architecture used in one embodiment of this specification.
[0045] Figure 2 This is a flowchart of a face video detection method in one embodiment of this specification.
[0046] Figure 3 This is a schematic diagram of a face video detection method in another embodiment of this specification.
[0047] Figure 4 This is a flowchart of a method for determining suspected risky image frames in a video of a face to be identified, according to one embodiment of this specification.
[0048] Figure 5 This is a schematic diagram of the structure of a face video detection device in one embodiment of this specification. Detailed Implementation
[0049] The solution provided in this specification will now be described with reference to the accompanying drawings.
[0050] First, it should be noted that the terminology used in the embodiments of this invention is for the purpose of describing specific embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” used in the embodiments of this invention and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise.
[0051] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0052] To facilitate understanding of the methods provided in this manual, the system architecture involved and applicable to this manual is first described. For example... Figure 1 As shown, the system architecture mainly includes three types of network nodes: terminal devices, face video acquisition devices, and face video detection devices.
[0053] The face video acquisition device is installed on the terminal device side to acquire face videos and send the acquired face videos to the face video detection device.
[0054] A face video detection device is used to detect received face videos to determine whether the face video is a fake face video.
[0055] The choice of terminal device depends on the business scenario. For example, in an access control scenario (such as determining whether a person is allowed to pass through a company gate), the terminal device could be a device installed at the access control point. In a supermarket shopping scenario, the terminal device could be a point-of-sale (POS) machine. In an online shopping scenario, the terminal device could be a mobile phone or computer. In a smart home scenario, the terminal device could be smart home devices such as smart locks, smart sockets, smart lights, and smart cameras.
[0056] The facial video capture device can be a standalone device or a camera integrated into a terminal device.
[0057] The face video detection device can be set up in a server, which can be a single server or a server group consisting of multiple servers.
[0058] It should be understood that Figure 1 The number of terminal devices, face video acquisition devices, and face video detection devices shown is merely illustrative. Any number can be selected and deployed as needed.
[0059] Figure 2 This is a flowchart of a face video detection method in one embodiment of this specification. The method is executed by a face video detection device. It is understood that this method can also be executed by any device, equipment, platform, or cluster of devices with computing and processing capabilities. See also... Figure 2 The method includes:
[0060] Step 201: Obtain the video of the face to be identified.
[0061] Step 203: Calculate the motion information of at least two image frames in the video of the face to be identified using the sparse optical flow algorithm.
[0062] Step 205: Based on the motion information of at least two image frames in the face video to be identified, determine the suspected risk image frames in the face video to be identified.
[0063] Step 207: Extract feature information of the suspected risk image frames in at least two modalities.
[0064] Step 209: Based on the feature information of suspected risky image frames in at least two modalities, determine whether the face video to be identified is a fake face video.
[0065] According to the above Figure 2 As can be seen from the process shown, in the embodiments of this specification, instead of using the full face image as the object to be detected for frame-by-frame detection or uniform frame sampling detection, the suspected risk image frames in the face video are first identified. Only a part of the full face image, namely the suspected risk image frames, is used as the object to be detected for feature extraction and detection. Therefore, the detection time is greatly shortened and the efficiency is improved. Furthermore, the accuracy is higher because the detection is targeted to only the suspected risk image frames.
[0066] Furthermore, in the embodiments of this specification, when extracting features for detection, it does not only use single image RGB information for detection, but uses multimodal feature information for detection, that is, it detects from multiple dimensions, thereby further improving the accuracy of detection.
[0067] The following is combined Figure 3 ,right Figure 2 The process shown is illustrated with an example.
[0068] First, for step 201: obtain the video of the face to be identified.
[0069] As mentioned above, the methods described in this specification can be applied to various business scenarios. For example, they can be applied to access control detection scenarios (such as determining whether a person is allowed to pass through a company gate). In this case, the method obtains the facial video of the person to be identified from the access control scenario and determines whether to allow the person to pass through the access control based on the detection results. Another example is in-store supermarket shopping scenarios, where the method obtains the facial video of the person to be identified from the POS machine and determines whether to allow the person in front of the POS machine to make a payment. Yet another example is in smart home scenarios, such as a smart remote control collecting the facial video of the person to be identified and determining whether to allow the person to open or close a cabinet door using the remote control based on the detection results.
[0070] See Figure 1 On the terminal device side, after the face video acquisition device acquires the face video to be recognized, it will upload the acquired face video to the face video detection device in the cloud.
[0071] Subsequent processing steps can all be performed by the face video detection device.
[0072] Step 203: Calculate the motion information of at least two image frames in the video of the face to be identified using the sparse optical flow algorithm.
[0073] Optical flow refers to the movement of target pixels in an image caused by the movement of objects or the camera between two consecutive frames. Optical flow is a two-dimensional vector field representing the displacement of a point from the first frame to the second. The working principle of optical flow is based on the following assumptions: the pixel intensity of the scene remains essentially constant between adjacent frames, and adjacent pixels have similar motion.
[0074] In this embodiment, the principle of sparse optical flow algorithm is used to detect the authenticity of face videos. This is because, for forged face videos, such as those created by replaying a legitimate user's face image, artifacts will always exist in the face video. Therefore, artifact risk is a common occurrence during face tampering or forgery, and this embodiment utilizes this situation for detection. The sparse optical flow algorithm can calculate the motion information from one frame to the next in the face video to be identified. Therefore, in step 203, the sparse optical flow algorithm can be used to calculate the velocity vector of each pixel in each image frame of the face video to be identified.
[0075] The sparse optical flow algorithm used in step 203 can be the Lucas-Kanade Method.
[0076] Next, for step 205: Based on the motion information of at least two image frames in the face video to be identified, determine the suspected risk image frames in the face video to be identified.
[0077] In the embodiments described in this specification, the process of step 205 may include:
[0078] For the video of the face to be identified, extract the motion information of every two adjacent image frames;
[0079] Based on the motion information of every two adjacent image frames, the velocity vector of each pixel in each image frame is obtained;
[0080] For each image frame in the video of the face to be identified, it is determined whether the image frame is a suspected risk image frame in the video of the face to be identified based on the velocity vector of the pixel in each image frame and the average velocity vector of the pixels around the pixel.
[0081] To further target the detection, targeted segmentation detection can be performed based on the characteristics of different regions of the face. Therefore, in one embodiment of this specification, to achieve segmentation detection, it may further include: dividing the face into at least two key regions, such as at least two key regions among the left eye region, right eye region, nose region, mouth region, and facial contour region.
[0082] Accordingly, in step 205, it is specifically determined whether an image frame is a suspected risk image frame in the video of the face to be identified by comparing the velocity vector of each pixel within a key region of an image frame with the average velocity vector of all other pixels within that key region. If the velocity vector of a pixel changes by more than a threshold compared to the average velocity vector of all other pixels in the surrounding area (i.e., the key region), it indicates that the image frame has a high risk of artifacts, and thus the image frame is identified as a suspected risk image frame in the video of the face to be identified.
[0083] The video of the face to be identified is composed of multiple image frames, such as 1000 image frames, or 1000 face images. Through the process in step 205, high-risk image frames can be located from these 1000 image frames, such as 20 suspected risk image frames. These 20 suspected risk image frames are combined into a detection sequence. Subsequently, it is only necessary to extract features from the detection sequence composed of these 20 suspected risk image frames and detect the extracted features.
[0084] For corresponding partition detection solutions, please refer to [link / reference]. Figure 4 In one embodiment of this specification, step 205 includes the following steps:
[0085] Step 401: For each key region included in an image frame, obtain the difference between the velocity vector of each pixel in the key region and the average velocity vector of all other pixels within the key region.
[0086] Step 403: Based on the differences between each pixel in the key region, obtain the artifact risk index corresponding to the key region.
[0087] Step 405: Determine whether an image frame is a suspected risk image frame in the video of the face to be identified based on the artifact risk index corresponding to each key region in an image frame.
[0088] The above Figure 4 In the process, the difference between two vectors can be represented by the angle between them. In one embodiment of this specification, one implementation of steps 401 and 403 includes:
[0089] For each key region, the artifact risk index for that region is calculated using the following formula:
[0090]
[0091] Where r is the artifact risk index of the key region, i and j are variables, and K is the number of pixels in the key region; V i V is the velocity vector of the i-th pixel within this critical region. j Let be the velocity vector of the j-th pixel within this critical region;
[0092] Accordingly, the implementation process of step 405 above includes:
[0093] For an image frame, determine whether the artifact risk index corresponding to at least one key region of the image frame is greater than a pre-set index threshold corresponding to the key region. If so, determine that the image frame is a suspected risk image frame in the video of the face to be identified.
[0094] For example, for the first frame of the video of the face to be identified, the artifact risk index r1 for the left eye region, r2 for the right eye region, r3 for the nose region, r4 for the mouth region, and r5 for the facial contour region are calculated. Then, in step 405, if any one of these five artifact risk indices is greater than the index threshold corresponding to its key region, the first frame can be identified as a suspected risk image frame and added to the detection sequence. Similarly, this process is performed on every subsequent frame of the video of the face to be identified; if a frame is identified as a suspected risk image frame, that frame is added to the detection sequence.
[0095] Next, for step 207: extract the feature information of the suspected risk image frame in at least two modalities.
[0096] In the embodiments of this specification, the feature information of suspected risk image frames in at least two modalities includes at least two of the following: features of multi-frame motion information, single-frame frequency domain features, and single-frame spatial domain features.
[0097] In step 207, feature information of the suspected risk image frame is extracted in at least two modalities, including at least two of the following:
[0098] Use the FlowNet2 optical flow model or the calcOpticalFlowPyrLK operator to extract features of multi-frame motion information;
[0099] The DCT transform can be used to calculate the frequency domain features of a single frame, or the FFT operator can be used to calculate the frequency domain features of a single frame.
[0100] Single-frame spatial features can be obtained by using RGB color information as single-frame spatial features, or by using YUV color space or image features filtered by the Sobel operator.
[0101] Next, for step 209: Based on the feature information of suspected risky image frames in at least two modalities, determine whether the face video to be identified is a fake face video.
[0102] In step 209, the feature information of suspected risk image frames under at least two modalities is fused in series along the channel direction; the fused features are then input into a pre-trained detection model for identification.
[0103] In one embodiment of this specification, a face video detection device is proposed, see [link to relevant documentation]. Figure 5 The device includes:
[0104] Input module 501 is configured to obtain the video of the face to be identified;
[0105] The sparse optical flow algorithm module 502 is configured to use the sparse optical flow algorithm to calculate the motion information of at least two image frames in the video of the face to be identified.
[0106] The detection sequence generation module 503 is configured to determine the suspected risk image frames in the face video to be identified based on the motion information of at least two image frames in the face video to be identified, and to form a detection sequence using each suspected risk image frame;
[0107] The feature information extraction module 504 is configured to extract feature information of the suspected risk image frame in at least two modalities.
[0108] The judgment module 505 is configured to determine whether the face video to be identified is a fake face video based on the feature information of suspected risk image frames in at least two modalities.
[0109] In one embodiment of the device described in this specification, the sequence to be detected generation module 503 is configured to perform:
[0110] For the video of the face to be identified, extract the motion information of every two adjacent image frames;
[0111] Based on the motion information of every two adjacent image frames, the velocity vector of each pixel in each image frame is obtained;
[0112] For each image frame in the video of the face to be identified, it is determined whether the image frame is a suspected risk image frame in the video of the face to be identified based on the velocity vector of the pixel in each image frame and the average velocity vector of the pixels around the pixel.
[0113] In one embodiment of the device described in this specification, the face is divided into at least two key regions;
[0114] Accordingly, the sequence generation module 503 is configured to perform the following: for each key region included in an image frame, obtain the difference between the velocity vector of each pixel in the key region and the average velocity vector of all other pixels in the key region; obtain the artifact risk index corresponding to the key region based on the differences of each pixel in the key region; and determine whether the image frame is a suspected risk image frame in the face video to be identified based on the artifact risk index corresponding to each key region in the image frame.
[0115] In one embodiment of the device described in this specification, the sequence to be detected generation module 503 is configured to perform:
[0116] For each key region, the artifact risk index for that region is calculated using the following formula:
[0117]
[0118] Where r is the artifact risk index of the key region, i and j are variables, and K is the number of pixels in the key region; V i V is the velocity vector of the i-th pixel within this critical region. j Let be the velocity vector of the j-th pixel within this critical region;
[0119] For an image frame, determine whether the artifact risk index corresponding to at least one key region of the image frame is greater than a pre-set index threshold corresponding to the key region. If so, determine that the image frame is a suspected risk image frame in the video of the face to be identified.
[0120] In one embodiment of the device described in this specification, at least two key regions include at least two of the following: left eye region, right eye region, nose region, mouth region, and facial contour region.
[0121] In one embodiment of the device described in this specification, the feature information of the suspected risk image frame in at least two modalities includes at least two of the following: features of multi-frame motion information, single-frame frequency domain features, and single-frame spatial domain features.
[0122] In one embodiment of the device described in this specification, the feature information extraction module 504 is configured to perform at least two of the following:
[0123] Use the FlowNet2 optical flow model or the calcOpticalFlowPyrLK operator to extract features of multi-frame motion information;
[0124] The DCT transform can be used to calculate the frequency domain features of a single frame, or the FFT operator can be used to calculate the frequency domain features of a single frame.
[0125] Single-frame spatial features can be obtained by using RGB color information as single-frame spatial features, or by using YUV color space or image features filtered by the Sobel operator.
[0126] In one embodiment of the device described in this specification, the determination module 504 is configured to perform:
[0127] Feature information of suspected risky image frames from at least two modalities is fused in series along the channel direction; the fused features are then input into a pre-trained detection model for identification.
[0128] It should be noted that the above-mentioned devices are typically implemented on the server side. They can be set up on independent servers, or some or all of the devices can be combined and installed on the same server. This server can be a single server or a server cluster consisting of multiple servers. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system. The above-mentioned devices can also be implemented on computer terminals with strong computing capabilities.
[0129] This specification provides, in one embodiment, a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the methods of any embodiment in the specification.
[0130] This specification provides a computing device according to one embodiment, including a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to perform the method of any embodiment of the specification.
[0131] It is understood that the structures illustrated in the embodiments of this specification do not constitute a specific limitation on the apparatus of the embodiments of this specification. In other embodiments of the specification, the above-described apparatus may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0132] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0133] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in this invention can be implemented using hardware, software, widgets, or any combination thereof. When implemented in software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium.
[0134] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method of detecting a face video, wherein, The method comprises: obtaining a to-be-identified face video; calculating motion information of at least two image frames in a face image in the to-be-identified face video by using a sparse optical flow algorithm; determining a suspected risk image frame in the face image in the to-be-identified face video according to the motion information of the at least two image frames in the face image in the to-be-identified face video; extracting feature information of the suspected risk image frame in the face image under at least two modalities respectively; judging whether the to-be-identified face video is a fake face video according to the feature information of the suspected risk image frame under the at least two modalities; wherein the determining the suspected risk image frame in the face image in the to-be-identified face video according to the motion information of the at least two image frames in the face image in the to-be-identified face video comprises: extracting motion information of each two adjacent image frames in the face image in the to-be-identified face video; obtaining a velocity vector of a pixel point in each image frame in the face image according to the motion information of each two adjacent image frames in the face image; determining whether the image frame in the face image is the suspected risk image frame in the to-be-identified face video according to the velocity vector of the pixel point in each image frame in the face image and an average velocity vector of each pixel point around the pixel point for each image frame in the to-be-identified face video; wherein the method further comprises: dividing the face into at least two key regions; the determining whether the image frame in the face image is the suspected risk image frame in the to-be-identified face video according to the velocity vector of the pixel point in each image frame in the face image and the average velocity vector of each pixel point around the pixel point comprises: obtaining a gap between the velocity vector of each pixel point in the key region and the average velocity vector of all other pixel points in the face image in the key region for each key region in the face image included in one image frame; and obtaining a artifact risk index corresponding to the key region according to each gap of each pixel point in the key region; determining whether the image frame in the face image is the suspected risk image frame in the to-be-identified face video according to each artifact risk index corresponding to each key region in the face image in one image frame.
2. The method of claim 1, wherein, the obtaining the gap between the velocity vector of each pixel point in the key region and the average velocity vector of all other pixel points in the face image in the key region, and the obtaining the artifact risk index corresponding to the key region according to each gap of each pixel point in the key region comprise: calculating the artifact risk index corresponding to each key region by using the following calculation formula for each key region: Wherein, r is the artifact risk index of the key region, i, j are variables, K is the number of pixel points in the key region; V i is the velocity vector of the i-th pixel point in the key region, V j is the velocity vector of the j-th pixel point in the key region; the determining whether the image frame in the face image is the suspected risk image frame in the to-be-identified face video according to each artifact risk index corresponding to each key region in the face image in one image frame comprises; For an image frame, it is judged whether an artifact risk index corresponding to at least one key region of the image frame is greater than an index threshold corresponding to the key region, and if so, it is determined that the image frame in the face image is a suspected risk image frame in the to-be-identified face video.
3. The method of claim 1, wherein, The at least two key regions include at least two of a left eye region, a right eye region, a nose region, a mouth region, and a face contour region.
4. The method of claim 1, wherein, The feature information of the suspected risk image frame under the at least two modalities includes at least two of multi-frame motion information features, single-frame frequency domain features, and single-frame spatial domain features.
5. The method of claim 4, wherein, The extracting the feature information of the suspected risk image frame under the at least two modalities includes at least two of the following: extracting the multi-frame motion information features using a FlowNet2 optical flow model or a calcOpticalFlowPyrLK operator; calculating the single-frame frequency domain features using a DCT transform or using an FFT operator; using RGB color information as the single-frame spatial domain features or using YUV color space or image features filtered by a Sobel operator to obtain the single-frame spatial domain features.
6. The apparatus for detecting a face video, wherein, The apparatus includes: an input module configured to obtain a to-be-identified face video; a sparse optical flow algorithm module configured to calculate motion information of at least two image frames in a face image in the to-be-identified face video using a sparse optical flow algorithm; a to-be-detected sequence generation module configured to determine suspected risk image frames in the face image in the to-be-identified face video according to the motion information of the at least two image frames in the face image in the to-be-identified face video, and form a to-be-detected sequence using the suspected risk image frames; a feature information extraction module configured to extract feature information of the suspected risk image frames in the face image under at least two modalities; a judgment module configured to judge whether the to-be-identified face video is a fake face video according to the feature information of the suspected risk image frames under the at least two modalities; wherein the to-be-detected sequence generation module is configured to perform: extracting motion information of each two adjacent image frames in a face image in the to-be-identified face video; obtaining a velocity vector of a pixel point in each image frame in the face image according to the motion information of each two adjacent image frames in the face image; for each image frame in the to-be-identified face video, determining whether the image frame in the face image is a suspected risk image frame in the to-be-identified face video according to the velocity vector of the pixel point in each image frame in the face image and an average velocity vector of each pixel point around the pixel point; wherein the face is divided into at least two key regions; the determining whether the image frame in the face image is the suspected risk image frame in the to-be-identified face video according to the velocity vector of the pixel point in each image frame in the face image and the average velocity vector of each pixel point around the pixel point includes: For each key region in the face image included in one image frame, a difference between a speed vector of each pixel point in the face image in the key region and an average speed vector of all other pixel points in the face image in the range of the key region is obtained; and according to each difference of each pixel point in the key region, a artifact risk index corresponding to the key region is obtained; According to each artifact risk index corresponding to each key region in the face image in one image frame, whether the image frame in the face image is a suspected risk image frame in the to-be-identified face video is determined. 7.A computer readable storage medium having stored thereon a computer program, which, when executed in a computer, causes the computer to perform the method of any one of claims 1-5. 8.A computing device comprising a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method of any one of claims 1-5.
Citation Information
Patent Citations
Face anti-fake method based on local motion pattern
CN105447432A
Face identification method and device
CN108154090A
False video detection method and system
CN114332718A