필터 지우기
필터 지우기

Classify Image using SVM after PCA analysis

조회 수: 1 (최근 30일)
monkey_matlab
monkey_matlab 2016년 11월 21일
댓글: Munshida P 2020년 1월 4일
Hello,
I need some help to classify a test image to belong to the correct person.
I am using PCA with a SVM classifier to classify the image.
I have 40 subjects, each with 5 features (= total of 200 images).
I therefore have the "train_label" matrix as [1;1;1;1;1;2;2;2;2;2;3;3;3;3;3;4;4;4;4;4;5...40;40;40;40;40]
  1. I got the projected images down to a 200 x 200 matrix using the PCA analysis - "projectimg".
  2. I then used the following command to "Train" the SVM classifier:
SVMModel = fitrsvm(projectimg', train_label,'Standardize',true,'KernelFunction','RBF',... 'KernelScale','auto');
I then generated the projected test image, - "projtestimg".
I now wanted to classify this test image, so I use the following command:
[label] = predict(SVMModel,projtestimg');
I always get the wrong value for the label, meaning that the label value never correlates to the proper subject. I think that I might be implementing the classify part incorrectly.
Can you please tell me how to correctly predict the class of the test image after the PCA analysis using the SVM method in Matlab? Thanks!
  댓글 수: 1
Munshida P
Munshida P 2020년 1월 4일
did you got the answer for the abouve question?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by