Realtime Emotion Analysis Using Keras
HTML-код
- Опубликовано: 10 сен 2024
- Realtime Emotion Analysis Using Keras
Predicting Facial emotions realtime from webcam feed.
Github link: github.com/neh...
Kaggle Dataset : www.mediafire.c...
(Haar cascades XML file link available on Github)
Connect with me:
I have a new instagram page, please consider following me here (moving forward all updates will be posted here):
/ nehathinks
Old instagram page:
/ techyneha
Twitter:
/ nehay01
Gmail :
neha.yadav.channel@gmail.com
mam no machine can get your emotions, they are precious!
its facial expression , not emotion
when I run your code, I got errors :
"
self._metric = self._metric_methods[self._label_length].create(*args)
tensorflow.python.framework.errors_impl.AlreadyExistsError: Another metric with the same name already exists.
"
how can I solve it?
only fear emotion is shown even we show smiling , sad or surprising face
can you tell the problem please.....??
Thanks Neha. Your Giithub repo saved my work as my computer is like me very slow.
hi Neha , thank you so much for this video m i trided your cods but i experienced this error : " line 205, in fit_loop
if batch_index == len(batches) - 1: # Last batch.
UnboundLocalError: local variable 'batch_index' referenced before assignment"
i tried to solve it , I found some answers to this question, but nothing could really help me!!
using spider (python 3.7) in widows 10
Please can you help me out. After the code for training the model on execution I get this error:
X_train= X_train-np.mean(X_train,axis=0)
File "", line 6, in mean
File "Python\Python37\lib\site-packages
umpy\core\fromnumeric.py", line 3335, in mean
out=out, **kwargs)
File "Python\Python37\lib\site-packages
umpy\core\_methods.py", line 151, in _mean
ret = umr_sum(arr, axis, dtype, out, keepdims)
TypeError: can only concatenate list (not "str") to list
Failed to find data adapter that can handle input: , ( containing values of types {""}) mam i am getting this error while trying to train please help me
Hello Neha can u tell me
In emotion_recognition.py file here the error
Filenotfounderror:[Error 2] File fer2013.csv does not exist: 'fer2013.csv'
Here: www.kaggle.com/ahmedmoorsy/facial-expression/data
module 'tensorflow.compat.v2' has no attribute '__internal__' this error is coming i tried to solve but not solve this issue
How did you set the order of emotions in videotester.py #emotions = ('angry', 'disgust', 'fear', 'happy', 'sad', 'surprise', 'neutral') ????
hi, I wonder why I should put 1 on the last parameter before the data entering the convolution neural network such as this
X_train = X_train.reshape(X_train.shape[0], 48, 48, 1)
X_test = X_test.reshape(X_test.shape[0], 48, 48, 1)
Getting error "AttributeError: module 'tensorflow' has no attribute 'get_default_graph'" while I am trying to create the first layer of cnn...please help
I am getting an error can anyone please help me in this.
TypeError: __init__() missing 1 required positional argument: 'kernel_size
Mam i got attribute error stating that 'nonetype object has no attribute iterrows'.....can i know how to resolve it and also i want want to know the version keras and tensorflow
error occured at index :373 and row:emotion 6
pixels 190 190 189 190 193 187 193 182 86 71 97 118 1...
Usage NaN
Name: 373, dtype: object
/usr/local/lib/python3.6/dist-packages/numpy/core/fromnumeric.py:3335: RuntimeWarning: Mean of empty slice.
out=out, **kwargs)
/usr/local/lib/python3.6/dist-packages/numpy/core/_methods.py:161: RuntimeWarning: invalid value encountered in true_divide
ret = ret.dtype.type(ret / rcount)
/usr/local/lib/python3.6/dist-packages/numpy/core/_methods.py:217: RuntimeWarning: Degrees of freedom .....] - ETA: 0s - loss: 1.8682 - accuracy: 0.1344
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
in ()
109 verbose=1,
110 validation_data=(X_test, test_y),
--> 111 shuffle=True)
112
113
I am getting this error. Can you please help rectify it?
Hello Neha, Your model is over-fitted and it doesn't give proper output in real time with webcam.
Can you just tell the solution for that?
its giving me this error
File "", line 11
except:
^
SyntaxError: invalid syntax
Thanks a lot Neha such a good video Please keep posting such good videos
I have your files from github what is jupyter lab file emotion analysis? And I changed the optimizer to adagrad and activation to sigmoid, but it takes some time to .. find a face.. even after attaining some good accuracy in training
How did you select the layers for the CNN why didn't you use Hyperparameter Optimization
hello neha, can you help me out running this code?
i am unable to run these files.
Did we use padding here?..how much is the stride of the kernal in the convolution layer?
Hello and thanks for the tutorial, if I do not want to use fer2013 for training, but the base JAFFE or CK +, would there be much change in the codes since the bases are in image format, and fer2013 is in CSV format?
Hi and Thank You. You will have to convert the images in the dataset into width* height pixels(in our case 48*48) and then have to label them based on emotions.after this part you can use the model as it is from the part where we feed data to our Conv2D model.... I will check ck+/JAFFE dataset once I get some spare time and will let you know any further insights
Hi, did you get any answer?
Hey nice tutorial.
I had a different trained model but I used your test file to run for real time but it sticks to the same emotion and doesn’t change with changing emotions.
Any idea why ?
chal chep
hey Neha , do u have more datasets to train in the same format of fer csv , so that i can improve my code efficiency.
How do I make this program more accurate?
Mam can you please tell me the hardware requirements for this project!
i tried ur as it is. Not trained but tried videotester. Not showing expressions. Always happy expression only. can u pls suggest hw to improve this
Hey neha ji.. I got my outcome exactly what you've got.. but if i increase my epochs does it help in increasing the accuracy or more emotions like -->anger,sad which we didn't get with 200 epochs..please reply neha ji i soo need this for my project right now.. plz
you are doing such a great job, keep it up👍, plz upload some more videos..😊😊
Hi neha can you please tell me which graphics card you using for real time face recognition ? thank you
How can I train a model using raw pics? Like not csv files
Can you tell me how to open with webcam cause mine is not working...
The content is quite informative but unable to see the code at the time of typing after explaination only i able to see the code.
Which algorithm used here to feature extraction from face image ...please Neha ... reply
Data Set Not Found Mam in the kaggle , Where Can I get mam Suggest me ...
reg = str(sys.argv[1])
IndexError: list index out of range
Amazing, mam can u plz help me with real time image classifier using cv2 and saved cnn model. Actually i have used kaggle fruits 360 for classification and saved the model. Now i want to classify fruits using cv2.
The video is not properly edited. Many mistakes , cannot see the programs which are down.
hey, can you tell me how do i use my own image for testing like 48:45?
2.5GB Ki CSV se ml model ke liye pc spec kya Preferred h?
Hey Neha you told in video that you take epoch 30 and you took around 3hrs i only want to share from you that insteed using local device use google colab change run time there with GPU and see the result around 100 epochs i took only 30 mins for your this type of project it will be helpful
Thanks..
Hi Neha, Thank you for such a great tutorial, just a quick question, I saw you already have the model fer.h5 saved in the same directory, but when I am trying to test using videotester.py, the model doesn't work properly. Do I need to retrain the model, or am I missing something here?
Did you get this resolved @Dustin. I used the versions in git hub worked for first few runs on the same test data, but stopped working after a few runs. Wondering what was your experience
thanks 😊
im writing it in pycharm then should i also write file 'emotion_analysis.ipynb'. please tell me
thanks
greate job, I am wondering if u can give us a licture of detect motion when the camera detects the motion it will record but if not it will stop record.
thanks a lot
where is this fer2013.csv file can you help me with that .. i am getting error that file not found fer2013.csv
www.kaggle.com/shawon10/facial-expression-detection-cnn/?select=fer2013.csv
Took 3 hours to train 30 epochs? I trained 100 epochs in about 4 minutes using a Tesla P100 instance
how to open the camera after the data got compiled and trained
Why we use 2 conv2d layers in each convolution
I got this error !!! anyone have solution ?
File "", line 1
python emotion_detection.py
^
SyntaxError: invalid syntax
I run this code in pycharm ,but it's not giving output
Hello mam, after training the machine i ran videoTester.py but it's showing command not found. Pls help
Can you share the exact error message .. That will help debug the issue.
Mam how can i do haar cascade face detection in colab can u help plz?
Is there anyone who can help me to record what we see in this project. I mean i want to record video with predictions and rectangle
Record your screen with imovie or similar tools when you are testing, it should capture it
thanks ...
now i want two classes that are interactive and non interactive.
so pls tell me how to convert these seven emotions in these two classes.
how to use the trained model to test the real time images?
I don't know if I learnt in a different way but it seems you don't really respect conventions in this videos. Thanks for sharing this it helps a lot :)
Thank you mam your video help me to solving and understanding the error actually I am doing almost same code. After getting lots of error I get your video. I am very grateful to you. Because of your videos I also know how to use these model with open CV and I got 60% accuracy in 13th itration
can you share your code source?
@@prakash3415 code is same as the mam. Only 2 parameter value is different.
@@rohanjoshi8420 Can you send me your fer.json and fer.h5 both. I need these trained models only for testing purpose. If you trained it on more than 30 epochs please share it with 2016185@iiitdmj.ac.in
Ya sure I will share entire project I am not upload on git very soon upload on git too just train it more to get more accuracy like 200 times might reach to near 90%
@@prakash3415 you have any other email address because your address is not found error I got on Gmail
*Sweet, simple and short , keep rocking*
can u share that fer2013.csv file
Here: www.kaggle.com/ahmedmoorsy/facial-expression/data
mam fontalface wali xml file download nhi ho rhi hai.
Gr8 job! well-paced video and nice explanations!!
why dont we do ífrom keras'import *?
This was awesome. How many layers could a person model? Imagine using more sensors that measure thermal, spacial other properties besides rgb cameras. I feel we are at a great time in tech. Amazing!
Hello mam :)
I'm also want to create a project on face recognition and I also like this project in which we analysis real-time emotions, can you suggest which one is appropriate for beginner like me.
And can you please show me some places from where I started learning more and develop our interest in this area..
Facial emotion recognition is amazing can you share a code for emotion recognition using text ... please
We can see happiness on your face after successful execution of code...🤩🤩👍👍
Did u get the code..?
@@sarikadanam5298 Yes!!
Need help.
I want the output in a json format.
Like this :
Angry : 2.75438905. Disgust : 6.436899
in videotester.py after predicted_emotion line add; data={emotions[max_index]:predictions[0][max_index]}
with open('json_data.txt', 'a') as outfile:
json.dump(str(data), outfile)
outfile.write('
')
predictions[0][max_index] will give us prediction probability of predicted emotion
kaggle data is not available in kaggle @nehayadav
how do you run the tester file to produce results?
on the link you have given in the github readme.md to download fer2013.csv file their is not csv file containing that name
on kaggle's page you will find it below data sources on bottom left
@@NehaYadav1 found it. it was named fer2013.tar.gz i am a windows user so didnt knew what it was so googled it .
on which software should i run this code??
data set is not available mam can u please send the link
I tried 50,70, and 90 epochs but no one is showing atleast one expression. Everytime is showing fear. I tried ur github code. can u pls suggest me anything on this
could you solve or improve this problem?
no
Hey Neha,firstly thank you so much for the video.But I am getting an error while downloading datasets from kaggle.
It is showing error like Data not found.... :(.Can u help me out
www.kaggle.com/shawon10/facial-expression-detection-cnn/?select=fer2013.csv
@@NehaYadav1 Thanks for sharing this.I opened that page and I got a full page of code.Do I need to copy the code to another file or what?There is no csv file attached to it.
@@sarikadanam5298 click on multiple data sources link on top. Then on left hand side data sources->facial expression-> fer2013.csv
It is always showing neutral expression. so how can we increase more accuracy?
try this.....
ml-showcase.com/
thank you
this video help me a lot for final year project in collage.
@@meetpatolia7025 yes
hi can you send me your code
Thanks you ma'am nice tutorial.
can send the link for data set now its asking money
Excellent !!! I have a request. Would you share a video on Facial Expression Recognition using CNN+ LSTM/ GAN/ DBN (I mean hybrid machine learning model)?
hello, ma'am first of all thanx for this amazing video. I have an issue that when I run videoTester.py it's not able to read fer.json and throwing an error in model_from_json and Keras. What should I do?
SAME HERE , ANY SOLUTION U GOT?
PLS REPLY ASAP IF U DID, I HAVE THIS PROJECT TO SHOW IN FEW DAYS
AttributeError : 'progbarLogger' object has no attribute 'log_values'
Also model.fit(X_train, train_y, batch_size=batch_size, epochs=epochs, verbose=1, validation_data=(X_test, test_y), shuffle = True) is throwing error.
Can you paste the entire error stack trace here.
@@NehaYadav1 never mind... Its working fine.
Great!
Hey
how you solved these errors?
I too encountered the same error. Could you please help me resolve the issue?
are you using SVM,LBP?
Hi Data has been removed from kaggal. can some one please share the dataset
Have u find it?
@@alanblitzer744 noo
@@hannan7494 thanks for answering
www.kaggle.com/shawon10/facial-expression-detection-cnn/?select=fer2013.csv
Dataset is not available on kaggle
TypeError: 'str' object cannot be interpreted as an integer
During handling of the above exception, another exception occurred:
KeyError on 'pixels'
hello did u solved the issue ...i am also facing the same issue
Priyank Kumar 16BCE2031 no. It’s still showing the same issue
@@yadvimaheshwari1345 i know what is the issue the dataset which she has used is wrong i am giving u the link of fer2013 use this one
www.kaggle.com/deadskull7/fer2013
@@yadvimaheshwari1345 and one more thing her code is completely crap its not working at all
I would love to see more of this kind of content.
You are incredible. Did you think aplied to Human Resource Area? Its an amazing tools for example for Selection Analyst in the job interview
how can I recognize multiple person in opencv
can i run this wholw project in google colab
In which College do u read .... It's just for knowing......
hi neha please tell me how to increase the no. of epoch. like currently i had hone 30 as per your's video
Replace 30 with hundred (epochs = 100)
I tried 50,70, and 90 epochs but no one is showing atleast one expression. Everytime is showing fear. I tried ur github code. can u pls suggest me anything on this
@@mohangoud9956 Did you get the other emotions correctly? If so please let me know how, and is it that we just change the epochs in the existing code with a higher number?
@@priyahariharan7420 I am getting same ans every time , it's just stucked on neutral and increasing the no. Of epochs is not helping me ...did you got the solution if yes then please help...
@@NehaYadav1 increasing the no. Of ephochs is not working, my model is just stucked on one emotion only... please help ...how to get out of this
How can I implement something like this in a web app
Use flask or Django framework
grat job
can we use RNN instead of CNN in model?
In this line im getting error
X_train = np.array(X_train,'float32')
Any help is appreciated.
Thank you
Even i got the same problem @neha yadav will u please help us
Can you do a video on object detection on colab?
Thank you Neha..
Can you make a video on sign language detection to speech conversion
Mam ar 6:39 how did u run your program, plz tell
python emotion_detection.py
where is the csv file?