Emotion Detection -Python Project using Machine Learning & OpenCV - with code (Face Expressions)

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.พ. 2025
  • Here we go over a Python Project using OpenCV and simple Machine Learning
    Google Colab Link : colab.research...
    Support me on Patreon
    / misbahmohammed
    💻 General Tech
    Dell Tower - amzn.to/3gHXAVV
    Monitor -amzn.to/2R0Mqk7
    Keyboard - amzn.to/3u2hPRS
    ​Mouse - amzn.to/3gMc72G
    ​Portable SSD - amzn.to/3voO8us
    Headset - amzn.to/3gI6K4t
    Airpods - amzn.to/3gK96Qu
    📸 Camera Gear
    Main Camera - amzn.to/3uae8cI
    Main Lens - amzn.to/3sXim6b
    Tripod - amzn.to/3vtsRA1
    Jobi Tripod - amzn.to/3eEo6wu
    Memory Card - amzn.to/3vt2quj
    🎥Video Accessories
    Mic - amzn.to/3uaeIHq
    Mic Arm - amzn.to/3tSkSMp
    Writing Pad - amzn.to/3nuxG9w
    Green Screen - amzn.to/3gQjnui
    LED lights - amzn.to/3nrQbex
    👨‍💻Books I like on Personal Growth
    Compound Effect - amzn.to/3vm815s
    Rework - amzn.to/32TE3K4
    Four Hour Work Week - amzn.to/32SrOx5
    Tools of Titans - amzn.to/3eEtfVx
    The Last Lecture - amzn.to/3dWia31
    Sam Walton - amzn.to/3b1nOPB
    Originals - amzn.to/3eyfUOt
    Blink - amzn.to/3sU0KIp
    The Tipping Point - amzn.to/3vuBKJH
    Rich Dad Poor Dad - amzn.to/3eCPRpq
    👨‍💻Books I like on Investing
    One up on Wall Street - amzn.to/3aFWohF
    Intelligent Investor - amzn.to/3xtMD08
    Common Sense Investing - amzn.to/3vuCbDP
    DISCLOSURE: Some of the links on this page are affiliate links, meaning, at no additional cost to you, I may earn a commission if you click through and make a purchase. Affiliate commissions help fund videos like this one.

ความคิดเห็น • 94

  • @keerthikarathan98
    @keerthikarathan98 4 ปีที่แล้ว +3

    Thank you, sir.. It's very helpful and just impressive!! Feed your knowledge a lot to us

  • @sallysoo5336
    @sallysoo5336 4 ปีที่แล้ว

    Thank you... It is very helpful for me to get a good glimpse of how it works

  • @nD-zr3be
    @nD-zr3be 3 ปีที่แล้ว +2

    can i used this for ml project in college? how to i show them code and run this? do i have to show them as you showed in this video?

  • @hatibshaikh5218
    @hatibshaikh5218 2 ปีที่แล้ว +1

    OpenCV(4.1.2) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'
    This error occured please help

  • @AyushRaj-pm1dz
    @AyushRaj-pm1dz 3 ปีที่แล้ว +1

    In the step of creating directories:
    %cd facial_expressions/
    %mkdir -p data_set/{anger,happy,neutral,sad,surprise}
    While running it on VS CODE or juypter notebook , I am getting an error saying "The syntax of the command is incorrect."
    How do I resolve this...plz help

  • @krinodagamer6313
    @krinodagamer6313 4 ปีที่แล้ว +2

    you should get in contact with the JALI Devs and see if this can be added to the AI

  • @muhayminamazid9130
    @muhayminamazid9130 8 หลายเดือนก่อน

    Can you Please help me? The picture you have uploaded the program can only detect those two. It doesn’t detect the pictures from outside.

  • @salmankevin7205
    @salmankevin7205 4 ปีที่แล้ว +3

    Really very helpful, cheers to you. 🙂With this u got a subscriber 😁

    • @19daredevill
      @19daredevill  4 ปีที่แล้ว

      Glad to know it was of help ... Take care

  • @CharmiZala1996
    @CharmiZala1996 4 ปีที่แล้ว +3

    have u used SVM for classification

  • @krinodagamer6313
    @krinodagamer6313 4 ปีที่แล้ว

    If this could be used in games to detect random NPC's emotion used with another NPC AI to react to thoes emotions and choose the best behavior the outcome would be crazy and unpredicted

  • @dhammjyotidhawase5755
    @dhammjyotidhawase5755 4 ปีที่แล้ว +3

    Thanks sir for your informative video. Can you please put the demonstration on video facial expression detection.

    • @19daredevill
      @19daredevill  4 ปีที่แล้ว

      I'll probably have to make another video on that. Will try to look into it soon. However, some of my more recent projects here on the channel are using video processing. Hope they give you an idea 🙂

    • @dhammjyotidhawase5755
      @dhammjyotidhawase5755 4 ปีที่แล้ว +1

      @@19daredevill Thanks sir will go through it

  • @Nature_bliss_official
    @Nature_bliss_official 4 ปีที่แล้ว +1

    How can we merge this into a Mobile app to detect in real time?

  • @chandanamuttur4394
    @chandanamuttur4394 2 ปีที่แล้ว

    Which algorithm you have used sir?
    Can u send that.!

  • @chandanamuttur4394
    @chandanamuttur4394 2 ปีที่แล้ว

    Sir can you tell what need to be taken x axis & y axis, if we plot a graph for this project

  • @riseandshine2116
    @riseandshine2116 2 ปีที่แล้ว

    recognizer.train(faces, np.array(ids))
    getting error in this line

  • @chandanamuttur4394
    @chandanamuttur4394 2 ปีที่แล้ว

    Sir how to do an accuracy graph for this project?! Can u please help with this

  • @oannhan2507
    @oannhan2507 4 ปีที่แล้ว +1

    project is this using support vector machine (svm), sir ?

  • @nedalnasser2326
    @nedalnasser2326 4 ปีที่แล้ว +3

    Hello Misbah, thanks for this nice job, I have a question please: how can I run this project on Jupyter notebook independently? there is no Clone Repository as you know, anyway I've downloaded the whole zip file "facial_expressions-master" but how can I run it on Jupyter?
    thank you in advance.

    • @19daredevill
      @19daredevill  4 ปีที่แล้ว

      Hi, you can always clone the repository in your local computer and then run the Jupyter notebook in that folder. Hope it helps

  • @yakshithsyyakshith7535
    @yakshithsyyakshith7535 8 หลายเดือนก่อน

    its only showing surprice accurency level 38

  • @elyeshamad1440
    @elyeshamad1440 4 ปีที่แล้ว +4

    I've triezd to run this code on different images but its not accurate at all :/

    • @19daredevill
      @19daredevill  4 ปีที่แล้ว

      What were the issues coming up. I'll try to address them in another video.

    • @isha_dam
      @isha_dam 4 ปีที่แล้ว

      @@19daredevill for anger its showing surprise why is it so.....

    • @harshahuja176
      @harshahuja176 4 ปีที่แล้ว

      @@isha_dam have u solved this issue

    • @isha_dam
      @isha_dam 4 ปีที่แล้ว

      @@harshahuja176 no but I switched to real time facial expression detection project..which I completed successfully

    • @bhuvaneshmurugadass7180
      @bhuvaneshmurugadass7180 4 ปีที่แล้ว

      @@isha_dam can you help me by sending source code of that😅

  • @anushkabharti7594
    @anushkabharti7594 4 ปีที่แล้ว

    error: OpenCV(4.1.2) /io/opencv_contrib/modules/face/src/facerec.cpp:61: error: (-2:Unspecified error) File can't be opened for reading! in function 'read'
    for line 6 in recognition block, I ma getting this error. I have written the code exactly as directed . please suggest how to overcome this problem

  • @tohelpothers9767
    @tohelpothers9767 4 ปีที่แล้ว

    please make a video, in witch u download a code and mange it and run it on others cam and give another pics/ video on runtime

  • @sudarsshnarayan5343
    @sudarsshnarayan5343 3 ปีที่แล้ว

    it shows surprise for Dwayne. Any help please!

  • @bswaran1645
    @bswaran1645 3 ปีที่แล้ว +3

    Hi sir.
    I need a code for emotions recognition based on music player

  • @harshgupta8556
    @harshgupta8556 3 ปีที่แล้ว

    I am facing this error:
    recognizer.train(faces, np.array(ids))
    cv2.error: OpenCV(4.5.1)
    help me to resolve it

  • @Deadsoul098
    @Deadsoul098 ปีที่แล้ว

    The user can speak for One minutes themselves while there fase expression are being recorded kindly help this project last start kary??

  • @CharmiZala1996
    @CharmiZala1996 4 ปีที่แล้ว +2

    can u plz tell me which algorithm and method u have used

    • @19daredevill
      @19daredevill  4 ปีที่แล้ว +4

      Thank you for the question. It's using Haar-Cascades for face detection and LBPH for face recognition, which is dependent on texture detection. Wikipedia Link on this : en.wikipedia.org/wiki/Local_binary_patterns Hope it helps
      Check this channel out and if it's useful to you, consider subscribing 🙂

  • @shivasainathreddyrachamall6435
    @shivasainathreddyrachamall6435 4 ปีที่แล้ว +1

    unable to upload other images .plz help

  • @anilpise4647
    @anilpise4647 4 ปีที่แล้ว +1

    Very nice explanation sir

    • @19daredevill
      @19daredevill  4 ปีที่แล้ว

      I'm glad it helped you 🙂... take care

  • @shyamsundard5824
    @shyamsundard5824 2 ปีที่แล้ว

    Sir I beg up please help me.Its working with happy file only for me.Not working with others.I am in a very critical situation . Please help me sir.What shall i do sir

    • @nyong7369
      @nyong7369 ปีที่แล้ว

      me neither in my case surprise only works

  • @billchen559
    @billchen559 4 ปีที่แล้ว +1

    Thanks for sharing

  • @growwitharosh5052
    @growwitharosh5052 4 ปีที่แล้ว +1

    Salam. It was excellent.
    I am trying to do a hybrid model such as CNN with LSTM/GAN/DBN/YOLO for real-time facial emotion recognition.is it possible?

  • @bushrarahim3861
    @bushrarahim3861 4 ปีที่แล้ว +1

    That was Informative

  • @CharmiZala1996
    @CharmiZala1996 4 ปีที่แล้ว +2

    hey can i have ur mail id. write now i m running ur code but it is not able to detect my face expression

    • @19daredevill
      @19daredevill  4 ปีที่แล้ว +1

      Pls use this email misbahlabs@gmail.com

  • @niyasparakkal431
    @niyasparakkal431 2 ปีที่แล้ว

    When I enable all the expressions ,all the images shows 'surprise' even Elon Musk and dwayne.can you please solve this.

  • @tadakshamahesh7187
    @tadakshamahesh7187 4 ปีที่แล้ว

    it says surprise to all faces, did according to what you dictated, where did it go wrong?

    • @19daredevill
      @19daredevill  4 ปีที่แล้ว

      It's mostly because of 1-2 reasons, the training dataset should be properly labeled prior to training. The other common problem is the final array that you use for comparing object, should have the correct order of the "emotions". Hope it helps

    • @diyadohare2793
      @diyadohare2793 4 ปีที่แล้ว

      @@19daredevill Hi, I checked. I have the same problem, it shows 'surprise' for all the images and I double/triple times checked the points you said. Still doesn't work! Please help!

    • @19daredevill
      @19daredevill  4 ปีที่แล้ว

      I have another video on this made , see if this helps
      th-cam.com/video/heKa-f4rkvg/w-d-xo.html

  • @raghavsethi4906
    @raghavsethi4906 4 ปีที่แล้ว

    please share a video specifically for web cam

  • @doraTV__
    @doraTV__ 4 ปีที่แล้ว

    how do i download the folder after all changes done in collab? so that i can finally run in pycharm

  • @prabakarank9391
    @prabakarank9391 4 ปีที่แล้ว

    Sir if I upload my photo and run it is showing some error sir what can I do sir

    • @19daredevill
      @19daredevill  4 ปีที่แล้ว

      Hi, what is the error you are getting?

  • @commonandcreativeofficial2452
    @commonandcreativeofficial2452 2 ปีที่แล้ว

    Can you plz send me code of this ??

  • @ishaanchandak4774
    @ishaanchandak4774 ปีที่แล้ว

    bro github link ?

  • @CharmiZala1996
    @CharmiZala1996 4 ปีที่แล้ว +1

    i m not able to get correct result for my face

    • @19daredevill
      @19daredevill  4 ปีที่แล้ว

      Make sure the image is also of good quality and the training was done correctly.

  • @bayazidkhanburki4158
    @bayazidkhanburki4158 4 ปีที่แล้ว

    sir which version of openCV should we use?

  • @Chesstreamer
    @Chesstreamer 4 ปีที่แล้ว

    it detects surprise for all the images,its not working

    • @19daredevill
      @19daredevill  4 ปีที่แล้ว

      It happens if we missed something in the steps. But I made another video on this to help

    • @19daredevill
      @19daredevill  4 ปีที่แล้ว

      th-cam.com/video/heKa-f4rkvg/w-d-xo.html
      This is the link

    • @Chesstreamer
      @Chesstreamer 4 ปีที่แล้ว

      @@19daredevill ok i will check it
      but thanks for making such videos
      good initiative
      keep going🤞

  • @RATANAGARWALITINFORMER
    @RATANAGARWALITINFORMER 4 ปีที่แล้ว

    thanks i need itpl support

  • @selimkutuk627
    @selimkutuk627 4 ปีที่แล้ว +1

    have a nice day
    algorithm might be saying surprise to all faces what could be the reason?

    • @19daredevill
      @19daredevill  4 ปีที่แล้ว

      The most common issue is at the training stage. If the files are not properly provided or at the detection stage if mistakenly change the detection array, it can cause problems. Hope it helps you

    • @selimkutuk627
      @selimkutuk627 4 ปีที่แล้ว

      @@19daredevill Thank you

    • @19daredevill
      @19daredevill  4 ปีที่แล้ว

      I made another video on this. See if it helps you th-cam.com/video/heKa-f4rkvg/w-d-xo.html

    • @selimkutuk627
      @selimkutuk627 4 ปีที่แล้ว

      @@19daredevill Thanks Im looking

  • @sahiljhakkaas
    @sahiljhakkaas 4 ปีที่แล้ว

    Sir i would i like to have your help ....regarding my project by using this.....can you put down your mail id so i can contact you?

  • @nntun03
    @nntun03 3 ปีที่แล้ว

    open.cv emotion detection is easy

  • @CharmiZala1996
    @CharmiZala1996 4 ปีที่แล้ว

    which dataset is used here

    • @19daredevill
      @19daredevill  4 ปีที่แล้ว

      In the beginning of the video I showed the dataset, it's on GitHub. Also if you open the GitHub Link from the colab, you can see where I forked it from

    • @CharmiZala1996
      @CharmiZala1996 4 ปีที่แล้ว +1

      @@19daredevill ok thank you very much

  • @thanuvm7199
    @thanuvm7199 9 หลายเดือนก่อน

    Hlo sir

  • @chrissaintjohn
    @chrissaintjohn 3 ปีที่แล้ว

    Hello are you a freelance coder? I have a project I want to discuss. Could I email you?