How to process extracted SURF features for SVM classifier
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Amit DOegar
el 17 de Dic. de 2019
Respondida: Bilal Razi
el 11 de Abr. de 2020
How to process stored surf features of multiple files for svm classifier
0 comentarios
Respuesta aceptada
Bilal Razi
el 11 de Abr. de 2020
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.
0 comentarios
Más respuestas (4)
Divya Gaddipati
el 14 de En. de 2020
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!
0 comentarios
fadi ssuhimat
el 3 de Feb. de 2020
Do you find soluation for this case, I have same issue???
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!