MTCNN is a face-detection model used to locate and crop faces before face recognition. In KYC workflows, it turns selfie and identity-document images into focused face inputs for comparison. section 7.2.3 section 7.2.4
A practical face-matching workflow separates three jobs:
- Use MTCNN to detect and crop the face from each image. section 7.2.3
- Use InceptionResnetV1 to convert each cropped face into an embedding. section 7.2.3
- Compare embeddings with cosine similarity for duplicate checks or selfie-to-ID checks. section 7.2.3 section 7.2.4
Detecting a face before a selfie-to-ID check
A selfie and passport image are each passed through MTCNN, producing cropped face tensors. The recognition model then generates embeddings, and cosine similarity compares them. Einstein’s selfie and ID score 61.54%, while a different person scores 2.52%; a suspicious 100% score can indicate that the selfie was pasted onto a fake ID. section 7.2.4
mtcnn = MTCNN() resnet = InceptionResnetV1(pretrained='vggface2').eval()
Inspect the Python model initialization for MTCNN and the accompanying pretrained face-recognition model. section 7.2.3
