Catalog npm
PACKAGE EXPLORERView in registry

@0xalter/mocap4face

npm

<h1 align="center"> <br> <img src="https://user-images.githubusercontent.com/130319/146201564-2bb3680e-38d1-471b-a487-25f416582d71.jpg" alt="mocap4face by alter" width="50%"></a> <br> mocap4face by <a href="https://twitter.com/alterz">alter</a>

blendshapescomputer-visionface-trackingfacetrackerfacial-landmarksmachine-learning
Versions collected4
Direct dependencies4From release 0.5.1
Last observed20 Oct, 22:40 UTC

README

Current package documentation


mocap4face by alter
mocap4face by alter

mocap4face by alter is a free, multiplatform SDK for real time facial motion capture based on Facial Action Coding System or (FACS). It provides real-time FACS-derived blendshape coefficients, and rigid head pose in 3D space from any mobile camera, webcam, photo, or video enabling live animation of 3D avatars, digital characters, and more.

After fetching the input from one of the mentioned sources, mocap4face SDK produces data in ARKit-compatible blendshapes, i.e., morph targets weight values as a per-frame expression shown in the video below. Useful for, e.g., animating a 2D or 3D avatar in a way that mimics the user's facial expressions in real-time à la Apple Memoji but without the need of a hardware-based TrueDepth Camera.

With mocap4face, you can drive live avatars or NFT PFPs, build Snapchat-like lenses, AR experiences, face filters that trigger actions, VTubing apps, and more with as little energy impact and CPU/GPU use as possible. As an example, check out how the popular avatar live-streaming app REALITY is using our SDK.

Please star us ⭐⭐⭐ on GitHub—it motivates us a lot!

📋 Table of Content

🤓 Tech Specs

✨ Key Features

  • 42 tracked facial expressions via blendshapes
  • Eye tracking including eye gaze vector
  • Tongue tracking
  • Light & fast, just 3MB ML model size
  • ≤ ±50° pitch, ≤ ±40° yaw and ≤ ±30° roll tracking coverage

🤳 Input

  • All RGB camera
  • Photo
  • Video

📦 Output

  • ARKit-compatible blendshapes
  • Head position and scale in 2D and 3D
  • Head rotation in world coordinates

⚡ Performance

  • 50 FPS on Pixel 4
  • 60 FPS on iPhone SE (1st gen)
  • 90 FPS on iPhone X or newer

💿 Installation

Prerequisites

  1. Create a dev account at studio.facemoji.co
  2. Generate a unique API key for your app
  3. Paste the API key to your source code

Web

  1. Open the sample project under js-example in an editor of your choice
  2. Run npm install && npm run dev to start a local server with the demo
  3. Run npm install && npm run dev_https to start a local server with self-signed HTTPS support
  4. Run npm install @facemoji/mocap4face in your own project to add mocap4face as a dependency

If the webcamera button is not working, you might need to use HTTPS for the local dev server. Run npm run dev_https and allow the self-signed certificate in the browser to start the demo in HTTPS mode.

You can also run npm run build to create a production bundle of the demo app.

🚀 Use Cases

  • AR for NFTs profile pics
  • Live avatar experiences
  • Snapchat-like lense
  • AR experiences
  • VTubing apps
  • Live streaming apps
  • Face filters
  • AR games with facial triggers
  • Beauty AR
  • Virtual try-on
  • Play to earn games

📄 License

This library is provided under the Facemoji SDK License Agreement—see LICENSE. Also make sure to check out our FAQ for more details.

The sample code in this repository is provided under the Facemoji Samples License

🙏 Notices

OSS used in mocap4face SDK:

Original video by LaBeouf, Rönkkö & Turner.

This library transitively uses open source software, see the full list of our OSS dependencies and license notices.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 4

Collected releases
VersionPublishedDirect dependenciesOpen version
0.5.1Registry latest27 Oct 20224
0.5.020 Oct 20224
0.4.025 Aug 20224
0.3.018 Feb 20224

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
facemoji/mocap4face

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:40 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:2703ad5f01f145f0569e039aec40ed99bbf6dad93796cced567d06ffe907f0eb