Face Emotion Recognition Using Machine Learning | Python

Поделиться
HTML-код
  • Опубликовано: 10 июн 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

Комментарии • 245

  • @ProgresswithPython
    @ProgresswithPython  14 дней назад +1

    If you want to deploy this model then you can watch this: ruclips.net/video/usGUFXCRUIg/видео.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 6 месяцев назад +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

  • @sig-yog7046
    @sig-yog7046 6 месяцев назад +1

    Did you establish the relationship between the photographs here?

  • @ritujsrivastava2037
    @ritujsrivastava2037 3 месяца назад

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

  • @KAZZinteractive
    @KAZZinteractive 7 месяцев назад +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.

  • @vishwaschandra2943
    @vishwaschandra2943 11 месяцев назад +3

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

  • @Aman-pb8sh
    @Aman-pb8sh Месяц назад

    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

  • @spidyqda3222
    @spidyqda3222 10 месяцев назад +1

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

  • @priyankabhargav5736
    @priyankabhargav5736 7 месяцев назад +1

    Is there any project related to speech emotional recognition system?

  • @mohammadabduloadud398
    @mohammadabduloadud398 10 месяцев назад +6

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

    • @ProgresswithPython
      @ProgresswithPython  10 месяцев назад +2

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

  • @shivamanand3861
    @shivamanand3861 8 месяцев назад +2

    Thanks buddy it really work thank you so much

  • @REHANARAUNAK786
    @REHANARAUNAK786 6 месяцев назад

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

  • @DJPapzin
    @DJPapzin 6 месяцев назад +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

  • @karishmashaik6741
    @karishmashaik6741 9 месяцев назад +2

    It works really well
    Thank you so much

    • @raeesmohit01
      @raeesmohit01 4 месяца назад

      can you share your code with me

    • @subhayanbose3010
      @subhayanbose3010 Месяц назад

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

  • @KAZZinteractive
    @KAZZinteractive 7 месяцев назад +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  7 месяцев назад +2

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

    • @KAZZinteractive
      @KAZZinteractive 7 месяцев назад

      @@ProgresswithPython how do you save the trained model?

    • @ProgresswithPython
      @ProgresswithPython  7 месяцев назад

      @@KAZZinteractive all things are explained in the video

    • @KAZZinteractive
      @KAZZinteractive 7 месяцев назад

      @@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  7 месяцев назад +1

      @KAZZinteractive yes this is the line to save model

  • @ahmadxrizvi
    @ahmadxrizvi 3 месяца назад

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

  • @sinanahmed6911
    @sinanahmed6911 3 месяца назад

    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

  • @sumitjhaldiyal9192
    @sumitjhaldiyal9192 9 месяцев назад

    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 ?

  • @windtech3457
    @windtech3457 4 месяца назад

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

  • @adityabothe1395
    @adityabothe1395 8 месяцев назад

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

  • @rkjatav12
    @rkjatav12 6 месяцев назад

    Nice❤❤

  • @REHANARAUNAK786
    @REHANARAUNAK786 11 месяцев назад

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

  • @umerhafiz4148
    @umerhafiz4148 8 месяцев назад

    How have to upload this dataset in JUPYTER?

  • @deepthikothamasu6727
    @deepthikothamasu6727 6 месяцев назад +2

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

  • @DanielSantos-pg6tc
    @DanielSantos-pg6tc 3 месяца назад

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

  • @ravindrakrishna9291
    @ravindrakrishna9291 6 месяцев назад

    Bro interview questions about this project, please tell me

  • @mk6263
    @mk6263 9 месяцев назад

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

    • @user-wd8tg9mr1h
      @user-wd8tg9mr1h 9 месяцев назад +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 10 месяцев назад +2

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

  • @kumarishrenika4900
    @kumarishrenika4900 9 месяцев назад

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

  • @user-uz2xg4vl2b
    @user-uz2xg4vl2b 5 месяцев назад

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

  • @DBSVICTORHUNBRO
    @DBSVICTORHUNBRO Месяц назад +2

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

  • @user-ne6xs8by9q
    @user-ne6xs8by9q 7 месяцев назад

    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

  • @masterpiece4021
    @masterpiece4021 10 месяцев назад +4

    its saying keras preprocessing not found idk why

  • @doniazedezzine6339
    @doniazedezzine6339 7 месяцев назад +1

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

    • @ProgresswithPython
      @ProgresswithPython  7 месяцев назад +1

      There is another Python file. Run that file after trainmodel.ipynb

    • @doniazedezzine6339
      @doniazedezzine6339 7 месяцев назад

      @@ProgresswithPython thank you

  • @seyedrabiu
    @seyedrabiu 3 месяца назад +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

    • @Granthavali109
      @Granthavali109 3 месяца назад +1

      Yes

    • @Granthavali109
      @Granthavali109 3 месяца назад

      My jupyter notebook show this type error

    • @seyedrabiu
      @seyedrabiu 3 месяца назад +1

      @@Granthavali109 solution came...
      You need to remove all the Class names on the json file

    • @jamesrobertsalud1443
      @jamesrobertsalud1443 3 месяца назад

      same

    • @user-qm4oc8nb8e
      @user-qm4oc8nb8e 3 месяца назад

      @@seyedrabiuthen after removing what should we write in place of them

  • @ankitabhattacharjee5669
    @ankitabhattacharjee5669 9 месяцев назад +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  9 месяцев назад

      Try with 0 index

    • @subhayanbose3010
      @subhayanbose3010 Месяц назад

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

  • @mouryagowdas516
    @mouryagowdas516 5 месяцев назад

    Can we add songs also according to the detected emotion

    • @mouryagowdas516
      @mouryagowdas516 5 месяцев назад

      Can anyone provide code or RUclips link

  • @younus.athlete
    @younus.athlete 6 месяцев назад

    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  6 месяцев назад

      Save the model and re-use it.

    • @subhayanbose3010
      @subhayanbose3010 Месяц назад

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

  • @KillerBoy-bh5ye
    @KillerBoy-bh5ye 9 месяцев назад

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

  • @REHANARAUNAK786
    @REHANARAUNAK786 11 месяцев назад

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

  • @prathamgupta3348
    @prathamgupta3348 8 месяцев назад +2

    hey buddy need help to integrate it with spotify API

    • @vineethb3718
      @vineethb3718 2 месяца назад

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

  • @harshkumarkashyap6621
    @harshkumarkashyap6621 7 месяцев назад

    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

  • @ishanjain3768
    @ishanjain3768 8 месяцев назад

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

    • @ProgresswithPython
      @ProgresswithPython  8 месяцев назад

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

  • @Nishant_Verma_184
    @Nishant_Verma_184 9 месяцев назад +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 Месяц назад

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

  • @poojaagale7509
    @poojaagale7509 3 месяца назад

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

  • @sagarahire123
    @sagarahire123 Месяц назад

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

  • @rajeshadhikari2310
    @rajeshadhikari2310 Месяц назад

    what algorithm did you use to implement it

  • @vihangupta6644
    @vihangupta6644 3 месяца назад +1

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

  • @REHANARAUNAK786
    @REHANARAUNAK786 6 месяцев назад

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

  • @kasireddyharinathreddy4822
    @kasireddyharinathreddy4822 3 месяца назад

    Bro can u pls help with this project
    Give reply

  • @jatinsharma4019
    @jatinsharma4019 10 месяцев назад

    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  10 месяцев назад

      have you increase the shape of images?

    • @jatinsharma4019
      @jatinsharma4019 10 месяцев назад

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

    • @mouryagowdas516
      @mouryagowdas516 6 месяцев назад

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

    • @mouryagowdas516
      @mouryagowdas516 6 месяцев назад

      ​@@ProgresswithPythonI'm decreased the size of folders

  • @tekkemganesh9424
    @tekkemganesh9424 9 месяцев назад +1

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

  • @diya_dr5
    @diya_dr5 4 месяца назад

    14:00

  • @BahutGamingLive
    @BahutGamingLive 11 месяцев назад +2

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

    • @ProgresswithPython
      @ProgresswithPython  11 месяцев назад +1

      Yes offcourse

    • @BahutGamingLive
      @BahutGamingLive 11 месяцев назад +2

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

    • @ProgresswithPython
      @ProgresswithPython  11 месяцев назад +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 11 месяцев назад +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  11 месяцев назад +1

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

  • @occultdebasis555
    @occultdebasis555 7 месяцев назад

    tensorflow is not installing shown error?
    how can I?

  • @prolaysaha7953
    @prolaysaha7953 Месяц назад

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

  • @lordlucifer1053
    @lordlucifer1053 Месяц назад

    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

  • @avataraand76
    @avataraand76 8 месяцев назад

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

    • @ProgresswithPython
      @ProgresswithPython  8 месяцев назад

      What's your model accuracy?

    • @avataraand76
      @avataraand76 8 месяцев назад

      @@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 8 месяцев назад

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

    • @ProgresswithPython
      @ProgresswithPython  8 месяцев назад

      @avataraand76 No, stop when you get good accuracy.

    • @avataraand76
      @avataraand76 8 месяцев назад

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

  • @vasunamdev6895
    @vasunamdev6895 4 месяца назад +1

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

  • @daryllesteroza9542
    @daryllesteroza9542 7 месяцев назад

    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

  • @pandharpurkarprathamesh8417
    @pandharpurkarprathamesh8417 8 месяцев назад

    to_categorical is not getting imported for me

  • @supratimray5401
    @supratimray5401 7 месяцев назад

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

  • @dharshinichellappan9295
    @dharshinichellappan9295 8 месяцев назад +5

    name error: model is not defined

  • @shaiksadainali7471
    @shaiksadainali7471 Месяц назад

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

  • @user-yo1jl5rr4s
    @user-yo1jl5rr4s 8 месяцев назад

    how i can download tensorflow in 3.12 version?

    • @ProgresswithPython
      @ProgresswithPython  8 месяцев назад

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

    • @ProgresswithPython
      @ProgresswithPython  8 месяцев назад +1

      but you can try with this command - pip install tensorflow

  • @rohankumardogra6572
    @rohankumardogra6572 7 месяцев назад

    label is not defined

  • @shejalpal7307
    @shejalpal7307 6 месяцев назад

    Import mai error aa raha h import error

  • @questchronicletv
    @questchronicletv 3 месяца назад +1

    same feeling of shy to show emotion by myself😅😅

    • @subhayanbose3010
      @subhayanbose3010 Месяц назад

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

    • @DBSVICTORHUNBRO
      @DBSVICTORHUNBRO Месяц назад

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

  • @amithvikramrajaram8072
    @amithvikramrajaram8072 5 месяцев назад

    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

    • @ProgresswithPython
      @ProgresswithPython  5 месяцев назад

      Yes , if your accuracy is not well, then you can epoch for 100 and more

    • @amithvikramrajaram8072
      @amithvikramrajaram8072 5 месяцев назад

      ​@@ProgresswithPythonThank you !

    • @amithvikramrajaram8072
      @amithvikramrajaram8072 5 месяцев назад

      ​@@ProgresswithPythonBy just saving the notebook, i can use it anytime later also right?

    • @ProgresswithPython
      @ProgresswithPython  5 месяцев назад

      @amithvikramrajaram8072 no, you have to save your model to use it later

  • @bunnyff2970
    @bunnyff2970 8 месяцев назад +1

    Bro can I DO THIS IN PYTHON 3.11

  • @justrise6154
    @justrise6154 Месяц назад

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

    • @ProgresswithPython
      @ProgresswithPython  Месяц назад

      Install jupyter notebook

    • @justrise6154
      @justrise6154 Месяц назад

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

    • @ProgresswithPython
      @ProgresswithPython  Месяц назад

      @justrise6154 What command did you use for installation

  • @maryambatool7662
    @maryambatool7662 6 месяцев назад

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

    • @ProgresswithPython
      @ProgresswithPython  6 месяцев назад

      you can use command prompt

    • @maryambatool7662
      @maryambatool7662 6 месяцев назад

      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 6 месяцев назад

      How to solve it

  • @priyarajak8202
    @priyarajak8202 9 месяцев назад

    how can i get json source file??

  • @___cory____8233
    @___cory____8233 5 месяцев назад

    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  5 месяцев назад

      Install opencv in python

    • @shortsbinge9910
      @shortsbinge9910 5 месяцев назад

      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?

  • @sonugowri1483
    @sonugowri1483 10 месяцев назад

    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

  • @gamerguru9745
    @gamerguru9745 14 дней назад

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

  • @gopinath.m2354
    @gopinath.m2354 4 месяца назад

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

    • @ProgresswithPython
      @ProgresswithPython  4 месяца назад

      I think you missed a cell to run in Jupyter notebook

    • @gopinath.m2354
      @gopinath.m2354 4 месяца назад

      @@ProgresswithPython I tried twice

  • @itnarayanchauhan9421
    @itnarayanchauhan9421 3 месяца назад +1

    Bhai last main run kar ke bhi bata dete hai

  • @abhaypawaiya5780
    @abhaypawaiya5780 6 месяцев назад

    Will it work on mac?

    • @ProgresswithPython
      @ProgresswithPython  6 месяцев назад

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

    • @abhaypawaiya5780
      @abhaypawaiya5780 5 месяцев назад

      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

  • @vihangupta6644
    @vihangupta6644 7 месяцев назад +1

    ModuledNotfoundError : No module named Keras_preprocessing

    • @vihangupta6644
      @vihangupta6644 7 месяцев назад +1

      11:16 bhai please help me

    • @ProgresswithPython
      @ProgresswithPython  7 месяцев назад

      pip install Keras-Preprocessing

    • @vihangupta6644
      @vihangupta6644 3 месяца назад +1

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

    • @mahesh_rathod27
      @mahesh_rathod27 Месяц назад

      Please no module cv2

  • @mouryagowdas516
    @mouryagowdas516 6 месяцев назад

    Memory error unable to allocate 507 what to do😢

    • @ProgresswithPython
      @ProgresswithPython  6 месяцев назад

      Reduce number of images

    • @mouryagowdas516
      @mouryagowdas516 6 месяцев назад

      deleting them right@@ProgresswithPython

    • @mouryagowdas516
      @mouryagowdas516 6 месяцев назад

      how to reduce them@@ProgresswithPython

    • @ProgresswithPython
      @ProgresswithPython  6 месяцев назад +1

      @@mouryagowdas516 yes, by deleting them , deleting some images from every letter folders

  • @mouryagowdas516
    @mouryagowdas516 6 месяцев назад

    Memory allocation error 270 min when runned the model.fit

    • @ProgresswithPython
      @ProgresswithPython  6 месяцев назад

      How much ram is there in your pc

    • @mouryagowdas516
      @mouryagowdas516 6 месяцев назад

      8gb ram@@ProgresswithPython

    • @ProgresswithPython
      @ProgresswithPython  6 месяцев назад

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

    • @mouryagowdas516
      @mouryagowdas516 6 месяцев назад

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

    • @ProgresswithPython
      @ProgresswithPython  6 месяцев назад

      @mouryagowdas516 you can check the import statements in code

  • @NikithaNikitha-lm2xb
    @NikithaNikitha-lm2xb 3 месяца назад

    How to run pip

  • @mouryagowdas516
    @mouryagowdas516 6 месяцев назад

    can you provide the main code sir

    • @ProgresswithPython
      @ProgresswithPython  6 месяцев назад

      Link in the description

    • @mouryagowdas516
      @mouryagowdas516 6 месяцев назад

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

    • @mouryagowdas516
      @mouryagowdas516 6 месяцев назад

      pls tell solution for above error@@ProgresswithPython

  • @mouryagowdas516
    @mouryagowdas516 6 месяцев назад

    Anyone have a 80% trained model pls send me

  • @shakuntaladevi9772
    @shakuntaladevi9772 2 месяца назад

    Last me run kaise krruuu???

  • @user-bq6th9hh5l
    @user-bq6th9hh5l 8 месяцев назад

    How to get camera 📸??
    Please brother reply

  • @worldviralhub6211
    @worldviralhub6211 5 месяцев назад

    Where can I get CSV File for this project?

    • @ProgresswithPython
      @ProgresswithPython  5 месяцев назад

      Which csv file?

    • @worldviralhub6211
      @worldviralhub6211 5 месяцев назад

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

  • @aryanyashwantrao12
    @aryanyashwantrao12 2 месяца назад

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

  • @ashokashu6903
    @ashokashu6903 Месяц назад

    sir pls send me project full

  • @awgpakhilvishavgaytripariv2174
    @awgpakhilvishavgaytripariv2174 4 месяца назад

    Json file isme nhi hai

    • @ProgresswithPython
      @ProgresswithPython  4 месяца назад +1

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

  • @basicknowledge6139
    @basicknowledge6139 2 месяца назад

    Bhai bhut error aa rha h

  • @BelugaD108
    @BelugaD108 7 месяцев назад

    Brother looking Sad 😂

  • @amanisdreaming3914
    @amanisdreaming3914 18 дней назад

    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 16 дней назад

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

    • @amanisdreaming3914
      @amanisdreaming3914 16 дней назад

      thnks, but I’ve already resolved it!

  • @tranlychi8463
    @tranlychi8463 Месяц назад

    Your facialemotionmodel.h5 is different from my emotiondetector.h5

  • @tsuki2281
    @tsuki2281 14 дней назад

    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  14 дней назад +1

      Test ka dataframe proper bnaya tha na ?

    • @tsuki2281
      @tsuki2281 12 дней назад

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

  • @sonugowri1483
    @sonugowri1483 9 месяцев назад +1

    Hi sir, which algorithm is used in building this model

  • @JericoIvan
    @JericoIvan Месяц назад

    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  Месяц назад

      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