資源簡介
基于SVM+HOG的人臉檢測matlab程序。內含libsvm-3.22 SVM庫。
資源中tgrs2013_epfifr.rar可不需要解壓,可以無視。
該程序自動讀取人臉庫文件夾下不同人物的照片,可實現遍歷文件夾及子文件夾下包含的圖片,進而提取特征利用SVM訓練分類識別。這可以作為一個baseline,基礎框架,在這個基礎上可以提取更多特征進而提高識別精度。
由于人臉庫是我們自己構造的,涉及了個人隱私,不能共享,所以本程序中人臉庫文件下圖像需要自己提供哦,然后自己構造相應的訓練樣本便可以運行了。

代碼片段和文件信息
function?[C?G?cv?cv_t]=cross_validation_svm(train_labeltrain_set)
%
%?function??[C?G?cv?cv_t]=cross_validation(train_labeltrain_setkernel)
%
%?This?function?performs?a?cross_validation?to?select?goods
%?parameter?for?the?training?of?a?binary?svm
%
%?INPUT
%?train_label:?the?label?in?row?column
%?train_set:?the?sample?corresponding?to?the?label
%
%?OUPUT
%?C:?the?optimal?value?of?c?coressponding?to?the?best?cv
%?g:?the?optimal?value?of?g?coressponding?to?the?best?cv
%?cv:?the?best?cross?validation?accuracy
%?cv_t:?the?cross?validation?grid
h?=?waitbar(0‘cross_validation...‘);
c=10.^(-2:4);
g=2.^(-3:1:4);
c_s=length(c);
g_s=length(g);
k=0;
for?i=1:g_s
????for?j=1:c_s
????????k=k+1;
????????waitbar(k/(g_s*c_s));
????????parameter=sprintf(‘-c?%f?-g?%f?-m?1000?-v?5?-q‘c(j)g(i));
????????cv_t(ij)=svmtrain(train_label?train_setparameter);
????end
end
[li?co]=find(max(max(cv_t))==cv_t);
C=c(co(1));
G=g(li(1));
cv=max(max(cv_t));
close(h)
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
*????文件????????357??2013-05-02?18:06??TGRS2013_EPF&IFR\average_fusion.m
*????文件???????6863??2013-10-01?14:32??TGRS2013_EPF&IFR\bilateralFilter.m
*????文件????????931??2013-10-01?14:32??TGRS2013_EPF&IFR\boxfilter.m
*????文件????????688??2013-10-01?14:32??TGRS2013_EPF&IFR\confusion.m
*????文件????????961??2013-10-01?14:32??TGRS2013_EPF&IFR\cross_validation_svm.m
*????文件????5987935??2013-04-08?01:59??TGRS2013_EPF&IFR\Dataset\IndiaP.mat
*????文件???????1488??2013-10-01?14:32??TGRS2013_EPF&IFR\EPF.m
*????文件???????2321??2013-10-01?14:32??TGRS2013_EPF&IFR\EPFdemo.m
*????文件????????957??2013-10-01?14:32??TGRS2013_EPF&IFR\guidedfilter.m
*????文件???????2462??2013-10-01?14:32??TGRS2013_EPF&IFR\guidedfilter_color.m
*????文件???????8438??2013-10-01?14:32??TGRS2013_EPF&IFR\IC.m
*????文件???????1723??2013-10-01?14:30??TGRS2013_EPF&IFR\IFRFdemo.m
*????文件???????3505??2013-10-01?14:32??TGRS2013_EPF&IFR\jbfilter2.m
*????文件???????4927??2013-10-01?14:32??TGRS2013_EPF&IFR\label2color.m
*????文件????????831??2013-10-01?14:37??TGRS2013_EPF&IFR\Readme.txt
*????文件???????4737??2013-04-11?19:44??TGRS2013_EPF&IFR\RF.m
*????文件????????444??2013-10-01?14:32??TGRS2013_EPF&IFR\scale_func.m
*????文件????????440??2013-08-14?19:28??TGRS2013_EPF&IFR\scale_new.m
*????文件????????232??2013-10-01?14:27??TGRS2013_EPF&IFR\spatial_feature.m
*????文件????????103??2008-12-15?23:19??TGRS2013_EPF&IFR\ToMatrix.m
*????文件????????131??2008-12-15?23:20??TGRS2013_EPF&IFR\ToVector.m
*????文件???????2676??2013-10-01?14:32??TGRS2013_EPF&IFR\train_test_random_new.m
?????目錄??????????0??2013-10-01?14:30??TGRS2013_EPF&IFR\Dataset
?????目錄??????????0??2013-10-01?14:32??TGRS2013_EPF&IFR
-----------?---------??----------?-----??----
??????????????6033150????????????????????24
評論
共有 條評論