Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG 🐛] The managed implementation works on Android, but on iOS, only the bounding boxes are drawn correctly, while the orientation for drawing landmarks is not accurate. #98

Open
shishi-RN opened this issue Sep 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@shishi-RN
Copy link

shishi-RN commented Sep 18, 2024

Description: The default bounding box for face detection correctly covers the face on iPad, but the landmarks are positioned outside the face and appear rotated by 90 or 270 degrees.

Steps to Reproduce:

Use react-native-vision-camera-face-detector in a React Native project.
Run the app on an iPad device.
Observe that the bounding box correctly covers the face, but the landmarks are incorrectly positioned and rotated.
Expected Behavior: The landmarks should be positioned correctly inside the bounding box and aligned with the facial features.

Actual Behavior: Landmarks are positioned outside the bounding box and appear rotated (by 90 or 270 degrees).

Environment:

React Native: 0.72.X (or your version)
iPadOS: (version)
react-native-vision-camera: 4.5.0
react-native-vision-camera-face-detector: ^1.7.1
Code Example:

import {StyleSheet, View} from 'react-native';
import React from 'react';
import {Landmarks} from 'react-native-vision-camera-face-detector';
import {Svg, Circle} from 'react-native-svg';

const DrawLandmarks = ({landmarks}) => {
const {
LEFT_CHEEK,
LEFT_EAR,
LEFT_EYE,
MOUTH_BOTTOM,
MOUTH_LEFT,
MOUTH_RIGHT,
NOSE_BASE,
RIGHT_CHEEK,
RIGHT_EAR,
RIGHT_EYE,
} = landmarks;

return (

{Object.values(landmarks).map((point, index) => (

))}

);
};

export default DrawLandmarks;
Additional Information: Any information about the rotation, scaling issues, or other iPad-specific behavior would be helpful.

Image (1)

@shishi-RN shishi-RN added the bug Something isn't working label Sep 18, 2024
@viktoria-budennaya
Copy link

@luicfrr any updates on this one? Also experienced it

I've also noticed that frame.isMirrored on ios returns true for front camera and false for android. Passing isMirrored={false} to the camera on ios face recognition completely so no face is recognised

Could be connected?

@luicfrr
Copy link
Owner

luicfrr commented Oct 25, 2024

Currently I'm really busy with other projects so I couldn't check this out.
I know there are some "problems" with vision-camera frame orientation and mirroring that I haven't managed to fix yet in my tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants