Menu

How an AR Face Filter Works: Banuba Effect Folders Explained With Code
📰

How an AR Face Filter Works: Banuba Effect Folders Explained With Code

DEV Community: ios·Banuba Official·3 days ago
#lsc8R0II
#devtoios#devto#dev#webar#face
Long article (1852 words) — no AI summary yet.
Reading 0:00
15s threshold

An AR face filter is a set of instructions that runs on every camera frame: find the face, fit a 3D mesh to it, then draw on that mesh. In the Banuba Face AR SDK the tracking is built in, and everything you author lives in one effect folder that you can read, diff and ship like code.

This is the smallest working filter in that folder. It is one file, and it draws black eyeliner:

{ "scene" : "Retouch example" , "version" : "2.0.0" , "camera" : { } , "faces" : [ { "makeup_eyeliner" : { "color" : "0.0 0.0 0.0" , "finish" : "matte_liquid" , "coverage" : "hi" } } ] }

Enter fullscreen mode

Exit fullscreen mode

We build the Face AR SDK, so the examples use our effect format. Where another tool is the better fit, we say so.

What happens on each frame when an AR face filter runs?

Three jobs run in a fixed order. Face detection finds the face in the frame. Face tracking follows the face from frame to frame and builds a model of it.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.