jeeliz / jeelizFaceFilter

Javascript/WebGL lightweight face tracking library designed for augmented reality webcam filters. Features : multiple faces detection, rotation, mouth opening. Various integration examples are provided (Three.js, Babylon.js, FaceSwap, Canvas2D, CSS3D...).
https://jeeliz.com
Apache License 2.0
2.69k stars 533 forks source link

FaceFilter Jumpy behavior #260

Closed ranbuch closed 2 years ago

ranbuch commented 2 years ago

Hi, love this repo!

When compering your glasses VTO demo to karuneyewear.com or visagetechnologies.com it looks like the other solutions are more stable in terms of how steddy the glasses are, way less jumpy.

Can we solve it? Maybe by replacing the neural network to a haftier one or something like that?

Thanks.

ranbuch commented 2 years ago

And another thing, they also look more responsive, a bit more agile. It's like the video and the neural network are having different frame rate, neural network is lagging behind.

xavierjs commented 2 years ago

Hi @ranbuch I am sorry for my previous answer it was a bad joke. Jeeliz FaceFilter framerate depends on the device. It may lag on low end devices. I am regularly updating neural networks

ranbuch commented 2 years ago

@xavierjs No worries, thanks for taking the time to answer.

It may lag on low end devices

Right, I guess my question is, are you trying to reduce the weight of the neural network on expense of acuridy or preformance? I see you have multiple neural networks, is there something better in turms of acuridy than NN_DEFAULT.json?

xavierjs commented 2 years ago

Hi,

The issue is more because of the stabilization Settings (look for JEELIZFACEFILTER.set_stabilizationSettings in https://github.com/jeeliz/jeelizFaceFilter/#miscellaneous-methods). I have upgraded Jeeliz FaceFilter to set more stables values (indeed former ones were tuned for older neural networks). I hope it will work better. I will also update the online demos.

For VTO I have other solutions which may be more suited:

ranbuch commented 2 years ago

@xavierjs Thanks, appreciate it! Can you please share more light about the difference between those 2 other repositories and this one?

xavierjs commented 2 years ago

Hi,

Jeeliz VTO widget:

WebAR.rocks.face is closer to Jeeliz FaceFilter than Jeeliz VTO widget. It is like Jeeliz FaceFilter except:

ranbuch commented 2 years ago

Gav it, well ditching THREE.js is not an option for me.

Is there a way to configure jeelizFaceFilter to run like WebAR.rocks.face?

Is there a way to lower the stability for higher speed or vice versa?

xavierjs commented 2 years ago

Since jeelizFaceFilter and WebAR.rocks.face does not have the same pose computation pipeline it is not possible to use the same stabilization methods.

Did you try Jeeliz FaceFilter since the latest commit? ( https://github.com/jeeliz/jeelizFaceFilter/commit/581273a6277026378d4e6e7d081ac14b9c04d85a )

You can adjust the stabilization settings as described in the README https://github.com/jeeliz/jeelizFaceFilter/#miscellaneous-methods (search for JEELIZFACEFILTER.set_stabilizationSettings )

ranbuch commented 2 years ago

Did you try Jeeliz FaceFilter since the latest commit? ( 581273a )

Yes, I've experienced an indentation to one of the sides (left or right) but in terms of preference there was no change.

Can I use WebAR.rocks.face with three.js?

Thanks.

xavierjs commented 2 years ago

yes

ghost commented 2 years ago

We cannot see the source code, right?

ranbuch commented 2 years ago

@xavierjs The VTOGlasses.js example on WebAR.rocks.face requires React. Do you happen to have an independent example?

xavierjs commented 2 years ago

It is the Github repo of Jeeliz FaceFilter here dude