[Super easy] Simultaneous face recognition and facial expression recognition in real time with Python and OpenCV!

Screenshot from 2021-01-01 10-14-16.png

Preparation

See also: [Perception for Autonomous Systems (github)](https://github.com/oarriaga/paz "paz") environment: ubuntu 20.04 lts corei3 7th ram 16gb

Install Tensorflow, OpenCV, NumPy, pypaz using pip3

sudo pip3 install tensorflow
sudo pip3 install opencv-python
sudo pip3 install numpy
sudo pip3 install pypaz

Download source code

git clone https://github.com/oarriaga/paz.git

Run

Please connect the WEB camera.
cd paz
cd examples
cd face_classification
python3 demo.py

You can now do it! Thank you for your hard work!

bonus

Increase the window size

sudo nano demo.py

This line

player = VideoPlayer((640, 480), pipeline, camera)

Changed as follows

player = VideoPlayer((1152, 864), pipeline, camera)

Now the window size is bigger and easier to see!

Finally

Thank you for reading until the end! There are other programs in the examples file, so give it a try!

Recommended Posts

[Super easy] Simultaneous face recognition and facial expression recognition in real time with Python and OpenCV!
Try face recognition with python + OpenCV
Face recognition with camera with opencv3 + python2.7
[python, openCV] base64 Face recognition with images
Hello World and face detection with OpenCV 4.3 + Python
Try converting videos in real time with OpenCV
How to generate a QR code and barcode in Python and read it normally or in real time with OpenCV
Get standard output in real time with Python subprocess
Easy face recognition try with Jetson Nano and webcam
Face recognition with Python's OpenCV
Face detection with Python + OpenCV
Face recognition / cutting with OpenCV
Try face recognition with Python
Try converting webcam / camcorder videos in real time with OpenCV
Number recognition in images with Python
Shining life with Python and OpenCV
Neural network with OpenCV 3 and Python 3
Draw optical flow in real time with OpenCV (Shi-Tomasi method, Lucas-Kanade method)
Easy Python + OpenCV programming with Canopy
Draw a watercolor illusion with edge detection in Python3 and openCV3
Cut out face with Python + OpenCV
Use OpenCV with Python 3 in Window
Replace your face with Twitter icon with openCV face recognition and do ZOOM
Easy modeling with Blender and Python
I tried face recognition with OpenCV
How to put OpenCV in Raspberry Pi and easily collect images of face detection results with Python
Put OpenCV in OS X with Homebrew and input / output video with python
How to get the date and time difference in seconds with python
Easy server monitoring with AWS Lambda (Python) and result notification in Slack
Get and convert the current time in the system local timezone with python
Face detection with Python + OpenCV (rotation invariant)
[Python] Super easy test with assert statement
Capturing images with Pupil, python and OpenCV
Easy introduction of speech recognition with Python
Dealing with "years and months" in Python
Easy image processing in Python with Pillow
Serverless face recognition API made with Python
Easy introduction of python3 series and OpenCV3
Easy web scraping with Python and Ruby
Visualize accelerometer information from the microcomputer board in real time with mbed + Python
Performance comparison of face detector with Python + OpenCV
Install OpenCV 4.0 and Python 3.7 on Windows 10 with Anaconda
Super easy! Python + Flask environment in Docker quickly
[Python3] [Ubuntu16] [Docker] Try face recognition with OpenFace
Feature matching with OpenCV 3 and Python 3 (A-KAZE, KNN)
To represent date, time, time, and seconds in Python
✨ Easy with Python ☆ Estimated elapsed time after death ✨
Install OpenCV 3 (core + contrib) in Windows & Python 3 environment & Difference between OpenCV 2 and OpenCV 3 & Easy operation check
It is easy to execute SQL with Python and output the result in Excel
Convert timezoned date and time to Unixtime in Python2.7
Extract "current date only" and "current date and time" with python datetime.
Easy partial download of mp4 with python and youtube-dl!
Solve simultaneous ordinary differential equations with Python and SymPy.
Super Primer to python-Getting started with python3.5 in 3 minutes
Write letters in the card illustration with OpenCV python
Calculate Pose and Transform differences in Python with ROS
[Ubuntu] [Python] Face detection comparison between dlib and OpenCV
Try face detection in real time using a webcam
Ubuntu 20.04 on raspberry pi 4 with OpenCV and use with python
Start numerical calculation in Python (with Homebrew and pip)
[Python] Webcam frame size and FPS settings with OpenCV