petercunha / emotion Goto Github PK
View Code? Open in Web Editor NEW:smile: Recognizes human faces and their corresponding emotions from a video or webcam feed. Powered by OpenCV and Deep Learning.
License: MIT License
:smile: Recognizes human faces and their corresponding emotions from a video or webcam feed. Powered by OpenCV and Deep Learning.
License: MIT License
im new to visual studio and i dont know how to pip3 install there, i used to do it with anaconda and its prompt is it still the same or should i install i else where ??
Hey, thank you for sharing this with us.
I wanted to try doing the training myself but after I downloaded fer2013.tar and train_emotion_classifier.py, as i ran train_emotion_classifier.py, it said no models.cnn could be found.
Could you please tell me how can i fix this? P.s As i ran the emotion.py, everything went perfectly well.
ImportError: cannot import name 'imread'
Error in loading the saved optimizer state. As a result, your model is starting with a freshly initialized optimizer.
warnings.warn('Error in loading the saved optimizer '
Please tell something about how to train the model on my custom data? This project is awesome, I really love it but it's useless unless we don't have ability to train it ourselves.
First, thank you to open this source.
Could you extract emotional percentage to show a graphic for analyzing your emotion during a period of time?
UserWarning: Error in loading the saved optimizer state. As a result, your model is starting with a freshly initialized optimizer.
warnings.warn('Error in loading the saved optimizer '
Hi,
I am getting the following error when trying to run the project with the mentioned instructions.
(vpy3) inspiron:~/Documents/Emotion$ python3 emotions.py
Using TensorFlow backend.
2018-10-29 20:02:17.572019: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
/home/inspiron/.virtualenvs/vpy3/lib/python3.6/site-packages/keras/engine/saving.py:327: UserWarning: Error in loading the saved optimizer state. As a result, your model is starting with a freshly initialized optimizer.
warnings.warn('Error in loading the saved optimizer '
VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV
Unable to stop the stream: Device or resource busy
VIDEOIO ERROR: V4L: can't open camera by index 0
Can you please suggest what may I change or do to make it work?
Hi, glad to see your effort building this system, and I am thinking about building a web app on working pieces like yours. Are you interested in this, and help me out? Thanks.
Andes
Line 58 in ca64ddc
The line above applies a pre-defined offset to each detected face region before sending it through the emotion detector. When I was trying this out, it would often move the region off of the face and even cause the program to error out (and hit the try/catch). What is the reason why this is here? I'm not an expert in face detection by any means, but this seems wrong to me. Please correct me if I'm wrong.
from models.cnn import mini_XCEPTION
ModuleNotFoundError: No module named 'models.cnn'
I was able to make it work by commenting out "video_capture = cv2.VideoCapture(0)" at line 36 of emotions.py
i want to save the emotion data to a csv file. how do i go about this ?
Emotion recognition as a flask app
I try running python3 emotions.py but I get this error
Traceback (most recent call last):
File "emotions.py", line 1, in
import cv2
ModuleNotFoundError: No module named 'cv2'
It says that its only for python 2.7 so how do you run it using python 3?
when i run thin on flask.
i got this , anyone help me please?
Traceback (most recent call last):
File "C:\Users\kkhzz\Anaconda3\lib\site-packages\flask\app.py", line 1997, in call
return self.wsgi_app(environ, start_response)
File "C:\Users\kkhzz\Anaconda3\lib\site-packages\flask\app.py", line 1985, in wsgi_app
response = self.handle_exception(e)
File "C:\Users\kkhzz\Anaconda3\lib\site-packages\flask\app.py", line 1540, in handle_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\kkhzz\Anaconda3\lib\site-packages\flask_compat.py", line 33, in reraise
raise value
File "C:\Users\kkhzz\Anaconda3\lib\site-packages\flask\app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\kkhzz\Anaconda3\lib\site-packages\flask\app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\kkhzz\Anaconda3\lib\site-packages\flask\app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\kkhzz\Anaconda3\lib\site-packages\flask_compat.py", line 33, in reraise
raise value
File "C:\Users\kkhzz\Anaconda3\lib\site-packages\flask\app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\kkhzz\Anaconda3\lib\site-packages\flask\app.py", line 1598, in dispatch_request
return self.view_functionsrule.endpoint
File "D:\hancom\ims_front\flaskstart.py", line 122, in upload_image
return detect_faces_in_image(file)
File "D:\hancom\ims_front\flaskstart.py", line 169, in detect_faces_in_image
emotion_prediction = emotion_classifier.predict(gray_face)
File "C:\Users\kkhzz\Anaconda3\lib\site-packages\keras\engine\training.py", line 1164, in predict
self._make_predict_function()
File "C:\Users\kkhzz\Anaconda3\lib\site-packages\keras\engine\training.py", line 554, in _make_predict_function
**kwargs)
File "C:\Users\kkhzz\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py", line 2744, in function
return Function(inputs, outputs, updates=updates, **kwargs)
File "C:\Users\kkhzz\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py", line 2546, in init
with tf.control_dependencies(self.outputs):
File "C:\Users\kkhzz\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 5004, in control_dependencies
return get_default_graph().control_dependencies(control_inputs)
File "C:\Users\kkhzz\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 4543, in control_dependencies
c = self.as_graph_element(c)
File "C:\Users\kkhzz\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 3490, in as_graph_element
return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
File "C:\Users\kkhzz\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 3569, in _as_graph_element_locked
raise ValueError("Tensor %s is not an element of this graph." % obj)
Using TensorFlow backend.
Traceback (most recent call last):
File "emotions.py", line 3, in
from keras.models import load_model
File "/home/anon/.local/lib/python3.6/site-packages/keras/init.py", line 3, in
from . import utils
File "/home/anon/.local/lib/python3.6/site-packages/keras/utils/init.py", line 6, in
from . import conv_utils
File "/home/anon/.local/lib/python3.6/site-packages/keras/utils/conv_utils.py", line 9, in
from .. import backend as K
File "/home/anon/.local/lib/python3.6/site-packages/keras/backend/init.py", line 89, in
from .tensorflow_backend import *
File "/home/anon/.local/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 5, in
import tensorflow as tf
File "/home/anon/.local/lib/python3.6/site-packages/tensorflow/init.py", line 24, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/home/anon/.local/lib/python3.6/site-packages/tensorflow/python/init.py", line 88, in
from tensorflow.python import keras
File "/home/anon/.local/lib/python3.6/site-packages/tensorflow/python/keras/init.py", line 24, in
from tensorflow.python.keras import activations
File "/home/anon/.local/lib/python3.6/site-packages/tensorflow/python/keras/activations/init.py", line 22, in
from tensorflow.python.keras._impl.keras.activations import elu
File "/home/anon/.local/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/init.py", line 21, in
from tensorflow.python.keras._impl.keras import activations
File "/home/anon/.local/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/activations.py", line 23, in
from tensorflow.python.keras._impl.keras import backend as K
File "/home/anon/.local/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/backend.py", line 36, in
from tensorflow.python.layers import base as tf_base_layers
File "/home/anon/.local/lib/python3.6/site-packages/tensorflow/python/layers/base.py", line 25, in
from tensorflow.python.keras.engine import base_layer
File "/home/anon/.local/lib/python3.6/site-packages/tensorflow/python/keras/engine/init.py", line 23, in
from tensorflow.python.keras.engine.base_layer import InputSpec
File "/home/anon/.local/lib/python3.6/site-packages/tensorflow/python/keras/engine/base_layer.py", line 35, in
from tensorflow.python.keras import backend
File "/home/anon/.local/lib/python3.6/site-packages/tensorflow/python/keras/backend/init.py", line 22, in
from tensorflow.python.keras._impl.keras.backend import abs
ImportError: cannot import name 'abs'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.