Commit ·
3da361f
1
Parent(s): f9fa578
face recognition
Browse files
app/Hackathon_setup/face_recognition_model.py
CHANGED
|
@@ -8,7 +8,14 @@ from torchvision import transforms
|
|
| 8 |
|
| 9 |
# Sample Transformation function
|
| 10 |
# YOUR CODE HERE for changing the Transformation values.
|
| 11 |
-
trnscm = transforms.Compose([transforms.Resize((100,100)), transforms.ToTensor()])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
##Example Network
|
| 14 |
class Siamese(torch.nn.Module):
|
|
|
|
| 8 |
|
| 9 |
# Sample Transformation function
|
| 10 |
# YOUR CODE HERE for changing the Transformation values.
|
| 11 |
+
# trnscm = transforms.Compose([transforms.Resize((100,100)), transforms.ToTensor()])
|
| 12 |
+
|
| 13 |
+
trnscm = transforms.Compose([
|
| 14 |
+
transforms.Grayscale(num_output_channels=1),
|
| 15 |
+
transforms.Resize((100, 100)),
|
| 16 |
+
transforms.ToTensor(),
|
| 17 |
+
transforms.Normalize(mean=[0.5], std=[0.5])
|
| 18 |
+
])
|
| 19 |
|
| 20 |
##Example Network
|
| 21 |
class Siamese(torch.nn.Module):
|