Spaces:
Running
Running
Commit
•
12089af
1
Parent(s):
2d095b3
Add valence arousal text box
Browse files
app.py
CHANGED
@@ -49,6 +49,7 @@ def inference(path_image: str) -> Tuple:
|
|
49 |
|
50 |
fer_dict_str = str({face.indx: face.preds["fer"].label for face in response.faces})
|
51 |
au_dict_str = str({face.indx: face.preds["au"].other["multi"] for face in response.faces})
|
|
|
52 |
deepfake_dict_str = str({face.indx: face.preds["deepfake"].label for face in response.faces})
|
53 |
response_str = str(response)
|
54 |
|
@@ -57,7 +58,7 @@ def inference(path_image: str) -> Tuple:
|
|
57 |
|
58 |
os.remove(path_image)
|
59 |
|
60 |
-
out_tuple = (pil_image, fer_dict_str, au_dict_str, deepfake_dict_str, sim_dict_str_embed, sim_dict_str_verify, response_str)
|
61 |
return out_tuple
|
62 |
|
63 |
|
@@ -71,6 +72,7 @@ demo=gr.Interface(
|
|
71 |
[gr.Image(type="pil", label="Face Detection and 3D Landmarks"),
|
72 |
gr.Textbox(label="Facial Expression Recognition"),
|
73 |
gr.Textbox(label="Facial Action Unit Detection"),
|
|
|
74 |
gr.Textbox(label="DeepFake Detection"),
|
75 |
gr.Textbox(label="Cosine similarity of Face Representation Embeddings"),
|
76 |
gr.Textbox(label="Cosine similarity of Face Verification Embeddings"),
|
|
|
49 |
|
50 |
fer_dict_str = str({face.indx: face.preds["fer"].label for face in response.faces})
|
51 |
au_dict_str = str({face.indx: face.preds["au"].other["multi"] for face in response.faces})
|
52 |
+
va_dict_str = str({face.indx: face.preds["va"].other for face in response.faces})
|
53 |
deepfake_dict_str = str({face.indx: face.preds["deepfake"].label for face in response.faces})
|
54 |
response_str = str(response)
|
55 |
|
|
|
58 |
|
59 |
os.remove(path_image)
|
60 |
|
61 |
+
out_tuple = (pil_image, fer_dict_str, au_dict_str, va_dict_str, deepfake_dict_str, sim_dict_str_embed, sim_dict_str_verify, response_str)
|
62 |
return out_tuple
|
63 |
|
64 |
|
|
|
72 |
[gr.Image(type="pil", label="Face Detection and 3D Landmarks"),
|
73 |
gr.Textbox(label="Facial Expression Recognition"),
|
74 |
gr.Textbox(label="Facial Action Unit Detection"),
|
75 |
+
gr.Textbox(label="Facial Valence Arousal"),
|
76 |
gr.Textbox(label="DeepFake Detection"),
|
77 |
gr.Textbox(label="Cosine similarity of Face Representation Embeddings"),
|
78 |
gr.Textbox(label="Cosine similarity of Face Verification Embeddings"),
|