Worked Demo:
The idea is built on top of face-api.js utilizing serveral key features.
This one page application analyzes the given video/movie to detect multiple faces.
For all the faces, it calculates the possible emotion through various algorithms.
What can you expect:
- Choose any video file that you want to play with.
- Upon processing, the faces(yes, mulitple) are tracked and emotions are calculated in real time
- The cumulative values of all the emotions are modelled in a Graph for extensive analysis
- Explore the graph further by selecting only the type of emotions that you want to compare
- Take a look at the Footer any time irrespective of the selection in Graph
- Every face processed at a given point of time is displayed below the video
- Those images have a nice border around them matching the calculated emotion
- Pause anytime to make calculations of yourself too
What else do you want to Configure:
- Select any of the three Models(SSD Mobilenet V1, Tiny Face Detector, MTCNN)
- More? Tweak several variables for the choosen algorithm as your wish
- Show or hide bounding box over the face
- Show or hide facial landmarks if needed
- Download the project locally
- Navigate to
/examples/examples-browser/
- Open Terminal and run
npm i
,npm start
- Head over to the browser and click http://localhost:3000/video_face_tracking
[As of now the video could be changed by changing the src
attribute of video
element]
Place the video file in /examples/media/
and assign its name
Resources to look:
- http://www.paulvangent.com/2016/04/01/emotion-recognition-with-python-opencv-and-a-face-dataset/
- https://docs.opencv.org/3.4/d7/d8b/tutorial_py_face_detection.html
- https://github.com/oarriaga/face_classification
- https://github.com/auduno/clmtrackr
Do contribute if you're curious.
Have fun!