Coder Social home page Coder Social logo

wei-1 / minimum-facemesh Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 1.0 3.96 MB

use TF.js to calculate the facial landmarks

Home Page: https://wei-1.github.io/minimum-facemesh/

HTML 11.34% JavaScript 88.66%
tfjs facemesh face-landmarks tensorflow javascript

minimum-facemesh's Introduction

Minimal Face Mesh

This project uses TF.js to calculate the facial landmarks.

SAMPLE IMAGE

DEMO

There are many Demos out there that are too complex. This repository is the minimum setup that I developed that contains a reasonable amount of component.

This repo uses that latest dependencies from Google at 2022-05-31:

There are 5 files in this repo:

  • README.md (this file)
  • index.html (include the dependencies and JS files)
  • landmarks.js (facial landmarks index)
  • sketch.js (integration and logic)
  • sample.png (DEMO image)

If you want to try this repo by yourself, you can clone the project and use http-server to host the index.html file.


Note

  • I saw more than 10% frame rate improvement jumping from TF.js 2.4.0 to TF.js 3.3.0.
  • Model [email protected] seems to be slightly more stable than [email protected], but the difference is hard to tell.
  • I am using MacBook, and I had tried several methods (including plaid-ml) to utilize my MacBook's GPU to do the job. At the end, using WebGL with TF.js is the easiest and the fastest solution.
  • I saw 20% frame rate improvement when moving from a 2017 MacBook to a 2020 MacBook. A better computer does help.

Changelog

  • 2021-04-15
    • TF.js update to 3.4.0
    • Add landmarks color
  • 2021-04-23
    • TF.js update to 3.5.0
  • 2021-04-26
    • Add cameraFlip variable
  • 2021-04-29
    • TF.js update to 3.6.0
  • 2021-05-01
    • Add irises
  • 2021-06-04
    • TF.js update to 3.7.0
  • 2021-07-16
    • TF.js update to 3.8.0
  • 2021-09-01
    • TF.js update to 3.9.0
  • 2021-10-22
    • TF.js update to 3.10.0
  • 2021-10-28
    • TF.js update to 3.11.0
  • 2022-01-16
    • TF.js update to 3.13.0
  • 2022-04-18
    • TF.js update to 3.15.0
  • 2022-05-31
    • TF.js update to 3.18.0

minimum-facemesh's People

Contributors

wei-1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

sirmr1001

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.