필터 지우기
필터 지우기

How to process extracted SURF features for SVM classifier

조회 수: 2 (최근 30일)
Amit DOegar
Amit DOegar 2019년 12월 17일
답변: Bilal Razi 2020년 4월 11일
How to process stored surf features of multiple files for svm classifier

채택된 답변

Bilal Razi
Bilal Razi 2020년 4월 11일
You can use a combination of functions.
bagOfFeatures and trainImageCategoryClassifier
Use bagOfFeatures to extract your SURF features e.g.
bag = bagOfFeatures(imds, "CustomExtractor", extractorFcn);
where extractorFcn is is a function which extracts your SURF features
then train your model using SVM
classifier = trainImageCategoryClassifier(imds, bag, "LearnerOptions", opts);
where opts = templateSVM()
Hope that helps.

추가 답변 (4개)

Divya Gaddipati
Divya Gaddipati 2020년 1월 14일
You can use fitcsvm to train SVM classifier.
You can load the files into the workspace in a loop.
for i = 1 : total_files
x = load(filename(i).name);
XTrain(i,:) = x;
clear x;
end
Assuming your labels are in a variable YTrain, you can use the fitcsvm as follows:
Mdl = fitcsvm(XTrain, YTrain)
For more information on fitcsvm, you can refer to the following link:
Alternatively, you can also use classificationLearner
Hope this helps!

Amit DOegar
Amit DOegar 2020년 1월 16일
I mean to ask for classfier needs input as vector of features and label
as input for classifier,
but when we extract surf features it gets into array for example
extracted features of aray size 100*100 then through reshape if we convert into vector
size will be of 100* 100 i.e 10000 for a vector . so how to use any classfier for the features like surf, mser or sift, brisk and give it to classifiier

fadi ssuhimat
fadi ssuhimat 2020년 2월 3일
Do you find soluation for this case, I have same issue???

Amit DOegar
Amit DOegar 2020년 2월 3일
Features set is in matrix form
using rehape function we can convert into vector
but dimensions are tool large, still looking for solution

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by