Run model at every "face" frame update
Hi!
I'm running
mlComponent.runScheduled(true, MachineLearning.FrameTiming.Update, MachineLearning.FrameTiming.OnRender)
but it runs the model at every frame update. I have a Face Crop Texure setup and the model is using it as input. But how can I make the model only run updates when the face is present? Otherwise if the user face is not present the model output is not meaningful?
I'm using scripting.
thanks
Hi!
I think you already figured this out but there is an answer:
If you are using FaceCropProvider for your MLInput - it will stop updating when no face is tracking. You can check this for sure by printing something onRunningFinished callback
You can just take care of your lens logic (for example hide output image) using onFaceFound and onFaceLost events
Best
Olha