due to the natural difference between the dynamic range and sparsity of gradient images compared with texture images.) For texture and depth facial feature extraction, we tested models inspired in the Xception architecture [@chollet2017xception]). Additional details are provided in the supplementary material Section \[app:implementation\_details\]. To train these models we add an auxiliary fully connected layer on top of the facial embedding (with as many neurons as identities in the train set) and minimize the cross-entropy between the ground truth and the predicted labels. More precisely, let us denote $\hat{f}_{rgb}(I_{rgb})=[p_1,...,p_c]$ the output of the fully connected layer associated to the embedding $f_{rgb}(I_{rgb})$ where $p_i$ denotes the probability associated to the id $i$, $$\begin{aligned}
    \theta_{rgb} = \operatorname*{argmin}\sum_{({I_0}_i, y_i)\in\mathcal{B}_2} \sum_{c} -{\bf{1}}_{y_i=c} \log(\hat{f}_{rgb}({I_0}_i)[c]) \\
    \theta_{\nabla z} = \operatorname*{argmin}\sum_{({z}_i, y_i)\in\mathcal{B}_3} \sum_{c} -{\bf{1}}_{y_i=c} \log(\hat{f}_{\nabla z}(\nabla z_i)[c])\end{aligned}$$ where ${\bf{1}}_{y_i=c}$ denotes the indicator function. (Of course one can choose other alternative losses to train these modules, see e.g., [@arcface; @Liu2017; @Wang2018; @Zheng2018].) As described above, the proposed design allows to leverage information from three types of datasets ($\mathcal{B}_1$, $\mathcal{B}_2$, $\mathcal{B}_3$). This has an important practical advantage as 2D facial and 3D generic datasets are more abundant, and the pattern dependant set $\mathcal{B}_1$ can be of modest size as 