Spaces:
Sleeping
Sleeping
add02
Browse files
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 |
-
|
68 |
-
|
69 |
-
|
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")
|