over a flat surface with the texture of the real face. (d) Output of the network when the input is (c). None of these images were seen during training.[]{data-label="fig:depth_extraction_verification"}](figures/spoofingExample1.png){width=".7\columnwidth"}

Several algorithms have been proposed to hallucinate 3D information from a 2D facial image [@eigen2014depth; @Huber2015; @Liu2015; @Pini2018]. In order to verify that our decomposition network is extracting real depth information (in lieu of hallucinating it from texture cues), we simulated an image where the pattern is projected over a surface with identical texture but with a planar 3D shape (as in the example illustrated in Figure \[fig:3dillustration\]). Figure \[fig:depth\_extraction\_verification\] (a) shows the image acquired when the fringes are projected over the ground truth facial depth, and (c) when instead the depth is set to $0$ (without modifying the texture information). The first component of the output (x-partial derivative) is shown in (b) and (d), as we can see, the network is actually extracting true depth information (from the deformation of the fringes) and not hallucinating 3D information from texture cues. (As we will see next, this property is particularly useful for joint face recognition and spoofing prevention.)

#### 2D and 3D face recognition.

Once the input image is decomposed into 