Ask Your Question

Traincascade parameters -> -numPos and -numNeg

asked 2015-05-22 08:50:35 -0500

Zeqqo gravatar image

updated 2015-05-22 08:51:41 -0500

Hi , I' m tring to understand what -numNeg and -numPos are , indeed i read some Q&A (here for exemple) which helped me a lot ,but I m still confused conserning -numNeg, infact I read from @StevenPuttemans ( here) that -numNeg is not the exact number of my Negative images:

I get the impression you are mixing up the concept of negative images (which is gathered manually) and negative windows (which are indicated by -numNeg and which are automatically retrieved from the negative set you supplied at model size).

So i now know was -numNeg is not but I can't get what -numNeg is ^^

Looking forward to your andswers, Regards , Luc

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2015-05-24 07:02:43 -0500

tomnjerry gravatar image

updated 2015-05-24 08:45:06 -0500

While training a cascade, we use more negative image samples as compared to positive images. The reason behind doing so is enabling the cascade to reject non-object region easily and thus reducing false detection and increasing computational efficiency. While training the cascade, we decide the window size. The cascade can detect objects with minimum size that of window. Also, it randomly picks samples of window size from the negative images. So you could have only 1000 unique negative images of 500 X 500 but -numNeg could be 10000 or more with window size of 50 X 50. This helps having more negative samples withoutthe need of having unique negative images. Hope this clears stuff!

edit flag offensive delete link more



The window-sized samples are not chosen randomly but sequentially.

LorenaGdL gravatar imageLorenaGdL ( 2015-05-24 12:18:52 -0500 )edit

Like Lorena said, both by me and others the mistake has been made that the sampling is random, which is not the case! It is a full sequential process.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-05-27 08:09:12 -0500 )edit

answered 2015-05-23 03:13:18 -0500

LorenaGdL gravatar image

You have a set of background images, which you input when running the training algorithm, and they're used as negative images. However these images are not use as they are, i. e. a full complete image is not taken. Instead, the algorithm chooses windows of these images, of the appropriate size (the size of the positive images). That means that a single background image will be used as many negative smaller images (supposing it's bigger than positive samples, what it's normally true). So, the -numNeg parameters indicates the number of windows taken, and not the number of real input background images

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-05-22 08:50:35 -0500

Seen: 2,144 times

Last updated: May 24 '15