Skip to content
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

Open
wants to merge 23 commits into
base: devel
Choose a base branch
from
Open

Emotion reco #12

wants to merge 23 commits into from

Conversation

israasalah
Copy link

No description provided.

@israasalah israasalah requested a review from mhashim6 March 3, 2020 16:48
Copy link
Member

@mhashim6 mhashim6 left a 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")
Copy link
Member

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.

Copy link
Member

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.


for i in top_percentage:

print('{:08.6f}: {}'.format(float(results[i]), labels[i]))
Copy link
Member

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.

@@ -0,0 +1,47 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
Copy link
Member

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?

global labels
global interpreter

labels = ['Angry', 'Disgusted', 'Fear', 'Happy', 'Neutral', 'Sad', 'Surprised']
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants