Ask Your Question

abankowski's profile - activity

2019-04-05 21:09:00 -0500 received badge  Famous Question (source)
2016-02-03 00:38:01 -0500 received badge  Notable Question (source)
2015-05-24 08:49:46 -0500 received badge  Favorite Question (source)
2014-11-21 10:01:47 -0500 received badge  Popular Question (source)
2014-09-05 19:36:22 -0500 received badge  Nice Question (source)
2013-07-05 15:16:54 -0500 commented answer memory consumption while training > 50GB

Thanks for the answer, basically it is what I supposed to hear - imo it's a pity that it is not written in the tutorial. Simple graph would be helpfull for the memory issue.

Thanks for the side notes, they may be very helpfull. I assume that many experiments are behind me.

The documentation, though extensive does not cover all cases, for the very beginner and one who does not want to dig into the source may leave many understatements. Tools also do not give very friendly feedback... eg "Assertion failed (_img.rows * _img.cols == vecSize)". I'm still wondering why i got it (id didnt have it for one templates set, now it happens).


2013-07-05 02:05:52 -0500 received badge  Supporter (source)
2013-07-04 17:05:50 -0500 received badge  Student (source)
2013-07-04 14:55:53 -0500 commented question memory consumption while training > 50GB

When it works (at least for the training part) it will be nice to explore many variants.

You were right about the size, using samples 226x61 made swapfiles grow only to 10GB which is acceptable... It's a pity that it is not clearly mentioned in the manual (the difference is incredible) however...

===== TRAINING 0-stage ===== <BEGIN OpenCV Error: Assertion failed (_img.rows * _img.cols == vecSize) in get, file /Users/abankowski/Downloads/opencv-2.4.5/apps/traincascade/imagestorage.cpp, line 154 libc++abi.dylib: terminate called throwing an exception Abort trap: 6

As this is different issue let's assume that the first problem is solved. ;)

2013-07-04 14:17:53 -0500 commented question memory consumption while training > 50GB

200 stages is a lot and in fact that was not my first attempt. I'v just tried to change parameters to get an idea which leads to such extraordinary memory consumption... I also experiment as this is my first attempt to use OpenCV and image recognition library :)

I thought about changing the samples size but i found no hint about relationship of memory and size. I'll give it a try.

Thanks for the response.

2013-07-04 12:16:59 -0500 asked a question memory consumption while training > 50GB

I try to train opencv to recognize a licenseplate. I have prepared some samples (few thousands), prepared vec file successfully and run opencv_traincascade (parameters below). After few minustes i had to stop the process due to the memory consumption that hit 16GB of my RAM and more than 50BG of (dynamic) swap. I have tried to run it with fewer examples, lowered the resolution of negative images. I last try runs were as below but without success (the same memory consumption).

opencv_createsamples -vec positive.vec -bg negative/IMG_5596.JPG -num 200 -maxxangle 0.4 -maxyangle 0.4 -maxzangle 0.2 -w 533 -h 117 -info info.dat 

opencv_traincascade -data result -vec info.dat -numStages 200 -w 533 -h 117 -bg bg.txt

(If needed i can provide all files i use to train opencv). Neither precalcValBufSize nor precalcIdxBufSize did't help.

I use OpenCV 2.4.5, build it myself from sources, MBP 2013, OSX 10.8.4

All suggestions what I may be doing wrong or how to train opencv appreciated. Thanks in advance.