Comments (2)
@imelos this will be difficult to fix without access to the device, logs, and other relevant information.
However, I suspect the problem might be related to scale values.
Perhaps these values are higher than they should be? 🤔
from react-native-vision-camera-face-detector.
@nonam4 I also btw just experienced a similar issue on iOS, not sure if it's the same cause, but basically scaleX
and scaleY
shouldn't be done.
react-native-vision-camera-face-detector/ios/VisionCameraFaceDetector.swift
Lines 245 to 246 in 22c87fe
You are making assumptions about a preview view here, whereas the coordinate system of a Frame Processor should always be the same of the Frame
(.width/.height).
The user is responsible for converting that to preview coordinates. Maybe I can expose a function that does that.
But in reality it's just not as simple to scale it, because sometimes there's a pixel-shift involved, sometimes the width/height are flipped on Android, etc.
And in my case that was wrong (I explicitly patched this lib and set scaleX
and scaleY
to 1
) because I am drawing in a Skia Frame Processor - and those use the same coordinate system as the Frame. It will be auto-scaled by the Preview later. mrousavy/react-native-vision-camera#2743
So I recommend you remove the scaling from your code, and let the user manually convert that to preview coordinates if needed. In Skia Frame Processors the user doesn't need to do that, it is just always the Frame coordinates.
from react-native-vision-camera-face-detector.
Related Issues (20)
- can i set face detector as id for the user like face recognition ? HOT 1
- example for face marker HOT 2
- How to render face landmarks HOT 1
- usereff getting typescript error
- Original 'Frame' HOT 3
- [QUESTION] Is this able to detect real human face? HOT 4
- camera mount error [unknown/unknown: [unknown/unknown] Compiling JS failed: 1:1:invalid empty parentheses '( )' Buffer size 3 starts with: 280a29] HOT 3
- [QUESTION] detected half face ? HOT 2
- Face always return empty object after upgrade vision camera to 4.0.0-beta.5 HOT 7
- [BUG] undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[10], "react-native-vision-camera-face-detector").Camera HOT 5
- [QUESTION] crop image by bounding box HOT 2
- [QUESTION] Store face attributes/embeddings? HOT 2
- [BUG] Inconsistent face detection HOT 5
- [BUG] Plugin with id 'kotlin-android' not found. HOT 9
- [QUESTION] x/y props not found on face bounds HOT 9
- [BUG] Downscaled face boundaries with lower photoResolution HOT 5
- How can I still operate on the Frame? HOT 5
- [BUG] Error when running build for Android HOT 2
- Pass detection options inside `initFrameProcessorPlugin` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-vision-camera-face-detector.