I cannot load my training descriptors in memory [closed]
I'm working on Bag of Visual words module .I extract SIFT descriptors from 984 Training images,and stored them on disk as .yaml file . I wonder why my descriptors file .yaml is too huge ,it's size 923MB ,although the size of my whole training images is just 146MB . My problem that i cannot load my descriptors file which is a matrix has 1.4 million rows and 128 cols in memory it's look there's a threshold used in the opencv alloc.cpp prevent me from allocate more than 730MB . is it normal that i the descriptors file .yaml is too huge according to the training image size which is 146MB ?
the size of the descriptors Mat is unrelated to the size of the images
how i can load my descriptor file ? I think i would try to implement serialize and desalinize into a txt system file .
yes, most likely, you will have to come up with your own serialization.
the problem with the yaml / xml FileStorage is, that they have to read the whole file in, before they can start parsing it, you probably can avoid that with your own solution.
but again, do you really need to store the descriptors ? the BOW training is an offline, one-time step, what you need to save is the resulting (much shorter) vocabulary Mat, after that, you'll never need those descriptors again.
Yes you are 100% right , so that i dont save them just go to the building the dictionary streadforward and now the clustering is running . just one question , i wonder why the BOWTrainer.cluster() method is using my 4 cores , is it normal (i.e is it multithreaded computaion) ? provided that i enable openmp during compilation my program .
kmeans should use parallel threads, if you enabled it.
I enabled openMp during building the opencv lib 2.4.9. also in my application i enabled the openMp flags .