Realtime Face Emotion Recognition | Tensorflow | Transfer Learning | Python | Train your own Images

Sdílet
Vložit
  • čas přidán 4. 07. 2024
  • This video contains stepwise implementation for training dataset of "Face Emotion Recognition or Facial Expression Recognition" using Transfer Learning in Tensorflow-Keras API
    (00:00:00) concepts
    (00:23:01) installation
    (00:30:52) implementation
    (1:15:08) Live Webcame demo

Komentáře • 281

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

    thank you very much, you explain very well, keep up the good work!

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

    It was a very successful presentation of the subject. thanks a lot

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

    Impressive Dr. Shan. Keep it up

  • @khadijaelkhabbazi3864

    Thank you so mcuh for this great explanation

  • @feridjabri9154
    @feridjabri9154 Před rokem +1

    thank you for your videos really it is very usefull

  • @jahongiribrohimov3106
    @jahongiribrohimov3106 Před 3 lety

    Thank you so much , you must teaching programming!!!!!

  • @davideraffo3721
    @davideraffo3721 Před 3 lety

    Very interesting!

  • @Kishi1969
    @Kishi1969 Před 3 lety

    Good lecture

  • @intizarrafaideen2825
    @intizarrafaideen2825 Před 3 lety +12

    Thank you for this ! it was very much helpful.
    Could you please make a video on psychological signals as well, followed up with a hybrid model between facial and psychological emotion detection =D

    • @deeplearning_by_phdscholar6925
      @deeplearning_by_phdscholar6925  Před 3 lety +6

      Thank you for your interest, its a nice idea, and I have also worked on fusion of bio-signals and vision (video) based techniques using multi-model.
      your valuable suggestion is noted, I will look forward to publish a video on the topic.
      Till then, please keep sharing my videos and keep supporting us like this.

    • @ahmedsamit9032
      @ahmedsamit9032 Před 2 lety

      @@deeplearning_by_phdscholar6925 thank you dear,
      what are the h.w specifications that you need to excute this program? please

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

      @@deeplearning_by_phdscholar6925 have you uploaded the video?

  • @jezztom102
    @jezztom102 Před rokem

    Thanks for the well-explained videos.

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

    Hi, Thanks for the well-explained videos. Our request to you is please make a video on emotion recognition on Bio-signals. also I haven't seen Realtime Face Emotion Recognition with Deep Face

    • @mohamedmasmoudi3969
      @mohamedmasmoudi3969 Před 2 lety

      Hello Vincent,
      DeepLearning_by_PhDScholar posted a video talking about Face Emotion Recognition with Deep Face, here is the link: czcams.com/video/fkgpvkqcoJc/video.html

  • @countjulu
    @countjulu Před 3 lety +18

    Just a tip for everyone doing the X normalization: Cut your data set in half, your RAM will thank you

  • @ahmedbahpullo8544
    @ahmedbahpullo8544 Před 2 lety

    thank you

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

    which model do u prefer best for FER,as per trainimg complexity n implenting over test dataset...?

  • @devendrasamant8832
    @devendrasamant8832 Před 2 lety

    +rep man goodwork

  • @md.shafaatjamilrokon8587
    @md.shafaatjamilrokon8587 Před 3 lety +2

    55:57 you got this!!

  • @snehatrivedi5461
    @snehatrivedi5461 Před rokem +2

    Sir how will we do for group facial expression recognition? what changes we have to make in this code?

  • @pranaypampana4190
    @pranaypampana4190 Před rokem +5

    hello sir, can we get the code and images that you wrote in this video.?

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

    I always see the same output from neural network. How many input and hidden layer units do i have to use?

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

    Hello sir. I'm making a model for detecting faces with mask, face shield and without it. I use this video but I have overfitting problems. What did I do wrong?

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

    Hello Dr.Shan, is it possible for you to share the validation accuracy and validation loss instead of the training accuracy and loss? TIA.

  • @pagotisandhya2253
    @pagotisandhya2253 Před rokem +3

    Sir we are planning to implement sub emotions in a particular major emotion.
    For example for the major emotion SAD there are different sub emotions like the sad can be due to heartbreak or trouble or when he lost something or even when he is hope less the person will be in sad emotion only.
    To implement this we need some guidence. So we are requesting you to please accept our requests.
    We are waiting for your reply sir.

  • @AKSHAYKUMAR-leo
    @AKSHAYKUMAR-leo Před 3 lety +5

    Can we have Github Link for This Code? There is not any Link in the Description.

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

    Sir, can you explain how to test the model using whole testing dataset?

  • @erfan.mostafiz
    @erfan.mostafiz Před rokem +2

    Hello, can you make a tutorial also on Bio-signal/physiological based emotion detection? Highly interested for that

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

    Hello sir,
    While training the model i.e., using the fit method it started running and gave a Resource exhausted error.
    Plzzz help me out how to solve this error.

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

    Is there any way to get the "Anaconda Prompt" terminal on Mac? I've only ever seen it open on Windows.

  • @Kikiolaolu
    @Kikiolaolu Před 3 lety

    Please did you use any algorithm to train the data

  • @besta_shiva
    @besta_shiva Před rokem

    Sir at 32:00 min of video,after downloading the dataset,again you are creating "Training" folder.Do we need to extract the all "train" files of archive into training folder

  • @NayeemHaider
    @NayeemHaider Před 3 lety

    Please make a video of emotion recognition based on bio/physiological data

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

    sorry sir, i have a question. what is feature and label from (at the x and y append)? because i can't running them.. or it because of the datasets that i used is different? thanks

  • @ViralKiller
    @ViralKiller Před 3 lety +3

    I guess this will be for the Android: "I detect sadness Dr Shan, would you like a back massage?"

  • @rachelw5806
    @rachelw5806 Před 10 měsíci

    Thank you for the tutorial! How can I cite your work in my writing?

  • @Pattnaik03420
    @Pattnaik03420 Před 3 lety

    Hi i have tried your code but in the last i am getting this 'break' outside loop error. could you help me with this?

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

    Great explanation. It would be great to share the code.

  • @rajatpaul615
    @rajatpaul615 Před 3 lety

    i guess you must make video on Human emotions recognition

  • @delfind8712
    @delfind8712 Před rokem

    sir in cnn which model you have used?

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

    Thank you so much, this video was very helpful for me. Is there a chance you could share the code and/or your pre-trained model? Keep up the good work!

    • @sruthikota1094
      @sruthikota1094 Před 2 lety

      णचछःंर्न

    • @mehmetfidanci8943
      @mehmetfidanci8943 Před 2 lety

      Did you get the trained files already? If yes please share with me.

    • @rajeshdharwai
      @rajeshdharwai Před 2 lety

      ​@@mehmetfidanci8943

    • @afriquemodel2375
      @afriquemodel2375 Před rokem

      @@mehmetfidanci8943 i have done a transfer learning with chekpoint but i wand to use webcam to detect

  • @GauravKVerma-kx3ex
    @GauravKVerma-kx3ex Před 10 měsíci

    how can we do this not from webcam but from a feed stream of data. E.g. I setup my model as an API end point and an incoming video data say from a security camera is sent to the API and API endpoint recieves and send the data back to user as one word (angry, sad, etc)

  • @programmingwithsukarnapaul832

    32:54 what is the sign between folders in path?

  • @soft_panda6196
    @soft_panda6196 Před 3 lety

    You are so intelegent gob bless you

  • @mihirpatel7803
    @mihirpatel7803 Před 3 lety

    While compile the model my losses and accuracy both are 0
    Please help me out

  • @88kalogero
    @88kalogero Před 3 lety

    So did you manage to save the model? Cause i'm getting a tf issue with custom layers

    • @88kalogero
      @88kalogero Před 3 lety

      @@sashinkakumarage4739 no I never solved it sorry! Wish u luck

  • @jonatapaulino
    @jonatapaulino Před 2 lety

    Friend, congratulations on your video. I'm also working on this issue. Do you have a tip on how to store these emotions in a database?

    • @m4mirza179
      @m4mirza179 Před rokem +1

      Hii sir could you got your answer?

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

    Hello sir at 32:00 min of video,after downloading the dataset,again you are creating "Training" folder.Do we need to extract the all "train" files of archive into training folder

  • @thuongpham5228
    @thuongpham5228 Před 2 lety

    is "create_training_Data()" will run lots of time?

  • @Rubi67446
    @Rubi67446 Před rokem

    hwy can you help me out, while using the same code i am geting a memory error status while normalization of the numpy array for dataset size 12k what to do

  • @vanshikarathi2356
    @vanshikarathi2356 Před rokem

    even after applying transfer learning , epoch started from 0.1-0.2 and not increasing even after 30 epch? what should i do?

  • @noluvomathaba207
    @noluvomathaba207 Před rokem

    Hi i have some problem when i try to fit the model i get this error MemoryError: Unable to allocate 16.1 GiB for an array with shape (28709, 224, 224, 3) and data type float32

  • @Slfga_7
    @Slfga_7 Před 2 lety

    Can i ask you what the model you used ?

  • @lalehashem5169
    @lalehashem5169 Před 2 lety

    Plz help .. How I do the test to get the accuracy of it ?? Did someone complete it

  • @puneethkumarvh2355
    @puneethkumarvh2355 Před 2 lety

    what's the algorithm we are using?

  • @akeladavis7976
    @akeladavis7976 Před 2 lety

    Sir when I execute the last part it says Face not detected . What should I do? Please help me

  • @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 🙏

  • @RohitKumar-dz8dh
    @RohitKumar-dz8dh Před 2 lety +2

    Sir i don't know how your code is running without throwing variable error, as you are using 'face_roi' variable inside loop scope and you are trying to access that variable after that scope.

    • @hmarslan_234
      @hmarslan_234 Před rokem

      Hi Rohit, can you please suggest any solution for this, how to solve this error.

  • @rajeshadhikari2310
    @rajeshadhikari2310 Před měsícem

    what algorithm did you use to implement for this?

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

    For some reason, when I come to the actual training part, my accuracy starts only at about 17 percent. And then after training for 150 epochs, I've only been able to get the accuracy up to about 32 percent. Any suggestions of what could possibly be going wrong?

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

      sir will you please tell me how to train epochs i am not able to do it for even 1 epochs

    • @sumitsoni7559
      @sumitsoni7559 Před 2 lety

      ​@@anshkumar2848maybe because you are not changing your limit of trainable paramters... as not locking the previous layers. will make the whole model trainable... for which obvious reasons your computer cant handlr

    • @anshkumar2848
      @anshkumar2848 Před 2 lety

      @@sumitsoni7559 ok sir got it

  • @Hizar_127
    @Hizar_127 Před rokem

    if your model taking time to train
    switch to google colab and select GPU (as a runtime type)then your model will train quickly

  • @ameerhussainbaig
    @ameerhussainbaig Před 2 lety

    When I run the code in the live video I am getting rectangle around my face and by default happy expression is displayed. And the emotion doesn't change even though I change my expression and in jupyter notebook it is displaying face not detected. Please can someone help me with this.

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

    At the end of the video you run it and it reads your emotion in real time. Does any part of the code in the video actually for it to detect emotion in real time?

  • @abhijithtejvaddeboina8390

    at 47:53 while executing that step I got an error "Unable to allocate 27.2 GiB for an array with shape (24257, 224, 224, 3) and data type float64" how to resolve it

  • @bswaran1645
    @bswaran1645 Před 3 lety

    Hello sir how did give img_array=imread("Training...)and it showing error in img_array.shape..please anybody to solve this solution

  • @sheGotSkills00
    @sheGotSkills00 Před rokem +1

    Can you please provide the github link or share the notebook of the code

  • @md.shafaatjamilrokon8587
    @md.shafaatjamilrokon8587 Před 3 lety +1

    Assalamu Alaikum
    Could you please make a video on food ingredients recognition ?? Please

  • @sagar98534
    @sagar98534 Před rokem +2

    Where can I get the code?

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

    Does anyone have this code up and running?

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

    could you connect this code you've done in tensor flow to a web application or would you have to code it into a whole different IDE?

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

      Yes, of course. You can connect to web application using flask or any other framework. You dont need to code it into another IDE. The reason to use Jupyter notebook is for better runtime visualization.

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

    Can we have a video on malaria detection using machine learning

  • @GayatriDuwarah
    @GayatriDuwarah Před 2 lety

    Where to find weizmann dataset

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

    Hey there, great work! For some reason even though the code runs, in the live video it shows the rectangle around my face and it constantly writes happy while in the jupyter it writes "face not detected"...Maybe you can help me out :/

    • @indiananime3125
      @indiananime3125 Před 2 lety

      I'm also facing similar problem where it shows surprise constantly and jupyter keep in writing "face not detected"

    • @babayaga2358
      @babayaga2358 Před 2 lety

      @@indiananime3125 did you find a solution for this?

    • @indiananime3125
      @indiananime3125 Před 2 lety

      @@babayaga2358 No

    • @ameerhussainbaig
      @ameerhussainbaig Před 2 lety

      Please can someone help I am also getting the same thing though I followed the same as shown in the video

  • @examform9362
    @examform9362 Před 2 lety

    Can you provide me code for calculating and displaying accuracy of detection

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

    please share the video with bio signal and intensity of emotioms

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

    The length of the training data is 0. what can be the possible issue? and how to resolve this? Can you share the github link of the code?

  • @akeladavis7976
    @akeladavis7976 Před 2 lety

    Anybody know what algorithm is being used. Please inform

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

    is there any replacement for matplotlib?

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

    Can you provide me the github link for the code sir

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

    Sir, why is validation accuracy fluctuating?

    • @simoart2446
      @simoart2446 Před 2 lety

      @@llqq1744 have u manage to figure it out?

  • @Kikiolaolu
    @Kikiolaolu Před 3 lety

    I am getting this error: warnings.warn('Custom mask layers require a config and must override ' when I try to save the model. Please help

    • @Kikiolaolu
      @Kikiolaolu Před 3 lety

      @@sashinkakumarage4739 I did not
      Please if you get any solution do let me know

  • @davideraffo3721
    @davideraffo3721 Před 3 lety

    Where we can find the code?

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

    how can i access your sourse code

  • @ayeshakhalid5708
    @ayeshakhalid5708 Před rokem

    Asslam alaikum!
    Sir I'm fresh in this Field and our teacher assign this project...I follow your instructions from the start of video but in implementation (start)where you put the image shape it occurs error which i cannot identify kindly sir help me I have no teacher who guide me plz sir

  • @msankar650
    @msankar650 Před rokem

    iam getting this error please help me
    MemoryError: Unable to allocate 32.2 GiB for an array with shape (28709, 224, 224, 3) and data type float64

  • @user-cg5rr3bn1p
    @user-cg5rr3bn1p Před rokem

    new_model.fit(X,Y, epochs = 25)***
    ResourceExhaustedError facing.. what to do?

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

    Which algorithm is used here

  • @pruthvivanka2161
    @pruthvivanka2161 Před dnem

    Bro where is the pre trained model which u used for new model load??

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

    42:01 After calling the function and printing the length of training data am getting 0 as the output . What can be the possible

    • @kalpatarudash3316
      @kalpatarudash3316 Před 3 lety

      did you get a solution for this

    • @princebadshah
      @princebadshah Před 3 lety

      same

    • @_whitewalker
      @_whitewalker Před 2 lety

      Check for any errors in the code like a typo..
      it happened to me but the reason was that i forgot to provide image size in the previous steps

  • @merveozdas3069
    @merveozdas3069 Před 2 lety

    thank you for your video,but I took an error in fit function. ValueError: Input 0 is incompatible with layer model_6: expected shape=(None, 224, 224, 3), found shape=(None, 50, 50, 1) I couldn't fix that

    • @namanjain9387
      @namanjain9387 Před 2 lety

      img = np.expand_dims(img, axis=0)
      img = img/255.0

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

    I have done the tutorial in multiple notebooks and different cpu and gpu setup but the accuracy is just at 14% on the first 5 epochs

  • @intizarrafaideen2825
    @intizarrafaideen2825 Před 3 lety

    Hi, My model is taking around 10-12 hours to train one epoch, any particular reason for it? (I'm using a MacBook pro 2020)

    • @arpitpathak7917
      @arpitpathak7917 Před 2 lety

      same with me bro i think it has somethig to do with optimizer ot no of images in data set

    • @vanshikarathi2356
      @vanshikarathi2356 Před rokem

      hey , how did you solved it then , i am getting same issue

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

    How to get a image dataset of. Diffrently abilied child and how we can classift them.. Because each people have different emotion.

  • @094_anuvabchatterjee5
    @094_anuvabchatterjee5 Před 8 měsíci

    The code is running but in the camera, the emotion is stuck in Fear and it is not changing along with my emotion. Can anyone help me ?

  • @tejashrist8000
    @tejashrist8000 Před 2 lety

    How to run the real time live video code in Google Colab. I m performing this all in Google Colab. I know how to open webcam in Google Colab but then how to connect code camera capture code with my code

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

    33:00 Anaconda Prompt won't allow me to run the command saying that it isn't a runnable program

  • @user-zt6kk7lm4z
    @user-zt6kk7lm4z Před 8 měsíci

    sir can you please help me i m getting a error---------------------------------------------------------------------------
    ValueError Traceback (most recent call last)
    Cell In[29], line 1
    ----> 1 temp = np.array(training_Data)
    ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (28273, 2) + inhomogeneous part.

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

    hi sir when i am normalizing my dataset x = x/255.0 its giving me a memory error. how i can solve it ?
    and its also giving an error if i am applying 'softmax'.

    • @theyk3817
      @theyk3817 Před 2 lety

      i'm also having this problem , did you find any solution??

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

      @@theyk3817 i reduced my dataset to 10k pictures

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

    Sir may you please share your linkdin profile

  • @rajeshdharwai
    @rajeshdharwai Před 2 lety

    i cant move further epochs, i tried alot iam facin error...
    Error
    ValueError: Shapes (None, 1) and (None, 1000) are incompatible

  • @robotdream8355
    @robotdream8355 Před 3 lety

    Hi Nice explain. Can you share the code?

  • @Paraschauhan0001
    @Paraschauhan0001 Před 3 lety

    sir can I get a link for the code!!!

  • @pseudounknow5559
    @pseudounknow5559 Před 3 lety

    Can anyone provide the github link plz ?