243 - Real time detection of facial emotion, age, and gender using TensorFlow Lite on RaspberryPi
HTML-код
- Опубликовано: 10 сен 2024
- Code generated in the video can be downloaded from here:
github.com/bns...
To install opencv, you need to first install a lot of dependencies on the RPi.
These are the ones I installed to get it working on my RPi 3B.
sudo apt-get update
sudo apt-get upgrade (consider full upgrade if you haven't used your Pi in a while)
sudo apt-get install build-essential cmake pkg-config
sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get install libxvidcore-dev libx264-dev
sudo apt-get install libfontconfig1-dev libcairo2-dev
sudo apt-get install libgdk-pixbuf2.0-dev libpango1.0-dev
sudo apt-get install libgtk2.0-dev libgtk-3-dev
sudo apt-get install libatlas-base-dev gfortran
sudo apt-get install libhdf5-dev libhdf5-serial-dev libhdf5-103
sudo apt-get install libqtgui4 libqtwebkit4 libqt4-test python3-pyqt5
sudo apt-get install python3-dev
Now you can install opencv....
pip install opencv-contrib-python
Now, you need to install tflite interpreter.
You do not need full tensorflow to just run the tflite interpreter.
The package tflite_runtime only contains the Interpreter class which is what we need.
It can be accessed by tflite_runtime.interpreter.Interpreter.
To install the tflite_runtime package, just download the Python wheel
that is suitable for the Python version running on your RPi.
Here is the download link for the wheel files based on the Python version:
github.com/goo...
for Python 3.5, download: tflite_runtime-2.5.0-cp35-cp35m-linux_armv7l.whl (This is what I used in my video)
for Python 3.7, download: tflite_runtime-2.5.0-cp37-cp37m-linux_armv7l.whl
Download face and eye models:
Go to these links, click on RAW and save as... otherwise you'd be saving html files of Github page. '
github.com/Its...
github.com/Its...
I am trying to run the code on my Raspberry pi, but I couldn't find the files other than the python code and the haarcascades files. I think the .tfile files were generated in a prior tutorial, but is there any way i could download it from somewhere?
Hi Sir, what about those files (age _model 50epochs.h5, emotion _detection _model _100 epochs .h5 , gender _model50 epochs.h5 and so on) which u showed in the video inside the folder emotion detection ,where can we find It? ,without it all is not working ,,,,,thanks
where can I found the Tfilte models which you used in
like emotion_detection_model_100epochs_ops.tlite
no candidate for libqtgui4,
package not found for libqtwebkit4,
package not found for libqt4-test
How can i solve these errors?
Love your videos c:
Very clear. Thx
Thanks :)
Thank you so much Sir!
Sir for python3.11 can u please provide a git hub link for same for tf lite.
great video thank you, Sir
Hi, will do videos about object detection for medical image ? Or do you now/have any ressources do learn about this topic ?
Can you make another new video on real-time emotion detection with Raspberry Pi 4? I have already followed all your steps and it is still not working, so you can make a new video about this topic.
where can i find those Haarcascades models that u copied from your windows in the minute 12:19? anyone know?
This video is part of a series that started with my video number 238. Here is the link to that video. You can find the haar cascade trained model links under the description for that video. I will add it to the description for this video, must have overlooked. Thanks.
ruclips.net/video/Fuve1nAdm8k/видео.html
Any way to run this on the new google coral TPU?
is there a way to download this directory?
At 13:38 im not quite understanding.. i try to run this code on my raspberry pi and is says no module found for tensorflow Even though ive already instalez it.. what is an alternative way to write the code without the tensorflow part? Thank you
Btw your videos are awesome, and very helpful!!
You do not need tensorflow, you only need tflite runtime. I believe I used tensorflow to convert image to array. Upon closer look at the code, you may not need it. Try dropping that to see if it works. Alternatively, you can install keras and import img_to_array.
@@DigitalSreeni thank you so much, sir!! your videos really helped me, it was a great way to start learning more about deep learning and everything!! It finally worked, the problem was with the libraries but i finally managed to finish!! Keep up the good work, we really need more people like u!
Hello Sir. Thanks for your videos. It's been very helpful.
Please can you share how to use various machine learning and deep learning methods to carry out a prospectivity mapping using various bands of remote sensing data. I will be glad to get this.
Great stuff sir! Could you please make a video how to covert it to apk with kivy so that we could use this from smartphones and tablets? Could this run on a smartphone resource wise?
Very knowledgeable vedio sir.. thank you very much for your effort congratulations sir
Sir can you please share your knowledge about the nvidia Al developer kit ...how can we use it for Deep learning methods..! Like classification, denoising using GPU of in nvidia jetson AI developer kit.
Great work sir!
Could you please guide me on how this tflite model can be used to develop this as an android app using android studio for real time detection of facial emotions?
Did you find any solution? Can you help if you found it. Thank you
gray=cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)
cv2.error: OpenCV(4.6.0) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'. I got this error
Looks like there is no image, please make sure you are seeing an array when you read the image. May be the path is not correct.