Face Emotion Recognition Using Machine Learning | Python

Sdílet
Vložit
  • čas přidán 10. 06. 2023
  • Face Emotion Recognition Using Machine Learning | Python
    ===============================================
    Project Code : -
    github.com/kumarvivek9088/Fac...
    Face Emotion Recognition Model(62% accuracy) : -
    drive.google.com/drive/folder...
    Data Images which I used in this Video to train Model :-
    www.kaggle.com/datasets/jonat...
    Wanna Deploy this Model? Then watch this:
    • Deploy ML/DL Model | ...
    ===============================================
    Like Share Comment
    And Subscribe

Komentáře • 256

  • @ProgresswithPython
    @ProgresswithPython  Před měsícem +1

    If you want to deploy this model then you can watch this: czcams.com/video/usGUFXCRUIg/video.html and If you are facing an issue of: - Could not locate class 'Sequential' error in Tensorflow while loading model, then you can also watch this.

  • @shejalpal7307
    @shejalpal7307 Před 7 měsíci +4

    Sir the model which says epochs 1/ 100 it doesn't show in my jupyter notebook what to do sir no error in the code 28:54

  • @vishwaschandra2943
    @vishwaschandra2943 Před 11 měsíci +3

    op bhaii thanks a ton could you please make another detailed vedio on installing tensorflow with gpu to run the model

  • @mohammadabduloadud398
    @mohammadabduloadud398 Před 11 měsíci +6

    Thanks a lot , it is very helpful. please make more videos on deep learning and machine learning. All the best

    • @ProgresswithPython
      @ProgresswithPython  Před 11 měsíci +2

      I am glad you like this....sure I will make more videos on deep learning and machine learning

  • @shivamanand3861
    @shivamanand3861 Před 9 měsíci +2

    Thanks buddy it really work thank you so much

  • @karishmashaik6741
    @karishmashaik6741 Před 9 měsíci +2

    It works really well
    Thank you so much

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

      can you share your code with me

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

      brother can u please share the model if its above 85% accuracy

  • @Aman-pb8sh
    @Aman-pb8sh Před 2 měsíci

    Whenever I type “Jupyter notebook “ and enter it , it opens the notebook.py file in vs code and not in the browser, so I have to run the complete code at once. After saving the model using “model.save” , it doesn’t show the name of the file emotion detector in vs code

  • @sig-yog7046
    @sig-yog7046 Před 7 měsíci +1

    Did you establish the relationship between the photographs here?

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

    Nice❤❤

  • @KAZZinteractive
    @KAZZinteractive Před 8 měsíci +2

    Thank you for the tutorial! I was wondering if there was a way to make the algorithm output the detected realtime emotion as a certain data so that it could be used in other programs realtime? For example, if i make a happy face on camera, it gives out a signal to OSCs or JSON etc? I'm trying to create visuals on other softwares so that everytime i make a certain face, it changes the visuals.

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

    what method did you use for facial recognition? I mean what was the approach?

  • @priyankabhargav5736
    @priyankabhargav5736 Před 7 měsíci +1

    Is there any project related to speech emotional recognition system?

  • @spidyqda3222
    @spidyqda3222 Před 10 měsíci +1

    hey bro nice job, but how can I run this program with gpu instead of cpu?

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

    27:05 "Arguments `target` and `output` must have the same rank (ndim). Received: target.shape=(None, 7, 7, 7), output.shape=(None, 7)". Please help

  • @DBSVICTORHUNBRO
    @DBSVICTORHUNBRO Před měsícem +2

    Those who are facing errors like Tensorflow etc etc should use python 3.8---3.11 version not the latest
    Regards

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

    Its very nice project ... But i want to change model and find the confusion matrix... How can i do this,?????

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

    How to generate a facial emotion model.json file? 🤔🤔

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

    How have to upload this dataset in JUPYTER?

  • @DanielSantos-pg6tc
    @DanielSantos-pg6tc Před 3 měsíci

    how to fix if only angry detected in train and test directory

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

    How can we detect face shape? i want to classify face shape but i am very new to ML, can you please guide me??

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

    me making weird faces in forn of my camera to satisfy the result😂🤣
    btw thnx for making this video

  • @REHANARAUNAK786
    @REHANARAUNAK786 Před rokem

    It so good but mujhe please batao features kya extract kiya hai.....
    Lbp features kaunse extract krta hai emotions detection.e

  • @masterpiece4021
    @masterpiece4021 Před 10 měsíci +4

    its saying keras preprocessing not found idk why

  • @seyedrabiu
    @seyedrabiu Před 4 měsíci +2

    json_file = open("facialemotionmodel.json", "r")
    model_json = json_file.read()
    json_file.close()
    model = model_from_json(model_json)
    model.load_weights("facialemotionmodel.h5")
    it shows TypeError: Could not locate class 'Sequential'. and so many error... What should I do

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

    WinError 3 the system cannot find the specified: 'images/train ' How to solve this problem 😢

  • @KAZZinteractive
    @KAZZinteractive Před 8 měsíci +1

    do you have to train the model everytime you turn on the computer and open the visual code & jupyter? It takes sooooo long

    • @ProgresswithPython
      @ProgresswithPython  Před 8 měsíci +2

      No, save your model after training and load that model when you do face emotion recognition

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

      @@ProgresswithPython how do you save the trained model?

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

      @@KAZZinteractive all things are explained in the video

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

      @@ProgresswithPython is it the part after the training section where you input 'model.save("emotiondetector.h5")?
      Unfortunately i can't understand the language so I have to resort to the youtube auto captions.

    • @ProgresswithPython
      @ProgresswithPython  Před 8 měsíci +1

      @KAZZinteractive yes this is the line to save model

  • @user-uz2xg4vl2b
    @user-uz2xg4vl2b Před 5 měsíci

    How can I solve it
    ImportError: Could not import PIL.Image. The use of `load_img` requires PIL.

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

    bro, next time se karne k time explain krna why are you using module and all.... it will be helpful for viewers.

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

    Bro interview questions about this project, please tell me

  • @ishanjain3768
    @ishanjain3768 Před 9 měsíci

    facing this error , even though i hace this file in correct folder : No such file or directory: 'facialemotionmodel.json'

    • @ProgresswithPython
      @ProgresswithPython  Před 9 měsíci

      Have you checked whether the file exists or not in that repository with this name

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

    Bro i am getting error in the .ipynb file again and again at the "" train_features = extract_features(train['image']) "" it states File D:\Sanket\Python_Projects\emotion_detection\venv\lib\site-packages\keras\src\utils\image_utils.py:414, in load_img(path, grayscale, color_mode, target_size, interpolation, keep_aspect_ratio Could not import PIL.Image. The use of `load_img` requires PIL. what should i do struck at the same error again and again despite of the fact that i copied and pasted your git code

  • @doniazedezzine6339
    @doniazedezzine6339 Před 8 měsíci +1

    How to run it ? after executing trainmodel.ipynb ? what are the commands to run the app

  • @prathamgupta3348
    @prathamgupta3348 Před 9 měsíci +2

    hey buddy need help to integrate it with spotify API

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

      I'm also working on same project. Did you understand how to do it?
      Will you please help me

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

    Sir could u plz tell in which areas this face emotion is actually used??

    • @user-wd8tg9mr1h
      @user-wd8tg9mr1h Před 10 měsíci +2

      It has different applications. For example apart from these emotions if you add "SLEEPY" to it. It will be useful while driving cars so that if its a self driving car , It can come to a stop preventing accidents. Even if its not self driving cars, atleast it can alert the driver. When you consider other applications, like ALEXA and all, In future if it has access to survilence cams, It can reccomend you a music or a movie to cheer you up if it detects you are SAD. So those are some applications. Thank You.

  • @sonugowri1483
    @sonugowri1483 Před 10 měsíci +2

    Hi thank you. Project works really well. Where can I find project report for this project? Please help

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

    Hey if I just changed the dataset and want to train this model to predict plant leaf diseases will it work?

  • @deepthikothamasu6727
    @deepthikothamasu6727 Před 7 měsíci +2

    model = model_from_json(model_json),I am getting error with this line.Can u tell me how to get rid of it

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

      Have you imported the model_from_json function?

    • @ProgresswithPython
      @ProgresswithPython  Před 13 dny

      @mohdbilal_shorts what error you getting?

    • @furkhanadoni3137
      @furkhanadoni3137 Před 13 dny

      Hey bro same problem have u got any solutions

    • @ProgresswithPython
      @ProgresswithPython  Před 13 dny

      @furkhanadoni3137 I loaded this same face emotion model in my new video without using model_from_json method...
      czcams.com/video/usGUFXCRUIg/video.htmlsi=j2vpphdT5KZbWv_V
      I hope this will solve your issues.

    • @furkhanadoni3137
      @furkhanadoni3137 Před 12 dny

      @mohdbilal_shorts same bro tell me the solution for this

  • @KillerBoy-bh5ye
    @KillerBoy-bh5ye Před 9 měsíci

    Bhai yrr isko django ke jariye kese kree uske upr video nii bnayi apne

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

    tensorflow is not installing shown error?
    how can I?

  • @Nishant_Verma_184
    @Nishant_Verma_184 Před 10 měsíci +2

    bro every thing is ok the code is not showing any error but at the last the camera is not opening as i had check the camera permission is also ok

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

      Brother if u have done it, can u please provide the model if it is above 80% accuracy.

  • @younus.athlete
    @younus.athlete Před 7 měsíci

    once the model is trained, then how to test and detect emotions, My model was working fine, but once I closed the data and try to reuse it , it was showing error , can You tell me the reason please

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

      Save the model and re-use it.

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

      Brother if u have done it, can u please provide the model if it is above 80% accuracy.

  • @vihangupta6644
    @vihangupta6644 Před 3 měsíci +1

    Brother no module named ‘cv2’ deka rha h or sab kuch shi chl gya 37:15 bhai pls help me pls bro

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

    Showing error in this line :-
    pred = model.predict(img)
    ValueError: Exception encountered when calling layer 'sequential_1' (type Sequential).

    Input 0 of layer "conv2d_4" is incompatible with the layer: expected min_ndim=4, found ndim=2. Full shape received: (None, 48)

    Call arguments received by layer 'sequential_1' (type Sequential):
    • inputs=tf.Tensor(shape=(None, 48), dtype=float32)
    • training=False
    • mask=None

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

    ImportError: cannot import name 'Maxpooling2D' from 'keras.layers' (C:\Users\avina\AppData\Local\Programs\Python\Python312\Lib\site-packages\keras\api\layers\__init__.py)
    ye error aa rha baar baar, what to do now

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

    Do anyone worked on confidence detection system based on audio or vedio files

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

    Extract_features k code par 0/7600 hi bata rah hi after run
    N your showing whole imagea like 7600/7600
    Please help

  • @REHANARAUNAK786
    @REHANARAUNAK786 Před rokem

    Plsss tell me how to work with SVM classifier instead of CNN model????

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

    MemoryError: Unable to allocate 12.2 GiB for an array with shape (1780, 1, 1280, 720, 1) and data type float64
    This error is coming after running model.fit(---) command

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

      have you increase the shape of images?

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

      I am using this method for other images which has 1280*720 dimension@@ProgresswithPython

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

      Can u tell what to do I'm also facing same issue​@@ProgresswithPython

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

      ​@@ProgresswithPythonI'm decreased the size of folders

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

    Can we add songs also according to the detected emotion

  • @vasunamdev6895
    @vasunamdev6895 Před 4 měsíci +1

    if someone have .h5 nad .json file with more accuracy, please share

  • @itnarayanchauhan9421
    @itnarayanchauhan9421 Před 4 měsíci +1

    Bhai last main run kar ke bhi bata dete hai

  • @questchronicletv
    @questchronicletv Před 3 měsíci +1

    same feeling of shy to show emotion by myself😅😅

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

      Brother if u have done it, can u please provide the model if it is above 80% accuracy.

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

      @@subhayanbose3010 bro if you got the model can you share it with me?

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

    I am getting an errror " No module named 'keras_preprocessing' "

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

    to_categorical is not getting imported for me

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

    Bhai sab kuch accha hai but ek chiz smajh ni aayi model train he ni hora mere laptiop mein 25% se jyda accuracy he ni aa rahi hai kya kru ?

    • @sourav-bisht
      @sourav-bisht Před dnem

      bro lagbhag 5-6 hours lagte hai model train hone k liye poora time diya aapne?

  • @ankitabhattacharjee5669
    @ankitabhattacharjee5669 Před 10 měsíci +1

    First of all thank you so much it works perfectly 😊😊😊...but i encountered an error while doing the realtime capturing it shows that can't open camera by index and camera index outof range ......i cant fix this can u please help me

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

      Try with 0 index

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

      Brother if u have done it, can u please provide the model if it is above 80% accuracy.

    • @sourav-bisht
      @sourav-bisht Před dnem

      @@ProgresswithPython brother where to put index 0 in the code can you tell me please its urgent

    • @ProgresswithPython
      @ProgresswithPython  Před 23 hodinami

      @@sourav-bisht at line of cv2.videocapture

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

    Import mai error aa raha h import error

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

    14:00

  • @BahutGamingLive
    @BahutGamingLive Před rokem +2

    so can we add it in python ai assistant by chatgpt so ai hamari wmotion samaj jaye ga

    • @ProgresswithPython
      @ProgresswithPython  Před rokem +1

      Yes offcourse

    • @BahutGamingLive
      @BahutGamingLive Před rokem +2

      @@ProgresswithPython how bro batao pls mai bana lu baad me video bhi dal Dena pls 😭🙏🥺🙏🙏🥺🥺🙏🥺🥺🙏

    • @ProgresswithPython
      @ProgresswithPython  Před rokem +2

      @BahutGamingLive simple create a function that takes input from camera and returns output by taking prediction from model and add this function to python ai

    • @BahutGamingLive
      @BahutGamingLive Před rokem +1

      @@ProgresswithPython yes can i can make can you prefer me any cheap wireless camera of usb wireless so rpi can support it

    • @ProgresswithPython
      @ProgresswithPython  Před rokem +1

      @@BahutGamingLive I have no idea about this as I never worked on raspberry pi

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

    Bro can u pls help with this project
    Give reply

  • @avataraand76
    @avataraand76 Před 9 měsíci

    when print out "model prediction", it always print happy, how can I fix it?

    • @ProgresswithPython
      @ProgresswithPython  Před 9 měsíci

      What's your model accuracy?

    • @avataraand76
      @avataraand76 Před 9 měsíci

      @@ProgresswithPython the model accuracy in line
      [model.fit(x= x_train,y = y_train, batch_size = 128, epochs = 100, validation_data = (x_test,y_test))]
      it print out [loss: 1.8245 - accuracy: 0.2435]

    • @avataraand76
      @avataraand76 Před 9 měsíci

      ​@@ProgresswithPython do i have to run whole 100 epochs, it takes hours?

    • @ProgresswithPython
      @ProgresswithPython  Před 9 měsíci

      @avataraand76 No, stop when you get good accuracy.

    • @avataraand76
      @avataraand76 Před 9 měsíci

      @@ProgresswithPython thank you but how do i know its a good accuracy?

  • @user-yo1jl5rr4s
    @user-yo1jl5rr4s Před 9 měsíci

    how i can download tensorflow in 3.12 version?

    • @ProgresswithPython
      @ProgresswithPython  Před 9 měsíci

      I checked online, and I think tensorflow isn't released for 3.12 yet

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

      but you can try with this command - pip install tensorflow

  • @dharshinichellappan9295
    @dharshinichellappan9295 Před 9 měsíci +5

    name error: model is not defined

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

    what algorithm did you use to implement it

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

    real time detection not working, everything is working well except the last and most important part for real time detection
    i'm getting this error ;
    Exception has occurred: ModuleNotFoundError
    No module named 'cv2'
    File "C:\Users\crtel\OneDrive\Desktop\FER Python
    ealtimedetection.py", line 1, in
    import cv2
    ModuleNotFoundError: No module named 'cv2'

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

      Install opencv in python

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

      Thank you for responding
      i had it already installed, but i somehow fixed that by changing interpreter but now this too
      Exception has occurred: AttributeError
      module 'cv2' has no attribute 'data'
      File "C:\Users\crtel\OneDrive\Desktop\FER Python
      ealtime.py", line 11, in
      haar_file=cv2.data.haarcascades + 'haarcascade_frontalface_default.xml'
      ^^^^^^^^
      AttributeError: module 'cv2' has no attribute 'data'
      And also does output takes time to show?

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

    label is not defined

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

    Jupyter notebook isn't open through vs code terminal so how to open jupyter notebook

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

      you can use command prompt

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

      Tried but didn't work
      Jupyter is also install in system but Error occur Jupyter is not recognize in external or internal command

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

      How to solve it

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

    Bhai agar training ke time Mera 75% accuracy bataya toh json file ki jaroorat nahiye ky?

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

    how can i get json source file??

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

    Hello sir i cannot open jupyter notebook in vs code please sort it out

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

      Install jupyter notebook

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

      ​@@ProgresswithPythoni tried sir,it showing the term 'install'is not recognised

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

      @justrise6154 What command did you use for installation

  • @DJPapzin
    @DJPapzin Před 7 měsíci +4

    🎯 Key Takeaways for quick navigation:
    00:00 🚀 *Introduction and Project Overview*
    - Introduces the topic of face emotion recognition using machine learning.
    - Mentions audience voting on machine learning projects.
    - Briefly discusses the choice of Python and the upcoming projects.
    00:57 🛠️ *Installing Python and Required Tools*
    - Guides viewers on installing Python using the official website.
    - Recommends installing a text editor like VS Code.
    - Emphasizes the importance of having Python and VS Code installed for the upcoming projects.
    02:35 📂 *Setting Up Project Structure*
    - Creates a project folder for face emotion detection.
    - Discusses the necessity of organizing files and folders.
    - Highlights the importance of creating a test file for the project.
    03:15 📊 *Project Planning and Model Selection*
    - Discusses the need for tensor and OpenCV models in the project.
    - Emphasizes the importance of understanding real-time vision inputs.
    03:44 📝 *Setting Up Jupyter Notebook and Package Installation*
    - Removes unnecessary lines from the Jupyter Notebook.
    - Simplifies the Jupyter Notebook for easier installation.
    04:19 🛠️ *Installation Process Overview*
    - Overview of the installation process using the terminal.
    - Listing the names of packages to be installed.
    04:47 🕵️ *Searching for CNN Algorithm*
    - Instructions on searching for the Convolutional Neural Network (CNN) algorithm.
    - Highlighting the importance of understanding the theory behind CNN.
    05:17 📊 *Setting Up the Dataset*
    - Creating a data frame for the image dataset.
    - Defining columns for image names and labels.
    05:45 🖼️ *Organizing Image Data*
    - Discussing the structure of the image folder and organizing images by expressions.
    - Describing the process of associating labels with images.
    06:11 📂 *Creating the DataFrame*
    - Creating a table (data frame) to store image information.
    - Assigning labels to images within the data frame.
    06:43 📸 *Understanding Image Set*
    - Examining the structure of the image data set.
    - Emphasizing the diversity of expressions and corresponding labels.
    07:15 🔄 *Image Processing Overview*
    - Outlining the process of loading and converting images.
    - Introduction to the Tensorflow method for loading images in grayscale.
    08:14 🚂 *Data Set Preparation for Training*
    - Data set preparation for face motion recognition.
    - Downloading a large data set from the website for facial motion recognition.
    09:11 📊 *Jupyter Notebook Setup and Data Import*
    - Launching Jupyter Notebook and creating a new file.
    - Importing necessary dependencies and verifying the successful download of the dataset.
    10:09 🧪 *Organizing Image Data for Training*
    - Moving images to the respective folders for face motion detection.
    - Deleting unnecessary folders and organizing the dataset for training.
    11:27 🔄 *Renaming and Preparing Validation Data*
    - Renaming the validation folder to 'test' for uniformity.
    - Cleaning up the dataset and preparing folders for training and testing.
    12:37 📂 *Directory Structure Explanation*
    - Explanation of the directory structure for the train and test data folders.
    - The train folder contains subfolders for different emotions (e.g., angry), and each subfolder contains images for that emotion.
    13:05 📊 *Creating a Data Frame Function*
    - Mention of the manual process and the creation of a function named "create_data_frame" to automate this task.
    14:06 🖥️ *Function for Creating Data Frame Implementation*
    - Detailed implementation of the "create_data_frame" function.
    - Listing folders inside the train directory, labeling them, and creating a data frame with image names and labels.
    15:03 🧹 *Cleaning and Checking the Data Frame*
    - Explanation of the creation of two columns in the data frame: one for images and another for labels.
    - Displaying the data frame for the train data and explaining its structure.
    16:19 🔄 *Copying Data Frame for Test Data*
    - Copying the data frame structure for the test data by changing the directory paths.
    - Verification by running the code and displaying the test data frame.
    17:40 🔄 *Function for Extracting Features*
    - Introducing the need for extracting features from images for training machine learning models.
    - Creating a function to extract features and demonstrating how it works.
    18:19 🖼️ *Loading and Converting Images*
    - Loading images, converting them to grayscale, and appending them to an array.
    - Explaining the process of converting and appending images in a step-by-step manner.
    18:59 🧠 *Data preprocessing for face emotion recognition*
    - Conversion of data to the format needed for the model.
    - Resizing images to 48x48 dimensions.
    19:45 🛠️ *Setting image dimensions and running the preprocessing function*
    - Setting image dimensions based on dataset details.
    - Running the preprocessing function to prepare the features.
    20:17 🔄 *Running the training function for face emotion recognition*
    - Executing the training function with the training data.
    - Obtaining the train feature names and labels.
    20:44 🖥️ *Checking the progress and resolving issues*
    - Monitoring the progress of the model training.
    - Addressing potential issues with model execution.
    21:30 🤖 *Supervised learning and label creation*
    - Creating labels for training data in supervised learning.
    - Understanding the concept of input and label levels.
    21:59 📊 *Scaling and installing necessary modules*
    - Installing and scaling the model and necessary modules.
    - Handling potential issues with module installation.
    22:38 🧮 *Label encoding and model adjustments*
    - Implementing label encoding for the emotion categories.
    - Adjusting the model for compatibility with encoded labels.
    23:10 🔍 *Retraining and troubleshooting the model*
    - Retraining the model after adjustments.
    - Troubleshooting potential errors in the process.
    23:57 🧪 *Creating a white test set for evaluation*
    - Preparing external features for the white test.
    24:25 📝 *Updating classes and preparing for testing*
    - Updating class information for the white test set.
    - Verifying the available classes for testing.
    24:59 📸 *Image Folder Exploration*
    - Exploring image folders for training a face emotion recognition model.
    - Different classes for emotions like Angry, Disgust, Fear, etc.
    25:39 🛠️ *Model Initialization*
    - Setting up the model for training.
    - Creating a sequential object with layers for Conv2D, MaxPooling, Flatten, and Dense.
    26:07 🖼️ *Model Input and Output Configuration*
    - Configuring input dimensions matching image shape (48x48 pixels).
    - Setting the output layer for classification, considering the number of emotion classes (60 levels).
    27:28 ⏸️ *Pausing Training for Tensorflow Installation*
    - Recommending the installation of the TensorFlow library for GPU support.
    - Guidance on enabling GPU support for faster training.
    28:19 🛑 *Stopping Training Process*
    - Demonstrating how to stop the training process using a stop button.
    - Suggesting to train up to 50 epochs for better accuracy.
    28:47 🚀 *Model Training Completion and Evaluation*
    - Indicating completion of model training with an accuracy of 24.80%.
    - Discussing the significance of achieving good accuracy.
    29:24 📈 *Choosing a Model for Inference*
    - Evaluating different models based on their accuracy (e.g., 38% and 62%).
    - Considering GPU availability for efficient training.
    29:54 🤖 *Final Thoughts*
    - Expressing the intention to use a specific model for further steps.
    - Suggesting potential solutions for users without a GPU.
    30:44 🏗️ *Loading and Importing Model*
    - Loading the JSON file for the model.
    - Importing the trained model into the script.
    31:12 🏷️ *Labeling and Preprocessing*
    - Creating a list of labels based on emotions or categories.
    - Setting up a function to preprocess a single image for prediction.
    31:39 🔄 *Training the Model*
    - Preparing and training the model on labeled data.
    - Handling the output range and interpretation for emotion labels.
    32:17 📤 *Prediction and Output*
    - Defining a function to accept an image and return predictions.
    - Running the function on an "angry" image and displaying results.
    32:52 🚧 *Handling Errors and Testing*
    - Updating feature variables and resolving an input error.
    - Dividing a feature variable by 250 for normalization.
    33:49 📸 *Image Display and Verification*
    - Loading and printing the original and processed images.
    - Verifying the results and correctness of the model.
    35:57 🎬 *Completing the Script*
    - Renaming and organizing files for clarity.
    - Wrapping up the code for a real-time face emotion detector.
    36:40 📷 *Real-time Face Emotion Detection*
    - Initializing and importing the model for real-time use.
    - Utilizing OpenCV to detect faces from the webcam.
    37:09 🧐 *Checking Real-time Output*
    - Demonstrating real-time face emotion detection.
    - Discussing the output and potential improvements.
    38:21 🎯 *Improving Model Accuracy*
    - Real-time accuracy may not be optimal; training the model can enhance accuracy.
    - Users with GPU capabilities can achieve accuracy above 80% through proper training.
    Made with HARPA AI

  • @Abhijeetghorpade11
    @Abhijeetghorpade11 Před 8 dny

    Bhai jupyter notebook open nahin ho raha kya karu

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

    Hello sir!! do i need to finish the process of this?
    Epoch 1/100
    226/226 [==============================] - 414s 2s/step - loss: 1.8224 - accuracy: 0.2441 - val_loss: 1.8126 - val_accuracy: 0.2583
    Epoch 2/100
    108/226 [=============>................] - ETA: 6:35 - loss: 1.8158 - accuracy: 0.2453

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

    Bro can I DO THIS IN PYTHON 3.11

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

    Bhai isko web application me kaise convert karen? Pls help😅

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

    Epoch 1/100
    My accuracy is not crossing 24% at all. What do i do please let me know. Should i wait till Epoch 100/100. Please let me know when to stop the process

  • @vihangupta6644
    @vihangupta6644 Před 8 měsíci +1

    ModuledNotfoundError : No module named Keras_preprocessing

  • @gopinath.m2354
    @gopinath.m2354 Před 4 měsíci

    Name error test is not defined.... how to solve

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

    train_features = extract_features(train['image'])
    After this I am getting error as "Could not import PIL.Image. The use of `load_img` requires PIL."
    Please help

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

    Memory allocation error 270 min when runned the model.fit

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

      How much ram is there in your pc

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

      8gb ram@@ProgresswithPython

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

      @mouryagowdas516 try to close unnecessary background processes and try to free up ram. Or you can use my trained model.

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

      @@ProgresswithPython can list and send me which are the libraries we have used

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

      @mouryagowdas516 you can check the import statements in code

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

    getting this warning after model json;- WARNING:absl:You are saving your model as an HDF5 file via `model.save()` or `keras.saving.save_model(model)`. This file format is considered legacy. We recommend using instead the native Keras format, e.g. `model.save('my_model.keras')` or `keras.saving.save_model(model, 'my_model.keras')`.

    • @Marci.K
      @Marci.K Před měsícem

      save it as "my_model.keras" instead of "my_model.h5"

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

      thnks, but I’ve already resolved it!

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

    Memory error unable to allocate 507 what to do😢

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

    Hello bhai mere ko or jhanana hai toh aap merese contact kr sakte ho kya ????

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

    sir pls send me project full

  • @NikithaNikitha-lm2xb
    @NikithaNikitha-lm2xb Před 4 měsíci

    How to run pip

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

    Anyone have a 80% trained model pls send me

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

    Anyone having model trained 80% accuracy plz share google drive link

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

    Will it work on mac?

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

      Not sure , but I think it should work. You can try

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

      there is a problem when I run the realtime detection code you have installed other 62% accuracy model but I m using which you have taught in train model code ..so what should I write in line no. 5 and 10 instead of facialemotionmodel and facialemotionmodel.h5 @@ProgresswithPython

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

    Brother looking Sad 😂

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

    Bhai bhut error aa rha h

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

    Last me run kaise krruuu???

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

    can you provide the main code sir

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

      Link in the description

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

      @@ProgresswithPython x_train = train_features / 255.0
      x_test = test_features / 255.0 error is there

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

      pls tell solution for above error@@ProgresswithPython

  • @awgpakhilvishavgaytripariv2174

    Json file isme nhi hai

    • @ProgresswithPython
      @ProgresswithPython  Před 4 měsíci +1

      drive.google.com/drive/folders/1xtF-XtQB4n9HjZy3r-XoyUQQxVHWSgcc

  • @user-Rania-n7m
    @user-Rania-n7m Před 9 měsíci

    How to get camera 📸??
    Please brother reply

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

    Where can I get CSV File for this project?

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

      Which csv file?

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

      @@ProgresswithPython in Our College They Are Asking CSV File For This Project, what shoul I show them ?

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

    Your facialemotionmodel.h5 is different from my emotiondetector.h5

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

    Sir im having errors for this line of code- y_test = le.transform(test['label']) #{x_test works fine for me)
    THE ERROR:
    KeyError Traceback (most recent call last)
    File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\indexes\base.py:3805, in Index.get_loc(self, key)
    3804 try:
    -> 3805 return self._engine.get_loc(casted_key)
    3806 except KeyError as err:
    File index.pyx:167, in pandas._libs.index.IndexEngine.get_loc()
    File index.pyx:196, in pandas._libs.index.IndexEngine.get_loc()
    File pandas\\_libs\\hashtable_class_helper.pxi:7081, in pandas._libs.hashtable.PyObjectHashTable.get_item()
    File pandas\\_libs\\hashtable_class_helper.pxi:7089, in pandas._libs.hashtable.PyObjectHashTable.get_item()
    KeyError: 'label'
    The above exception was the direct cause of the following exception:
    KeyError Traceback (most recent call last)
    Cell In[118], line 1
    ----> 1 y_test = le.transform(test['label'])
    File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\frame.py:4102, in DataFrame.__getitem__(self, key)
    4100 if self.columns.nlevels > 1:
    4101 return self._getitem_multilevel(key)
    -> 4102 indexer = self.columns.get_loc(key)
    4103 if is_integer(indexer):
    4104 indexer = [indexer]
    File ~\AppData\Local\Programs\Python\Python312\Lib\site-packages\pandas\core\indexes\base.py:3812, in Index.get_loc(self, key)
    3807 if isinstance(casted_key, slice) or (
    3808 isinstance(casted_key, abc.Iterable)
    3809 and any(isinstance(x, slice) for x in casted_key)
    3810 ):
    3811 raise InvalidIndexError(key)
    -> 3812 raise KeyError(key) from err
    3813 except TypeError:
    3814 # If we have a listlike key, _check_indexing_error will raise
    3815 # InvalidIndexError. Otherwise we fall through and re-raise
    3816 # the TypeError.
    3817 self._check_indexing_error(key)
    KeyError: 'label'

    • @ProgresswithPython
      @ProgresswithPython  Před měsícem +1

      Test ka dataframe proper bnaya tha na ?

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

      @@ProgresswithPython i rechecked it. thankyou sir. Its working

  • @sonugowri1483
    @sonugowri1483 Před 10 měsíci +1

    Hi sir, which algorithm is used in building this model

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

    json_file = open("facialemotionmodel.json", "r")
    model_json = json_file.read()
    json_file.close()
    model = model_from_json(model_json)
    model.load_weights("facialemotionmodel.h5")
    it shows TypeError: Could not locate class 'Sequential'. and so many error... What should I do

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

      This problem is coming with the latest version of tensorflow. Try it with tensorflow version 2.10.0, and this tensorflow version is not compatible with the latest Python version, so install it in Python 3.10.7