Designing convolutional neural networks for face alignment and anti-spoofing