Allocator 'n' exceeds maximum supported size
I am trying to create a training set for training a DTree but I keep getting the following error:
libc++abi.dylib: terminating with uncaught exception of type std::length_error: allocator<t>::allocate(size_t n) 'n' exceeds maximum supported size
The code for your reference:-
cout<<"Creating and training dtree\n";
Ptr<ml::DTrees> model = ml::DTrees::create();
model->train(ml::TrainData::create(data, ml::ROW_SAMPLE, labels));
Mat prediction;
prediction = model->predict(data);
Size of the data set - 388 x 7020 - Features 388 x 1 - Labels 128x112 - Size of an Image 7020- Size of the HOG Descriptors
Possibly you are using a 32 bit compiler and your data exceeds 4GB of memory? If so, build in 64 bit and you should be fine.