Unable to run bag of features

I have a 8gb ram and whenever I tried to run bagOfFeatures, it always says out of memory. Please see below.

Error using vertcat
Out of memory. Type HELP MEMORY for your options.
Error in bagOfFeatures/extractDescriptorsFromSet (line 578)
descriptors = [descriptors; tempDescriptors]; %#ok
Error in bagOfFeatures (line 207)
scores{categoryIndex}] = this.extractDescriptorsFromSet(imgSets(categoryIndex), params);

May I know how can I resolve this issue? Thanks.

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

The error occurs because bagOfFeatures is extracting features from all of your training images and storing them in memory. This is a simple strategy for collecting the features, but does have the downside of requiring lots of memory.

If you’re using the ‘Grid’ point selection method, then you can try increasing the GridStep parameter [32 32], which will reduce the number of locations within the image where features are extracted. In addition to that, you can try reducing the number of blocks using the ‘BlockWidth’ parameter, for example, set it to [64 96].

Another common strategy to avoid this type of problem with large datasets is to sub-sample the number of features extracted from the training images.

You can see the M-code by editing the example: edit(‘exampleBagOfFeaturesExtractor.m’)

This example uses the same feature extraction method that the bagOfFeatures uses by default.

SEE COMPLETE ANSWER CLICK THE LINK

--

--

--

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Deploy and Serve AI Models (Part-1)

https://developer.nvidia.com/sites/default/files/akamai/ai-for-enterprise-print-update-to-triton-diagram-1339418-final-r3.jpg

How to start Machine Learning for Developers in 2022

Dummying down get_dummies (one-hot encoding) for ML pipeline

A CNN can learn Miró’ surrealism: Joan Miró Neural Style Transfer & DeepDream

Automated Machine Learning With AWS

Detecting Facial expressions and poses using Machine Learning

Introduction to Linear Regression

How to Recommend similar products to any user?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Technical Source

Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

More from Medium

Compute intensities of interested regions in a fluorescence image stack

Docker Tessesract compilation, order of commands

Why is the Canny edge detection in MATLAB different to OpenCV?

Making Multilingual Subtitles using Machine Translation, Aegisub, Notepad++, and Python