Loading repository dataβ¦
Loading repository dataβ¦
jeeliz / repository
π Lightweight WebGL & JavaScript library for real-time multi-face detection, tracking and augmented-reality face filters. Supports rotation, mouth-opening and integrates with Three.js, Babylon.js, Canvas2D and CSS3D
This JavaScript library detects and tracks the face in real time from the camera video feed captured with WebRTC. Then it is possible to overlay 3D content for augmented reality applications. We provide various demonstrations using the main WebGL 3D engines. We have included in this repository the release versions of the 3D engines to work with a determined version (they are in /libs/<name of the engine>/).
This library is lightweight and it does not include any 3D engine or third party library. We want to keep it framework agnostic so the outputs of the library are raw: if the face is detected or not, the position and the scale of the detected face and the rotation Euler angles. But thanks to the featured helpers, examples and boilerplates, you can quickly deal with a higher level context (for motion head tracking, for face filter or face replacement...). We continuously add new demonstrations, so stay tuned!
Here are the main features of the library:
/demos/: source code of the demonstrations, sorted by 2D/3D engine used,/dist/: core scripts of the library:
jeelizFaceFilter.js: main minified script,jeelizFaceFilter.module.js: main minified script for use as a module (with import or require),/neuralNets: trained neural network models:
NN_DEFAULT.json: file storing the neural network parameters, loaded by the main script,NN_<xxx>.json: alternative neural network models,/helpers/: scripts which can help you to use this library in some specific use cases,/libs/: 3rd party libraries and 3D engines used in the demos,/reactThreeFiberDemo/: NPM/React/Vite/Three-Fiber boilerplate.These demonstration are included in this repository. So they are released under the FaceFilter licence. You will probably find among them the perfect starting point to build your own face based augmented reality application:
REACT/THREE FIBER boilerplate: /reactThreeFiberDemo
BABYLON.JS based demos:
THREE.JS based demos - specific README about THREE.js based demo problems:
Boilerplates:
<canvas> element: live demo, source codeneuralNets/NN_4EXPR_1.json as neural net, and displays 4 expressions: live demo, source codeAR 3D demos:
face painting or deformation:
demos linked with tutorials:
Statue Of Liberty: live demo, source code, interactive tutorial
Matrix: live demo, source code, tutorial in French
misc:
A-FRAME based demos:
CSS3D based demos:
<DIV> element on the user's head): live demo, source codeCanvas2D based demos:
CESIUM.JS based demos:
Face replacement demos: