cdiddy77 / react-native-mediapipe

A React Native Camera and Player for MediaPipe applications.
MIT License
10 stars 12 forks source link

facelandmarkerdetection example becomes very slow very fast #121

Open cdiddy77 opened 4 months ago

cdiddy77 commented 4 months ago

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

cdiddy77 commented 4 months ago

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.