Ask Your Question

aplicaciones moviles's profile - activity

2015-10-20 13:05:45 -0600 asked a question Problems with traincascade

Yeah, I have also got many emails from people regarding the same stuff but till now I have not faced such issue. I have also developed an Haar Classifier using 3000+ positive images and 1500+ negative images. It took me almost 1 week to make a strong classifier.

I would like to recommend one thing. Please check the input parameters mentioned in the batch files of Haar Training. The input parameters must match ( e.g. the window size height and width, number of positive and negatives should be same)

Please check the prerequisites mentioned below for Haar Training:

  1. Number of Positives & Negatives Images: The number of positive images and negatives images must match with the input given to the HaarTraining.dat.

    For example: npos 1595 -nneg 2270 -nstages 20 -mem 1024 -mode ALL -w 25 -h 25

  2. Samples Creation : Please recheck that the number of positives and negatives are same and the width and height you mentioned for the object (Bounding box) -num 1595 -w 25 -h 25

    1. Cascade batch file: Please recheck that the input parameters for height and width are same 25 25

---In OpenCV@xxxxxxxxxxxxxxx, <opencv@xxxxxxxxxxxxxxx> wrote:

 In the past few days I've been investigating the createsamples and traincascade methods in order to generate a car cascaded classifier. Such as myself, many people find themselves not having a clue about how to get past all the errors and problems, so in this post I'll explain my procedure and reasoning as well as I can, as well as my problem.
 To give a little more context, in the past I implemented myself a boosted classifier with Haar features but since the method was not cascaded it was very slow. I am, however, very well acquainted with the method behind the cascaded classification.
 Problem: Car classification on images
 I downloaded a dataset (set of images) that provides 550 positive windows (100w x 40h images with cars) and 500 negative windows (100w x 40h images without cars), and I intend to use this data to train the cascaded classifier.
 STEP 1 - Generate the .dat files for creating samples
 The createsamples application needs a .dat file with the information about the positive and negative samples. I generated two .dat files, one with positive windows and other with negative windows:
 positive.dat example structure:
 CarData\TrainImages\POS\pos-0.pgm 1 0 0 100 40
 CarData\TrainImages\POS\pos-1.pgm 1 0 0 100 40 (and more 548 lines of this)
 The number 1 indicates that there is one object in the entire image, and the next 4 integers represent the bounding box that has the object (the entire image in this example)
 negative.dat example structure:
 CarData\TrainImages\NEG\neg-0.pgm
 CarData\TrainImages\NEG\neg-1.pgm(and more 498 lines of this)
 STEP 2 - Generate .vec files
 To do this I use the createsamples.exe application with the following command line:
 : createsamples.exe -info path/positive.dat -vec samples.vec -bg negative.dat -w 100 -h 40 -num 550 ...
(more)
2015-10-20 12:34:46 -0600 received badge  Editor (source)
2015-10-20 12:34:21 -0600 answered a question Best method to track multiple objects?

excellent suggestions

2015-10-19 16:03:45 -0600 answered a question How to calculate blurriness and sharpness of a given image?

excellent help, thank you very much, worked well

2015-10-16 12:15:51 -0600 answered a question Informative websites related to OpenCV

Excelent!!! recomendations.

2015-10-14 12:50:42 -0600 answered a question How to read/write video with OpenCV in Python?

Excellent recommendations, I served very helpful, Greetings