Skip to content

ABD-01/Siamese-NN

Repository files navigation

Siamese-Triplet Networks using Pytorch

Face Recognition is genarlly a one-shot learning task. One shot learning is a classification task where the model should learn from one example of given class and be able to recognize it in the future.

Siamese Network here is used to implement the one-shot learning for face recognition.

Dataset : The Database of Faces (AT&T)

The AT&T face dataset, “(formerly ‘The ORL Database of Faces’) is used for training face verification and recognititon model.

Dataset Statistics

  1. Color: Grey-scale

  2. Sample Size: 92x112

  3. #Samples: 400

    There are 10 different images of each of 40 distinct subjects.

Architechtures

Parameter Value
Training Set 75% (300/400)
Testing Set 25% (100/400)
Number of Epochs 16
Learning Rate 10-4
Total Parameters 4,170,400
Loss Function Triplet Loss
Optimizer Adam
Train Accuracy 92.67 %
Test Accuracy 88.0 %
Total Accuracy 87.25 %
Parameter Face Identification One Shot Learning
Training Set 70% (38x7/38x10) 75% (300/400)
Testing Set 30% (38x3/38x10) 25% (100/400)
Number of Epochs 8 20
Learning Rate 20-4 10-4
Total Parameters 11,235,904 11,235,904
Loss Function Triplet Loss Triplet Loss
Optimizer Adam Adam
Threshold 8 -
Train Accuracy 99.62 % 82.00 %
Test Accuracy 94.73 % 87.00 %
Total Accuracy 92.75 % 75.50 %
Parameter Value
Training Set 75% (300/400)
Testing Set 25% (100/400)
Number of Epochs 20
Learning Rate 20-4
Total Parameters 17,728,064
Loss Function Triplet Loss
Optimizer Adam
Train Accuracy 93.00 %
Test Accuracy 69.00 %
Total Accuracy 82.00 %

References: