-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emotion reco #12
base: devel
Are you sure you want to change the base?
Emotion reco #12
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes. Good Work!
emotion/lite.py
Outdated
results = np.squeeze(output_data) | ||
#print("result",results) | ||
top_k = results.argsort()[-2:][::-1] | ||
labels = load_labels("labels.txt") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
labels.txt
is not uploaded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add an init
function that is responsible for loading the model and the labels, and a detect
function that receives a an image as a numpy
array. Take a look on facial_recognition for a reference.
emotion/Emotional_recoLITE.py
Outdated
|
||
for i in top_percentage: | ||
|
||
print('{:08.6f}: {}'.format(float(results[i]), labels[i])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
detect
should return the result, not print it. if the model returns multiple results return the fittest one.
emotion/Emotional_recoLITE.py
Outdated
@@ -0,0 +1,47 @@ | |||
from __future__ import absolute_import | |||
from __future__ import division | |||
from __future__ import print_function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do need these imports for?
emotion/Emotional_recoLITE.py
Outdated
global labels | ||
global interpreter | ||
|
||
labels = ['Angry', 'Disgusted', 'Fear', 'Happy', 'Neutral', 'Sad', 'Surprised'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make an Arabic copy of the labels; detect
should return an Arabic result.
No description provided.