使用CascadeClasifier和FaceRecognizer的OpenCV性别分类(FisherFace) [英] OpenCV Gender Classification using CascadeClasifier vs. FaceRecognizer (FisherFace)

查看:1319
本文介绍了使用CascadeClasifier和FaceRecognizer的OpenCV性别分类(FisherFace)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想找到性别检测的最佳方法。我使用opencv,目前一切都很好,除了性别准确性不是很好,即使我有1500个样本图像为每个男性和女性。



m使用默认的lbp面级联文件来检测面部,然后使用自定义编译的渔业识别器模型来将面部分类为男性或女性。



我想知道是否有人有关于为每个男性和女性面部产生lbp级联的想法,其中阴性样本将包含相反的性别?在我自己尝试之前,我想知道是否有人知道这是否会浪费时间



我可以使用opencv中的cascadeclassifier检查男性在框架,第二次检查女性?



编辑:
这是我正在采取的步骤,想出一个男性或女性是

$ b
  • 检测左上角和右眼


  • 翻译图像,使眼睛之间的中心位于裁剪图像的中心,眼睛与样品图像的眼睛垂直。

  • 将图片调整为150x150,保持纵横比

  • 将图片标准化为照明

  • 使用fisherfaces将脸部分为男性或女性


  • 解决方案

    是的,如果您创建一个性别特定的lbp级联检测,这将浪费时间。这种类型的检测使用haar-like特征,其基本上是线。男性和女性面部在这方面具有相同的特征,因此您的检测器的负像和正像在数学上是相同的。



    有很多原因为什么性别认同的渔业判别式是垃圾,你说,可能是由于几个原因。一旦检测到,你在脸上进行什么类型的预处理?你在调整脸?如果没有,你没有机会。您是否正规化照明?你是否使用ASM来找到面部的特征点,并从平面旋转变为正面视图?预处理是任何类型的图像处理的一切。


    I'm trying to find the best way to go about gender detection. I'm using opencv, and currently everything is fine except the gender accuracy is not very good, even though i have 1500 sample images for each male and female.

    I'm using the default lbp face cascade file to detect faces, then a custom compiled fisherface recognizer model to classify the face as male or female.

    I was wondering if anybody had any thoughts about generating an lbp cascade for each male and female faces, where negative samples would contain the opposite gender? Before i try it myself, i wanted to know if anybody knew whether this would be a waste of time

    Can I use the cascadeclassifier in opencv once to check for males in the frame, and a second time to check for females?

    EDIT: Here are the steps i'm taking to figure out of a male or female is in front of the camera:

    1. Detect the face
    2. crop the face
    3. detect at least two eyes in the top half of the cropped image (temp image used)
    4. detect left and right eyes
    5. rotate cropped image around left eye to align eyes
    6. translate image so center between eyes is center of cropped image and eye's are vertically in "common" with sample image's eyes
    7. resize image to 150x150 keeping aspect ratio
    8. normalize image for lighting
    9. classify face as male or female using fisherfaces

    解决方案

    Yes, if you create a gender specific lbp cascade for detection, that will be a waste of time. That type of detection uses "haar-like" features, which are basically lines. Both male and female faces have the same features in that respect so your detector's negative and positive images will be identical mathematically.

    There are many reasons why the fisherface discriminant for gender recognition is "crap" as you say, could be due to several reasons. What type of preprocessing are you doing on the faces once they are detected? Are you aligning the faces? If not, you don't have a chance. Are you normalizaing for lighting? Are you using the ASM to find feature points of the faces and morph out of plane rotations to frontal views? Preprocessing is everything when it comes to any type of image processing.

    这篇关于使用CascadeClasifier和FaceRecognizer的OpenCV性别分类(FisherFace)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆