Skip to content
Advertisement

expo FaceDetector keep triggering “onFacesDetected” event in “accurate” mode even without face

I’m new to react native. I’m using expo FaceDetector to detect faces. when I’m using it in “fast” mode it trigger “onFacesDetected” event correctly. But when I’m using “accuratemodeonFacesDetected” event keep triggering (on “minDetectionInterval“) (it suppose to trigger after detecting a face).

Is this a expo issue or my code is wrong ? Any help would be greatly appreciated. 1.below is fast mode code

JavaScript

2.below is accurate mode code

JavaScript

expo documentation expo documentation

Advertisement

Answer

I think this may help. The problem is that onFacesDetected returns an object, not a boolean value.

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement