Assuming we have \(N\)  patch type classes in the training dataset, which consists of \(k\)  live and \(N-k\)  spoof classes. Each input patch \(t(x_i)\)  belongs to one fine-grained ground truth class \(y_i \in \lbrace L_1, L_2, ... L_k, S_1, S_2, ... S_{N-k}\rbrace \) , and the Angular-Margin Softmax Loss is applied to regularize the patch features. The Angular-Margin Softmax Loss has many variants [1]}, [2]}, [3]}, [4]}, [5]} and is commonly used in face recognition to improve the generalization ability to open-set identities. In this work, we employ AM-Softmax [1]} loss to optimize the fine-grained patch recognition model and modify it to address the asymmetric nature in face anti-spoofing.
