This application claims priority to Chinese Patent Application No. 202010304904.9, filed with the China National Intellectual Property Administration (CNIPA) on Apr. 17, 2020, the content of which is incorporated herein by reference in its entirety.
Embodiments of the present disclosure relate to the field of computer technology, and more particularly, to a method and apparatus for spoof detection.
In spoof detection, whether an image is an image of a live body or not is detected, and is a basic component module of a spoof detection system, thereby ensuring safety of the spoof detection system. Currently, spoof detection algorithms by using deep learning techniques are the mainstream methods in the field, and have greatly improved in accuracy compared with conventional algorithms.
At present, there are many implementation schemes of spoof detection algorithms. According to technical routes, they are divided into two main types: traditional spoof manual feature extraction and classification methods and spoof detection methods by using deep learning. The conventional manual feature extraction and classification methods mainly include spoof detection methods which are based on the manual features such as LBP (Local binary pattern), HOG (Histogram of oriented gradients), and SIFT (Scale-invariant feature transform) and conventional classifiers. This type of method first extracts spoof features based on manually designed feature extractors, and then classifies the features based on conventional classifiers such as SVM (Support Vector Machine) to finally obtain spoof detection results. The spoof detection method by using deep learning mainly includes spoof detection methods based on convolution neural networks, LSTM (Long Short-Term Memory), and the like. This type of method use neural networks for spoof feature extraction and classification.
Embodiments of the present disclosure provide a method and apparatus for spoof detection.
In a first aspect, some embodiments of the present disclosure provides a method for spoof detection. The method includes: acquiring an original image; inputting the original image into a training-completed spoof cue extraction network, to obtain a spoof cue signal of the original image; calculating an element-wise mean value of the spoof cue signal; and generating a spoof detection result of the original image based on the element-wise mean value.
In some embodiments, the training-completed spoof cue extraction network is obtained by: acquiring training samples, wherein a training sample comprises a sample original image and a sample category tag for labeling that the sample original image belongs to a live body sample or a spoof sample; and training the spoof cue extraction network to be trained and an auxiliary classifier network to be trained simultaneously by using the training samples, to obtain the training-completed spoof cue extraction network.
In some embodiments, the training the spoof cue extraction network to be trained and the auxiliary classifier network to be trained simultaneously by using the training samples, to obtain the training-completed spoof cue extraction network, includes: training the spoof cue extraction network to be trained by using the sample original image, to obtain a sample spoof cue signal of the sample original image and a pixel-wise L1 loss corresponding to the live body sample; training the auxiliary classifier network to be trained with the sample spoof cue signal, to obtain a sample category of the sample original image and a binary classification loss; and updating parameters of the spoof cue extraction network to be trained and the auxiliary classifier network to be trained based on the pixel-wise L1 loss and the binary classification loss until the networks converge, so as to obtain the training-completed spoof cue extraction network.
In some embodiments, the training the spoof cue extraction network to be trained by using the sample original image, to obtain the sample spoof cue signal of the sample original image, includes: inputting the sample original image into the spoof cue extraction network to be trained, to obtain the sample spoof cue signal; the training the auxiliary classifier network to be trained by using the sample spoof cue signal, to obtain the sample category of the sample original image, includes: superimposing the sample spoof cue signal on the sample original image, to obtain a sample superimposition image; inputting the sample superimposition image to the auxiliary classifier network to be trained, to obtain the sample category of the sample original image.
In some embodiments, the spoof cue extraction network comprises an encoder-decoder structure; and the inputting the sample original image into the spoof cue extraction network to be trained, to obtain the sample spoof cue signal, includes: inputting the sample original image into the encoder, to obtain a sample encoded image; inputting the sample encoded image into the decoder, and to obtain a sample decoded image; inputting the sample decoded image into a tangent activation layer, to obtain the sample spoof cue signal.
In some embodiments, the encoder comprises a plurality of encoding residual sub-networks; and the inputting the sample original image to the encoder, to obtain the sample encoded image, includes: down-sampling the sample original image successively by using the serially connected plurality of encoding residual sub-networks, to obtain a plurality of sample down-sampled encoded images output by the plurality of encoding residual sub-networks, wherein the sample down-sampled encoded image output by the last encoding residual sub-network is the sample encoded image.
In some embodiments, the decoder comprises a plurality of decoding residual sub-networks; and the inputting the sample encoded image to the decoder, to obtain the sample decoded image includes: decoding the sample encoded image successively by using the serially connected plurality of decoding residual sub-networks, to obtain the sample decoded image.
In some embodiments, the decoding the sample encoded image successively by using the serially connected plurality of decoding residual sub-networks, includes: for a current decoding residual sub-network in the plurality of decoding residual sub-networks, up-sampling an input of the current decoding residual sub-network by using nearest neighbor interpolation, to obtain a sample up-sampled decoded image; convolving the sample up-sampled decoded image, to obtain a sample convolved decoded image; concatenating the sample convolved decoded image with an output of an encoding residual sub-network symmetrical to the current decoding residual sub-network, to obtain a sample concatenated decoded image; and inputting the sample concatenated decoded image into an encoding residual sub-network in the current decoding residual sub-network, to obtain an output of the current decoding residual sub-network.
In a second aspect, some embodiments of the present disclosure provide an apparatus for spoof detection. The apparatus includes: an acquisition unit, configured to acquire an original image; an extraction unit, configured to input the original image into a training-completed spoof cue extraction network, to obtain a spoof cue signal of the original image; a calculation unit, configured to calculate an element-wise mean value of the spoof cue signal; and a generation unit, configured to generate a spoof detection result of the original image based on the element-wise mean value.
In some embodiments, the training-completed spoof cue extraction network is obtained by: acquiring training samples, wherein a training sample comprises a sample original image and a sample category tag for labeling that the sample original image belongs to a live body sample or a spoof sample; and training the spoof cue extraction network to be trained and an auxiliary classifier network to be trained simultaneously by using the training samples, to obtain the training-completed spoof cue extraction network.
In some embodiments, the training the spoof cue extraction network to be trained and the auxiliary classifier network to be trained simultaneously by using the training samples, to obtain the training-completed spoof cue extraction network, includes: training the spoof cue extraction network to be trained by using the sample original image, to obtain a sample spoof cue signal of the sample original image and a pixel-wise L1 loss corresponding to the live body sample; training the auxiliary classifier network to be trained with the sample spoof cue signal, to obtain a sample category of the sample original image and a binary classification loss; updating parameters of the spoof cue extraction network to be trained and the auxiliary classifier network to be trained based on the pixel-wise L1 loss and the binary classification loss until the networks converge, so as to obtain the training-completed spoof cue extraction network.
In some embodiments, the training the spoof cue extraction network to be trained by using the sample original image, to obtain the sample spoof cue signal of the sample original image, includes: inputting the sample original image into the spoof cue extraction network to be trained, to obtain the sample spoof cue signal; and the training the auxiliary classifier network to be trained by using the sample spoof cue signal, to obtain the sample category of the sample original image, includes: superimposing the sample spoof cue signal on the sample original image, to obtain a sample superimposition image; and inputting the sample superimposition image to the auxiliary classifier network to be trained, to obtain the sample category of the sample original image.
In some embodiments, the spoof cue extraction network comprises an encoder-decoder structure; and the inputting the sample original image into the spoof cue extraction network to be trained, to obtain the sample spoof cue signal, includes: inputting the sample original image into the encoder, to obtain a sample encoded image; inputting the sample encoded image into the decoder, and to obtain a sample decoded image; and inputting the sample decoded image into a tangent activation layer, to obtain the sample spoof cue signal.
In some embodiments, the encoder comprises a plurality of encoding residual sub-networks; and the inputting the sample original image to the encoder, to obtain the sample encoded image, includes: down-sampling the sample original image successively by using the serially connected plurality of encoding residual sub-networks, to obtain a plurality of sample down-sampled encoded images output by the plurality of encoding residual sub-networks, wherein the sample down-sampled encoded image output by the last encoding residual sub-network is the sample encoded image.
In some embodiments, the decoder comprises a plurality of decoding residual sub-networks; and the inputting the sample encoded image to the decoder, to obtain the sample decoded image, includes: decoding the sample encoded image successively by using the serially connected plurality of decoding residual sub-networks, to obtain the sample decoded image.
In some embodiments, the decoding the sample encoded image successively by using the serially connected plurality of decoding residual sub-networks, includes: for a current decoding residual sub-network in the plurality of decoding residual sub-networks, up-sampling an input of the current decoding residual sub-network by using nearest neighbor interpolation, to obtain a sample up-sampled decoded image; convolving the sample up-sampled decoded image, to obtain a sample convolved decoded image; concatenating the sample convolved decoded image with an output of an encoding residual sub-network symmetrical to the current decoding residual sub-network, to obtain a sample concatenated decoded image; and inputting the sample concatenated decoded image into an encoding residual sub-network in the current decoding residual sub-network, to obtain an output of the current decoding residual sub-network.
In a third aspect, some embodiments of the present disclosure provide an electronic device, the electronic device includes: one or more processors; storage means, storing one or more programs thereon, the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method according to any one of the embodiments in the first aspect.
In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium, storing a computer program, where the computer program, when executed by a processor, causes the processor to perform the method according to any one of the embodiments in the first aspect.
Other features, objects, and advantages of the present disclosure will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
Embodiments of present disclosure will be described below in detail with reference to the accompanying drawings. It should be appreciated that the specific embodiments described herein are merely used for explaining the relevant disclosure, rather than limiting the disclosure. In addition, it should be noted that, for the ease of description, only the parts related to the relevant disclosure are shown in the accompanying drawings.
It should also be noted that the some embodiments in the present disclosure and some features in the disclosure may be combined with each other on a non-conflict basis. Features of the present disclosure will be described below in detail with reference to the accompanying drawings and in combination with embodiments.
As shown in
The photographing device 101 may be a hardware or a software. When the photographing device 101 is a hardware, it may be various electronic devices supporting image photographing, including but not limited to a camera, a camera, a smartphone, and the like. When the photographing device 101 is a software, it may be installed in the electronic device mentioned above. It may be implemented as a plurality of software or software modules, or as a single software or software module. It is not specifically limited herein.
The server 103 may provide various services. For example, the server 103 may analyze the data such as an original image acquired from the photographing device 101, and generate a processing result (for example, a spoof detection result).
It should be noted that the server 103 may be a hardware or a software. When the server 103 is a hardware, a distributed server cluster composed of multiple servers may be implemented or a single server may be implemented. When the server 103 is a software, it may be implemented as a plurality of software or software modules (e.g., for providing distributed services) or as a single software or software module. It is not specifically limited herein.
It should be noted that the method for spoof detection provided in embodiments of the present disclosure is generally performed by the server 103, and accordingly, the apparatus for spoof detection is generally provided in the server 103.
It should be understood that the number of photographing devices, networks and servers in
With continuing reference to
Step 201, acquiring an original image.
In an embodiment, an execution body of the method for spoof detection (for example, the server 103 shown in
Step 202, inputting the original image into a training-completed spoof cue extraction network, to obtain a spoof cue signal or spoof cue signals of the original image.
In an embodiment, the execution body described above may input the original image into the training-completed spoof cue extraction network, to output a spoof cue signal or spoof cue signals of the original image. The spoof cue extraction network may be used to extract a spoof cue signal of an image input thereto. A spoof cue signal may be a characteristic signal indicating that a target in the image, which is input into the spoof cue extraction network, is not a live body. The spoof cue signal or spoof cue signals of a live body is usually an all-zero graph, and the spoof cue signal or spoof cue signals of the non-live body is usually not an all-zero graph.
Step 203, calculating an element-wise mean value of the spoof cue signal.
In an embodiment, the execution body described above may calculate an element-wise mean value of the spoof cue signal (s). The element-wise mean value may be a mean value obtained by adding together the spoof cue signals element by element.
Step 204: generating a spoof detection result of the original image based on the element-wise mean value.
In an embodiment, the execution body described above may generate the spoof detection result of the original image based on the element-wise mean value. The spoof detection result may be the information describing whether or not the target in the original image is a live body. Generally, the larger the element-wise mean value, the more likely the target in the original image is not a live body, and it is more likely the original image is a spoof image. Conversely, the smaller the element-wise mean value, the more likely the target in the original image is a live body, and it is more likely the original image is a live body image. Therefore, the execution body mentioned above can compare the element-wise mean value with a preset threshold value. If the element-wise mean value is greater than the preset threshold value, a detection result indicating that the target in the original image is not a live body may be generated. If the element-wise mean value is not greater than the preset threshold value, a detection result indicating that the target in the original image is a live body may be generated.
According to the method for spoof detection provided in embodiments of the present disclosure, an acquired original image is first input to a training-completed spoof cue extraction network, and an spoof cue signal of the original image is output; then an element-wise mean value of the spoof cue signal is calculated; and finally generating a spoof detection result of the original image based on the element-wise mean value. A new spoof detection method is provided, which performs spoof detection by using spoof detection technology based on spoof cue mining and amplifying, and the new spoof detection method can significantly improve the accuracy of spoof detection. Compared with the conventional manual feature extraction and classification methods, the spoof cue signal obtain herein has strong feature stability and is not easily affected by factors such as illumination. Compared with the conventional spoof detection method by using deep learning, the method provided in embodiments of the present disclose does not over-fit over small-range training samples, improving generalization of unknown attack modes and unknown spoof samples. In addition, when the method for spoof detection provided in embodiments of the present disclosure is applied to a face spoof detection scenario, the face spoof detection performance can be improved. By improving the performance of face spoof detection, the method for spoof detection provided herein may be applied to various scenarios in the field of face recognition, such as attendance, access control, security, financial payment. Many applications based on the face spoof detection technology are facilitated to improve the effect and user experience, and further promotion of business projects is facilitated.
Referring further to
Step 301, acquiring training samples.
In an embodiment, the execution body (for example, the server 103 shown in
Step 302, training the spoof cue extraction network to be trained and an auxiliary classifier network to be trained simultaneously by using the training samples, to obtain the training-completed spoof cue extraction network.
In an embodiment, the execution body mentioned above may perform training on the spoof cue extraction network to be trained and the auxiliary classifier network to be trained simultaneously by using training samples, to obtain the training-completed spoof cue extraction network. The spoof cue extraction network may be used to extract an spoof cue signal of an image input thereto. The auxiliary classifier network may be, for example, a network capable of performing binary classifications, such as ResNet (Residual Network) 18, for detecting whether an target in an image is a live body based on the spoof cue signal input thereto.
Generally, during training of the network, the output of the spoof cue extraction network may be used as an input to the auxiliary classifier network. For example, the spoof cue extraction network to be trained may be trained with a sample original image, to obtain sample spoof cue signal of the sample original image and pixel-wise L1 loss corresponding to a live body sample in the sample original images. Then the auxiliary classifier network to be trained may be trained by using the sample spoof cue signal, to obtain a sample category and a binary classification loss of the sample original image; finally, the parameters of the spoof cue extraction network to be trained and the auxiliary classifier network to be trained are updated according to the pixel-wise L1 loss and the binary classification loss until the networks converges, so that the training-completed spoof cue extraction network is obtained. When extracting the spoof cue signal, a sample original image is input to the spoof cue extraction network, to output the sample spoof cue signal. The spoof cue signal of the live body sample is defined as an all-zero graph, and a pixel-wise L1 loss is introduced for supervising live body samples without supervising the output results of spoof samples. After extracting the spoof cue signal, the sample spoof cue signal is superimposed on the sample original image to obtain a sample superimposition image, and then the sample superimposition image is input to the auxiliary classifier network to output a sample category of the sample original image. The sample spoof cue is superimposed on the sample original image and input into the auxiliary classifier network, and the network convergence is supervised by introducing a binary classification loss function.
It should be noted that the auxiliary classifier network only acts on the network training phase. In the network prediction stage, an element-wise mean operation is performed on the output of the spoof cue extraction network, and the element-wise mean value is used as a basis for detecting whether a target in an image is a live body or not.
Referring further to
Step 401: acquiring training samples.
In an embodiment, the execution body (for example, the server 103 shown in
Step 402, inputting the sample original image into the encoder, to obtain a sample encoded image.
In an embodiment, the execution body described above may input the sample original image into the encoder to obtain the sample encoded image. In general, the ResNet18 may be used as the encoder of the spoof cue extraction network. The encoder may include a plurality of encoding residual sub-networks. By passing the sample original image successively through the serially connected plurality of encoding residual sub-networks, a plurality of sample down-sampled encoded images output by the plurality of coding residual sub-networks can be obtained. The sample down-sampled encoded image output from the last encoding residual sub-network may be the sample encoded image. For example, the encoder may include five encoding residual sub-networks, each of which may perform one down-sampling on the sample original image, and for a total of five times of down-sampling on the sample original image.
Step 403, inputting the sample encoded image to the decoder, to obtain the sample decoded image.
In an embodiment, the execution body described above may input the sample encoded image into the decoder and output the sample decoded image. Generally, the decoder may include a plurality of decoding residual sub-networks. The sample decoded image may be obtained by passing the sample original image successively through the serially connected plurality of decoding residual sub-networks. The output of the last decoding residual sub-network may be the sample decoded image. For example, the decoder may include four decoding residual sub-networks, each of which may perform one up-sampling on the sample encoded image, for a total of four times of up-sampling on the sample encoded image.
In some alternative implementations of the present embodiment, for a current decoding residual network in a plurality of decoding residual sub-networks, the execution body may: up-sample an input of the current decoding residual sub-network by using the nearest neighbor interpolation, to obtain a sample up-sampled decoded image; convolve (e.g., 2×2 convolving) the sample up-sampled decoded image to obtain a sample convolved decoded image; concatenate the sample convolved decoded image with an output of an encoding residual sub-network symmetrical to the current decoding residual sub-network, to obtain a sample concatenated decoded image; and input the sample concatenated decoded image into an encoding residual sub-network in the current decoding residual sub-network, to obtain an output of the current decoding residual sub-network.
Step 404: inputting the sample decoded image to the tangent active layer, to obtain the sample spoof cue signal, and a pixel-wise L1 loss corresponding to the live body sample.
In the present embodiment, the execution body described above may input the sample decoded image to a tangent (tan h) active layer to obtain a sample spoof cue signal. In addition, the pixel-wise L1 loss corresponding to the live body sample may also be obtained. The spoof cue signal of the live body sample is defined as an all-zero graph, and the pixel-wise L1 loss is introduced to supervise the live body samples without supervising the output result of spoof samples.
Step 405, superimposing the sample spoof cue signal on the sample original image, to obtain a sample superimposition image.
In an embodiment, the execution body described above may superimpose the sample spoof cue signal on the sample original image to obtain the sample superimposition image.
Step 406, inputting the sample superimposition image to the auxiliary classifier network to be trained, to obtain a sample category of the sample image, and obtaining a binary classification loss.
In an embodiment, the execution body described above may input the sample superimposition image to the auxiliary classifier network to be trained, to obtain the sample category of the sample image. In addition, a binary classification loss may also be obtained. The network convergence is supervised by introducing a binary classification loss function.
Step 407, updating parameters of the spoof cue extraction network to be trained and the auxiliary classifier network to be trained based on the pixel-wise L1 loss and the binary classification loss until the networks converge, so as to obtain the training-completed spoof cue extraction network.
In an embodiment, the execution body may update the parameters of the spoof cue extraction network to be trained and the auxiliary classifier network to be trained based on the pixel-wise L1 loss and the binary classification loss until the networks converge, so as to obtain the training-completed spoof cue extraction network.
According to the method of training the spoof cue extraction network provided in embodiments of the present application, an spoof cue signal is extracted by using an encoder-decoder structure, and a multi-level metric learning method at a decoder stage is introduced for enlarging the inter-class feature distance between live body samples and spoof samples and shortening the intra-class feature distance between live body samples. The spoof cue signal of the live body sample is defined as an all-zero graph, and pixel-wise L1 loss is introduced for supervising the live body samples without supervising the output result of the spoof samples. By superimposing the sample spoof cue signal to the sample original image, the spoof cue signal is further amplified by using an auxiliary classifier network, thereby improving network generalization. A new spoof cue signal modeling method is designed, which extracts and amplifies the spoof cue signal through the encoder-decoder structure combined with multi-level metric learning, pixel-wise L1 loss supervision and auxiliary classifier network, and finally performs live body detection based on the strength of the spoof cue signal, which not only accelerates the convergence speed of network training, improves the generalization of spoof detection algorithm, but also improves the defense effect of spoof detection algorithm against unknown spoof samples and attack modes.
Referring further to
Referring further to
Referring further to
With further reference to
As shown in
In an embodiment, in the apparatus 800 for spoof detection: the processing detail of the acquisition unit 801, the extraction unit 802, the calculation unit 803, and the generation unit 804 and the technical effects thereof may be referred to the related description of step 201-204 in the corresponding method embodiments in
In some alternative implementations of the present embodiment, the training-completed spoof cue extraction network is obtained by acquiring training samples, wherein a training sample comprises a sample original image and a sample category tag for labeling that the sample original image belongs to a live body sample or a spoof sample; and training the spoof cue extraction network to be trained and an auxiliary classifier network to be trained simultaneously by using the training samples, to obtain the training-completed spoof cue extraction network.
In some alternative implementations of the present embodiment, the training the spoof cue extraction network to be trained and the auxiliary classifier network to be trained simultaneously by using the training samples, to obtain the training-completed spoof cue extraction network, includes: training the spoof cue extraction network to be trained by using the sample original image, to obtain a sample spoof cue signal of the sample original image and a pixel-wise L1 loss corresponding to the live body sample; training the auxiliary classifier network to be trained with the sample spoof cue signal, to obtain a sample category of the sample original image and a binary classification loss; updating parameters of the spoof cue extraction network to be trained and the auxiliary classifier network to be trained based on the pixel-wise L1 loss and the binary classification loss until the networks converge, so as to obtain the training-completed spoof cue extraction network.
In some alternative implementations of the present embodiment, the training the spoof cue extraction network to be trained by using the sample original image, to obtain the sample spoof cue signal of the sample original image, includes: inputting the sample original image into the spoof cue extraction network to be trained, to obtain the sample spoof cue signal; and the training the auxiliary classifier network to be trained by using the sample spoof cue signal, to obtain the sample category of the sample original image, includes: superimposing the sample spoof cue signal on the sample original image, to obtain a sample superimposition image; and inputting the sample superimposition image to the auxiliary classifier network to be trained, to obtain the sample category of the sample original image.
In some alternative implementations of the present embodiment, the spoof cue extraction network comprises an encoder-decoder structure; and the inputting the sample original image into the spoof cue extraction network to be trained, to obtain the sample spoof cue signal, includes: inputting the sample original image into the encoder, to obtain a sample encoded image; inputting the sample encoded image into the decoder, and to obtain a sample decoded image; inputting the sample decoded image into a tangent activation layer, to obtain the sample spoof cue signal.
In some alternative implementations of the present embodiment, the encoder comprises a plurality of encoding residual sub-networks. the inputting the sample original image to the encoder, to obtain the sample encoded image, includes: down-sampling the sample original image successively by using the serially connected plurality of encoding residual sub-networks, to obtain a plurality of sample down-sampled encoded images output by the plurality of encoding residual sub-networks, where the sample down-sampled encoded image output by the last encoding residual sub-network is the sample encoded image.
In some alternative implementations of the present embodiment, the decoder comprises a plurality of decoding residual sub-networks. the inputting the sample encoded image to the decoder, to obtain the sample decoded image, includes: decoding the sample encoded image successively by using the serially connected plurality of decoding residual sub-networks, to obtain the sample decoded image.
In some alternative implementations of the present embodiment, the decoding the sample encoded image successively by using the serially connected plurality of decoding residual sub-networks, includes: for a current decoding residual sub-network in the plurality of decoding residual sub-networks, up-sampling an input of the current decoding residual sub-network by using nearest neighbor interpolation, to obtain a sample up-sampled decoded image; convolving the sample up-sampled decoded image, to obtain a sample convolved decoded image; concatenating the sample convolved decoded image with an output of an encoding residual sub-network symmetrical to the current decoding residual sub-network, to obtain a sample concatenated decoded image; inputting the sample concatenated decoded image into an encoding residual sub-network in the current decoding residual sub-network, to obtain an output of the current decoding residual sub-network.
Referring to
The following components are connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse etc.; an output portion 907 comprising a cathode ray tube (CRT), a liquid crystal display device (LCD), a speaker etc.; a storage portion 908 including a hard disk and the like; and a communication portion 909 comprising a network interface card, such as a LAN card and a modem. The communication portion 909 performs communication processes via a network, such as the Internet. A driver 910 is also connected to the I/O interface 905 as required. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, and a semiconductor memory, may be installed on the driver 910, to facilitate the retrieval of a computer program from the removable medium 911, and the installation thereof on the storage portion 908 as needed.
In particular, according to embodiments of the present disclosure, the process described above with reference to the flow chart may be implemented in a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which comprises a computer program that is hosted in a machine-readable medium. The computer program comprises program codes for executing the method as illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 909, or may be installed from the removable medium 911. The computer program, when executed by the central processing unit (CPU) 901, implements the above mentioned functionalities as defined by the methods of the present disclosure.
It should be noted that the computer readable medium in the present disclosure may be a non-transitory computer readable medium. The computer readable medium may be a computer readable signal medium or computer readable storage medium or any combination of the above two. An example of the computer readable storage medium may include, but not limited to: electric, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, elements, or a combination any of the above. A more specific example of the computer readable storage medium may include but is not limited to: electrical connection with one or more wire, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), a fibre, a portable compact disk read only memory (CD-ROM), an optical memory, a magnet memory or any suitable combination of the above. In some embodiments of the present disclosure, the computer readable storage medium may be any tangible medium containing or storing programs which can be used by a command execution system, apparatus or element or incorporated thereto. In some embodiments of the present disclosure, the computer readable signal medium may include data signal in the base band or propagating as parts of a carrier, in which computer readable program codes are carried. The propagating signal may take various forms, including but not limited to: an electromagnetic signal, an optical signal or any suitable combination of the above. The signal medium that can be read by computer may be any computer readable medium except for the computer readable storage medium. The computer readable medium is capable of transmitting, propagating or transferring programs for use by, or used in combination with, a command execution system, apparatus or element. The program codes contained on the computer readable medium may be transmitted with any suitable medium including but not limited to: wireless, wired, optical cable, RF medium etc., or any suitable combination of the above.
A computer program code for executing operations in some embodiments of the present disclosure may be compiled using one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages, such as Java, Smalltalk or C++, and also include conventional procedural programming languages, such as “C” language or similar programming languages. The program code may be completely executed on a user's computer, partially executed on a user's computer, executed as a separate software package, partially executed on a user's computer and partially executed on a remote computer, or completely executed on a remote computer or server. In the circumstance involving a remote computer, the remote computer may be connected to a user's computer through any network, including local area network (LAN) or wide area network (WAN), or may be connected to an external computer (for example, connected through Internet using an Internet service provider). The flow charts and block diagrams in the accompanying drawings illustrate architectures, functions and operations that may be implemented according to the systems, methods and computer program products of the various embodiments of the present disclosure. In this regard, each of the blocks in the flow charts or block diagrams may represent a module, a program segment, or a code portion, said module, program segment, or code portion comprising one or more executable instructions for implementing specified logic functions. It should also be noted that, in some alternative implementations, the functions denoted by the blocks may occur in a sequence different from the sequences shown in the figures. For example, any two blocks presented in succession may be executed, substantially in parallel, or they may sometimes be in a reverse sequence, depending on the function involved. It should also be noted that each block in the block diagrams and/or flow charts as well as a combination of blocks may be implemented using a dedicated hardware-based system executing specified functions or operations, or by a combination of a dedicated hardware and computer instructions.
The units or modules involved in embodiments of the present disclosure may be implemented by means of software or hardware. The described units or modules may also be provided in a processor, for example, described as: a processor, comprising an acquisition unit, an extraction unit, a calculation unit and a generation unit, where the names of these units or modules do not in some cases constitute a limitation to such units or modules themselves. For example, the acquisition unit may also be described as “a unit for acquiring an original image.”
In another aspect, some embodiments of the present disclosure further provide a computer-readable storage medium. The computer-readable storage medium may be the computer storage medium included in the apparatus in the above described embodiments, or a stand-alone computer-readable storage medium not assembled into the apparatus. The computer-readable storage medium stores one or more programs. The one or more programs, when executed by a device, cause the device to: acquire an original image; input the original image into a training-completed spoof cue extraction network, to obtain a spoof cue signal of the original image; calculate an element-wise mean value of the spoof cue signal; and generate a spoof detection result of the original image based on the element-wise mean value.
The above description only provides an explanation of preferred embodiments of the present disclosure and the technical principles used. It should be appreciated by those skilled in the art that the inventive scope of the present disclosure is not limited to the technical solutions formed by the particular combinations of the above-described technical features. The inventive scope should also cover other technical solutions formed by any combinations of the above-described technical features or equivalent features thereof without departing from the concept of the disclosure. Technical schemes formed by the above-described features being interchanged with, but not limited to, technical features with similar functions disclosed in the present disclosure are examples.
Number | Date | Country | Kind |
---|---|---|---|
202010304904.9 | Apr 2020 | CN | national |