资源简介
基于PCA的Deep Learning Network。作者马毅,喜欢也可以去他的主页下载
代码片段和文件信息
% ==== PCANet Demo =======
% T.-H. Chan K. Jia S. Gao J. Lu Z. Zeng and Y. Ma
% “PCANet: A simple deep learning baseline for image classification?“ submitted to IEEE TPAMI.
% ArXiv eprint: http://arxiv.org/abs/1404.3606
% Tsung-Han Chan [thchan@ieee.org]
% Please email me if you find bugs or have suggestions or questions!
% ========================
clear all; close all; clc;
addpath(‘./Utils‘);
addpath(‘./Liblinear‘);
TrnSize = 10000;
ImgSize = 28;
ImgFormat = ‘gray‘; %‘color‘ or ‘gray‘
%% Loading data from MNIST Basic (10000 training 2000 validation 50000 testing)
% load mnist_basic data
load(‘./MNISTdata/mnist_basic‘);
% ===== Reshuffle the training data =====
% Randnidx = randperm(size(mnist_train1));
% mnist_train = mnist_train(Randnidx:);
% =======================================
TrnData = mnist_train(1:TrnSize1:end-1)‘; % partition the data into training set and validation set
TrnLabels = mnist_train(1:TrnSizeend);
ValData = mnist_train(TrnSize+1:end1:end-1)‘;
ValLabels = mnist_train(TrnSize+1:endend);
clear mnist_train;
TestData = mnist_test(:1:end-1)‘;
TestLabels = mnist_test(:end);
clear mnist_test;
% ==== Subsampling the Training and Testing sets ============
% (comment out the following four lines for a complete test)
TrnData = TrnData(:1:4:end); % sample around 2500 training samples
TrnLabels = TrnLabels(1:4:end); %
TestData = TestData(:1:50:end); % sample around 1000 test samples
TestLabels = TestLabels(1:50:end);
% ===========================================================
nTestImg = length(TestLabels);
%% PCANet parameters (they should be funed based on validation set; i.e. ValData & ValLabel)
% We use the parameters in our IEEE TPAMI submission
PCANet.NumStages = 2;
PCANet.PatchSize = 7;
PCANet.NumFilters = [8 8];
PCANet.HistBlockSize = [7 7];
PCANet.BlkOverLapRatio = 0.5;
fprintf(‘\n ====== PCANet Parameters ======= \n‘)
PCANet
%% PCANet Training with 10000 samples
fprintf(‘\n ====== PCANet Training ======= \n‘)
TrnData_ImgCell = mat2imgcell(TrnDataImgSizeImgSizeImgFormat); % convert columns in TrnData to cells
clear TrnData;
tic;
[ftrain V BlkIdx] = PCANet_train(TrnData_ImgCellPCANet1); % BlkIdx serves the purpose of learning block-wise DR projection matrix; e.g. WPCA
PCANet_TrnTime = toc;
clear TrnData_ImgCell;
fprintf(‘\n ====== Training Linear SVM Classifier ======= \n‘)
tic;
models = train(TrnLabels ftrain‘ ‘-s 1 -q‘); % we use linear SVM classifier (C = 1) calling libsvm library
LinearSVM_TrnTime = toc;
clear ftrain;
%% PCANet Feature Extraction and Testing
TestData_ImgCell = mat2imgcell(TestDataImgSizeImgSizeImgFormat); % convert columns in TestData to cells
clear TestData;
fprintf(‘\n ====== PCANet Testing ======= \n‘)
nCorrRecog = 0;
RecHistory = zeros(nTestImg1);
tic;
for idx = 1:1:nTestImg
ftest = PCANet_FeaExt(TestData_ImgCell(idx)VPCAN
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-04-16 00:31 PCANet_demo\
文件 4095 2014-04-16 00:26 PCANet_demo\demo.m
文件 3013 2014-04-16 00:24 PCANet_demo\HashingHist.m
目录 0 2013-11-07 01:29 PCANet_demo\Liblinear\
文件 4226 2011-08-26 22:25 PCANet_demo\Liblinear\libsvmread.c
文件 11225 2013-09-24 05:36 PCANet_demo\Liblinear\libsvmread.mexa64
文件 10752 2013-08-25 19:42 PCANet_demo\Liblinear\libsvmread.mexw64
文件 2254 2011-08-26 22:25 PCANet_demo\Liblinear\libsvmwrite.c
文件 9463 2013-09-24 05:36 PCANet_demo\Liblinear\libsvmwrite.mexa64
文件 9216 2013-08-25 19:42 PCANet_demo\Liblinear\libsvmwrite.mexw64
文件 3726 2012-04-16 21:50 PCANet_demo\Liblinear\linear_model_matlab.c
文件 168 2008-09-06 19:07 PCANet_demo\Liblinear\linear_model_matlab.h
文件 910 2012-10-18 17:51 PCANet_demo\Liblinear\make.m
文件 1764 2011-05-09 16:37 PCANet_demo\Liblinear\Makefile
文件 8629 2012-10-09 21:49 PCANet_demo\Liblinear\predict.c
文件 66845 2013-09-24 05:36 PCANet_demo\Liblinear\predict.mexa64
文件 16384 2013-08-25 19:42 PCANet_demo\Liblinear\predict.mexw64
文件 7349 2012-04-16 22:26 PCANet_demo\Liblinear\README
文件 10947 2012-07-20 00:59 PCANet_demo\Liblinear\train.c
文件 68273 2013-09-24 05:36 PCANet_demo\Liblinear\train.mexa64
文件 58880 2013-08-25 19:42 PCANet_demo\Liblinear\train.mexw64
目录 0 2013-11-07 01:29 PCANet_demo\MNISTdata\
文件 23859010 2013-10-29 04:03 PCANet_demo\MNISTdata\mnist_basic.mat
文件 1851 2014-04-16 00:22 PCANet_demo\PCANet_FeaExt.m
文件 3260 2014-04-16 00:22 PCANet_demo\PCANet_train.m
文件 1774 2014-04-16 00:24 PCANet_demo\PCA_FilterBank.m
文件 1730 2014-04-16 00:22 PCANet_demo\PCA_output.m
目录 0 2013-11-07 01:29 PCANet_demo\Utils\
文件 1341 2009-08-31 20:17 PCANet_demo\Utils\im2colstep.m
文件 9919 2013-10-02 11:23 PCANet_demo\Utils\im2colstep.mexa64
文件 9216 2013-10-01 19:43 PCANet_demo\Utils\im2colstep.mexw64
............此处省略2个文件信息
- 上一篇:图像中值滤波FPGA和MATLAB的实现
- 下一篇:Autosar支持包.rar
相关资源
- DeepLearningLSTM.m
- 手写体识别——MATLAB代码
- MATLAB Deep Learning: With Machine Learning Ne
- MATLABDeepLearning.rar
- Matlab Deep Learning ebook Phil Kim
- MATLAB Deep Learning.pdf
- 《2017_MATLAB_DeepLearning》完整版-Phil K
- 基于Matlab Deep Learning Toolbox的卷积神经
- matlab深度学习工具箱254438
- Matlab Deep learning 2017年新书
- 深度学习工具包matlab代码
- matlab深度学习算法合集
- DeepLearnToolbox-master.zip
- MATLAB DL工具箱 deep learning toolbox
- 2017Matlab_DeepLearning配套代码
- DeepLearnToolbox 工具箱
- Matlab-Deep Learning Toolbox
- Deep Learning 经典文章代码matlab
- 深度学习的matlab的工具包(DeepLearnT
- Deep Learning 经典文章与代码matlab
- Matlab 深度学习工具箱
- Phil Kim-2017Matlab_DeepLearning电子书
- Matlab深度学习工具箱 deep learning tool
- imagenet-vgg-verydeep-19.mat
- Matlab实现循环神经网络RNN
- Deep Semi-NMF源代码
- network_analyer.mlpkginstall
- matlab 深度学习toolbox(Deep Learn Toolbo
- Softmax 函数处理
- 深度学习汽车目标检测matlab2017
评论
共有 条评论