xionghc / facial-expression-recognition Goto Github PK
View Code? Open in Web Editor NEWFacial-Expression-Recognition in TensorFlow. Detecting faces in video and recognize the expression(emotion).
License: GNU General Public License v3.0
Facial-Expression-Recognition in TensorFlow. Detecting faces in video and recognize the expression(emotion).
License: GNU General Public License v3.0
i want to use my phone to take some pictures to train the model, how to give each pic a label and get my own dataset?
should i download any module or write another .py file?
thanks a lot!
Hi, I find the 'norm1' layer not being used in 'model.py', it is ok? and I had retrained the model, but the test accuracy just 0.527724, Is this related to the previous issue?
After the python3 main.py ,there is the NOTE:Press SPACE on keyboard to capture face.And I pressed the spacekey, it is no answer .For quite a while, the terminal shows the print that traceback (most recetn call last):..............
AttributeErrot:'NoneType' object has no attribute ''shape
There is an error of TypeError: 'NoneType' object is not subscriptable when I press space
How can I make this real-time, that is, if i want the expressions to be detected without pressing the Space Key?
Also, how do I enlarge the graph(shown on the left side of the screen)?
Thanks in advance
你好,我在执行main.py后,摄像头开了也有我的视频镜头,但是按下空格没有反应,请问是为什么啊?我是mac系统
Should I open camera first and then run test?
测试了一下,分类很少有对的。有啥建议吗
在model.py文件中
def image_to_tensor(image): tensor = np.asarray(image).reshape(-1, 2304) * 1 / 255.0 return tensor
May I ask a question?What kind of network do you use in your code?Look forward to your answer!
i changed demo.py
#video_captor = cv2.VideoCapture('sample.mp4')
video_captor = cv2.VideoCapture(0)
but it did not work
There is no folder named valid_sets defined in line 137 of model.py. That is why no emoji is showing in the webcam.
I am using a windows 10 system.
I have also installed all dependencies.
on running main.py , both the command prompt as well as the python shell display the following:
C:\Users\410379\Python37\Facial-Expression-Recognition-master>python main.py
Traceback (most recent call last):
File "main.py", line 6, in
flags.DEFINE_string('MODE', 'demo',
NameError: name 'flags' is not defined
solved
may i know which algorithm u have used or can i get report for this???
and when i run it i am not getting accuracy??
Hi,
I trained the model myself and found that the accuracy is only 52%.
I wonder what's wrong with my training? I just followed readme.
can you please share the pretrained model?
I AM FINDING THE ABOVE ERROR KINDLY HELP ME OUT
import tensorflow as tf
ModuleNotFoundError: No module named 'tensorflow'
Hello, how many layers of neural network are you using to extract features? Is the classifier softmax?Where is these content in the code?
Where is the mode in the file 'demo.py'?
Hello sir,
I am working with your code how to increase the efficiency of the project. Kindly suggest me .
你好,我是使用main,py运行,将amazingkelly.jpeg图像使用vaild模型进行测试,首先将图像重新裁剪为(2304,1484),然而在model.py最后一行print(file,EMOTIONS[result.argmax()])报错IndexError: list index out of range。请问result.argmax()是什么?我应该如何处理输入图像
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1068, in _run
allow_operation=False)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 2708, in as_graph_element
return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 2797, in _as_graph_element_locked
% (type(obj).name, types_str))
TypeError: Can not convert a int32 into a Tensor.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 36, in
main()
File "main.py", line 29, in main
run_demo(args)
File "main.py", line 7, in run_demo
demo(args.modelPath, args.showbox)
File "/home/d/Facial-Expression-Recognition/Facial-Expression-Recognition-master/demo.py", line 119, in demo
result = sess.run(probs, feed_dict={x: tensor})
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 895, in run
run_metadata_ptr)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 1071, in _run
+ e.args[0])
TypeError: Cannot interpret feed_dict key as Tensor: Can not convert a int32 into a Tensor.
hi
I ran the program according to your step instructions and got an error。
when i input ‘python3 main.py train ’ , i get the following error
usage: main.py [-h] [--modelPath MODELPATH] [--showbox] func train_or_valid
main.py: error: the following arguments are required: train_or_valid
when i input 'python3 main.py model train',The program starts running。
Since I am not familiar with this knowledge, I hope to get your help.
您好,我想请问一下运行代码之后出现VIDEOIO ERROR: V4L: can't open camera by index 0
是什么原因啊
您好,我是上海交大的一名学生,最近在跑您的代码,运行main函数的时候不知道为什么出现了这样的bug,能麻烦您指点一下吗。
Restore model sucsses!!
NOTE: Press SPACE on keyboard to capture face.
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvWaitKey, file /opt/conda/conda-bld/opencv_1491943704081/work/opencv-3.1.0/modules/highgui/src/window.cpp, line 616
Traceback (most recent call last):
File "main.py", line 29, in
main()
File "main.py", line 22, in main
demo(FLAGS.checkpoint_dir, FLAGS.show_box)
File "/home/lgy/chutingxuan/Facial-Expression-Recognition-master/demo.py", line 105, in demo
if cv2.waitKey(1) & 0xFF == ord(' '):
cv2.error: /opt/conda/conda-bld/opencv_1491943704081/work/opencv-3.1.0/modules/highgui/src/window.cpp:616: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvWaitKey
i met up with this problem, and i cannot close the camera window.
besides when VIDIOC_QUERYCTRL: Input/output error shows, the program can still run
how to end the program?sometimes i press 'q' there was no response
Have you published any articles about this model and algorithm? If so, could you tell me the title or link of the article? Thank you very much
When I use following command to do expression recognition, there is no emojis face.
python3 main.py demo valid
system information:
Ubuntu 16.04
Tensorflow 1.7
Opencv 3.4.0
Python 3.5
May I ask you how long did you take to train this model and what the configuration of your computer?
I use your models to running this programmming ,only to show my image,Can't show expression?
What i would like to achieve here is that you please guide me how to fetch face and emotion and store them in a folder everytime a new face is introduced in front the camera.
你好,我是使用main,py运行,将amazingkelly.jpeg图像使用vaild模型进行测试,首先将图像重新裁剪为(2304,1484),然而在model.py最后一行print(file,EMOTIONS[result.argmax()])报错IndexError: list index out of range。请问result.argmax()是什么?我应该如何处理输入图像
Hello, I am a student who is interested in your source code.
To begin with, thank you for sharing the source code. ^^
I confirmed that your code is successfully working on my raspberry pi.
I'd like to visualize emotions with some LEDs.
For example, if smile emoji appears, a blue LED turns on.
So I am wondering where to add the code.
I would appreciate if you could help me.
My laptop runs WIN10 of Ver1803 and I got no answer running"python3 main.py demo". I have already downloaded the demo files and put models folder in it. Should I open camera application first and then run the Python files? Thank you very much.
DEAR SIR,
WITH RESPECT TO YOUR PROJECT CAN WE ABLE TO ADD age analysis by using local binary patterns
Hello,
Hope you doing well!
First of all lovely program, thank you!
But the program is not seeming to take a picture when I press space. I am not quite sure why?
I am using Windows 8!
Thank you!
FailedPreconditionError (see above for traceback): Attempting to use uninitialized value Variable
[[Node: Variable/read = IdentityT=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]]
[[Node: Softmax/_3 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_73_Softmax", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
Is it possible to train it to recognize people's faces? Im sure it's possible it's the matter of implementation, and with your smart brain I'm sure you know how to implement it :)
Traceback (most recent call last):
File "main.py", line 36, in
main()
File "main.py", line 29, in main
run_demo(args)
File "main.py", line 7, in run_demo
demo(args.modelPath, args.showbox)
File "/home/hci/hansol/cantexecutewell/demo.py", line 110, in demo
result = sess.run(probs, feed_dict={x: tensor})
File "/home/hci/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 889, in run
run_metadata_ptr)
File "/home/hci/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1067, in _run
+ e.args[0])
TypeError: Cannot interpret feed_dict key as Tensor: Can not convert a int32 into a Tensor.
Hello. It didn't work it. I had typing "python3 main.py demo ./models" and only my face appear and insert "SPACE" then have above message. How can I try that? Help me plz.
When I run the demo, It just save the a.jpg about 48 * 48,only size 2 KB
您好,我运行main.py之后打开了摄像头可是不识别表情,也不报错
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.