Cascade Training - nneg setting with prepared negative images

asked 2018-08-01 11:51:25 -0600

graham gravatar image

I have created a few cascades already but would like to further refine them to remove false positives.

Assuming I have prepared 1000 hard negative images ready for my cascade and they are all cut to the correct window size as set in the trainer what value do I put in for nneg in the trainer?

Should this be the 1000? or 1? My understanding is that nneg is negative windows and not the same as the number of negative samples I provide. The trainer will attempt to grab 'nneg' number of negative windows from the images I supply, so where I have provided 1000 correctly sized samples what should I set this value to?

A further level on this question - if I have some larger negative images in addition to my 1000 pre-cropped images in my negatives folder does this mean I need a different nneg value?

Any insight appreciated.

edit retag flag offensive close merge delete

Comments

usually, you'd apply large negative images, and the cascade training tool will crop many negative windows from that image (sliding window). a hd image will generate ~500 window samples.

given it is so, your 1000 pre-cropped images might not be very much (or simply add not that much value, as you expect)

berak gravatar imageberak ( 2018-08-01 12:12:43 -0600 )edit

and nneg is the number of images, not expected negative windows

berak gravatar imageberak ( 2018-08-01 12:15:07 -0600 )edit

Thank for the quick reply @berak and clarification..

Understand it is normally done from a larger image at that is indeed how I've created the original cascades.

OK asked a different way - I am trying to apply a level of hard negative mining to reduce the false positives. To do this I had thought I crop these false positives images to the window size and add them to my negative images folder and re-run the cascade - from reading around people have suggested cropping these to the window size hence the question wording above.

I have tried some of this already i.e. using my original full size negative images plus some cropped negative images and have found it significantly slows the cascade trainer.

graham gravatar imagegraham ( 2018-08-01 12:36:57 -0600 )edit
  1. Am I doing the hard negative mining correctly? i.e. adding extra pre-cropped false positives to the original negatives and re-running?

  2. How should the nneg value be changed after adding the extra cropped false positives?

graham gravatar imagegraham ( 2018-08-01 12:40:20 -0600 )edit