thank you so much, I have one question, how to solve the problem of data imbalance ? because there is one class countian around 500 images and other classes more than 5000 images.
You are most welcome! Thats more simple. Just read image and apply the emotion detection. In video we are doing the same. Video is nothing but set of multiple images/frames. In you context you just have to apply on single image/frame.
hey there it is indeed a wonderful project and the accuracy you have obtained is great btw my question is that instead of loading the videos how can we use camera for real time detection? Thanks again for explaining the project
When you are creating video capture with openCV pass 0 as argument to access your laptops default camera. If you want to access any othe IP based camera then pass full address of that camera. Same program will work fine. It may you get some lag in real time. For that you may need to process least frames per second to avoid it.
@@DataMagicAI An other query is, Basically I know nothing about this and can you please suggest to me what I should read like what are the prerequisites for this project?
TypeError: Could not locate class 'Sequential'. Make sure custom classes are decorated with `@keras.saving.register_keras_serializable()`. PLEASE HELP ME HOW TO RESOLVE THIS.
Sir, can you please help me with how to build my own image dataset. Geotagging, labeling and many concepts has to be looked after. As i am beginner is confused, please help me.
This a great video! I have a question though: How can I get the probability of each emotion prediction? Like how sure is the model that the face is happy or sad.
great project would you please tell me waht is percentage of traning and testing of dataset also we want to detect percentage of depression how can we do that
Data science it very broder field...open cv is just one small area of Computer Vision problems. Copy paste is not enough ,I f you want to be data scientist. Data science is all about getting deep dive into data.
Can we perform project in Jupiter notebook to perform in Jupiter notebook we need to upload dataset in Jupiter notebook so huge database how can be uploaded in Jupiter notebook can you suggest techniques to upload.
That's great, I don't know where I can get more emotional videos like in the code so there is only one video in your code so I want to find more to try
@@DataMagicAI Hi, output emotion detection window is playing video with slow speed and no sound, could you please tell me how i can detect emotion with normal speed of playing video and with sound !
hi sir, your code work perfectly but there is some issue if i try to run in .ipynb (i copying your code into ipynb file) error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. how do i fix them ? *find on stack overflow that we should delete the opencv-headless file but i don't know where the file is *i use mini conda (conda install opencv)
Hello Sir, I am building my own facial emotion detection model on google colaboratory but it is taking a very long time (1 epoch took an hour) and after about 3 epochs my runtime stops on its own (because it takes around 3-4 hours). Is there a way I can continue execution from the point where the execution stopped becuase I have been trying for 3 days but the model is not getting trained. Otherwise, what do you suggest I do?
How can I run it on my computer? It has been more than 10 days that I have been trying and it has caused me a psychological condition. Note that I downloaded the file from kaggle and called it in Python. Please can someone make a video? It is my graduation research.😢
You can use directly pertained model too. If you want you can retrain amd create your own model too. It will take 8 hours on CPU and couple of hours on GPU to train it.
Download dataset from kaggle and place under data folder inside of your project repository. All files are using relative paths from your project directory only. Go through ReadMe file from GitHub repository for more information.
tensorflow:Your input ran out of data; interrupting training. Make sure that your dataset or generator can generate at least `steps_per_epoch * epochs` batches (in this case, 14336 batches). You may need to use the repeat() function when building your dataset. Why am I getting this error ??
At a high level it tries to find the different lines curves and dots in the image. Neural Network looks at image in term of the each pixel value and what it’s intensity.
There is always more scope to do preprocessing in different ways. You can try with some other preprocessing and see if you are able to achieve better results.
Hello sir I have got a problem when I run train....py file said: 2529 if scipy is None: 2530 raise ImportError( 2531 "Image transformations require SciPy. " "Install SciPy." 2532 ) 2534 # Input sanity checks: 2535 # 1. x must 2D image with one or more channels (i.e., a 3D tensor) 2536 # 2. channels must be either first or last dimension
-> 2529 if scipy is None: 2530 raise ImportError( 2531 "Image transformations require SciPy. " "Install SciPy." 2532 ) 2534 # Input sanity checks: 2535 # 1. x must 2D image with one or more channels (i.e., a 3D tensor) 2536 # 2. channels must be either first or last dimension NameError: name 'scipy' is not defined
In opencv video capture provide the camera full address. If you are using default laptop camera then just pass 0. If you want to apply on image then use opencv imread to load image n then pass it for processing. Check out computer vision with opencv playlist on our channel where we have videos on how to read image/ video or live cameras.
@@DataMagicAI Boss, please tel me, i have a macbook pro 2.2Ghz processor, 8Go memory, is it risky for my machine to train the model, i m afraid to crush the processor because of high level of hit. Thank you in advance Boss
Sir I beg up please help me When I downloaded and paseted the haarcascade frontal_face. xml file in Haarcascade directory, it is showing file size greater than 2.56MB. What shall i do sir. I really need your help. Do I need to the create the xml file and write code snippets or do I need to download and paste it
@@DataMagicAI AttributeError: module 'tensorflow.keras.preprocessing' has no attribute 'image_dataset_from_directory' But I constantly get this error, I tried to run this code on VS code, pycharms, everywhere
Can u do me favour Pls provide me the model , just put the model on a drive plszzzz and provide me the link ,pls i need it ,,,pls provide it within this week
Download dataset from kaggle and place under data folder inside of your project repository. All files are using relative paths from your project directory only. Go through ReadMe file from GitHub repository for more information.
If you keep dataset inside of your PyCharm project directory then you will be able to see dataset in PyCharm. There is nothing like adding dataset to PyCharm. You can put your dataset in any directory and pass that directory to your python code in PyCharm to load and train dataset.
- diagnosis dipression - check employee stress level - student reactions on classes - live gaming.experience - automobile safety features - patient monitoring system These are few but there could be lot of areas where we can utilise emotion detection to solve the real life problems...
ValueError: decay is deprecated in the new Keras optimizer, pleasecheck the docstring for valid arguments, or use the legacy optimizer, e.g., tf.keras.optimizers.legacy.Adam. can someone help me with the error?
Thanks! One of the best videos to understand how CNN actually works!
Thank you!
@@DataMagicAI Great video!!!, can you make a video like this with more updated tools?
It is super-worth to watch every second of the video, Thank You Sir🤗
Your welcome!
@@DataMagicAI which source is used for compilation of code
Your lecture is amazing l am learning soo much form this
Thank you!
thank you so much, I have one question, how to solve the problem of data imbalance ? because there is one class countian around 500 images and other classes more than 5000 images.
By over sampling.
Perfect Video! Thanks for showing me, how to create such a nice Emotion-Detecion. :D
You're very welcome! Code in the description box!
iT FUKINNN WORKS!!!
what values did you get in accuracy and val_accuracy?
unable to get your github link, if anyone get plz provide or pinned proper link of entire code.
Thank you sir
Welcome
Thank you so much sir.
this video is too good.
I just wanted to know that how can we use it on photos?
You are most welcome! Thats more simple. Just read image and apply the emotion detection.
In video we are doing the same. Video is nothing but set of multiple images/frames. In you context you just have to apply on single image/frame.
Really thank you so much for your reply… but how can I do that? Because when I tried to do that, it was giving me error.
hey there it is indeed a wonderful project and the accuracy you have obtained is great btw my question is that instead of loading the videos how can we use camera for real time detection? Thanks again for explaining the project
When you are creating video capture with openCV pass 0 as argument to access your laptops default camera.
If you want to access any othe IP based camera then pass full address of that camera.
Same program will work fine.
It may you get some lag in real time. For that you may need to process least frames per second to avoid it.
@@DataMagicAI I see thank you very much for a quick response
@@DataMagicAI An other query is,
Basically I know nothing about this and can you please suggest to me what I should read like what are the prerequisites for this project?
amazing! learnt a lot!
Glad it was helpful!
thanks alot
Most welcome
TypeError: Could not locate class 'Sequential'. Make sure custom classes are decorated with `@keras.saving.register_keras_serializable()`. PLEASE HELP ME HOW TO RESOLVE THIS.
i wish that one day i would be able to build something like this
You can build it. Its not rocket science. You can join our ML course and learn skills required to build these kind of system.
Sir, can you please help me with how to build my own image dataset. Geotagging, labeling and many concepts has to be looked after. As i am beginner is confused, please help me.
PLEASE HELP WITH THIS ERROR - AttributeError: 'str' object has no attribute 'decode'
@@sid1784 you have to read it using tf.io.read_file(image_path)
Kindly make video with CK+ dataset
This a great video! I have a question though:
How can I get the probability of each emotion prediction? Like how sure is the model that the face is happy or sad.
With Relu function?
great project would you please tell me waht is percentage of traning and testing of dataset
also we want to detect percentage of depression how can we do that
80-20
As a data scientist, should the person by heart the entire open cv code or just copy paste??
Data science it very broder field...open cv is just one small area of Computer Vision problems. Copy paste is not enough ,I f you want to be data scientist. Data science is all about getting deep dive into data.
And where is the data folder in the zip file.
can we use this model for speech emotion recognition?
Do you have any videos related to deepfakes and synthetic data
sir there no code in that link pls send code link
That's good, thank you!
Glad you like it!
Sir can you help me with this error I get when I prompt to train the system, OSError: [WinError 126] The specified module could not be found
when i install keras their is a problem, what is that????????????
Can you give me the .json and .h5 files? Or can I have the sourcecode please? Thank you
Code link is not accessible
Can we perform project in Jupiter notebook to perform in Jupiter notebook we need to upload dataset in Jupiter notebook so huge database how can be uploaded in Jupiter notebook can you suggest techniques to upload.
You have to keep dataset on your system. Just provide path of data while loading in Jupyter notebook.
What is the accuracy of this model
That's great, I don't know where I can get more emotional videos like in the code so there is only one video in your code so I want to find more to try
Check on pexel.com
@@DataMagicAI What do I have to record to get a video like that?
@@DataMagicAI sir isme hum apna front camera ke sath emotion kaise detect ker sakte hai te btaa dijiye
On the second Conv2D why is it a 64 layer size?
How to train the model. I have i5, 8gb ram. How much time will it take on muy system??
Code is provided in the description box. Can’t tell exactly but It will take at least 3-4 hours on i5.
Please Commercialize this tool, I want this solution, how to buy it
You can contact us on datamagic2020@gmail.com
@@DataMagicAI Hi, output emotion detection window is playing video with slow speed and no sound, could you please tell me how i can detect emotion with normal speed of playing video and with sound !
how can i use this trained dataset in for a mobile app?
SAME QUESTION ... Did you find a way ?????? if yeah, then plzzz tell me
you can deploy this model as service . and access this service in your mobile app.
@@DataMagicAI ok thanks alot ✨👍
can anyone can list what are the tools used and for what purpose it is used?
@@srisangeeth4131 did this code work for you?
if we train the model using gray scale image can we predict rgb images also?
Yes, you need to preprocess your image to gray scale before feeding it to model.
hi sir, your code work perfectly
but there is some issue if i try to run in .ipynb (i copying your code into ipynb file)
error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support.
how do i fix them ?
*find on stack overflow that we should delete the opencv-headless file but i don't know where the file is
*i use mini conda (conda install opencv)
From where you found the code
Accuracy is so low like 17% how to fix this?
from keras.models import Sequential
ModuleNotFoundError: No module named 'keras'
how to resolve this problem sir ?
Keras is not installed. Install it
Hello Sir, I am building my own facial emotion detection model on google colaboratory but it is taking a very long time (1 epoch took an hour) and after about 3 epochs my runtime stops on its own (because it takes around 3-4 hours). Is there a way I can continue execution from the point where the execution stopped becuase I have been trying for 3 days but the model is not getting trained. Otherwise, what do you suggest I do?
use google tpu instead of your computer cpu
How can I run it on my computer? It has been more than 10 days that I have been trying and it has caused me a psychological condition. Note that I downloaded the file from kaggle and called it in Python. Please can someone make a video? It is my graduation research.😢
bro i need that link from where u downloaded
sir can i ask you
how to use this model on mobile apps and i can use camera on mobile to detect emotion
You might need to developer some light version of this model to work on edge devices
Hello are we supposed to train the data even tho the downloaded code already has h5 and json file?
You can use directly pertained model too. If you want you can retrain amd create your own model too. It will take 8 hours on CPU and couple of hours on GPU to train it.
can we predict depression using this project also recognize face and send motivational message to user
you cant predict depression just by AI. Yet.
Hey can you share sample video you used for testing
Sorry, I dont have it now. You can search on pexel.com
Im not able to understand tr train step after we download all the libraries the what we have to do to get that 2 files .json and the another one
You need to train model then save the trained model structure in Json file and mode weights in h5 file. So you can use this trained model later.
Hello! Are you using some signal processing or Gabor Filters?
Nope!
@@DataMagicAI do you have any code using a Gabor Filter? I need it for a school project, and I can't find any resoursces...
Sir all the folders and director are placed under the emotion detection folder..??
Download dataset from kaggle and place under data folder inside of your project repository. All files are using relative paths from your project directory only.
Go through ReadMe file from GitHub repository for more information.
Is it possible to fuse with audio recognition model and get final multimodal emotion recognition?
Yes
thank you so much
Your welcome!
tensorflow:Your input ran out of data; interrupting training. Make sure that your dataset or generator can generate at least `steps_per_epoch * epochs` batches (in this case, 14336 batches). You may need to use the repeat() function when building your dataset.
Why am I getting this error ??
you probably don't have enough pictures in your dataset to complete the training
Can you tell me what he wrote at the end of line 43 ..... plzzzzzz.... after cv2.LINE_A
hey, exactly what type of features are being extracted
At a high level it tries to find the different lines curves and dots in the image. Neural
Network looks at image in term of the each pixel value and what it’s intensity.
Hi when i run the project i faced this error (No module named 'tensorflow.compat')??!
Seems library conflict issues. Search on internet. I can’t help without knowing the environment details.
i am getting the same error ,how to resolve it
hi sir is the preprocessing on the images i mean the operation is enough ????
There is always more scope to do preprocessing in different ways. You can try with some other preprocessing and see if you are able to achieve better results.
How to apply code on ck+ dataset??
hello where did you found the code plz ? i didint found it on the link in description
how to get deep and machine learning code for emotion detection, would u help me
Go to description box. Code link is provided
My evaluate file is not working ....
What error you are getting?
What percentage of the dataset is used for training and testing?
80
Hello sir I have got a problem when I run train....py file said:
2529 if scipy is None:
2530 raise ImportError(
2531 "Image transformations require SciPy. " "Install SciPy."
2532 )
2534 # Input sanity checks:
2535 # 1. x must 2D image with one or more channels (i.e., a 3D tensor)
2536 # 2. channels must be either first or last dimension
-> 2529 if scipy is None:
2530 raise ImportError(
2531 "Image transformations require SciPy. " "Install SciPy."
2532 )
2534 # Input sanity checks:
2535 # 1. x must 2D image with one or more channels (i.e., a 3D tensor)
2536 # 2. channels must be either first or last dimension
NameError: name 'scipy' is not defined
Is seems younhave not installed all packages correctly. This error show scipynpackage is not installed please install it.
Bro I have downloaded the kaggle database. How to add it in my pycharm ide. Please help me bro
You just add the full path of your data folder in the code which you written in Pycharm. No special process to add data in Pycharm.
Hello!! Do I need to download all the requirements??
Yes
Sir how can I run the camera to detect the live photo and how to run the image to get output
In opencv video capture provide the camera full address. If you are using default laptop camera then just pass 0.
If you want to apply on image then use opencv imread to load image n then pass it for processing.
Check out computer vision with opencv playlist on our channel where we have videos on how to read image/ video or live cameras.
@@DataMagicAI @Data Magic (by Sunny Kusawa) sir I'm a beginner.... Can u plzzzz tell me how you add Data folder (train and test) ???
Sir another kind help. I have copied and pasted . h5 file but I am not able to view it. What shall I do sir
What do you want to view?
@@DataMagicAI sir, a kind help for me too. I cannot copy or carry or import this emotin_model.h5 file to pycharm. how can I handle it.
The cv2.resize() don’t work to me
What's the error. Make sure you are reading the image/video properly and not having empty feed.
Kindly post how to annotate the images. Tell about tools
I have shown it in this episode. Please check the same.
how did make file under file like in data in pycharm please reply
You mean folder under folder?
Amazing work. Please how can i get the scripts ?
Do you mean code?
@@DataMagicAI Yes Boss, possible to have it please?
@@DataMagicAI Boss, please tel me, i have a macbook pro 2.2Ghz processor, 8Go memory, is it risky for my machine to train the model, i m afraid to crush the processor because of high level of hit.
Thank you in advance Boss
Sir I can't able to find the code please help did any one found the code
Its in description box.
@@DataMagicAI Sir, the link cannot be reached
I need this expression changing video to check my model
Plz check on pexel.com
I have copied the code but I'm getting errors
Follow the steps properly, others are able to run it.
What is the accuracy did you get?
92%
@@DataMagicAI sir may I know which dataset is better for emotion recognition whether it is ck+ dataset or fer 2013 dataset
@Ratnadeep Mazumder how to fix it
Wt are the requirements for system to install pycharm?
Please check on below link all the requirements.
www.jetbrains.com/help/pycharm/installation-guide.html#requirements
Sir which libraries are import for this code?
Plz check in the code all libraries.
Sir I beg up please help me
When I downloaded and paseted the haarcascade frontal_face. xml file in Haarcascade directory, it is showing file size greater than 2.56MB. What shall i do sir. I really need your help. Do I need to the create the xml file and write code snippets or do I need to download and paste it
Please help me sir. I am in a very critical situation
You need to download harcascade xml file
flow form directory showing error
Send the error
Do I need a GPU for this code? Because I am getting CUDA GPU errors
Its warning ignore...you can run it without GPU
@@DataMagicAI AttributeError: module 'tensorflow.keras.preprocessing' has no attribute 'image_dataset_from_directory' But I constantly get this error, I tried to run this code on VS code, pycharms, everywhere
Can u do me favour
Pls provide me the model , just put the model on a drive plszzzz and provide me the link ,pls i need it ,,,pls provide it within this week
Download it from here: github.com/datamagic2020/Emotion_detection_with_CNN/tree/main/model
Can you tell me directory of the folder
Download dataset from kaggle and place under data folder inside of your project repository. All files are using relative paths from your project directory only.
Go through ReadMe file from GitHub repository for more information.
Sir how to check accuracy?
share on GitHub, please check.
Can I make it for image only ?
Yes
@@DataMagicAI i have having problem downloading tenserflow and grpcio will this be because of paython 3.9 ??
Is it possible to deploy this
Yes!
@@DataMagicAI I am trying to deploy this but I get errors
Flow chart of this system?
Not readily available. You can drop an email at datamagic2020@gmail.com
Mine showing error adam is not defined
Make sure you have addded the import statement for Adam.
from keras.optimizers import Adam
@@DataMagicAI tq,s for replying but how to train our data model...like u said 4 hours......like how to do that just by simply running that train code
it only shows 17% on evaulateemotiodetector
Same did you know why?
How to add downloaded datasets to pycharm
If you keep dataset inside of your PyCharm project directory then you will be able to see dataset in PyCharm.
There is nothing like adding dataset to PyCharm. You can put your dataset in any directory and pass that directory to your python code in PyCharm to load and train dataset.
@@DataMagicAI Sir Kindly Upload a Practical video, how to do this. I tried but couldn't find any results.
Thanks!
where is github link?
Code link in description box
i need source website contain video demo
Pexel
@@DataMagicAI thank you so much
How to train a data set CNN
If you need full support. Drop email at datamagic2020@gmail.com
It is running an infinite loop
Press q
can you please share the github link
Code link in the description box
@@DataMagicAI sample video not available in code
where is code
Check description box
Can u give the flow chart for this sir
I don't have it ready...
@@DataMagicAI how to get the graphical represent can u please tell me sir.
make use of matplotlib library in python to plot the accuracy and loss graphs
hi bro please tell me the uses of this emotion detection
- diagnosis dipression
- check employee stress level
- student reactions on classes
- live gaming.experience
- automobile safety features
- patient monitoring system
These are few but there could be lot of areas where we can utilise emotion detection to solve the real life problems...
Program is being compiled but the output is running infinite times and the kernel is being crashed showing error !ssize.empty()
It takes lots of time to run. What's your processor?
ValueError: decay is deprecated in the new Keras optimizer, pleasecheck the docstring for valid arguments, or use the legacy optimizer, e.g., tf.keras.optimizers.legacy.Adam.
can someone help me with the error?
same error i am also facing please tell me the solution
Thank you sir
Welcome
Sir how to check accuracy ?
share on GitHub, please check.