Training method, device and computing equipment of face detection model based on video stream

By sorting and pooling video streams and processing optical streams, eigenvectors are extracted to train face detection models, solving the problem that face anti-spoof detection cannot be achieved through video streams in the prior art, achieving high accuracy and low cost Face detection.

CN112528872BActive Publication Date: 2024-11-19SINOCHEM CAPITAL DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011475791.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-15
Publication Date
2024-11-19
Estimated Expiration
2040-12-15

AI Technical Summary

Technical Problem

There is a lack of a solution in the prior art that can realize anti-spoof detection of faces by processing video streams alone, especially in scenarios where there are no additional sensors such as infrared, depth, and thermal graphics.

Method used

By sorting and pooling and optical flow processing on the frame images in the video stream, the sorting pooling feature vectors and optical flow feature vectors are extracted, and combined with these feature vectors for training, a face detection model that can quickly and accurately detect fake face images is obtained. .

Benefits of technology

It realizes high-precision face anti-spoof detection without additional sensors, optimizes face detection methods and reduces costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112528872B_ABST
    Figure CN112528872B_ABST
Patent Text Reader

Abstract

The present invention discloses a training method, device and computing equipment for a face detection model based on video streams. The method includes: obtaining a plurality of collected video streams, configuring corresponding sample labels for the plurality of video streams, and constructing a video stream sample set; for each video stream in the video stream sample set, extracting a plurality of frame images from the video stream, performing feature extraction on the plurality of frame images to obtain a sorted pooled feature vector and an optical flow feature vector of the video stream, and then determining the feature vector of the video stream; training a face detection model based on the feature vector of each video stream in the video stream sample set and the sample label corresponding to each video stream. The scheme determines the final feature vector of the video stream based on the sorted pooled feature vector and the optical flow feature vector. The face detection model obtained by model training not only effectively improves the accuracy of face detection, but also can realize face anti-spoofing detection only by processing the video stream.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a training method, device, computing equipment and storage medium for a face detection model based on a video stream. Background Art

[0002] In recent years, face recognition has been a research hotspot and has been widely used in various application scenarios, such as identity authentication, access control recognition, customs monitoring, etc. Due to the rapidly growing demand for face recognition, face anti-spoofing technology has received great attention. How to provide a high-security level of face recognition technology to avoid deceptive attacks has become an urgent problem to be solved.

[0003] In the prior art, the commonly used face anti-spoofing method is usually achieved by combining information provided by additional sensors such as infrared, depth, and thermal images on the basis of processing video streams. However, in real life, there are many face recognition scenarios where additional sensors cannot be used for various reasons, such as scenarios with only cameras. Therefore, the prior art lacks a face detection solution that can achieve face anti-spoofing by only processing video streams. Summary of the invention

[0004] In view of the above problems, the present invention is proposed to provide a method, apparatus, computing device and storage medium for training a face detection model based on a video stream that overcomes the above problems or at least partially solves the above problems.

[0005] According to one aspect of the present invention, a method for training a face detection model based on a video stream is provided, the method comprising:

[0006] Acquire multiple collected video streams, configure corresponding sample labels for the multiple video streams, and construct a video stream sample set; the frame image in each video stream contains a face image;

[0007] For each video stream in the video stream sample set, extract multiple frame images from the video stream, perform feature extraction on the multiple frame images, and obtain a sorted pooling feature vector and an optical flow feature vector of the video stream; determine a feature vector of the video stream based on the sorted pooling feature vector and the optical flow feature vector;

[0008] A face detection model is trained based on the feature vector of each video stream in the video stream sample set and the sample label corresponding to each video stream.

[0009] According to another aspect of the present invention, there is provided a training device for a face detection model based on a video stream, the device comprising:

[0010] The sample set building module is suitable for acquiring the collected multiple video streams, configuring corresponding sample labels for the multiple video streams, and building a video stream sample set; the frame image in each video stream contains a face image;

[0011] The feature processing module is adapted to extract multiple frame images from each video stream in the video stream sample set, perform feature extraction on the multiple frame images, and obtain a sorted pooling feature vector and an optical flow feature vector of the video stream; and determine a feature vector of the video stream based on the sorted pooling feature vector and the optical flow feature vector;

[0012] The training module is suitable for training a face detection model according to the feature vector of each video stream in the video stream sample set and the sample label corresponding to each video stream.

[0013] According to another aspect of the present invention, there is provided a computing device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;

[0014] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned training method of the face detection model based on the video stream.

[0015] According to another aspect of the present invention, a computer storage medium is provided, in which at least one executable instruction is stored, and the executable instruction enables a processor to perform operations corresponding to the above-mentioned training method of a face detection model based on a video stream.

[0016] According to the technical solution provided by the present invention, by performing sorting pooling processing and optical flow processing on multiple frame images in a video stream respectively, the sorting pooling feature vector and the optical flow feature vector are conveniently obtained, and then the feature vector that can accurately reflect the motion information and optical flow change information of the frame image of the video stream is obtained; training is performed according to the feature vectors of each video stream in the video stream sample set and the sample labels corresponding to each video stream, so that the trained face detection model can quickly and accurately detect whether the video stream contains forged face images. The implementation method is simple and low-cost, and there is no need to combine additional sensors such as infrared, depth, and thermal graphics. Face anti-spoofing detection can be achieved only by processing the video stream, which effectively improves the accuracy of face detection and optimizes the face detection method.

[0017] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0019] Figure 1 A schematic diagram of a process of training a face detection model based on a video stream according to an embodiment of the present invention is shown;

[0020] Figure 2 A schematic flow chart of a method for training a face detection model based on a video stream according to another embodiment of the present invention is shown;

[0021] Figure 3 A structural block diagram of a video stream-based face detection model training device according to an embodiment of the present invention is shown;

[0022] Figure 4 A schematic structural diagram of a computing device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0023] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0024] Figure 1 FIG. 4 is a flow chart showing a method for training a face detection model based on a video stream according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0025] Step S101, obtain multiple collected video streams, configure corresponding sample labels for the multiple video streams, and construct a video stream sample set.

[0026] Among them, a large number of video streams with facial images can be collected, and multiple collected video streams are obtained as samples, and corresponding sample labels are configured for multiple video streams. The frame images in each video stream contain facial images. By configuring corresponding sample labels for video streams, video streams with sample labels are obtained. Such video streams with sample labels can be used in model training. Then, all video streams with sample labels are summarized to construct a video stream sample set.

[0027] Step S102, for each video stream in the video stream sample set, extract multiple frame images from the video stream, perform feature extraction on the multiple frame images, obtain a sorted pooled feature vector and an optical flow feature vector of the video stream, and determine a feature vector of the video stream based on the sorted pooled feature vector and the optical flow feature vector.

[0028] Among them, for each video stream in the video stream sample set, multiple frame images are extracted from the video stream. Those skilled in the art can set the number and method of extracting frame images according to actual needs, which is not limited here.

[0029] After extracting multiple frame images, the multiple frame images can be sorted and pooled to obtain the sorted pooled feature vector of the video stream, and the multiple frame images can be processed by optical flow to obtain the optical flow feature vector of the video stream, wherein the sorted pooled feature vector can reflect the motion information of the frame images of the video stream, and the optical flow feature vector can reflect the optical flow change information of the frame images of the video stream. After obtaining the sorted pooled feature vector and the optical flow feature vector, the sorted pooled feature vector and the optical flow feature vector can be combined, for example, the sorted pooled feature vector and the optical flow feature vector are spliced ​​into a whole, and the feature vector finally obtained is used as the feature vector of the video stream.

[0030] Taking into account that the optical flow of a video stream containing real, living face images is changing, while the optical flow of a video stream obtained by forging face images is almost unchanged, the present invention performs two processing steps, namely, sorting pooling and optical flow processing, on the video stream, and determines the final feature vector of the video stream based on the obtained sorting pooling feature vector and the optical flow feature vector, so that the feature vector of the video stream finally obtained can fully reflect the motion information and optical flow change information of the frame image, thereby more accurately and comprehensively reflecting the characteristics of the video stream, so that model training based on the feature vector of the video stream can obtain a face detection model with higher face detection accuracy.

[0031] Step S103: training a face detection model according to the feature vector of each video stream in the video stream sample set and the sample label corresponding to each video stream.

[0032] Specifically, the model training can be performed based on the feature vector of each video stream in the video stream sample set and the sample label corresponding to each video stream to obtain the face detection model. Using the face detection model, there is no need to combine additional sensors such as infrared, depth, thermal graphics, etc., and face anti-spoofing detection can be achieved by processing the video stream alone, and whether the video stream contains a forged face image can be detected quickly and accurately. Those skilled in the art can determine the specific training method according to actual needs, which is not limited here.

[0033] According to the training method of the face detection model based on video stream provided by the present embodiment, by performing sorting pooling processing and optical flow processing on multiple frame images in the video stream respectively, the sorting pooling feature vector and the optical flow feature vector are conveniently obtained, and then the feature vector that can accurately reflect the motion information and optical flow change information of the frame image of the video stream is obtained; training is performed according to the feature vectors of each video stream in the video stream sample set and the sample labels corresponding to each video stream, so that the trained face detection model can quickly and accurately detect whether the video stream contains forged face images. The implementation method is simple and low-cost. There is no need to combine additional sensors such as infrared, depth, and thermal graphics. Face anti-spoofing detection can be achieved only by processing the video stream, which effectively improves the accuracy of face detection and optimizes the face detection method.

[0034] Figure 2 FIG. 4 is a flow chart showing a method for training a face detection model based on a video stream according to another embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:

[0035] Step S201, obtain multiple collected video streams, configure corresponding sample labels for the multiple video streams, and construct a video stream sample set.

[0036] Among them, the frame images in each video stream contain human face images. Specifically, the video stream obtained by shooting real, living human face images can be used as a positive sample, and a sample label for representing the positive sample can be configured for it; the video stream obtained by artificially or technically forging human face images can be used as a negative sample, such as a video stream obtained by shooting human face photos or other substitutes for authorized human faces, and a video stream obtained by replacing all frame images in the positive sample with the same frame image, etc., and a sample label for representing the negative sample can be configured for it. Corresponding sample labels are configured for all video streams, and the video streams are summarized to construct a video stream sample set, which can be stored in a database for use in model training.

[0037] Step S202: for each video stream in the video stream sample set, extract a plurality of frame images from the video stream.

[0038] A plurality of frame images may be extracted from the video stream according to a preset frame image extraction rule, for example, the preset frame image extraction rule may include randomly extracting a preset number of frame images from the video stream or extracting a preset number of frame images from the video stream according to a preset extraction interval, wherein the preset extraction interval may be a fixed interval or an extraction interval determined based on the length of the video stream, for example, video streams of different lengths have different extraction intervals. Those skilled in the art may set the preset frame image extraction rule according to actual needs, which is not limited here.

[0039] After extracting multiple frame images, feature extraction can be performed on the multiple frame images to obtain the sorted pooled feature vector and optical flow feature vector of the video stream. Among them, feature extraction on multiple frame images to obtain the sorted pooled feature vector of the video stream can be implemented through steps S203 to S205; feature extraction on multiple frame images to obtain the optical flow feature vector of the video stream can be implemented through steps S206 to S208.

[0040] Step S203 , sorting the plurality of frame images according to their frame sequence numbers to obtain a frame sequence.

[0041] Each frame image has a corresponding frame number, which is set in time sequence, and specifically, the frame number can be 0, 1, 2, etc. In step S203, the plurality of frame images are sorted in ascending order of the frame number, that is, the plurality of frame images are sorted in time sequence to obtain a frame sequence.

[0042] Assume that in step S202, for a certain video stream, n frame images are extracted from the video stream, and the n frame images are frame image x1, frame image x2, ..., frame image x n-1 , frame image x n , sort the n frame images in ascending order according to the frame numbers, and obtain the frame sequence X = [x1, x2, ..., x n-1 , x n ].

[0043] Step S204, performing smoothing processing on the frame sequence to obtain a frame vector sequence corresponding to the frame sequence.

[0044] The frame sequence can be smoothed using an existing smoothing method to obtain a frame vector sequence V = [v1, v2, ..., v n-1 , v n ], where v1 is the frame vector of frame image x1, v2 is the frame vector of frame image x2, and so on. Moreover, the frame image and the frame vector of the frame image have the same frame sequence number, that is, x1 and v1 have the same frame sequence number, and x2 and v2 have the same frame sequence number.

[0045] Step S205, cyclically use the sorting function to calculate the sorting score of each frame vector in the frame vector sequence, and optimize the parameter value of the first specified parameter in the sorting function until the sorting loop end condition that the frame vector with a later frame number has a larger sorting score is met, and the final parameter value of the first specified parameter is obtained, and the final parameter value is used as the sorting pooling feature vector of the video stream.

[0046] Considering that the video stream is composed of ordered frame images, the frame sequence determines the evolution of the frame image. For the frame vector sequence corresponding to the frame sequence, we focus on the order of each frame vector. If v t+1 Yes t The sequel of is represented by v t+1 >v t , then the frame vector sequence can also be represented as v n >…>v t >…>v1, then the transitivity of frame images can be transformed into a pairwise learning ranking problem, that is, if v a >v b and In this embodiment, a ranking function W(v;u)=u is constructed. T ·v t Calculate the ranking score of each frame vector in the frame vector sequence, where u is the first specified parameter, which can be a vector, u T is the transpose of the first specified argument, v t is the frame image x t The frame vector.

[0047] In step S205, the ranking function W(v;u) is cyclically used to calculate the ranking score of each frame vector in the frame vector sequence, and the parameter value of the first designated parameter u in the ranking function is continuously optimized until the ranking cycle end condition that the frame vector with a later frame number has a larger ranking score is met. When the ranking cycle end condition is met, the final parameter value of the first designated parameter obtained can be used to reflect the sequence of each frame vector in the frame vector sequence, indicating the evolution process of the frame image over time. In specific applications, algorithms such as RankSVM and SVR (support vector regression) can be used to complete the optimization processing of the first designated parameter u. Specifically, the structural risk minimization and maximum interval optimization framework can be used to construct the target optimization function. Through continuous optimization, the ranking score of each frame vector meets the ranking cycle end condition, and the final parameter value of the first designated parameter is obtained.

[0048] Step S206 , extracting two frame images from the plurality of frame images to form a frame image group, thereby obtaining a plurality of frame image groups.

[0049] In order to extract the optical flow feature vector of the video stream, after extracting multiple frame images of a certain video stream in step S202, it is necessary to construct a frame image group. Specifically, for a certain video stream, two different frame images can be extracted arbitrarily from the multiple frame images of the video stream extracted in step S202 or extracted according to a preset extraction rule to form a frame image group, and multiple processing is performed in this way to obtain multiple frame image groups. Those skilled in the art can set the number of frame image groups according to actual needs, and no specific limitation is made here.

[0050] Assume that in step S202, for a certain video stream, n frame images are extracted from the video stream, and the n frame images are frame image x1, frame image x2, ..., frame image x n-1 , frame image x n , in step S206, two frame image groups need to be formed. If the preset extraction rule is to extract the first frame image and the last frame image from multiple frame images to form one frame image group, and extract the first frame image and the second frame image from multiple frame images to form another frame image group, then in step S206, frame image x1 and frame image x2 are extracted from n frame images. n , using frame image x1 and frame image x n A frame image group is formed, frame image x1 and frame image x2 are extracted from the n frame images, and another frame image group is formed using frame image x1 and frame image x2.

[0051] Each of the obtained frame image groups contains two frame images. For the convenience of subsequent description, the two frame images in the frame image group are respectively called the first frame image I1 and the second frame image I2, where the frame sequence number of the second frame image I2 is greater than the frame sequence number of the first frame image I1, then the frame image group can be expressed as [I1, I2].

[0052] Step S207, calculating group feature vectors of multiple frame image groups.

[0053] In this embodiment, a hierarchical optical flow estimation method can be used to calculate the group feature vector of the frame image group. Specifically, for each frame image group, corresponding visible mask data are respectively configured for the first frame image and the second frame image in the frame image group, wherein the visible mask data corresponding to the first frame image is represented as M1, and the visible mask data corresponding to the second frame image is represented as M2; and a first optical flow domain (u′1, v′1) from the first frame image I1 to the second frame image I2 and a second optical flow domain (u′2, v′2) from the second frame image I2 to the first frame image I1 are set. Wherein, u′1 and v′1 respectively represent the speed vectors of the optical flow of the pixels in the frame image along the X-axis and Y-axis directions in the process of changing from the first frame image I1 to the second frame image I2; u′2 and v′2 respectively represent the speed vectors of the optical flow of the pixels in the frame image along the X-axis and Y-axis directions in the process of changing from the second frame image I2 to the first frame image I1. Then, an optical flow objective function is constructed according to the visible mask data M1, the visible mask data M2, the first optical flow domain (u′1, v′1) and the second optical flow domain (u′2, v′2).

[0054] In an application, the optical flow objective function may include a data item for matching M1 and M2, an optical flow smoothing item, and a symmetric matching item, wherein the data item includes and The optical flow smoothing term includes and Symmetric matches include and Specifically, and It can be calculated by the following formulas 1 to 3 respectively.

[0055]

[0056]

[0057]

[0058] Among them, g in the above formulas represents the Gaussian filter parameter, and η is the exponential factor; and The calculation can be performed in a similar manner, which will not be described in detail here.

[0059] Then the optical flow objective function can be calculated by the following formula 4.

[0060]

[0061] Among them, E(u′1, v′1, u′2, v′2) in Formula 4 represents the optical flow objective function, α represents the smoothness term coefficient factor, and β represents the symmetry term coefficient factor.

[0062] After the construction of the optical flow objective function is completed, the optical flow objective function can be cyclically used to calculate the output value of the optical flow objective function, and the parameter value of the second specified parameter in the optical flow objective function is continuously optimized until the output value meets the optical flow cycle end condition, thereby obtaining the final parameter value of the second specified parameter. Among them, the second specified parameter includes the above-mentioned η, α and β, and the optical flow cycle end condition can be specifically that the output value of the optical flow objective function is the minimum value or the output value is less than the preset threshold. In the optimization process, the values ​​can be traversed within the preset value ranges corresponding to η, α and β, and the parameter values ​​of η, α and β are continuously optimized so that the output value of the optical flow objective function meets the optical flow cycle end condition, thereby obtaining the final parameter values ​​of η, α and β, and then obtaining the final domain data of the first optical flow domain (i.e., the values ​​of u′1 and v′1) and the final domain data of the second optical flow domain (i.e., the values ​​of u′2 and v′2), and then using the final domain data of the first optical flow domain to determine the group feature vector of the frame image group. Optionally, a weighted operation may be performed on u′1 and v′1, and the result of the weighted operation is used as the group feature vector of the frame image group. Those skilled in the art may set the weighted value according to actual needs, which is not specifically limited here.

[0063] Step S208, determining the optical flow feature vector of the video stream according to the group feature vectors of the plurality of frame image groups.

[0064] After obtaining the group feature vector of each frame image group, the group feature vectors of multiple frame image groups can be combined, for example, the group feature vectors of multiple frame image groups can be spliced ​​into a whole or weighted fusion can be performed, and the final feature vector can be used as the optical flow feature vector of the video stream.

[0065] Step S209, determining the feature vector of the video stream according to the sorted pooling feature vector and the optical flow feature vector.

[0066] After obtaining the sorted pooling feature vector and the optical flow feature vector, the sorted pooling feature vector and the optical flow feature vector can be combined, for example, the sorted pooling feature vector and the optical flow feature vector are spliced ​​into a whole, and the finally obtained feature vector is used as the feature vector of the video stream.

[0067] Each video stream in the video stream sample set is processed according to step S202 to step S209, so as to obtain a feature vector of each video stream for use in model training.

[0068] Step S210, training a face detection model according to the feature vector of each video stream in the video stream sample set and the sample label corresponding to each video stream.

[0069] The training process of the face detection model is completed through multiple iterations. In step S210, the feature vector of the video stream and the sample label corresponding to the video stream are extracted from the video stream sample set; the feature vector of the extracted video stream is input into the initial face detection model for training to obtain the initial detection result corresponding to the video stream; the loss function is calculated according to the initial detection result and the sample label corresponding to the video stream, and the weight parameter of the initial face detection model is updated according to the loss function; the above steps are iteratively executed until the iteration end condition is met to obtain the face detection model. Specifically, the loss between the initial detection result and the sample label is calculated to obtain the loss function, and the backpropagation operation is performed according to the loss function, and the weight parameter of the initial face detection model is updated according to the operation result. The iteration end condition may include: the number of iterations reaches the iteration number threshold; and / or the output value of the loss function is less than the loss threshold. Then, it can be judged whether the iteration end condition is met by judging whether the number of iterations reaches the iteration number threshold, or it can be judged whether the iteration end condition is met by judging whether the output value of the loss function is less than the loss threshold. After the iteration end condition is met, the iteration process is stopped, thereby obtaining a face detection model, which is a trained face detection model.

[0070] Specifically, the feature vector of the extracted video stream is input into the initial face detection model, and the feature vector of the extracted video stream is subjected to multiple pooling processes using the initial face detection model, wherein the multiple pooling processes may include: mean pooling, maximum pooling, minimum pooling, and median pooling, etc. Specifically, mean pooling focuses more on global features, maximum pooling focuses more on important local features, and median pooling has the characteristics of learning edge and texture structure, and has strong anti-noise ability. An intermediate pooling feature vector is obtained by combining the pooling results of multiple pooling processes, for example, the pooling results of multiple pooling processes are spliced ​​into a whole or weighted fusion is performed, and the obtained feature vector is used as an intermediate pooling feature vector, and then the intermediate pooling feature vector is trained to obtain the initial detection result corresponding to the video stream. In the process of model training, the present embodiment fully considers the pooling results of multiple pooling processes, so that the face detection model finally trained has strong robustness and high detection accuracy. Using the face detection model, it is possible to quickly and accurately detect whether a video stream contains a forged face image.

[0071] According to the training method of the face detection model based on video stream provided by the present embodiment, the accurate calculation of the sorted pooled feature vector and the optical flow feature vector of the video stream is realized, and the final feature vector of the video stream is determined based on the sorted pooled feature vector and the optical flow feature vector, so that the feature vector of the video stream finally obtained can more accurately and comprehensively reflect the characteristics of the video stream; training is performed according to the feature vectors of each video stream in the video stream sample set and the sample labels corresponding to each video stream, and the pooling results of multiple pooling processing are fully combined in the training process, so that the face detection model finally trained has strong robustness and high detection accuracy, and there is no need to combine additional sensors such as infrared, depth, thermal graphics, etc., and face anti-spoofing detection can be achieved only by processing the video stream. The implementation method is simple and the face detection method is optimized.

[0072] Figure 3 FIG. 4 shows a structural block diagram of a training device for a face detection model based on a video stream according to an embodiment of the present invention. Figure 3 As shown, the device includes: a sample set construction module 310, a feature processing module 320 and a training module 330.

[0073] The sample set construction module 310 is adapted to: obtain the collected multiple video streams, configure corresponding sample tags for the multiple video streams, and construct a video stream sample set, wherein the frame image in each video stream contains a face image.

[0074] The feature processing module 320 is suitable for: for each video stream in the video stream sample set, extracting multiple frame images from the video stream, performing feature extraction on the multiple frame images, and obtaining a sorted pooled feature vector and an optical flow feature vector of the video stream; and determining a feature vector of the video stream based on the sorted pooled feature vector and the optical flow feature vector.

[0075] The training module 330 is adapted to: train a face detection model according to the feature vector of each video stream in the video stream sample set and the sample label corresponding to each video stream.

[0076] Optionally, the feature processing module 320 is further suitable for: sorting multiple frame images according to their frame numbers to obtain a frame sequence; smoothing the frame sequence to obtain a frame vector sequence corresponding to the frame sequence; cyclically using the sorting function to calculate the sorting score of each frame vector in the frame vector sequence, and optimizing the parameter value of the first specified parameter in the sorting function until the sorting loop end condition that the frame vector with a later frame number has a larger sorting score is met; obtaining the final parameter value of the first specified parameter, and using the final parameter value as the sorted pooling feature vector of the video stream.

[0077] Optionally, the feature processing module 320 is further adapted to: extract two frame images from multiple frame images to form a frame image group, thereby obtaining multiple frame image groups; calculate group feature vectors of the multiple frame image groups; and determine the optical flow feature vector of the video stream based on the group feature vectors of the multiple frame image groups.

[0078] Optionally, the frame image group includes a first frame image and a second frame image, and the frame number of the second frame image is greater than the frame number of the first frame image; the feature processing module 320 is further suitable for: for each frame image group, respectively configuring corresponding visible mask data for the first frame image and the second frame image in the frame image group, and setting a first optical flow domain from the first frame image to the second frame image and a second optical flow domain from the second frame image to the first frame image; constructing an optical flow objective function according to the visible mask data, the first optical flow domain and the second optical flow domain; cyclically using the optical flow objective function to calculate the output value of the optical flow objective function, by optimizing the parameter value of the second specified parameter in the optical flow objective function until the output value meets the optical flow cycle end condition; obtaining the final domain data of the first optical flow domain, and using the final domain data to determine the group feature vector of the frame image group.

[0079] Optionally, the training module 330 is further adapted to: extracting feature vectors of the video stream and sample labels corresponding to the video stream from a set of video stream samples; inputting the extracted feature vectors of the video stream into an initial face detection model for training to obtain an initial detection result corresponding to the video stream; calculating a loss function based on the initial detection result and sample labels corresponding to the video stream, and updating weight parameters of the initial face detection model based on the loss function; and iterating the above steps in a loop until an iteration end condition is met to obtain a face detection model.

[0080] Optionally, the training module 330 is further suitable for: inputting the feature vector of the extracted video stream into the initial face detection model, using the initial face detection model to perform multiple pooling processes on the feature vector of the extracted video stream, combining the pooling results of the multiple pooling processes to obtain an intermediate pooled feature vector, training the intermediate pooled feature vector, and obtaining an initial detection result corresponding to the video stream.

[0081] Optionally, the multiple pooling processes include: mean pooling process, maximum pooling process, minimum pooling process and median pooling process.

[0082] According to the training device of the face detection model based on video stream provided by the present embodiment, the accurate calculation of the sorted pooled feature vector and the optical flow feature vector of the video stream is realized, and the final feature vector of the video stream is determined based on the sorted pooled feature vector and the optical flow feature vector, so that the feature vector of the video stream finally obtained can more accurately and comprehensively reflect the characteristics of the video stream; training is performed according to the feature vectors of each video stream in the video stream sample set and the sample labels corresponding to each video stream, and the pooling results of multiple pooling processing are fully combined in the training process, so that the face detection model finally trained has strong robustness and high detection accuracy, and there is no need to combine additional sensors such as infrared, depth, thermal graphics, etc., and face anti-spoofing detection can be achieved only by processing the video stream. The implementation method is simple and the face detection method is optimized.

[0083] The present invention also provides a non-volatile computer storage medium, which stores at least one executable instruction, and the executable instruction can execute the training method of the face detection model based on the video stream in any of the above method embodiments.

[0084] Figure 4 A schematic diagram of the structure of a computing device according to an embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the computing device.

[0085] like Figure 4As shown, the computing device may include: a processor (processor) 402 , a communications interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .

[0086] in:

[0087] The processor 402 , the communication interface 404 , and the memory 406 communicate with each other via a communication bus 408 .

[0088] The communication interface 404 is used to communicate with other devices such as clients or other servers.

[0089] The processor 402 is used to execute the program 410, and specifically can execute the relevant steps in the above-mentioned embodiment of the training method of the face detection model based on the video stream.

[0090] Specifically, the program 410 may include program codes, which include computer operation instructions.

[0091] The processor 402 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the computing device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0092] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0093] Program 410 can be specifically used to enable processor 402 to execute the training method of the face detection model based on video stream in any of the above-mentioned method embodiments. The specific implementation of each step in program 410 can refer to the corresponding descriptions in the corresponding steps and units in the above-mentioned training embodiment of the face detection model based on video stream, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above-mentioned method embodiment, which will not be repeated here.

[0094] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the description of the above specific languages ​​is for disclosing the best mode of the present invention.

[0095] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0096] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those expressly recited in each claim. Rather, as reflected in the claims, inventive aspects lie in less than all of the features of the individual embodiments previously disclosed. Therefore, the claims that follow the detailed description are hereby expressly incorporated into the detailed description, with each claim itself serving as a separate embodiment of the present invention.

[0097] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0098] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims, any one of the claimed embodiments may be used in any combination.

[0099] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0100] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.

[0101] The present invention discloses: A1. A training method for a face detection model based on a video stream, characterized in that the method comprises:

[0102] Acquire multiple collected video streams, configure corresponding sample labels for the multiple video streams, and construct a video stream sample set; the frame image in each video stream contains a face image;

[0103] For each video stream in the video stream sample set, extract multiple frame images from the video stream, perform feature extraction on the multiple frame images, and obtain a sorted pooling feature vector and an optical flow feature vector of the video stream; determine a feature vector of the video stream based on the sorted pooling feature vector and the optical flow feature vector;

[0104] A face detection model is trained based on the feature vector of each video stream in the video stream sample set and the sample label corresponding to each video stream.

[0105] A2. The method according to A1 is characterized in that extracting features from multiple frame images to obtain the sorted pooled feature vector of the video stream further comprises:

[0106] Sorting the plurality of frame images according to the frame sequence numbers of the plurality of frame images to obtain a frame sequence;

[0107] Performing smoothing on the frame sequence to obtain a frame vector sequence corresponding to the frame sequence;

[0108] cyclically using the sorting function to calculate the sorting score of each frame vector in the frame vector sequence, by optimizing the parameter value of the first specified parameter in the sorting function until a sorting cycle end condition is met in which the sorting score of the frame vector with a later frame sequence number is larger;

[0109] A final parameter value of the first specified parameter is obtained, and the final parameter value is used as a sorted pooling feature vector of the video stream.

[0110] A3. The method according to A1 is characterized in that extracting features from multiple frame images to obtain the optical flow feature vector of the video stream further comprises:

[0111] Extracting two frame images from a plurality of frame images to form a frame image group, thereby obtaining a plurality of frame image groups;

[0112] Calculating group feature vectors of multiple frame image groups;

[0113] The optical flow feature vector of the video stream is determined according to the group feature vectors of the plurality of frame image groups.

[0114] A4. The method according to A3, characterized in that the frame image group includes a first frame image and a second frame image, and the frame sequence number of the second frame image is greater than the frame sequence number of the first frame image;

[0115] The calculating of the group feature vectors of the plurality of frame image groups further comprises:

[0116] For each frame image group, respectively configure corresponding visible mask data for a first frame image and a second frame image in the frame image group, and set a first optical flow domain from the first frame image to the second frame image and a second optical flow domain from the second frame image to the first frame image;

[0117] constructing an optical flow objective function according to the visible mask data, the first optical flow domain, and the second optical flow domain;

[0118] cyclically calculating an output value of the optical flow objective function by using the optical flow objective function, by optimizing a parameter value of a second specified parameter in the optical flow objective function, until the output value satisfies an optical flow cycle end condition;

[0119] The final domain data of the first optical flow domain is obtained, and the group feature vector of the frame image group is determined by using the final domain data.

[0120] A5. The method according to any one of A1-A4, characterized in that the training of the face detection model based on the feature vector of each video stream in the video stream sample set and the sample label corresponding to each video stream further comprises:

[0121] Extracting a feature vector of a video stream and a sample label corresponding to the video stream from the video stream sample set;

[0122] Inputting the feature vector of the extracted video stream into the initial face detection model for training to obtain the initial detection result corresponding to the video stream;

[0123] Calculating a loss function according to the initial detection result and sample label corresponding to the video stream, and updating weight parameters of the initial face detection model according to the loss function;

[0124] The above steps are executed in a loop and iterated until the iteration end condition is met to obtain a face detection model.

[0125] A6. The method according to A5, characterized in that the step of inputting the extracted feature vector of the video stream into the initial face detection model for training to obtain the initial detection result corresponding to the video stream further comprises:

[0126] The feature vector of the extracted video stream is input into the initial face detection model, and the initial face detection model is used to perform multiple pooling processes on the feature vector of the extracted video stream, and the pooling results of the multiple pooling processes are combined to obtain an intermediate pooling feature vector, and the intermediate pooling feature vector is trained to obtain the initial detection result corresponding to the video stream.

[0127] A7. The method according to A6 is characterized in that the multiple pooling processes include: mean pooling process, maximum pooling process, minimum pooling process and median pooling process.

[0128] The present invention also discloses: B8. A training device for a face detection model based on a video stream, characterized in that the device comprises:

[0129] The sample set building module is suitable for acquiring the collected multiple video streams, configuring corresponding sample labels for the multiple video streams, and building a video stream sample set; the frame image in each video stream contains a face image;

[0130] A feature processing module, adapted to extract multiple frame images from each video stream in the video stream sample set, perform feature extraction on the multiple frame images, and obtain a sorted pooling feature vector and an optical flow feature vector of the video stream; and determine a feature vector of the video stream based on the sorted pooling feature vector and the optical flow feature vector;

[0131] The training module is adapted to train a face detection model according to the feature vector of each video stream in the video stream sample set and the sample label corresponding to each video stream.

[0132] B9. The device according to B8, characterized in that the feature processing module is further adapted to:

[0133] Sorting the plurality of frame images according to the frame sequence numbers of the plurality of frame images to obtain a frame sequence;

[0134] Performing smoothing on the frame sequence to obtain a frame vector sequence corresponding to the frame sequence;

[0135] cyclically using the sorting function to calculate the sorting score of each frame vector in the frame vector sequence, by optimizing the parameter value of the first specified parameter in the sorting function until a sorting cycle end condition is met in which the sorting score of the frame vector with a later frame sequence number is larger;

[0136] A final parameter value of the first specified parameter is obtained, and the final parameter value is used as a sorted pooling feature vector of the video stream.

[0137] B10. The device according to B8, characterized in that the feature processing module is further adapted to:

[0138] Extracting two frame images from a plurality of frame images to form a frame image group, thereby obtaining a plurality of frame image groups;

[0139] Calculating group feature vectors of multiple frame image groups;

[0140] The optical flow feature vector of the video stream is determined according to the group feature vectors of the plurality of frame image groups.

[0141] B11. The device according to B10, characterized in that the frame image group includes a first frame image and a second frame image, and the frame sequence number of the second frame image is greater than the frame sequence number of the first frame image;

[0142] The feature processing module is further adapted to:

[0143] For each frame image group, respectively configure corresponding visible mask data for a first frame image and a second frame image in the frame image group, and set a first optical flow domain from the first frame image to the second frame image and a second optical flow domain from the second frame image to the first frame image;

[0144] constructing an optical flow objective function according to the visible mask data, the first optical flow domain, and the second optical flow domain;

[0145] cyclically calculating an output value of the optical flow objective function by using the optical flow objective function, by optimizing a parameter value of a second specified parameter in the optical flow objective function, until the output value satisfies an optical flow cycle end condition;

[0146] The final domain data of the first optical flow domain is obtained, and the group feature vector of the frame image group is determined by using the final domain data.

[0147] B12. The apparatus according to any one of B8-B11, characterized in that the training module is further adapted to:

[0148] Extracting a feature vector of a video stream and a sample label corresponding to the video stream from the video stream sample set;

[0149] Inputting the feature vector of the extracted video stream into the initial face detection model for training to obtain the initial detection result corresponding to the video stream;

[0150] Calculating a loss function according to the initial detection result and sample label corresponding to the video stream, and updating weight parameters of the initial face detection model according to the loss function;

[0151] The above steps are executed in a loop and iterated until the iteration end condition is met to obtain a face detection model.

[0152] B13. The apparatus according to B12, wherein the training module is further adapted to:

[0153] The feature vector of the extracted video stream is input into the initial face detection model, and the initial face detection model is used to perform multiple pooling processes on the feature vector of the extracted video stream, and the pooling results of the multiple pooling processes are combined to obtain an intermediate pooling feature vector, and the intermediate pooling feature vector is trained to obtain the initial detection result corresponding to the video stream.

[0154] B14. The device according to B13 is characterized in that the multiple pooling processes include: mean pooling process, maximum pooling process, minimum pooling process and median pooling process.

[0155] The present invention also discloses: C15. A computing device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;

[0156] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the training method of the face detection model based on the video stream as described in any one of A1-A7.

[0157] The present invention also discloses: D16. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to execute operations corresponding to the training method of a face detection model based on a video stream as described in any one of A1-A7.

Claims

1. A training method for a face detection model based on video stream, characterized in that: The method comprises: Acquire multiple collected video streams, configure corresponding sample labels for the multiple video streams, and construct a video stream sample set; the frame image in each video stream contains a face image; For each video stream in the video stream sample set, a plurality of frame images are extracted from the video stream, and features are extracted from the plurality of frame images to obtain a sorted pooling feature vector and an optical flow feature vector of the video stream; a feature vector of the video stream is determined based on the sorted pooling feature vector and the optical flow feature vector; wherein the sorted pooling feature vector and the optical flow feature vector are spliced ​​into a whole, and the obtained feature vector is used as the feature vector of the video stream to reflect the motion information and optical flow change information of the frame image; A face detection model is obtained by training according to the feature vector of each video stream in the video stream sample set and the sample label corresponding to each video stream; The step of extracting features from the plurality of frame images to obtain a sorted pooled feature vector of the video stream further includes: Sort the multiple frame images according to the order of the frame numbers of the multiple frame images from small to large to obtain a frame sequence; Performing smoothing processing on the frame sequence to obtain a frame vector sequence corresponding to the frame sequence; the frame image and the frame vector of the frame image have the same frame sequence number; Recycling sorting function W(v;u)=u T ·v t Calculate the ranking score of each frame vector in the frame vector sequence, use the structural risk minimization and maximum interval optimization framework to construct a target optimization function, and optimize the parameter value of the first specified parameter in the ranking function until the ranking cycle end condition that the ranking score of the frame vector with a later frame number is larger is met; wherein u is the first specified parameter, the first specified parameter is a vector, u T is the transpose of the first specified argument, v t is the frame image x t The frame vector of Obtain the final parameter value of the first specified parameter, and use the final parameter value as the sorted pooling feature vector of the video stream; wherein the final parameter value is used to reflect the sequence of each frame vector in the frame vector sequence, indicating the evolution process of the frame image over time.

2. The method according to claim 1, characterized in that: Extracting features from multiple frame images to obtain the optical flow feature vector of the video stream further includes: Extracting two frame images from a plurality of frame images to form a frame image group, thereby obtaining a plurality of frame image groups; Calculating group feature vectors of multiple frame image groups; The optical flow feature vector of the video stream is determined according to the group feature vectors of the plurality of frame image groups.

3. The method according to claim 2, characterized in that The frame image group includes a first frame image and a second frame image, and the frame sequence number of the second frame image is greater than the frame sequence number of the first frame image; The calculating of the group feature vectors of the plurality of frame image groups further comprises: For each frame image group, respectively configure corresponding visible mask data for a first frame image and a second frame image in the frame image group, and set a first optical flow domain from the first frame image to the second frame image and a second optical flow domain from the second frame image to the first frame image; constructing an optical flow objective function according to the visible mask data, the first optical flow domain, and the second optical flow domain; cyclically calculating an output value of the optical flow objective function by using the optical flow objective function, by optimizing a parameter value of a second specified parameter in the optical flow objective function, until the output value satisfies an optical flow cycle end condition; The final domain data of the first optical flow domain is obtained, and the group feature vector of the frame image group is determined by using the final domain data.

4. The method according to any one of claims 1 to 3, characterized in that: The training of the face detection model according to the feature vector of each video stream in the video stream sample set and the sample label corresponding to each video stream further comprises: Extracting a feature vector of a video stream and a sample label corresponding to the video stream from the video stream sample set; Inputting the feature vector of the extracted video stream into the initial face detection model for training to obtain the initial detection result corresponding to the video stream; Calculating a loss function according to the initial detection result and sample label corresponding to the video stream, and updating weight parameters of the initial face detection model according to the loss function; The above steps are executed in a loop and iterated until the iteration end condition is met to obtain a face detection model.

5. The method according to claim 4, characterized in that The step of inputting the extracted feature vector of the video stream into the initial face detection model for training to obtain the initial detection result corresponding to the video stream further comprises: The feature vector of the extracted video stream is input into the initial face detection model, and the initial face detection model is used to perform multiple pooling processes on the feature vector of the extracted video stream, and the pooling results of the multiple pooling processes are combined to obtain an intermediate pooling feature vector, and the intermediate pooling feature vector is trained to obtain the initial detection result corresponding to the video stream.

6. The method according to claim 5, characterized in that The multiple pooling processes include: mean pooling, maximum pooling, minimum pooling and median pooling.

7. A training device for a face detection model based on video stream, characterized in that: The device comprises: The sample set building module is suitable for acquiring the collected multiple video streams, configuring corresponding sample labels for the multiple video streams, and building a video stream sample set; the frame image in each video stream contains a face image; The feature processing module is adapted to extract multiple frame images from each video stream in the video stream sample set, perform feature extraction on the multiple frame images, and obtain a sorted pooling feature vector and an optical flow feature vector of the video stream; determine a feature vector of the video stream based on the sorted pooling feature vector and the optical flow feature vector; wherein the sorted pooling feature vector and the optical flow feature vector are spliced ​​into a whole, and the obtained feature vector is used as the feature vector of the video stream to reflect the action information of the frame image and the optical flow change information; A training module, adapted to train a face detection model according to a feature vector of each video stream in the video stream sample set and a sample label corresponding to each video stream; Wherein, the feature processing module is further adapted to: Sort the multiple frame images according to the order of the frame numbers of the multiple frame images from small to large to obtain a frame sequence; Performing smoothing processing on the frame sequence to obtain a frame vector sequence corresponding to the frame sequence; the frame image and the frame vector of the frame image have the same frame sequence number; Recycling sorting function W(v;u)=u T ·v t Calculate the ranking score of each frame vector in the frame vector sequence, use the structural risk minimization and maximum interval optimization framework to construct a target optimization function, and optimize the parameter value of the first specified parameter in the ranking function until the ranking cycle end condition that the ranking score of the frame vector with a later frame number is larger is met; wherein u is the first specified parameter, the first specified parameter is a vector, u T is the transpose of the first specified argument, v t is the frame image x t The frame vector of Obtain the final parameter value of the first specified parameter, and use the final parameter value as the sorted pooling feature vector of the video stream; wherein the final parameter value is used to reflect the sequence of each frame vector in the frame vector sequence, indicating the evolution process of the frame image over time.

8. The device according to claim 7, characterized in that The feature processing module is further adapted to: Extracting two frame images from a plurality of frame images to form a frame image group, thereby obtaining a plurality of frame image groups; Calculating group feature vectors of multiple frame image groups; The optical flow feature vector of the video stream is determined according to the group feature vectors of the plurality of frame image groups.

9. The device according to claim 8, characterized in that The frame image group includes a first frame image and a second frame image, and the frame sequence number of the second frame image is greater than the frame sequence number of the first frame image; The feature processing module is further adapted to: For each frame image group, respectively configure corresponding visible mask data for a first frame image and a second frame image in the frame image group, and set a first optical flow domain from the first frame image to the second frame image and a second optical flow domain from the second frame image to the first frame image; constructing an optical flow objective function according to the visible mask data, the first optical flow domain, and the second optical flow domain; cyclically calculating an output value of the optical flow objective function by using the optical flow objective function, by optimizing a parameter value of a second specified parameter in the optical flow objective function, until the output value satisfies an optical flow cycle end condition; The final domain data of the first optical flow domain is obtained, and the group feature vector of the frame image group is determined by using the final domain data.

10. The device according to any one of claims 7 to 9, characterized in that: The training module is further adapted to: Extracting a feature vector of a video stream and a sample label corresponding to the video stream from the video stream sample set; Inputting the feature vector of the extracted video stream into the initial face detection model for training to obtain the initial detection result corresponding to the video stream; Calculating a loss function according to the initial detection result and sample label corresponding to the video stream, and updating weight parameters of the initial face detection model according to the loss function; The above steps are executed in a loop and iterated until the iteration end condition is met to obtain a face detection model.

11. The device according to claim 10, characterized in that The training module is further adapted to: The feature vector of the extracted video stream is input into the initial face detection model, and the initial face detection model is used to perform multiple pooling processes on the feature vector of the extracted video stream, and the pooling results of the multiple pooling processes are combined to obtain an intermediate pooling feature vector, and the intermediate pooling feature vector is trained to obtain the initial detection result corresponding to the video stream.

12. The device according to claim 11, characterized in that The multiple pooling processes include: mean pooling, maximum pooling, minimum pooling and median pooling.

13. A computing device comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the training method of the face detection model based on the video stream as described in any one of claims 1-6.

14. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to execute operations corresponding to the training method of a face detection model based on a video stream as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Video motion recognition method based on fusion of sorting pooling and spatial features

    CN108416795A

  • Face replacement detection method and device, electronic equipment and computer storage medium

    CN111611873A