How to choose the cascade file for face detection?

前端 未结 2 2047
攒了一身酷
攒了一身酷 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条回答
  •  忘了有多久
    2021-01-31 17:23

    To get an idea how successful each one is, how many false positives, and how much stuff in total it finds, I ran each XML file on 41,452 magazine covers and made a contact sheet and average of each.

    Here are the results on Flickr. The titles show the input XML filename and how many features were detected.

    Example result for haarcascade_frontalface_default.xml

    haarcascade_frontalface_alt_tree.xml_-_4720_into_one haarcascade_frontalface_alt2.xml_-_9563_into_one haarcascade_frontalface_alt.xml_-_8970_into_one

    For the files you mention, here's how many features were found:

    • 10,692 haarcascade_frontalface_default.xml
    • 9,563 haarcascade_frontalface_alt2.xml
    • 8,970 haarcascade_frontalface_alt.xml
    • 4,720 haarcascade_frontalface_alt_tree.xml

    I didn't count the false positives, you have to check the images for that (for example, the smile file isn't very good, but the faces generally are). Of course, you'll get different results depending on your input data, and magazine covers are generally quite clean photos.

提交回复
热议问题