Facial-Recognition
Approach
An implementation of Siamese Neural Networks for facial recognition
Data
Using yale face dataset Collection of greyscale faces of differing light and facial expressions
example:
Siamese Network
Contrastive loss implementation
def contrastive_loss(y, t):
nonmatch = F.relu(1 - y) # max(margin - y, 0)
return torch.mean(t * y**2 + (1 - t) * nonmatch**2)
Findings
Training losses (not very representative due to imbalanced classes)
Evaluating the results
With an ad hoc threshold of 0.7.
Sensitivity (true positive rate): 0.91
Specificity (true negative rate): 0.96