breathingcyborg / mediapipe-face-effects

Realtime Face Effects in Browser using mediapipe and three js.

Home Page:https://breathingcyborg.github.io/mediapipe-face-effects/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mediapipe Facemesh Effects

Realtime facemesh effects using mediapipe and Three JS. Works realtime even on older CPU like AMD Semprom 145.

Screenshot Screenshot Alt

Demo

Demo Link

Todo

  • add more face effects
  • make it work on older android phones

Building and running on localhost

Install dependencies:

yarn

Start development server:

yarn serve

Open localhost:8080

Preparing glasses 3d model.

When using custom 3d glasses make sure the model is oriented in the right way. You can use three js editor or other tools like gltfviewer to check or correct orientation of glasses.

Top View

Front View

Limitations

Face Transform Module is not available in facemesh javascript. So it does not give proper depth / z coordinates. So 3d effect look weird when using perspective camera.

While writing code to places objects relative to facemesh model, facemesh model UV visualization can be helpful.

About

Realtime Face Effects in Browser using mediapipe and three js.

https://breathingcyborg.github.io/mediapipe-face-effects/


Languages

Language:JavaScript 99.2%Language:CSS 0.7%Language:HTML 0.2%