Ask Your Question
0

Adjusting memory used in haar cascade training

asked 2016-11-08 16:37:06 -0600

Mohamed Alzaki gravatar image

updated 2016-11-08 16:37:47 -0600

I'd like to increase the amount of memory used in the training using opencv_traincascade, i tried to add precalcValBufSize and precalcIdxBufSize parameters but no thing seems to be changed my machine is 64GB ram and running ubuntu OS when i see the consumption of training its always around 7.5 GB no changed occurred after adding the parameters although i see PrecalcValBufSize and precalcIdxBufSize in the terminal has been set to a value before it enters the stage. Any thoughts?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-11-09 04:17:16 -0600

updated 2016-11-09 04:17:53 -0600

Well there are 2 things to consider

  • While increasing precalcValBufSize and precalcIdxBufSize work in the lower ranges (for example changing 1024MB to 2048MB), it does not when increasing it alot in the upper regions (like 5-6GB) because the process just does not need that amount of memory.
  • For now this means that given your training data, all possible features (the feature pool), can be stored in memory for the boosting process by using 7.5 GB of memory. Increase either the number of samples, or the dimensions of the model (which increases the amount of possible features per image) and you will see it increasing.
edit flag offensive delete link more

Comments

1

Thanks for your answer that was straightforward and helpful answer.

Another thing does increasing the dimensions of samples improve the accuracy ? detection rate is like 70% now what do you suggest to improve it.

Mohamed Alzaki gravatar imageMohamed Alzaki ( 2016-11-10 16:57:42 -0600 )edit

No it does not. In fact, a larger sample dimensions is kind of overkill, and less performant, because it will focus on rather local object features than global object features.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-11-14 04:50:11 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-11-08 16:37:06 -0600

Seen: 520 times

Last updated: Nov 08 '16