Open bglgwyng opened 1 year ago
Any update on this, I'm getting different results on Android and IOS
@nguyenhieuax https://github.com/bglgwyng/vision-camera-face-detector
I forked this repo and fix this issue.
Frame
object works differently in ios and android. You'll receive cropped images in ios, so their aspect ratio is different to each other even in the same camera view size.
I'm going to share face detection + bounding box rendering example soon.
https://github.com/mrousavy/react-native-vision-camera/discussions/1229 I made a simple example.
@bglgwyng the top value still not so correct when i test on the Ipad one. Also, when i use your lib there are no contours
data anymore.
@jackviatick Sorry, I removed countours
for my own purpose. I think you can easily restore it.
And if you figure out the correct solution that works also on iPad, please share it here for me. I'd be very grateful.
I supposed that those are
top
andleft
of the bounding box, and I directly used them to display the overlay bounding box for the detected face. And I realized thatframe
is mirrored so I triedright
instead ofleft
. Nevertheless, the bounding box was not correctly positioned over the face.So I looked into the source and I saw these lines.
But I couldn't understand the definition of
x
andy
. So I just replaced the definitions withboundingBox.top
andboundingBox.left
. And It worked really well! What is the intended usage ofx
andy
? What is the problem when I just useboundingBox.top
andboundingBox.left
?