Spaces:
Sleeping
Sleeping
Sudipta Nayak
commited on
Commit
·
c8b6952
1
Parent(s):
668f0f4
no message
Browse files
app/Hackathon_setup/face_recognition.py
CHANGED
@@ -112,17 +112,11 @@ def get_face_class(img1):
|
|
112 |
##Hint: you need a classifier finetuned for your classes, it takes o/p of siamese as i/p to it
|
113 |
##Better Hint: Siamese experiment is covered in one of the labs
|
114 |
|
115 |
-
|
116 |
-
# transforms.Grayscale(num_output_channels = 1),
|
117 |
-
# transforms.Resize((100, 100)), # Resize the image to the desired size
|
118 |
-
# transforms.ToTensor(), # Convert the image to a PyTorch tensor
|
119 |
-
# transforms.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]) # Normalize if needed
|
120 |
-
# ])
|
121 |
trnscm = transforms.Compose([transforms.Resize((100,100)), transforms.ToTensor()])
|
122 |
det_img1_tensor = trnscm(det_img1).unsqueeze(0)
|
123 |
# Apply the transformations to the image
|
124 |
-
|
125 |
-
|
126 |
feature_net = SiameseNetwork() #Example Network
|
127 |
feature_net = feature_net.to(device)
|
128 |
current_path = 'app/Hackathon_setup'
|
|
|
112 |
##Hint: you need a classifier finetuned for your classes, it takes o/p of siamese as i/p to it
|
113 |
##Better Hint: Siamese experiment is covered in one of the labs
|
114 |
|
115 |
+
|
|
|
|
|
|
|
|
|
|
|
116 |
trnscm = transforms.Compose([transforms.Resize((100,100)), transforms.ToTensor()])
|
117 |
det_img1_tensor = trnscm(det_img1).unsqueeze(0)
|
118 |
# Apply the transformations to the image
|
119 |
+
|
|
|
120 |
feature_net = SiameseNetwork() #Example Network
|
121 |
feature_net = feature_net.to(device)
|
122 |
current_path = 'app/Hackathon_setup'
|