-
Notifications
You must be signed in to change notification settings - Fork 22
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
Face Boundaries shouldn't use Scale #35
Comments
@mrousavy can you please check v1.5 branch? I added a condition auto scalling prop on it so you can handle scaling on js side. I'm still testing this branch before merging but I'm having a problem on IOS that makes my frame processor freeze after a few detections. I think this problem is related to this issue but I'm still working on it. |
Did you try with latest V4? I am currently running it and everything's working great |
I just created a demo app; check out https://github.com/mrousavy/FaceBlurApp You can reproduce the issue there. With |
it was just me messing with frame 😅 |
@mrousavy In the new version |
Hey @nonam4, I'm creating this issue to follow up on the discussion about returned coordiantes/bounds being incorrect.
A Camera streams in it's native resolution, and sometimes in landscape orientation, since that's just how sensors work.
If I run any ML model on such a native raw frame, I expect the coordinates to be relative to exactly the frame dimensions and orientation, not the preview/screen size or orientation.
This is especially relevant when I want to draw back to the Frame (with Skia Frame Processors), because then the coordinate system will be the frame's
.width
and.height
.I am talking about these two lines: https://github.com/nonam4/react-native-vision-camera-face-detector/blob/22c87fe4af1fd44fdff7bf729dd9bebe41da176e/ios/VisionCameraFaceDetector.swift#L245-L246
Currently when drawing a blur mask over the face using Skia Frame Processors, it looks like this:
before.mp4
After I change
scaleX
andscaleY
to1.0
, it will look correct:RPReplay_Final1713799605.mp4
Can you remove
scaleX
/scaleY
from your code, and maybe provide such converters on the JS side using theDimensions.get('window')
APIs from React Native? I think that makes more sense, especially now that people use Skia Frame Processors.The text was updated successfully, but these errors were encountered: