Open alejandrojapkin opened 6 years ago
did you fix it ?
I have the same problem when I run face_reco_demo
, I think the problem from this line from face_reco_image import FaceImage
any solution?
I was facing the same issue, so I had to comment out all code related to emotion detection models and it worked though the output was naturally lacking emotions analysis.
I've fix it by removing that line src.emotionpred and add emotion_model_path = 'trained_models/emotion_models/fer2013_mini_XCEPTION.102-0.66.hdf5' emotion_classifier = load_model(emotion_model_path, compile=False) emotion_target_size = emotion_classifier.input_shape[1:3] emotion_offsets = (20, 40) emotion_prediction = emotion_classifier.predict(gray_face) emotion_probability = np.max(emotion_prediction) emotion_label_arg = np.argmax(emotion_prediction) emotion_text = emotion_labels[emotion_label_arg]
I've fix it by removing that line src.emotionpred and add emotion_model_path = 'trained_models/emotion_models/fer2013_mini_XCEPTION.102-0.66.hdf5' emotion_classifier = load_model(emotion_model_path, compile=False) emotion_target_size = emotion_classifier.input_shape[1:3] emotion_offsets = (20, 40) emotion_prediction = emotion_classifier.predict(gray_face) emotion_probability = np.max(emotion_prediction) emotion_label_arg = np.argmax(emotion_prediction) emotion_text = emotion_labels[emotion_label_arg]
Can u post the full code for this please?
Just removed the line and replaced with your lines does not help.
please check here https://github.com/khaledrefai/Face-Recognition-Model-with-Gender-Age-and-Emotions-Estimations
Thanks. pulled the other github repo.
We got an error "cannot import name imread" from preprocessor.py
please check here https://github.com/khaledrefai/Face-Recognition-Model-with-Gender-Age-and-Emotions-Estimations
Thanks. pulled the other github repo.
We got an error "cannot import name imread" from preprocessor.py in what file?
are there any updates for this problem ?
I was facing the same issue, so I had to comment out all code related to emotion detection models and it worked though the output was naturally lacking emotions analysis.
Can you tell me how to delete that model about emotion?
please check here https://github.com/khaledrefai/Face-Recognition-Model-with-Gender-Age-and-Emotions-Estimations
this link is not working anymore
same problem. ang solution?
same prob here. Anyone got yhe solution ?
from keras import models emotion_model_path = '/content/Face-Recognition-Model-with-Gender-Age-and-Emotions-Estimations/models/fer2013_mini_XCEPTION.119-0.65.hdf5' emotion_classifier = models.load_model(emotion_model_path, compile=False) emotion_target_size = emotion_classifier.input_shape[1:3] emotion_offsets = (20, 40) emotion_prediction = emotion_classifier.predict(gray_face) emotion_probability = np.max(emotion_prediction) emotion_label_arg = np.argmax(emotion_prediction) emotion_text = emotion_labels[emotion_label_arg]
Use this - U need to import models to load the .h5 file
what is gray_face?
I've fix it by removing that line src.emotionpred and add emotion_model_path = 'trained_models/emotion_models/fer2013_mini_XCEPTION.102-0.66.hdf5' emotion_classifier = load_model(emotion_model_path, compile=False) emotion_target_size = emotion_classifier.input_shape[1:3] emotion_offsets = (20, 40) emotion_prediction = emotion_classifier.predict(gray_face) emotion_probability = np.max(emotion_prediction) emotion_label_arg = np.argmax(emotion_prediction) emotion_text = emotion_labels[emotion_label_arg]
May I know what is gray_face ?
Code won't run, strange dependencies
import src.emotionpred as emotion ModuleNotFoundError: No module named 'src.emotionpred'