Tejaswini2403 commited on
Commit
3ecaf41
·
1 Parent(s): d133142

files added

Browse files
app/Hackathon_setup/face_recognition.py CHANGED
@@ -3,7 +3,7 @@ import cv2
3
  from matplotlib import pyplot as plt
4
  import torch
5
  # In the below line,remove '.' while working on your local system. However Make sure that '.' is present before face_recognition_model while uploading to the server, Do not remove it.
6
- from . import face_recognition_model
7
  from PIL import Image
8
  import base64
9
  import io
@@ -74,7 +74,7 @@ def get_similarity(img1, img2):
74
  ##########################################################################################
75
 
76
  # YOUR CODE HERE, load the model
77
- feature_net = face_recognition_model.Siamese()
78
  model = torch.load( './siamese_model.t7', map_location=device)
79
  feature_net.load_state_dict(model['net_dict'])
80
 
 
3
  from matplotlib import pyplot as plt
4
  import torch
5
  # In the below line,remove '.' while working on your local system. However Make sure that '.' is present before face_recognition_model while uploading to the server, Do not remove it.
6
+ from .face_recognition_model import *
7
  from PIL import Image
8
  import base64
9
  import io
 
74
  ##########################################################################################
75
 
76
  # YOUR CODE HERE, load the model
77
+ feature_net = Siamese()
78
  model = torch.load( './siamese_model.t7', map_location=device)
79
  feature_net.load_state_dict(model['net_dict'])
80