py-feat icon indicating copy to clipboard operation
py-feat copied to clipboard

detect_image is detecting multiple faces in an image with a single face

Open awymanquant opened this issue 1 year ago • 1 comments

I just started using Py-Feat to analyze participants emotions while taking a stress task. However, for some participants, the algorithm is detecting multiple faces in the image even though it's only one person in front of the camera. From plot_detections, it looks like the algorithm is dividing the person's face into two different faces (top half of face and bottom half of face, with the nose region overlapping in both).

I apologize if this issue has been solved already, but is there a way to coerce the algorithm to only detect one face instead of searching for all possible faces?

Thanks so much!

awymanquant avatar Jan 03 '24 20:01 awymanquant

Hi @awymanquant , there are a few different things to try to reduce this undesirable behavior.

  1. Adjust face_detection_threshold=0.5
  2. Try a different face_model in the Detector()
  3. We have also found that there are more false positives in high res images. you could also try downsampling the image before running detection.

ljchang avatar Jan 06 '24 19:01 ljchang