Skip to content

😜 A web app that detects your face emotions using AI and matches them with emojis. Built using ReactJS and Face-API.js: a JavaScript API for face detection and face recognition in the browser implemented on top of the tensorflow.js core API.

Notifications You must be signed in to change notification settings

louiejancevski/FacialEmotionDetector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

54 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Facial Emotion Detector

  • Web app that detects your face emotions using AI and matches them with emojis.
  • Built using ReactJS and face-API.js
  • Face-API.js is a JavaScript API for face detection and face recognition in the browser implemented on top of the tensorflow.js core API.
  • Version 2.0

URL / Live demo

About this project

The main objective was very simple, to display emojis based on the facial expressions that we make in front of our camera.

Once the app detects your face, it will do two things:

  • Change the background color.
  • Replace the default emoji with the one that it thinks is the best match to your expression.

Face-API.js was used to faciliate this process. You can read more about it here.

Note: You are not being recorded at any point, it all happens in your own browser!

Taking a look inside

I'm going to take Dwayne Johnson, The Rock, as an example to showcase the site.

Very straightforward.

Whenever he smiles, the emoji turns into a lauging emoji, and the background color changes to green.

App demo image

On the other side,

If he looks angry, the app will also catch that and display the right emoji and background color.

App demo image

Same thing happens whenever his facial expression might look a bit neutral.

The emoji gets changed, and the background color gets updated as well.

App demo image

Detectable expressions

  • Default: 😐
  • Neutral: 😐
  • Happy: πŸ˜€
  • Sad: πŸ˜₯
  • Angry: 😠
  • Fearful: 😨
  • Disgusted: 🀒
  • Surprised: 😲

Browsers support

Firefox
Firefox
Chrome
Chrome
Safari
Safari
last version last version last version

Other notes

For this app to properly work, make sure that:

  • Your room has good lighting
  • Your face is close enough to the computer
  • And that you give it a few seconds after your camera is loaded, so that it can accurately detect your face

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

Learn More

This project was bootstrapped with Create React App.

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

About

😜 A web app that detects your face emotions using AI and matches them with emojis. Built using ReactJS and Face-API.js: a JavaScript API for face detection and face recognition in the browser implemented on top of the tensorflow.js core API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published