1
$\begingroup$

I want to train a cascade classifier to face detect. I read this page. But I wont use trainingImageLabeler app, because I already have face and nonface database sized 24x24. How I use trainCascadeObjectDetector function with my own database?

Is there any example except this you know?

$\endgroup$

3 Answers 3

1
$\begingroup$

If you want to train the classifiers with your own database, you will only need 'trainCascadeObjectDetector' function and feed your images into the proper arguments (Positive, negative images). The output classifier will be in your 'outputXMLFilename' as in traincascadeobjectdetector

trainingImageLabeler is helpful function for classifying positive/negative image. Try this function later when you work with larger database.

$\endgroup$
7
  • $\begingroup$ Thanks for giving time. I am feeding images properly and it works, but has very bad performance. I think this function doesnt like images that have small size (like 24x24). Am I right? $\endgroup$
    – emre
    Feb 4, 2015 at 15:59
  • $\begingroup$ If I use 24x24 negative image, training takes a few minutes an it ends at stage 3 of 20. So it doesnt give good performance. However I use a variant set of large images as negative example it works better. Why this happens? I have thousands of example images and I want to use these for training. $\endgroup$
    – emre
    Feb 4, 2015 at 16:58
  • $\begingroup$ 1. Yes, you are right. We use smaller images just for speed-up the training process. 2. Larger set of negative images will tell the classifier what it should not decide in the wrong way. This will surely help. $\endgroup$
    – pakornosky
    Feb 4, 2015 at 18:52
  • $\begingroup$ The point is, if you appropriately feed the classifier. The results will be improved. Because the algorithm of it is the same. Try the alternate way to go. $\endgroup$
    – pakornosky
    Feb 4, 2015 at 18:56
  • $\begingroup$ I am trying to implement Viola Jones and all articles I read talks about image database that have a same small size. Therefore I think I should use a database like them. At the moment, I confused that which way is the best? What I should to do? Try another function or try large size random negative images? $\endgroup$
    – emre
    Feb 4, 2015 at 20:23
1
$\begingroup$

I know it is not matlab, but this post about training a 'banana' detector is really great and can give you some tips.

$\endgroup$
0
$\begingroup$

There is a tutorial on how to use trainCascadeObjectDetector in the documentation.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.