Neural Networks and Their Training Methods

By extracting and connecting multi-size feature maps, and determining local areas in the feature maps to generate classification features, it solves the problem of insufficient information utilization of the classic DNN model in distinguishing authentic and fake images, and improves the accuracy of presentation attack detection.

CN113642363BActive Publication Date: 2024-09-20FUJITSU LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010392572.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-11
Publication Date
2024-09-20
Estimated Expiration
2040-05-11

AI Technical Summary

Technical Problem

Existing presentation attack detection models based on classic deep neural networks fail to make full use of low-level feature maps and local area information when distinguishing real face images from fake face images, resulting in insufficient detection accuracy.

Method used

Extract feature maps of multiple sizes and generate the first feature through connection; determine the local area based on the feature map of the largest size and extract the second feature; connect the first feature and the second feature to generate classification features for distinguishing real faces and fake face images.

Benefits of technology

By utilizing low-level feature maps and local area information, the accuracy of presentation attack detection is improved and the ability to identify forged images is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113642363B
    Figure CN113642363B
Patent Text Reader

Abstract

A neural network and a training method thereof are disclosed. The neural network is used to detect presentation attacks and is configured to: extract feature maps of multiple sizes for an input image; connect the feature maps of multiple sizes and generate a first feature based on the connected feature maps; determine multiple local areas based on the feature map of the largest size among the extracted feature maps; extract features for the multiple local areas respectively and generate a second feature based on the extracted multiple features; generate a classification feature by connecting the first feature and the second feature; and determine whether the image is a real image or a forged image based on the classification feature.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a neural network and a training method thereof, and more particularly, to a neural network for detecting presentation attacks and a method for training the neural network. Background Art

[0002] Presentation attacks are an emerging threat to face recognition systems that use forged biometric samples for authentication. Common presentation attacks include print attacks and replay attacks, which use a printed face image (paper document) or a pre-recorded video containing a face to authenticate to the system, respectively. Figure 1 A schematic diagram of the presentation attack is shown.

[0003] Currently, technologies for detecting presentation attacks have been developed. In particular, presentation attack detection models based on classic deep neural networks (DNNs) have been widely adopted, and the detection models are usually trained to classify input images into one of real face images and forged face images. In training, real and forged face images are first collected as training sample sets, and then the DNN detection model is trained using a loss function (such as a softmax loss function) so that it can correctly classify the training samples as real images or forged images.

[0004] Figure 2 The framework of the existing DNN detection model is schematically shown. Figure 2 As shown, the training sample set includes a real face image 110 and forged face images 120, 130. For each training image, the DNN detection model extracts feature maps FM1', FM2', FM3' of different levels in turn, and then applies a fully connected layer FC to the feature map FM3' of the highest level and smallest size to obtain the feature f'. In this article, "applying a fully connected layer" means a matrix multiplication operation. For example, the operation of the fully connected layer can be expressed as B = A × W, where A represents an M × N input matrix, B represents a K × F output matrix, and W represents the parameters of the fully connected layer, and it is an N × K matrix.

[0005] Subsequently, the detection model classifies the image into one of a real image and a forged image based on the feature f'. In the process of training the detection model, for example, a softmax loss function is used.

[0006] However, this approach has the following problems:

[0007] (1) Classical DNN models usually capture highly abstract features from high-level feature maps (such as FM3') to perform classification. However, the texture in face images plays a key role in distinguishing true from false images, and texture information corresponds to low-level feature maps (such as FM1').

[0008] (2) The entire face region is usually used in the training of classic DNN detection models. However, the most distinctive patterns usually exist in local areas of facial images rather than in the entire face region. Summary of the invention

[0009] In view of the above problems, the inventors have realized that in the training of the presentation attack detection model, low-level feature maps should play an important role and local patches of the image should be used together with the global patches.

[0010] According to one aspect of the present invention, a method for detecting presentation attacks based on a neural network is provided, comprising: extracting feature maps of multiple sizes for an input image; connecting the feature maps of the multiple sizes and generating a first feature based on the connected feature maps; determining multiple local areas based on the feature map of the largest size in the extracted feature maps; extracting features for the multiple local areas respectively and generating a second feature based on the extracted multiple features; generating a classification feature by connecting the first feature and the second feature; and determining whether the image is a real image or a forged image based on the classification feature.

[0011] According to another aspect of the present invention, a neural network for detecting presentation attacks is provided, comprising: a feature map extraction module, configured to extract feature maps of multiple sizes for an input image; a first feature generation module, configured to connect the feature maps of the multiple sizes and generate a first feature based on the connected feature maps; a second feature generation module, configured to determine multiple local areas based on a feature map of the largest size in the extracted feature maps, extract features for the multiple local areas respectively, and generate a second feature based on the extracted multiple features; a classification feature generation module, configured to generate a classification feature by connecting the first feature and the second feature; and a classification module, configured to classify the image into one of a real image and a forged image based on the classification feature.

[0012] According to another aspect of the present invention, there is provided a neural network-based apparatus for detecting presentation attacks, comprising: a memory configured to store instructions; and a processor configured to perform the following operations by executing the instructions: extracting feature maps of multiple sizes for an input image; connecting the feature maps of the multiple sizes, and generating a first feature based on the connected feature maps; determining multiple local areas based on a feature map of the maximum size among the extracted feature maps; extracting features for the multiple local areas, respectively, and generating a second feature based on the extracted multiple features; generating a classification feature by connecting the first feature and the second feature; and determining whether the image is a real image or a forged image based on the classification feature.

[0013] According to another aspect of the present invention, there is provided a method for training a neural network for detecting presentation attacks, wherein the neural network is configured to: extract feature maps of multiple sizes for an input image; connect the feature maps of multiple sizes and generate a first feature based on the connected feature maps; determine multiple local areas based on a feature map of the largest size among the extracted feature maps; extract features for the multiple local areas respectively and generate a second feature based on the extracted multiple features; generate a classification feature by connecting the first feature and the second feature; the method comprises: training the neural network using a loss function so that the neural network classifies the image into one of a real image and a forged image based on the classification feature.

[0014] According to another aspect of the present invention, there is provided a storage medium storing a program, which, when executed by a computer, enables the computer to implement the method described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A presentation attack is schematically illustrated.

[0016] Figure 2 The framework of a presentation attack detection model in the prior art is schematically shown.

[0017] Figure 3 The framework of the presentation attack detection model according to the present invention is schematically shown.

[0018] Figure 4 The process of determining the local area is schematically illustrated.

[0019] Figure 5 A flow chart of a method for detecting a presentation attack according to the present invention is shown.

[0020] Figure 6 A logical block diagram of a presentation attack detection model according to the present invention is shown.

[0021] Figure 7 A block diagram showing an exemplary configuration of computer hardware for implementing the present invention is shown. DETAILED DESCRIPTION

[0022] Figure 3 The framework of the presentation attack detection model according to the present invention is schematically shown. Figure 3 As shown, the detection model 300 extracts feature maps FM1, FM2, FM3 of different levels for each input facial image. The levels of the feature maps FM1, FM2, FM3 gradually increase while the sizes gradually decrease.

[0023] and Figure 2 Unlike the prior art shown in the figure, the detection model 300 according to the present invention not only utilizes the highest level feature map, but also connects the extracted feature maps FM1, FM2, and FM3 to obtain the feature map FM4. Then, the first feature f1 is generated based on the feature map FM4. For example, the first feature f1 can be generated by applying a fully connected layer FC to the feature map FM4, or the first feature f1 can be obtained by using other known methods. Therefore, in addition to the high-level feature map FM3, the detection model 300 according to the present invention also utilizes the low-level feature map FM1 containing more texture information, which helps to improve the detection accuracy.

[0024] In the connection, first, the size of the feature map FM1 is changed to be the same as that of the feature map FM2, and then the changed feature map FM1 is connected with the feature map FM2, so that the size of the resulting feature map (not shown) is the same as that of the feature map FM2.

[0025] Then, the obtained feature map is processed to change its size to be the same as the feature map FM3, and the resized feature map is connected with the feature map FM3 to obtain the feature map FM4. The size of the feature map FM4 is the same as that of the feature map FM3.

[0026] If available from Figure 3 As can be seen intuitively in , the length of the cuboid representing the feature graphs FM1-FM4 in the horizontal direction represents the number of dimensions, and the cross section perpendicular to the horizontal direction represents the size of the feature graph. Generally speaking, after the i-th feature graph and the i+1-th feature graph are connected, the resulting feature graph has the same size as the i+1-th feature graph with a smaller size, and the number of dimensions it contains is equal to the sum of the number of dimensions of the i-th feature graph and the i+1-th feature graph.

[0027] It should be noted that Figure 3 The connection mode of the characteristic diagram is only schematically shown, and the present invention is not limited to Figure 3For example, the number and size of the extracted feature maps can be changed according to actual design requirements. Figure 3 The described joining method is applied to a larger or smaller number of feature graphs.

[0028] On the other hand, Figure 3 As shown in the lower part, the detection model 300 determines multiple (K) local regions based on the extracted feature map FM1 with the largest size, extracts features for each local region, and then generates a second feature f2 based on the extracted multiple (K) features. This is described in detail below.

[0029] Regarding the process of determining the local area based on the feature map FM1, Figure 4 The specific process is schematically shown. Figure 4 As shown, for the feature map FM1, the background signal is first suppressed by the ReLU layer 410, and then the auto-encoder module 420 is used to suppress the noise signal, enhance the texture information in the feature map FM1, and then the position information of the K local regions is obtained by performing a convolution operation and applying a fully connected layer FC. The ReLU layer is a technology known to those skilled in the art, so its detailed description is omitted herein. A detailed description of the auto-encoder module can be obtained in the online course "Sparse Autoencoder" by Andrew Ng, a professor at Stanford University in the United States, and its content is incorporated herein by reference.

[0030] In order to reduce the computational complexity, the length and width of the local area are set to fixed values, such as 20 pixels, in the present invention. Therefore, for a local area, its position information can be represented by only the coordinates (x, y) of its upper left corner pixel, where x and y represent the horizontal and vertical coordinates of the upper left corner pixel, respectively. Figure 4 In , the fully connected layer FC can output K 2-dimensional vectors, each vector represents the location information of a local area.

[0031] Return to reference Figure 3 After obtaining K local regions, a convolution operation and a fully connected layer FC are applied to each local region to obtain K features. For ease of explanation, the jth feature among the K features is represented as an m-dimensional vector {p 1j ,p 2j ,…,p mj}, where j = 1, 2, ..., K. Thus, in each dimension (e.g., the first dimension), the K features have K elements (e.g., p 11 ,p 12 ,…,p 1K), and then select the maximum value among the K elements corresponding to the dimension. In this way, m maximum values ​​can be selected for m dimensions, and these maximum values ​​form the second feature f2. This process is Figure 3 It is represented as the "MaxOut" process in .

[0032] So far, the first feature f1 and the second feature f2 have been obtained. The detection model 300 connects the first feature f1 and the second feature f2 to form a third feature f3. The fully connected layer FC is further applied to the third feature f3 to obtain the classification feature fd. The detection model 300 classifies the input image as a real face image or a forged face image based on the classification feature fd.

[0033] In the training phase of the detection model 300, training samples labeled as "real" or "fake" are input to the detection model 300, and a loss function such as softmax loss is used for training. This is a known technique for those skilled in the art, so it will not be described in detail herein. In addition, those skilled in the art may also use other methods to perform training, and the present invention is not limited thereto.

[0034] After the training is completed, the image to be detected is input into the trained detection model 300, and the output of the detection model 300 can indicate whether the input image is a forged face image, thereby realizing the detection of presentation attacks.

[0035] Figure 5 A flow chart of a method for detecting presentation attacks according to the present invention is shown, Figure 6 The following is a logical block diagram of the attack detection model presented in accordance with the present invention. Figure 5 and Figure 6 Describe in detail.

[0036] In step S510 , the feature map extraction module 610 extracts feature maps of multiple levels with different sizes for the input image.

[0037] In step S520, the first feature generation module 620 connects the extracted feature maps and applies a fully connected layer to the connected feature maps to generate a first feature.

[0038] In step S530, the second feature generation module 630 determines multiple local areas based on the feature map of the maximum size, extracts features for each local area, and then generates a second feature based on the extracted multiple features through a "Max Out" operation.

[0039] In step S540 , the first feature and the second feature are connected by the classification feature generation module 640 to generate a third feature, and a fully connected layer is applied to the third feature to generate a classification feature.

[0040] In step S550 , the classification module 650 classifies the input image into one of a real face image and a forged face image based on the classification features.

[0041] The above has described the presentation attack detection model and its training method proposed by the present invention in combination with specific embodiments. Compared with the existing model, the detection model according to the present invention utilizes the low-level feature map containing texture information and utilizes the most distinctive local area with rich texture information, thereby improving the detection accuracy of presentation attacks.

[0042] The methods described in the above embodiments may be implemented by software, hardware, or a combination of software and hardware. The programs included in the software may be stored in advance in a storage medium provided inside or outside the device. As an example, during execution, these programs are written to a random access memory (RAM) and executed by a processor (e.g., CPU), thereby implementing the various methods and processes described herein.

[0043] Figure 7 An example block diagram of the configuration of computer hardware for executing the method of the present invention according to a program is shown. Each module in the neural network detection model according to the present invention can be implemented using the computer hardware. In addition, the device for training the neural network detection model of the present invention can also be implemented by the computer hardware.

[0044] like Figure 7 As shown, in a computer 700 , a central processing unit (CPU) 701 , a read only memory (ROM) 702 , and a random access memory (RAM) 703 are connected to one another via a bus 704 .

[0045] The input / output interface 705 is further connected to the bus 704. The input / output interface 705 is connected with the following components: an input unit 706 formed with a keyboard, a mouse, a microphone, etc.; an output unit 707 formed with a display, a speaker, etc.; a storage unit 708 formed with a hard disk, a nonvolatile memory, etc.; a communication unit 709 formed with a network interface card (such as a local area network (LAN) card, a modem, etc.); and a drive 710 that drives a removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory.

[0046] In the computer having the above-described structure, the CPU 701 loads the program stored in the storage unit 708 into the RAM 703 via the input / output interface 705 and the bus 704 and executes the program so as to perform the method described above.

[0047] The program to be executed by the computer (CPU 701) may be recorded on a removable medium 711 as a package medium, which is formed by, for example, a magnetic disk (including a floppy disk), an optical disk (including a compact disk-read only memory (CD-ROM)), a digital versatile disk (DVD), etc.), a magneto-optical disk, or a semiconductor memory. In addition, the program to be executed by the computer (CPU 701) may also be provided via a wired or wireless transmission medium such as a local area network, the Internet, or digital satellite broadcasting.

[0048] When the removable medium 711 is installed in the drive 710, the program can be installed in the storage unit 708 via the input / output interface 705. In addition, the program can be received by the communication unit 709 via a wired or wireless transmission medium and installed in the storage unit 708. Alternatively, the program can be pre-installed in the ROM 702 or the storage unit 708.

[0049] The program executed by the computer may be a program that performs processing according to the sequence described in this specification, or may be a program that performs processing in parallel or performs processing when necessary such as when called.

[0050] The modules or devices described herein are only in a logical sense and do not strictly correspond to physical devices or entities. For example, the functions of each module described herein may be implemented by multiple physical entities, or the functions of multiple modules described herein may be implemented by a single physical entity. In addition, the features, components, elements, steps, etc. described in one embodiment are not limited to the embodiment, but may also be applied to other embodiments, such as replacing specific features, components, elements, steps, etc. in other embodiments, or combining them.

[0051] The scope of the present invention is not limited to the specific embodiments described herein. It should be understood by those skilled in the art that, depending on design requirements and other factors, various modifications or changes may be made to the embodiments herein without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

[0052] Note:

[0053] 1. A method for detecting presentation attacks based on a neural network, comprising:

[0054] Extract feature maps of multiple sizes for the input image;

[0055] Connecting the feature graphs of the multiple sizes, and generating a first feature based on the connected feature graphs;

[0056] Determine a plurality of local regions based on a feature map with a maximum size among the extracted feature maps;

[0057] Extracting features from the multiple local areas respectively, and generating a second feature based on the extracted multiple features;

[0058] generating a classification feature by concatenating the first feature and the second feature; and

[0059] It is determined whether the image is a real image or a forged image based on the classification feature.

[0060] 2. The method according to 1 also includes: using a deep neural network (DNN) to extract feature maps of the multiple sizes for the image.

[0061] 3. The method according to 1, wherein the step of connecting the feature graphs of the multiple sizes further comprises:

[0062] In the presence of N feature maps of decreasing size,

[0063] Process the i-th feature map to change its size to the same as the i+1-th feature map, where i=1,2,...,N-1;

[0064] Connect the processed i-th feature map with the i+1-th feature map.

[0065] 4. The method according to 3 also includes: applying a fully connected layer to the feature map obtained after connection to generate the first feature.

[0066] 5. The method according to 1, wherein the step of determining a plurality of local regions based on a feature map of a maximum size further comprises:

[0067] Suppressing background signals in the feature map of the maximum size;

[0068] Enhance the texture contained in the feature map of the maximum size;

[0069] The position information of the multiple local areas is obtained by applying a convolution operation and a fully connected layer.

[0070] 6. The method according to 5, wherein the background signal is suppressed using a ReLU layer and the texture is enhanced using an autoencoder.

[0071] 7. The method according to item 1, wherein the step of forming a second feature based on the extracted multiple features further comprises:

[0072] For each dimension of the extracted multiple features, select the maximum value of all elements corresponding to the dimension;

[0073] The second feature is formed using the maximum value selected for each dimension.

[0074] 8. The method according to item 1, wherein the real image is a face image acquired in real time, and the forged image is a pre-prepared image or video frame containing a face.

[0075] 9. A method of training a neural network for detecting a presentation attack, wherein the neural network is configured to:

[0076] Extract feature maps of multiple sizes for the input image;

[0077] Connecting the feature graphs of the multiple sizes, and generating a first feature based on the connected feature graphs;

[0078] Determine a plurality of local regions based on a feature map with a maximum size among the extracted feature maps;

[0079] Extracting features from the multiple local areas respectively, and generating a second feature based on the extracted multiple features;

[0080] generating a classification feature by joining the first feature and the second feature;

[0081] The method comprises:

[0082] The neural network is trained using a loss function so that the neural network classifies the image into one of a real image and a forged image based on the classification feature.

[0083] 10. The method according to 9, wherein the loss function is a Softmx loss function.

[0084] 11. A device for detecting presentation attacks based on a neural network, comprising:

[0085] a memory configured to store instructions; and

[0086] A processor configured to perform the following operations by executing the instructions:

[0087] Extract feature maps of multiple sizes for the input image;

[0088] Connecting the feature graphs of the multiple sizes, and generating a first feature based on the connected feature graphs;

[0089] Determine a plurality of local regions based on a feature map with a maximum size among the extracted feature maps;

[0090] Extracting features from the multiple local areas respectively, and generating a second feature based on the extracted multiple features;

[0091] generating a classification feature by joining the first feature and the second feature;

[0092] as well as

[0093] It is determined whether the image is a real image or a forged image based on the classification feature.

[0094] 12. A neural network for detecting presentation attacks, comprising:

[0095] A feature map extraction module, configured to extract feature maps of multiple sizes for an input image;

[0096] A first feature generation module, configured to connect the feature graphs of the multiple sizes and generate a first feature based on the connected feature graphs;

[0097] A second feature generation module is configured to determine a plurality of local areas based on a feature map of a maximum size in the extracted feature map, extract features for the plurality of local areas respectively, and generate a second feature based on the plurality of extracted features;

[0098] a classification feature generation module, configured to generate a classification feature by connecting the first feature and the second feature;

[0099] A classification module is configured to classify the image into one of a real image and a forged image based on the classification feature.

[0100] 13. A storage medium storing a program, wherein when the program is executed by a computer, the computer executes the above method.

Claims

1. A method for detecting presentation attacks based on a neural network, comprising: Extract feature maps of multiple sizes for the input image; Connecting the feature graphs of the multiple sizes, and generating a first feature based on the connected feature graphs; Determine a plurality of local regions based on a feature map with a maximum size among the extracted feature maps; Extracting features from the multiple local areas respectively, and generating a second feature based on the extracted multiple features; generating a classification feature by joining the first feature and the second feature; as well as determining whether the image is a real image or a forged image based on the classification feature, The step of generating the first feature further includes: In the case where there are N feature maps of decreasing size, the i-th feature map is processed to change its size to be the same as the i+1-th feature map, where i=1,2,...,N-1; Connect the processed i-th feature map with the i+1-th feature map; Applying a fully connected layer to the feature map obtained after the connection to generate the first feature, wherein the step of generating the second feature further includes: For each dimension of the extracted multiple features, select the maximum value of all elements corresponding to the dimension; The second feature is formed using the maximum value selected for each dimension.

2. The method according to claim 1, further comprising: A deep neural network (DNN) is used to extract feature maps of the plurality of sizes for the image.

3. The method according to claim 1, wherein: The step of determining a plurality of local regions based on the feature map of the maximum size also includes: Suppressing background signals in the feature map of the maximum size; Enhance the texture contained in the feature map of the maximum size; The position information of the multiple local areas is obtained by applying a convolution operation and a fully connected layer.

4. The method according to claim 3, wherein: The background signal is suppressed using a ReLU layer, and the texture is enhanced using an autoencoder.

5. The method according to claim 1, wherein: The real image is a face image acquired in real time, and the forged image is a pre-prepared image or video frame containing a face.

6. A method for training a neural network for detecting presentation attacks, wherein: The neural network is configured as: Extract feature maps of multiple sizes for the input image; Connecting the feature graphs of the multiple sizes, and generating a first feature based on the connected feature graphs; Determine a plurality of local regions based on a feature map with a maximum size among the extracted feature maps; Extracting features from the multiple local areas respectively, and generating a second feature based on the extracted multiple features; generating a classification feature by joining the first feature and the second feature; The method comprises: training the neural network using a loss function so that the neural network classifies the image into one of a real image and a forged image based on the classification feature, Wherein, the neural network is further configured as: In the presence of N feature maps of decreasing sizes, the i-th feature map is processed to change its size to be the same as the i+1-th feature map, where i=1,2,...,N-1, the processed i-th feature map is concatenated with the i+1-th feature map, and a fully connected layer is applied to the concatenated feature map to generate the first feature map; For each dimension of the extracted multiple features, a maximum value among all elements corresponding to the dimension is selected, and the second feature is formed using the maximum value selected for each dimension.

7. A neural network-based device for detecting presentation attacks, comprising: a memory configured to store instructions; as well as A processor configured to perform the following operations by executing the instructions: Extract feature maps of multiple sizes for the input image; Connecting the feature graphs of the multiple sizes, and generating a first feature based on the connected feature graphs; Determine a plurality of local regions based on a feature map with a maximum size among the extracted feature maps; Extracting features from the multiple local areas respectively, and generating a second feature based on the extracted multiple features; generating a classification feature by joining the first feature and the second feature; as well as Determining whether the image is a real image or a forged image based on the classification features, wherein the processor further performs the following operations: In the presence of N feature maps of decreasing sizes, the i-th feature map is processed to change its size to be the same as the i+1-th feature map, where i=1,2,...,N-1, the processed i-th feature map is concatenated with the i+1-th feature map, and a fully connected layer is applied to the concatenated feature map to generate the first feature map; For each dimension of the extracted multiple features, a maximum value among all elements corresponding to the dimension is selected, and the second feature is formed using the maximum value selected for each dimension.