-
Notifications
You must be signed in to change notification settings - Fork 23
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
[FEAT ✨] Support landscape mode #62
Comments
can you add a screenshot or a video showing what you mean with "detections appear erratic"? |
There you go. It's probably because the model expects images with faces up. I tried doing RPReplay_Final1716295251.mov |
Okay, can you please check if Currently I’m using frame’s orientation to determine MLKit orientation. |
My app was locked in portrait mode so I just unlocked it. Oddly What would be awesome (and maybe the simpler fix) would be to be able to manually pass the screen orientation to bug2.mov |
Okay I definitely need to update the documentation on
Hope this explains why it stays the same. |
I'll do some tests and try to implement this feature ASAP. The problem is I'm busy with another project right now so I can't say when I'll have time to do this. Anyway, if you want to try it yourself: orientation is handled on native side in these lines: Lines 251 to 262 in 4d3629e
react-native-vision-camera-face-detector/ios/VisionCameraFaceDetector.swift Lines 220 to 231 in 4d3629e
a good start point is to set fixed values on native side and check if it works:
maybe we can add the
Or maybe get device's orientation on native side instead? |
@gwendall I just released |
I think the issue still isn't fixed. When I run the face detector in a landscape orientation the detections are erratic, similar to what was described by the OG post. In @mrousavy's post about frame.orientation (mrousavy/react-native-vision-camera#3077), he mentions that the frame is "... always some fixed orientation (e.g. landscape-left), no matter if the phone is in portrait or landscape". He then mentions that Frame Processor Plugin authors need to adjust their respective Plugins accordingly so that the Plugins themselves compensate for any rotations that the user may encounter or use. This is an option I don't believe is currently available in this pacakge, and would really appreciate it if it got added! |
@dkoh555 The issue is reopened but I don't have time to work on this package right now. |
When switching to landscape mode the detections appear erratic. Is there something we can do to support them better in the current version?
Upvote & Fund
The text was updated successfully, but these errors were encountered: