How to choose the cascade file for face detection?

前端 未结 2 2045
攒了一身酷
攒了一身酷 2021-01-31 16:24

I am a freshman for face detection. These days I try to compile the OpenCV2.1 code for face detection. I found that there are about 4 cascade files for front face detection, whi

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-31 17:19

    It depends on your use case. If you prefer high precision or prefer high recall.

    I did a comparison test of face detection for haarcascade_frontalface_default.xml and haarcascade_frontalface_alt_tree.xml, with the same parameters for detectMultiScale function, and only keep the max rectangle that detectMultiScale returns.

    On my test data, I found haarcascade_frontalface_default.xml has higher recall (side effect is, more false positives), and haarcascade_frontalface_alt_tree.xml has higher precision (side effect is, detected less number of faces)

    You many try with similar test on your data, and choose the one that best suits your purpose

提交回复
热议问题