Facemesh freezes after one minute

I am trying various things with Facemesh and I built a program to show some of the important points as listed in the Extension.
I tried it with showing the 450 points and without showing them but in all cases, after about one or two minutes the canvas freezes. Nothing moves. After several minutes the point is showed at another place but there is no fluidity at all.
What could be the reason for that?
Here is the major block I am using.

thanks for your help.

Show us those two procedures you call?

Here they are.
"Updatepoints" gets all the new coordinates when the face is updated,
"DrawTriangle" draws a triangle between the points called RightNose, LeftNose, NoseBottom

Uploading: blocks (8).png...

Thanks for your help

1 Like

I noticed that when I activated the command to show the BackgroundImage I was getting not only the image from the camera but also all the points by numbers. That was triggered by the ShowMesh property in FaceExtension1. When I unchecked this property this "mesh" disppeared and it did not freeze anymore.
However I noticed that my points did not fit the image from the camera, see the video
Why is it offset?

Your point(s) appear depending on the value of global PointIndex.

I see no place (enabled or visible) where that variable gets updated.

One of your uploads failed.

1 Like

Here is the missing block.

The pointIndex comes from the selection index in the List Selector as shown below

Sorry, maybe some one with better French can see the problem.
Upload the .aia here in case some one wants to try.

I changed the app several times, and made several tests on two phones and it becomes clear that when I asked to show the mesh (the points with their numbers) I get the mesh but after one or two minutes everything is frozen.
If I don't ask for it it stays ok forever..
Here is my app
FaceDetection.aia (2.8 MB)

I can confirm that behavior.

Usually, such behavior is caused by things piling up somewhere:

  • memory waiting to be reallocated in a garbage collection process
  • display tasks struggling to keep up

If you can find the original announcement of that extension, look for an email address or @ board ID for further inquiries. The extension itself is a black box to me.

Does that mean that I can mail this person for questions?

Do these examples work for you?

Try this
p299D_puntosFace_v2.aia (2.8 MB)

Here is another hypothesis for you, based on the one minute limit.

Is all the work of the extension being done on the phone itself, or is the extension silently passing the work to a server at MIT or Google for the facial recognition part? One minute sounds like a good rate limiter threshhold.

From what I just tried by cutting mobile data on my phone:

  • there are calls to some server somewhere at the beginning, which may explain the long time before the first face recognition,
  • but then all the processes take place in the phone.
    That's the same thing if I want the Mesh to be displayed or not. And in both cases, connected or not, showing the mesh stays only one or two minutes and then it freezes.

Searching for an Android equivalent of Windows Task Manager, I see Android can tell you the RAM usage of a running app, through Settings->Apps.

Maybe watch that and see if it increases?

Well did not see anything special comparing the app with this action and without, and it does not bring anything. Actually the one without showing the mesh uses more RAM...
Is there a name of someone who built this extension that we can question about it?

See post 9, if you consider this important enough to pursue.

maybe its the storage. i see rhe freeze for problems with external and internal storage permissions

It looks like @ellelili2025 was (one of) the author(s)