react-native-mediapipe icon indicating copy to clipboard operation
react-native-mediapipe copied to clipboard

facelandmarkerdetection example becomes very slow very fast

Open cdiddy77 opened this issue 1 year ago • 1 comments

The inference times grow, on both android and ios to a point that the drawing is seconds behind the camera frame.

cdiddy77 avatar Jun 01 '24 20:06 cdiddy77

I have done quite a bit of investigation. Annoyingly, the results vary considerably from run to run. But in general I observe that if the state (setFaceSegments is the easiest repro) is updated on every callback, then even the slightest drawing code will result in eventually very high inference times

There seems to be some sort of reinforcing effect: Once inference times get above a certain point, they tend to accelerate.

cdiddy77 avatar Jun 01 '24 20:06 cdiddy77