Opencv_contrib: Error on training WBDetector

Created on 27 Jul 2016  Â·  2Comments  Â·  Source: opencv/opencv_contrib

System information (version)

  • OpenCV => 3.1
  • Operating System / Platform => Ubuntu 14.04
  • Compiler => gcc
  • Detailed description

    Simply trying to train a WaldBoost detector.
    I have 722 png pos images 64x64 and 988 neg images also 64x64

    This is my return:

    compute features
    pos=722 neg=988
    i=   0 feat= 8179 thr=  0 casthr=2.693 alpha=2.693 err=0.005 loss=1.347e-01
    neg 988/9
    i=   1 feat=   36 thr=243 casthr=inf alpha=inf err=0.000 loss=inf
    neg 9/0
    OpenCV Error: Assertion failed (0 <= _rowRange.start && _rowRange.start <= _rowRange.end && _rowRange.end <= m.rows) in Mat, file /mnt/0ED4F1644821DB94/opencv/modules/core/src/matrix.cpp, line 477
    terminate called after throwing an instance of 'cv::Exception'
      what():  /mnt/0ED4F1644821DB94/opencv/modules/core/src/matrix.cpp:477: error: (-215) 0 <= _rowRange.start && _rowRange.start <= _rowRange.end && _rowRange.end <= m.rows in function Mat
    
    Aborted (core dumped)
    
    Steps to reproduce

    ```.cpp Ptr<WBDetector> wbd = WBDetector::create(); wbd.operator->()->train("/home/thom/train/cars","/home/thom/train/non_cars"); ```

    bug xobjdetect

    All 2 comments

    you're running out of usable negatives

    can you try to use larger negative images ? WBDetector tries to augment negative data by cropping multiple patches (in positive size) from the images.

    Now it's failling on the first iteration...
    3000(512x512) negative images

    `
    compute features
    pos=1166 neg=11660
    i= 0 feat= 381 thr= 0 casthr=inf alpha=nan err=-0.000 loss=nan
    neg 11660/0
    OpenCV Error: Assertion failed (0 <= _rowRange.start && _rowRange.start <= _rowRange.end && _rowRange.end <= m.rows) in Mat, file /media/thom/HD2/opencv/modules/core/src/matrix.cpp, line 477
    terminate called after throwing an instance of 'cv::Exception'
    what(): /media/thom/HD2/opencv/modules/core/src/matrix.cpp:477: error: (-215) 0 <= _rowRange.start && _rowRange.start <= _rowRange.end && _rowRange.end <= m.rows in function Mat

    Aborted (core dumped)
    `

    Was this page helpful?
    0 / 5 - 0 ratings