cosanlab / py-feat

Facial Expression Analysis Toolbox
https://py-feat.org/
Other
245 stars 67 forks source link

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

Open awymanquant opened 8 months ago

awymanquant commented 8 months ago

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!

ljchang commented 8 months ago

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.