Ask Your Question

Revision history [back]

looking for advice for logo detection using haar training

hi there!

Scenario: What I'm trying to do is have a screenshot of a web page and my application to detect in it a specific logo.

Question: My first question is How many positives and negatives should I use. I tried two alternatives:

1: I had 6 slightly different pictures of the logo and 26 negatives, run createsamples like this(from this tutorial):

createsamples.exe -info positive/info.txt -vec data/vector.vec -num 6 -w 24 -h 24

and haartraining like this:

haartraining.exe -data data/cascade -vec data/vector.vec -bg negative/infofile.txt -npos 6 -nneg 26 -nstages 30 -mem 1000 -mode ALL -w 24 -h 24 -nonsym

and 2: I run createsamples like this :

createsamples.exe -img logo.bmp -num 200 -bg negative/infofile.txt -vec data/vector.vec -maxxangle 0.6 -maxyangle 0 -maxzangle 0.3 -maxidev 100 -bgcolor 0 -bgthresh 0 -w 24 -h 24

to generate 200 training samples from one image of the logo. And then run haartraining like this:

haartraining.exe -data data/cascade -vec dat a/vector.vec -bg negative/infofile.txt -nstages 20 -nsplits 2 -minhitrate 0.999 -maxfalsealarm 0.5 -npos 200 -nneg 26 -w 24 -h 24 -nonsym -mem 2048 -mode ALL

(it's not clear to me if training samples is the same as positive images)

Both methods were unsuccessful. Do you have any advice. It would be appreciated.