jeevana commited on
Commit
0609fff
1 Parent(s): 2d31e16
app/Hackathon_setup/exp_recognition.py CHANGED
@@ -63,10 +63,11 @@ def get_expression(img):
63
  ##########################################################################################
64
 
65
  face = detected_face(img)
 
66
  print('face', face.size())
67
- #face = img
68
- # if face==0:
69
- # face = Image.fromarray(cv2.cvtColor(img, cv2.COLOR_BGR2GRAY))
70
  face = trnscm(face).unsqueeze(0)
71
  # YOUR CODE HERE, return expression using your model
72
  file = open(current_path + "/exp_model.t7")
 
63
  ##########################################################################################
64
 
65
  face = detected_face(img)
66
+ print("type of face", type(face))
67
  print('face', face.size())
68
+ face = img
69
+ if face==0:
70
+ face = Image.fromarray(cv2.cvtColor(img, cv2.COLOR_BGR2GRAY))
71
  face = trnscm(face).unsqueeze(0)
72
  # YOUR CODE HERE, return expression using your model
73
  file = open(current_path + "/exp_model.t7")