BabylonJS + Deep-Learning

Hello guys !

Like some of you know, I worked during +10 years in Deep Learning (at the time, so called “AI” was barely known) and I’m passionnate into this field


After the last meeting at FrameVR with @gabrieljbaker I started to do some tests with some face detection stuff.

I open this topic to discuss / show / have fun, about some tests, running deep NNs directly inside the browser, in JS.


As a start, here is a face landmark model (WASM + a bit of GPU acceleration) taken from mediapipe, and running directly in the web page, alongside BabylonJS

Mouth :
Screencast from 04-04-2025 13:43:53

Eyes :
Screencast from 04-04-2025 13:47:24

Headpose :
Screencast from 04-04-2025 13:47:41

Face Crop Tracking :
Screencast from 04-04-2025 14:01:06
NB: Please note that I don’t do any image cropping here. The plane texture still receive the full image camera, I only tweak the texture UVs in realtime :slight_smile:


Next steps (soon)

  • Gaze (eye direction)
  • Animation an avatar with it

@gabrieljbaker I think this kind of techs could leverage the usage of FrameVR when used from Browser :smiley:

17 Likes

That’s crazy! Well done!

1 Like

Avatar Head Pose, here we come :
Screencast from 04-04-2025 18:16:43

Eyes brows and mouth :
Screencast from 04-04-2025 18:16:54

And Eye Gaze is coming ! :grin:
Screencast from 04-04-2025 18:22:47


Ok, this is all quick and dirty, but it will improve no worries :smile:

8 Likes

Hey !

@gabrieljbaker I gave a try to some Ready Player Me avatars I downloaded from SketchFab.

Shapekeys are exported from Blender to .GLB using Morph Targets.

Head Pose :
pose

Eyes opening, Eye brows, gaze :
eyes

Mouth and nose shape :
mouth


@Deltakosh I think it could be a nice demo for promoting BabylonJS Morph Targets ! :smiley:

9 Likes

New test with :

  • An avatar generated using a picture of me on Ready Player Me Avatar Generator :
  • The BabylonJS scene loading directly the .GLB output of the Avatar creator
    (No more finetuning on Blender :slight_smile: )`
  • The webcam background re-generated using a diffusion model to mimic a low poly toon style
7 Likes

I’m so impressed by how well BabylonJS handles multiple morph targets in realtime, flawlessly ! :smiling_face_with_three_hearts:

multi_pose

multi_mouth

multi_eyes

10 Likes

Super impressive! Can we try it somewhere yet :eyes: ?

Thanks !

Not yet, but if many people are interested… Could be :face_with_tongue:

2 Likes

This is awesome thanks for sharing @Tricotou !

+1 to @CrashMaster, would love to try it :smiling_face:

2 Likes

“could be” is enough promise for me! :smiley: