笔记:ITQ
来源:互联网 发布:小炫代刷网源码 编辑:程序博客网 时间:2024/06/05 13:27
- Introduction
- Related Works
- Approximate Nearest Neighbor Search
- Similarity Preserving Binary Codes
- ITQ
- 代码
Introduction
large-scale image retrieval的主要挑战:
1. define similarity between images(图片间相似度定义-cv的基础问题)
2. design compact representation for images so we can store them(设计图片的紧凑表达,高效存储)
3. design fast search schemes so we can efficiently find similar images(设计高效搜索方法)
LSH:Locality-sensitive hashing. high-dimensional vectors -> discrete representation. Based on: random projections to perform spatial partitioning.
扩展阅读: 1. boosting. 2. restricted Boltzmann machines.
Related Works
Approximate Nearest Neighbor Search
方法总体上来说有
Similarity Preserving Binary Codes
相似度保存的二值编码,主要有一下三步:
1. Projection learning, or finding a linear or nonlinear projection of the data;(映射数据)
2. Binary thresholding, or quantizing continuous projected data to binary vectors;(量化映射后的数据到二值向量)
3. Similarity computation, or finding distances between query and database points.(相似度计算)
ITQ
主要思路:先对原始空间的数据集
设
从图1可以看出,对投影后的矩阵V进行随机旋转后,量化误差降低至0.93,对于找到的最优的旋转矩阵,量化误差降低至0.88(矩阵与正交矩阵相乘实际上就是对矩阵做旋转)。基于这样一个事实,考虑将投影后的数据集
该式的优化可以采用交替迭代的求解方法:先生成随机矩阵并对其进行SVD分解得到对应的正交矩阵作为
总结一下,整个过程可以概括为:先对数据集进行PCA降维,然后寻找量化误差最小的旋转矩阵即可得到对应该最优旋转矩阵下的特征向量的二进制编码。
代码
function ITQparam = trainITQ(X, ITQparam)% Input:% X: n * d, n is the number of images% ITQparam:% ITQparam.pcaW---PCA of all the database% ITQparam.nbits---encoding length%% Output:% ITQparam:% ITQparam.pcaW---PCA of all the database% ITQparam.nbits---encoding length% ITQparam.r---ITQ rotation projectionpc = ITQparam.pcaW; % Wnbits = ITQparam.nbits; % cV = X * pc; % V% initialize with a orthogonal random rotationR = randn(nbits, nbits);% R-orthogonal[U11 S2 V2] = svd(R);R = U11(:, 1: nbits);% ITQ to find optimal rotationfor iter = 0 : 50 Z = V * R; % calculate B = UX UX = ones(size(Z, 1), size(Z, 2)) .* -1; UX(Z >= 0) = 1; % B' * V C = UX' * V; [UB, sigma, UA] = svd(C); R = UA * UB'; %fprintf('iteration %d has finished\r',iter);end% make B binary%B = UX;%B(B<0) = 0;ITQparam.r = R;
- 笔记:ITQ
- ITQ(Iterative Quantization)迭代量化方法详解
- Iterative Quantization: A Procrustean Approach to Learning Binary Codes (ITQ)
- ITQ(Iterative Quantization)迭代量化方法详解 hash 哈希算法
- ITQ(Iterative Quantization)迭代量化方法详解 hash 哈希算法
- 笔记
- 笔记
- 笔记
- 笔记
- 笔记
- 笔记
- 笔记
- 笔记
- 笔记
- 笔记
- 笔记
- 笔记
- 笔记
- 让你知道什么才是firefox4的速度.
- 使用ucenter在第三方应用中实现同步注册与登录
- grub 引导 Win 7
- linux系统权限修复——学生误操作!
- linux 回收站 路径
- 笔记:ITQ
- experiment目录递归,indent C standard style
- Linux 系统调用
- linux网络编程:用C语言实现的聊天程序(异步通信)
- mybatis中的#和$的区别
- 嵌入式方向学习的重点
- 系统扫二维码
- linux网络编程:用C语言实现的聊天程序(同步通信)
- Linux目录递归改变文件名大小写