LinearBinaryPattern and BagOfVisualWords with OutOfMemeoryException

48 views
Skip to first unread message

Edward Weinert

unread,
Nov 18, 2014, 9:45:59 AM11/18/14
to accor...@googlegroups.com
Hi All,

I'm trying to use BagOfVisualWords with LinearBinaryPattern, but an algorythm consumes a lot of memory and throws OutOfMemeoryException. However It works perfectly with HOG and FREAK.

example code:

var lbp = new LocalBinaryPattern(); //with default params
int wordClusters = 32;
var bow = new BagOfVisualWords<FeatureDescriptor>(lbp, wordClusters);

Data: two RGB images 250 x 200 px

I tried to change params in LBP and number of clusters in BoVW. Any ideas?

Thanks a lot!

César

unread,
Nov 18, 2014, 3:38:15 PM11/18/14
to accor...@googlegroups.com
Hi Edward,

One possible problem is that LinearBinaryPattern does not produce sparse interest points, but instead, it produces a dense grid of points. As such, the number of created points can be extremely large and possible prohibitive. However, the fact that HoGs works and LBP not is a bit surprising, since they should have suffered from the same limitations. 

I remember I had corrected an issue with LBP not long ago in the development branch. I will investigate. By the way, I would suggest you to make sure that you are using your application in 64-bits (in VS, you should also disable the "prefer 32-bit" option in the project settings). This might help with the memory issue, in case it is really the cause of the problem.

I will come back to this issue one I finish some testing.

Best regards,
Cesar

Edward Weinert

unread,
Nov 28, 2014, 9:32:50 AM11/28/14
to accor...@googlegroups.com
Hi,

Switching VisualStudio "prefer 32-bit option" solved my problem!

Thank you.

Best regards
edi
Reply all
Reply to author
Forward
0 new messages