Tensorflow Android demo: Detection using Front Camera

958 Views Asked by At

I would like to use the front camera for face detection in tensorflow android demo. I managed to switch the camera to front but the detected bounding boxes are drawn incorrectly. Specifically i think they are inverted with respect to the screen. Can someone let me know where to change the orientation of the camera/ change other configurations to correctly draw the detections?

Thanks!

1

There are 1 best solutions below

4
DrChandra On

I'm just guessing, but did you flip the box drawing coordinates around backwards left-to-right? The front facing camera flips the image to be a mirror image. This prevents people from becoming confused because they are used to looking at themselves in the mirror, not straight on. To display a bounding box on someone's face, the drawing coordinates also have to be flipped backwards.