Faces detection are inconsistent on IOS: detections logs changes from 0 to 1 then 0 again. Sometimes 2 faces are detected but with only one person in front of device's camera.
Replacing image.orientation = getFrameRotation(orientation: frame.orientation) with image.orientation = frame.orientation seems to fix the issue. (It was already fixed on 1.6.0 version).
Logs and Screenshots
running in expo dev mode (npx expo run:ios -d):
LOG faces 1 frame 1080 x 1920 yuv Frame
LOG faces 1 frame 1080 x 1920 yuv Frame
LOG faces 0 frame 1080 x 1920 yuv Frame
LOG faces 0 frame 1080 x 1920 yuv Frame
LOG faces 0 frame 1080 x 1920 yuv Frame
LOG faces 1 frame 1080 x 1920 yuv Frame
LOG faces 1 frame 1080 x 1920 yuv Frame
LOG faces 1 frame 1080 x 1920 yuv Frame
LOG faces 2 frame 1080 x 1920 yuv Frame
LOG faces 2 frame 1080 x 1920 yuv Frame
LOG faces 0 frame 1080 x 1920 yuv Frame
LOG faces 0 frame 1080 x 1920 yuv Frame
... they keep this exactly way floating fro 0 to 1 or 2
Describe the bug:
Faces detection are inconsistent on IOS: detections logs changes from 0 to 1 then 0 again. Sometimes 2 faces are detected but with only one person in front of device's camera.
Minimum reproducible example:
Doesn't need - I'm using example app
Expected behavior:
Face detection should be consistent
I have tryed:
https://github.com/luicfrr/react-native-vision-camera-face-detector/blob/bbfea361e97db52990080c1b0245e78d10339a6e/ios/VisionCameraFaceDetector.swift#L241
Replacing
image.orientation = getFrameRotation(orientation: frame.orientation)
withimage.orientation = frame.orientation
seems to fix the issue. (It was already fixed on1.6.0
version).Logs and Screenshots
running in expo dev mode (
npx expo run:ios -d
):Device:
package.json
file:Doesn't need - I'm using example app