MTCNN to detect faces Generate triplet data function Train function Create an embedding vector for each face Inference function