当前位置:网站首页>【特征提取】基于稀疏PCA实现目标识别信息特征选择附matlab源码
【特征提取】基于稀疏PCA实现目标识别信息特征选择附matlab源码
2022-06-26 06:43:00 【Matlab科研工作室】
1 简介
Bag-of-words (BoW) methods are a popular class of object recognition methods that use image features (e.g. SIFT) to form visual dictionaries and subsequent histogram vectors to represent object images in the recognition process. The accuracy of the BoW classifiers, however, is often limited by the presence of uninformative features extracted from the background or irrelevant image segments. Most existing solutions to prune out uninformative features rely on enforcing pairwise epipolar geometry via an expensive structure-from- motion (SfM) procedure. Such solutions are known to break down easily when the camera transformation is large or when the features are extracted from low- resolution low-quality images. In this paper, we propose a novel method to select informative object features using a more efficient algorithm called Sparse PCA. First, we show that using a large-scale multiple-view object database, informative features can be reliably identified from a high- dimensional visual dictionary by applying Sparse PCA on the histograms of each object category. Our experiment shows that the new algorithm improves recognition accuracy compared to the traditional BoW methods and SfM methods. Second, we present a new solution to Sparse PCA as a semidefinite programming problem using Augmented Lagrange Multiplier methods. The new solver outperforms the state of the art for estimating sparse principal vectors as a basis for a low-dimensional subspace model. The source code of our algorithms will be made public on our website.
2 部分代码
clc;
T = 5; % Number of trials to average run times over
dimensions = [10 50 100 150 200 250 300 350 400 450 500];
ALMTimes = zeros(length(dimensions), T);
DSPCATimes = zeros(length(dimensions), T);
ALMPrec = zeros(length(dimensions), T);
DSPCAPrec = zeros(length(dimensions), T);
for i = 1:length(dimensions)
% Initialize parameters ****************
n=dimensions(i); p = 1; % Dimension
ratio=1; % "Signal to noise" ratio
% rand('state',25); % Fix random seed
for j = 1:T
% Form test matrix as: rank one sparse + noise
testvec=rand(n,p);
testvec = testvec - ones(n,1)*mean(testvec);
numZero = n - floor(0.1*n);
randInd = randperm(n); randInd1 = randInd(1:numZero); randInd2 = randInd(numZero+1:end);
testvec(randInd1,:) = 0;
testvec=ratio*testvec; % + rand(n,p);
testvec = testvec/norm(testvec);
A = testvec*testvec'/p;
lambda = max(1e-5,min(diag(A))*0.5);%(min(diag(A)) + max(diag(A)))/2;
tstartDSPCA = tic;
[x1, DSPCAIter] = DSPCA(A, lambda);
tstopDSPCA = toc(tstartDSPCA);
DSPCAPrec(i,j) = norm(abs(x1) - abs(testvec));
tstartALM = tic;
[x, ALMIter] = SPCA_ALM(A, lambda);
tstopALM = toc(tstartALM);
ALMPrec(i,j) = norm(abs(x) - abs(testvec));
ALMTimes(i,j) = tstopALM;
DSPCATimes(i,j) = tstopDSPCA;
fprintf('\n [dim,trial] = [%i, %i]: [DSPCA time, SPCA-ALM time] = [%0.4f %0.4f]\t[DSPCA Iter, SPCA-ALM Iter] = [%i, %i]',n, j, tstopDSPCA, tstopALM, DSPCAIter, ALMIter);
end
fprintf('\n');
end
fprintf('\n');
ALMTimes = mean(ALMTimes,2);
DSPCATimes = mean(DSPCATimes,2);
ALMPrec = mean(ALMPrec,2);
DSPCAPrec = mean(DSPCAPrec,2);
figure
hold on
plot(dimensions, DSPCATimes, '-bx', 'linewidth', 2)
plot(dimensions, ALMTimes, '-ro', 'linewidth', 2)
legend('DSPCA', 'SPCAALM');
xlabel('Dimension (n)');
ylabel('Compute time (sec)');
title('Time comparison of DSPCA and SPCAALM')
figure
hold on
plot(dimensions, DSPCAPrec, '-gx', 'linewidth', 2)
plot(dimensions, ALMPrec, '-mo', 'linewidth', 2)
legend('DSPCA', 'SPCAALM');
xlabel('Dimension (n)');
ylabel('Error');
title('Precision comparison of DSPCA and SPCAALM')
3 仿真结果
4 参考文献
[1] Naikal N , Yang A Y , Sastry S S . Informative feature selection for object recognition via Sparse PCA[C]// International Conference on Computer Vision. IEEE, 2011.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。
边栏推荐
- Solve the problem of cross domain invalidation of cookies in the new version of Google Chrome browser
- Go语言学习笔记 1.1
- Research Report on China's surfactant market demand and future investment opportunities 2022
- Temperature alarm
- Self attention and multi head self attention (MSA) in transformer
- STM32F1与STM32CubeIDE编程实例-热敏传感器驱动
- 数据挖掘是什么?
- 直播预告丨消防安全讲师培训“云课堂”即将开讲!
- STM 32 uses cube to generate Tim to trigger ADC and transmit through DMA
- Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could
猜你喜欢
I use flask to write the website "II"
Decision tree learning notes
Open source demo| you draw and I guess -- make your life more interesting
Gof23 - prototype mode
[digital signal processing] basic sequence (unit step sequence | relationship between unit step sequence and unit pulse sequence | rectangular sequence | relationship between rectangular sequence and
Jasminum plug-in of Zotero document management tool
【微服务系列】Protocol buffer动态解析
TCP connection and disconnection, detailed explanation of state transition diagram
MYSQL索引不生效的原因
同步通信和异步通信的区别以及优缺点
随机推荐
Judgment of SQL null value
Fmt Must the result of println (true) be true?
I have been testing at Tencent for several years
Go语言学习笔记 1.2-变量篇
Connexion et déconnexion TCP, détails du diagramme de migration de l'état
Dpdk - tcp/udp protocol stack server implementation (I)
Vulnerability discovery - API interface service vulnerability probe type utilization and repair
[digital signal processing] basic sequence (unit step sequence | relationship between unit step sequence and unit pulse sequence | rectangular sequence | relationship between rectangular sequence and
China micronutrient market trend report, technical innovation and market forecast
Bugku练习题---MISC---富强民主
Top down transformation method
SparseArray
稀疏数组sparsearray
DS18B20 details
3.pyinstaller模块介绍
Jasminum plug-in of Zotero document management tool
Alarm operation and Maintenance Center | build an efficient and accurate alarm collaborative processing system
MySQL
Number of connections server database message: error number 2003can't connect to MySQL server on 'server address' (10061)
JS download pictures