Emotion Detection using Convolutional Neural Networks and OpenCV | Keras | Realtime

Sdílet
Vložit
  • čas přidán 20. 01. 2021
  • #emotiondetection #opencv #cnn #python
    Code - github.com/akmadan/Emotion_De...
    Telegram Channel- t.me/akshitmadan
    Instagram- akshitmadan...
    LinkedIn- / akshit-madan-394a82a6
    Books for Reference -
    Python for Beginners - amzn.to/3oZmqSm
    Complete Data Science - amzn.to/3nTZkuV
    Data Science Handbook - amzn.to/3oYHHvt
    Book for Computer Vision -
    Learning OpenCV by O'Reilly - amzn.to/391GJJo

Komentáře • 269

  • @erdemmemisyazici3950
    @erdemmemisyazici3950 Před 2 lety

    Gotta love it. Play a noise for each detected emotion and see if you can focus on your work.

  • @votanasrey2076
    @votanasrey2076 Před 2 lety

    that's an explanation ever. thanks for ur sharing

  • @annarauscher8536
    @annarauscher8536 Před 2 lety

    Thank you so much for this awsome video!!! Helped me so much in understanding! Keep it up!!

  • @funatic9912
    @funatic9912 Před 3 lety +16

    I was working on the same project for my end semester, I had gotten the code from elsewhere but couldnt understand anything, But your explanation is very clear. Looking forward to more such videos and thanks so much!

    • @AkshitMadan
      @AkshitMadan  Před 3 lety +5

      That's so motivating 🔥🔥👍

    • @akhibali8405
      @akhibali8405 Před 3 lety

      @@AkshitMadan I have a doubt about regression metrics like Mean squared error and mean absolute error. When should we go with mean squared error and when we should select mean absolute error?

    • @careercom9485
      @careercom9485 Před 2 lety

      Hi,

    • @careercom9485
      @careercom9485 Před 2 lety

      Please explain how to implement all codes in Jupiter note book

    • @user-ws9re8wf9e
      @user-ws9re8wf9e Před 2 lety

      hey there i have followed the same steps in the video but my model is predicting only sad for any expression shown..
      kindly help..

  • @ozlemmay
    @ozlemmay Před rokem

    Thank you very very much. this tutorial is the best.

  • @ottomaggio2725
    @ottomaggio2725 Před 2 lety +5

    Hi, great video!
    I have to create a similar CNN for a school project but I'm required to use pytorch.
    Do you know any useful source for translating it?

  • @subhadipghosh8194
    @subhadipghosh8194 Před 3 lety +5

    Very well explained, I should add just one thing, using keras tuner to tune the hyperparameters that are the number of filters and kernel size, would have given you better accuracy. Anyways, very well explained

  • @muhammadfajarramdhani4760

    thanks for the explanation and the file, it really helped me.

  • @akshatabiradar1816
    @akshatabiradar1816 Před 3 lety

    Nice Explaination 👍

  • @SimarjeetSingh-go3pk
    @SimarjeetSingh-go3pk Před 3 lety +2

    Can you please guide us that which Tensorflow and Keras version are you using for training model. Great Explanation of the code!!

  • @clumsycoder1907
    @clumsycoder1907 Před rokem +1

    hey the training is taking so much time

  • @AyushRaj-pm1dz
    @AyushRaj-pm1dz Před 2 lety

    Every thing was well explained... can you please make a sepreate video describing in detail about the modeling part with all the CNN and Deep learning concepts...

  • @tejaswinitikariha1300
    @tejaswinitikariha1300 Před 2 lety

    Thanks for this video :)))

  • @vaishnavivajirkar2202
    @vaishnavivajirkar2202 Před 3 lety +2

    thank you so much it was great help!! I succesfully peformed emotion recognition.

    • @bulbul9963
      @bulbul9963 Před 3 lety

      Hy

    • @user-ws9re8wf9e
      @user-ws9re8wf9e Před 2 lety +1

      @vaishnavi vajirkar i have trained the model and got output as sad for any given expression
      kindly help

    • @mistermayhem988
      @mistermayhem988 Před 7 měsíci

      @@user-ws9re8wf9e any solution?

  • @boringpsychology9737
    @boringpsychology9737 Před 2 lety

    very good video thanks

  • @asaduzzamanasad1244
    @asaduzzamanasad1244 Před rokem +3

    how many epochs should i train ? training stopped after 18 epochs . and how to generate model.h5 file ?

  • @PranavDhokane
    @PranavDhokane Před rokem +1

    Hi I'm getting error when I run Display Images
    File not found : [ Winerror 3_] The system cannot find the path specified , how to fix this error?

  • @mosbahlokhmane4404
    @mosbahlokhmane4404 Před 3 lety +1

    wich CNN architecture did you use in your project?
    VGG16?

  • @kokuluemail
    @kokuluemail Před 2 měsíci

    amazingggg

  • @rajeshdharwai
    @rajeshdharwai Před 2 lety

    I want to capture video in python sing OpenCV but not from webcam I want to capture video from live call during Zoom/whatsapp/Tewams or any other video calls tools to detect the face. can any help me, how i can do this. Thanks

  • @deenkibatain754
    @deenkibatain754 Před 3 lety

    Sir! for feature extraction which algorithm you have used?

  • @jamshaidali711
    @jamshaidali711 Před 2 lety +1

    FileNotFoundError: [WinError 3] The system cannot find the path specified: 'F:\\kaggale dataset\\imagestrain/disgust'
    sir i am using your code and got tthe above error again and again and i am working on jupyter notebook not on kaggle kernal...plz help me in using path

  • @user-jd5sb8kr8l
    @user-jd5sb8kr8l Před 7 měsíci +1

    i am unable to save model, after retraining the model. Where is a problem? in checkpoint? pl guide.

  • @careercom9485
    @careercom9485 Před 2 lety

    Thanku..

  • @nD-zr3be
    @nD-zr3be Před 2 lety

    This is my 1st ml project pls help what to show to when someone asked about the code to show where is the code?
    Can't i save this and use whenever I want?

  • @rajeevganji3819
    @rajeevganji3819 Před 3 lety

    how much does it take to run epochs? In jupyter notebook for me out of 48 epochs each epoch is taking about 30 minutes

  • @dilam4254
    @dilam4254 Před 2 lety

    Can we give the duration of each emotion in a certain period of time ?

  • @r.tasiajoe6370
    @r.tasiajoe6370 Před 2 lety

    Hi Akshit! Thank you for your helpful video. Can you explain more about the cascade classifier? if I want to detect other than face, can I use the same haarcascade xml file? thanks in advance.

  • @myarchitecturallife4643
    @myarchitecturallife4643 Před 5 měsíci

    THANK YOU!

  • @drm8164
    @drm8164 Před rokem

    Hi boss, please let me know, it is very long to run 48 epochs, maybe or then 16 hours and i m afraid that my cpu will burn motherboard and damage my macbook pro, so i stoped untill 4 epochs.
    How did you do? is it risky for my macbook to run the program many hours?

  • @blessing2356
    @blessing2356 Před 2 lety

    I have a doubt that weather we can use this same idea for detecting the crack in railway tracks? Can I train the CNN with the crack images and use this same process

  • @hinafraz528
    @hinafraz528 Před 3 lety

    what are versions of packages/libraries you have used.?

  • @carriergrowth1581
    @carriergrowth1581 Před 2 lety +1

    Hi ,thanks for your vedio .its very help for my project. One doubt your code run successfully but model.h5 is not create why?

  • @AISHAIKSAMEERUDDIN
    @AISHAIKSAMEERUDDIN Před 2 lety

    What is the final test accuracy(validation accuracy) you got???

  • @vaibhavkeni2941
    @vaibhavkeni2941 Před rokem

    I have an error that I tensorflow/core/platform/cpu_feature_guard this tensorflow binary is optimised with oneapi deep neural network library to use the following cpu instructions in performance-critical operation AVX AV2X
    Please help me sir 🙏

  • @sidulislamsohag786
    @sidulislamsohag786 Před 6 měsíci

    kaggle part code possible to run in Google Colab?

  • @debosmitachakraborty5197

    great video. but when I run this code with my work it shows the error like this " ValueError: `validation_steps=None` is only valid for a generator based on the `keras.utils.Sequence` class. Please specify `validation_steps` or use the `keras.utils.Sequence` class." please help.

  • @karishmamogal3994
    @karishmamogal3994 Před 2 lety

    Can we use transfer learning on grayscale images?

  • @yotte8846
    @yotte8846 Před rokem

    I am getting an error exception has occurred: ModuleNotFoundError
    No module named 'tensorflow.python. Please can you help

  • @bunnyff2970
    @bunnyff2970 Před 9 měsíci +1

    I am gonna use this for making face detection project

  • @manogarik1006
    @manogarik1006 Před 2 lety

    Hi bro , In output data section there is no output file is produced why ? Help me plz

  • @nitians2005
    @nitians2005 Před 4 měsíci

    Thank you bro.Because of you I completed my AI project today

    • @falm7153
      @falm7153 Před 4 měsíci

      bro what was your project I also have project about real time emotion detection xd

    • @Shady_404
      @Shady_404 Před 3 měsíci

      ​@@falm7153what did you do?

  • @TrickyRatnesh
    @TrickyRatnesh Před rokem

    I am in fifth grade this video is very helpful. i am working on this project and looking forward to more projects

  • @amandas00
    @amandas00 Před 2 lety

    which algorithm u have used ?

  • @anuragselote
    @anuragselote Před rokem

    showing an error while importing Keras optimizer what should i do?

  • @shashankijeri7047
    @shashankijeri7047 Před rokem

    from keras preprocessing.image import img_to_array
    from keras preprocessing import image I am getting error invalid syntax error

  • @jarintasnimritu4057
    @jarintasnimritu4057 Před 3 lety

    Currently, I am working on a pain detection project. This was very helpful, Thank you so much.

  • @ayushmukhopadhyay7470
    @ayushmukhopadhyay7470 Před 3 lety +1

    How did you choose the layers of CNN , did u use some hyperparameter optimization?

  • @jojosage1322
    @jojosage1322 Před rokem

    hey, exactly what type of features are being extracted

  • @ayushagarwal4066
    @ayushagarwal4066 Před 3 lety +2

    getting error while loading model... I think because of mismatch in the keras or tensorflow version between yours and mine so please tell me your tensorflow version
    i have tried to creat my own model but it is getting some problems

    • @RishavChatterjee
      @RishavChatterjee Před 3 lety

      If your images are of different sizes you will get an error while loading them into the model

  • @AamirKhan-je2dh
    @AamirKhan-je2dh Před rokem +1

    getting error - cannot import name 'Adam' from 'keras.optimizers' (/opt/conda/lib/python3.7/site-packages/keras/optimizers.py)
    please guide

  • @adhvaidh7421
    @adhvaidh7421 Před rokem

    Hey Akshit,
    I'm getting a Illegal instruction: 4 error. Do you know why?
    Thanks.

  • @nidafatima7809
    @nidafatima7809 Před rokem

    Hi, Thank you for this helpful video. I also want to make the same project for my term project, but I face a minor issue at the 2nd last step "callbacks=callback_list". I am still trying to resolve this but I can't. plz, help me to resolve this issue. I am thankful to you for this.

  • @user-ws9re8wf9e
    @user-ws9re8wf9e Před 2 lety +3

    hey there i have followed the same steps in the video but my model is predicting only sad for any expression shown..
    kindly help..

  • @nidafatima4531
    @nidafatima4531 Před 3 lety

    Helpful Video! why sometimes images are not display clearly?

  • @chirumallakamal6710
    @chirumallakamal6710 Před 2 lety

    model.h5 file is not appearing after running the code in kaggle. Give me solution for it bro.

  • @rishiprakash1275
    @rishiprakash1275 Před 3 lety

    bro i want to download the ipynb notebook that you posted in your github..

  • @sheebha1568
    @sheebha1568 Před 2 lety +1

    What is the accuracy of the project?

  • @AmitYadav-kr9bv
    @AmitYadav-kr9bv Před 3 lety

    bro how to change the size of openCV window?

  • @harshchoudhary9791
    @harshchoudhary9791 Před 2 lety

    If you can integrate a music player with this model then it will be a big help. Thank you

  • @mehwishshabbir6365
    @mehwishshabbir6365 Před 3 lety

    Why there is no predicted value not labeled with predicted emotion?

  • @deepanshimishra8737
    @deepanshimishra8737 Před rokem

    I am not getting model.h5 file after following the steps in output.
    Can u help plz

  • @SanjayKumar-nr2qx
    @SanjayKumar-nr2qx Před 2 lety

    Can you give some idea to web development using this ml algorithm (emotion detection)

  • @anuragchaturvedi750
    @anuragchaturvedi750 Před rokem

    I am getting error load_model is not defined in vscode please guide me

  • @ShahriarRafi-qt1mi
    @ShahriarRafi-qt1mi Před 10 měsíci +1

    Hello, I faced a problem, I built a CNN model where the accuracy is almost 65%. I use that model in the pycharm code. But after running the code, when The webcam opens, it always shows the first label. The label doesn't change for a single moment. How can I solve this problem?

  • @subhadipchakraborty9490
    @subhadipchakraborty9490 Před 3 měsíci

    where to get the pretrained model from?

  • @hiimo8456
    @hiimo8456 Před 2 lety

    Do you have a 3D image??? End of Semester Project (3d-CNN) and thanks for the video

  • @umangthakur7317
    @umangthakur7317 Před rokem

    ValueError: Input 0 of layer "sequential_2" is incompatible with the layer: expected shape=(None, 90, 3, 1), found shape=(None, 48, 48, 1)

  • @adityashukla3335
    @adityashukla3335 Před rokem

    My model is only predicting SAD emotion.. why??

  • @nitesharora739
    @nitesharora739 Před 7 měsíci

    why is the frame rate so low?and how to improve the fps

  • @WebDevFreelancer4
    @WebDevFreelancer4 Před 11 měsíci

    you got new subscribe

  • @balajiavinash5907
    @balajiavinash5907 Před 3 lety

    I have one dought instead of using our own weights can we use vgg16/19 to get better accuracy.
    In real world app will we use our own weights or predefined one?

  • @pruthvikp1992
    @pruthvikp1992 Před 3 lety

    how to choose the path in jupiter notebook.

  • @harleenkaur5306
    @harleenkaur5306 Před 3 lety

    Hey!
    What is the version of tensorflow you are using, I'm getting errors.

  • @banditharun6184
    @banditharun6184 Před 5 měsíci

    Handwritten signature and dates from image extraction can you do a video on this

  • @sivaganeshatchyutuni4342

    i am not getting model.h5 file in output

  • @prakashkale4009
    @prakashkale4009 Před 3 lety

    why is my dataset giving null error

  • @lokeshsinghpawar3676
    @lokeshsinghpawar3676 Před 7 měsíci

    can you tell me how to get model.h5 file because it is not saving in kaggle and whats the code for saving the model

    • @mistermayhem988
      @mistermayhem988 Před 7 měsíci

      model.save() put the file path in the brackets

  • @anbumani6460
    @anbumani6460 Před 6 měsíci +1

    Please reply to me immediately brother instead of using kaggle I used jupyter notebook to train images but I can't download h5 file from jupyter how do I download it from jupyter notebook please tell me

    • @bdeekshitha2256
      @bdeekshitha2256 Před 4 měsíci

      model.save_weights('face_emotion_model_weights.weights.h5')

  • @kiranpamidi6793
    @kiranpamidi6793 Před 3 lety

    how can i get the h5 file

  • @animeshnaroliya118
    @animeshnaroliya118 Před 6 měsíci +2

    I am unable to get the model5 file in jupyter notebook how can i get it ?

    • @bdeekshitha2256
      @bdeekshitha2256 Před 4 měsíci

      save the model with--> model.save_weights('face_emotion_model_weights.weights.h5')

  • @AllVIDEO4You
    @AllVIDEO4You Před 2 lety

    what is mode='max' doing

  • @deril7636
    @deril7636 Před 3 lety

    wt are the specs of your laptop or PC

  • @sid1784
    @sid1784 Před 6 měsíci

    How did you calculated that the accuracy is 72%?

  • @hknyky2386
    @hknyky2386 Před 3 lety +1

    Hi, thanks for your video. It's very helpful for my project. I have a question : I write the proportions of the emotions measured on the screen. When there is more than 1 person, the data is overwritten. How do I solve this?

    • @AkshitMadan
      @AkshitMadan  Před 3 lety +2

      Yes, for two people it will be like this only, for two people you need to use a 2 dimensional np array for storing predictions of more than 1 person.

    • @hknyky2386
      @hknyky2386 Před 3 lety

      @@AkshitMadan I read the data of one person in each frame at a time. How can I add two people to the array at the same frame. I can't create a 2 dimensional array.I get 1 dimensional array every time. Thank you.

    • @Un-TedxTalks
      @Un-TedxTalks Před 2 lety

      @@hknyky2386 hey did you find the solution to that probelm??? i am currently implementing that and i am unable to get the solution. would you mind sharing that with me

    • @Un-TedxTalks
      @Un-TedxTalks Před 2 lety

      i am also trying to write the proportion of the emotions measured on the screen

  • @poojatg5691
    @poojatg5691 Před 2 lety

    Are you post full clear code or not

  • @tanmaypattanaik7919
    @tanmaypattanaik7919 Před 2 lety +2

    hey, Very well explained and helpful video.
    while running the code, in webcam its only predicting as sad. what should i do?

  • @manishgautam2424
    @manishgautam2424 Před rokem

    How to build this with flutter

  • @skkarimullakarimulla9269

    Thank you so much bro. U have explained very well. This is crystal clear for me. Actually i am beginner so i am going to try this for my mini project. Can u pls tell me that what are all packages i need to install for this . Plz tell me

  • @silviusyt
    @silviusyt Před 9 měsíci +3

    where do i find my model to download?

    • @bdeekshitha2256
      @bdeekshitha2256 Před 4 měsíci

      save your model --> model.save_weights('face_emotion_model_weights.weights.h5')

  • @gouthamisabbani6549
    @gouthamisabbani6549 Před 2 lety

    Can u guide me to do this project

  • @funatic9912
    @funatic9912 Před 3 lety +1

    Also in your code I saw it took you a few seconds to calculate each epoch while my code is taking all the way to 12 minutes to calculate a single epoch? Could there be something wrong with my code?

    • @AkshitMadan
      @AkshitMadan  Před 3 lety

      Make sure you are using GPU not cpu

    • @funatic9912
      @funatic9912 Před 3 lety +2

      @@AkshitMadan How do we change that though?

    • @funatic9912
      @funatic9912 Před 2 lety

      Never mind I figured it out

  • @springdales1219
    @springdales1219 Před 3 lety +2

    Thanks for your clear and concise explanation. I'm stuck with a value error on MaxPooling 2D. can you post the exact code here?

    • @AkshitMadan
      @AkshitMadan  Před 3 lety

      Code link is there in description. It's s Jupyter notebook, so won't be feasible to post here.

  • @unq_boy_badal_raj9677

    Bro module to import kr dete.. Kon sa module import kiy th.. Pip. Ke through

  • @yupp_harish3936
    @yupp_harish3936 Před 2 lety

    how can i get you dataset

  • @nagendravarma7858
    @nagendravarma7858 Před 3 lety +1

    im not getting model.h5 file bro ... what to do please help bro

    • @poojatg5691
      @poojatg5691 Před 2 lety

      Yah I'm also facing same problem how do u solve it

  • @anonymoustrolls7952
    @anonymoustrolls7952 Před rokem

    I can't get model.h5 file

  • @Saucehero29
    @Saucehero29 Před 8 měsíci

    do you have documentation for this sir?

  • @babureddy661
    @babureddy661 Před 3 lety +4

    I'm unable to get the model.h5 file

  • @kunalparihar9224
    @kunalparihar9224 Před 3 lety

    Very detailed explanation.
    Thankyou so much you've earned a subscriber.
    How can we use this on a saved video?

    • @AkshitMadan
      @AkshitMadan  Před 3 lety

      It's easy only, search on google how to play saved video in OpenCV you will get it, I think only one- two lines of code will be changed.

    • @kunalparihar9224
      @kunalparihar9224 Před 3 lety

      @@AkshitMadan Thanks i was able to do it by
      cap = cv2.VideoCapture('C:/Users/PATH TO THE VIDEO/video_name.MP4')
      cv2.namedWindow('Emotion capture',cv2.WINDOW_AUTOSIZE)