0x00 预备知识 $\DeclareMathOperator{\vol}{vol}$

无向图上的随机游走

无向图 $G=(V,E)$,边权函数 $w\colon V\times V \to R_+$ 。

若 $(u,v) \notin E $ 则 $w(u,v) = w(v,u) = 0$,否则 $w(u,v) , w(v,u) > 0$

令 $d(u) = \sum_{v\in V} w(v, u)$

先不管建图的细节(比如 $G_m$ 的边权(edge strength 是如何确定的)),先来梳理一下 $G_m$ 上的随机游走。

$G_m$ 上的随机游走即「连通的无向图上的随机游走」。
只要给出转移矩阵 $\mathbf{P}$ 就能求出稳态分布。

我们使用左随机矩阵列向量,这样转移矩阵中元素 $p_{ij}$ 的含义更为直观。

注:使用列向量是数学中的惯例。

定义 1

A probability distribution $\pi$ satisfying
\begin{equation}
\pi^{T} = \pi^{T}\mathbf{P} \label{E:1}
\end{equation}
is called a stationary distribution of the transition matrix $P$, or of the corresponding HMC.

将 $G_m$ 上的转移矩阵定义为

$p_m(v_j | v_i) = e_m(v_i, v_j) / d_m(v_i)$

显然如此定义的转移矩阵 $\mathbf{P}_m$ 是左随机矩阵,可以证明 $P$ 的平稳分布为
\begin{equation}
\pi_m(v_i) = d_m(v_i) / \vol_m V
\end{equation}

证明:边权都大于 $0$,连通图意味着 $\forall v\in V, \quad d(v) > 0$,设 $\pi^T \mathbf{P} = (p_1, p_2, \dots, p_n)$ 其中 $n$ 是节点数,则有
\begin{aligned}
p_i &= \sum_{j = 1} ^n \pi_j p_{ji} \\
&= \sum_{j = 1} ^n \frac{d_j}{\vol V} \frac{w(j,i)}{d_j} \\
&= \frac{d_i}{\vol V} \\
&= \pi_i
\end{aligned}
证毕。

现在考虑融合图 $G$ 上的随机游走过程。对于这个过程,我们提出的模型是

\begin{equation}
p(v_j | v_i) = \sum_m p_m(v_i) p_m(v_j | v_i) \label{E:3}
\end{equation}

其中 $p_m(v_i)$ 是 walker 在点 $v_i$ 时转到图 $G_m$ 中进行下一步游走的概率。按我们的想法,应当有 $p_m(v_i) \propto \pi_m(v_i)$,于是我们假定

\begin{equation}
p_m(v_i) = k_m(v_i) \pi_m(v_i) \label{E:4}
\end{equation}

其中的系数 $k_m(v_i)$ 未知,根据

Theorem 1

Let $\mathbf{P}$ be a transition matrix on the countable state space $E$, and
let $\pi$ be some probability distribution on $E$. If for all $i, j \in E$, the detailed balance
equations (6.8) are satisfied, then π is a stationary distribution of P.


数据集

首先要能够按文章中的描述提取特征

2 个全局特征:

  • BOW
  • VLAD

2 个局部特征:

  • GIST
  • HSV

OpenCV 处理图像。

OpenCV

不论图像(cv::Mat)的 color model 如何,只要是彩色图像(cv::Mat::channels 返回值为 3)cv::imshow 都认为 3 个 channel 依次是 BGR 。(即 BGR 的字典序 :XD)
参考一
参考二

HSV

下文中,color space 与 color model 混用,指同一个东西。

Trouble 1: How to detect the color model of an image in OpenCV?

Info: 看到一种说法

When OpenCV loads colored images (i.e. 3 channel) from the disk, camera, or a video file, the image data will be stored in the BGR format.

另一种相似的说法指出 RBG 和 RBG 是两种不同的 color model,不过差别只在于 channel 的顺序。

OpenCV has a BGR color space which is used by default. This is similar to the RGB color space except that the B and R channels are physically switched in the image. If the physical channel ordering is important to you, you will need to convert your image with this function: cvCvtColor(defaultBGR, imageRGB, CV_BGR2RGB).

Problem1: 用 cvtColor(img, img, CV_BGR2HSV);img 转为 HSV 格式后,imshow 显示的图与原图不同。我的想法:图片的样子应该与 color model 无关。(彩图转成灰度图这类情形除外)
A:已解决。

cv::Mat 存储图片的格式的一些细节:

The color-space conversions all use the following conventions: 8-bit images are in the range 0 to 255, 16-bit images are in the range 0 to 65,536, and floating-point numbers are in the range $0.0$ to $1.0$. When grayscale images are converted to color images, all components of the resulting image are taken to be equal; but for the reverse transformation (e.g., RGB or BGR to grayscale), the gray value is computed through the perceptually weighted formula:

\[Y = (0.299)R + (0.587)G + (0.114)B\]

In the case of HSV or HLS representations, hue is normally represented as a value from 0 to 360 (excluding 360, of course). This can cause trouble in 8-bit representations and so when you are converting to HSV, the hue is divided by 2 when the output image is an 8-bit image.

Trouble 2: cv::Mat::at 方法(和 member function 同义)不懂。

论文笔记(一)Re-ranking by Multi-feature Fusion with Diffusion for Image Retrieval的更多相关文章

  1. 论文笔记(一)---翻译 Rich feature hierarchies for accurate object detection and semantic segmentation

    论文网址: https://arxiv.org/abs/1311.2524 RCNN利用深度学习进行目标检测. 摘要 可以将ImageNet上的进全图像分类而训练好的大型卷积神经网络用到PASCAL的 ...

  2. 论文阅读笔记(三)【AAAI2017】:Learning Heterogeneous Dictionary Pair with Feature Projection Matrix for Pedestrian Video Retrieval via Single Query Image

    Introduction (1)IVPR问题: 根据一张图片从视频中识别出行人的方法称为 image to video person re-id(IVPR) 应用: ① 通过嫌犯照片,从视频中识别出嫌 ...

  3. 《Hyperspectral Image Classification With Deep Feature Fusion Network》论文笔记

    论文题目<Hyperspectral Image Classification With Deep Feature Fusion Network> 论文作者:Weiwei Song, Sh ...

  4. 论文笔记之:Multiple Feature Fusion via Weighted Entropy for Visual Tracking

    Multiple Feature Fusion via Weighted Entropy for Visual Tracking ICCV 2015 本文主要考虑的是一个多特征融合的问题.如何有效的进 ...

  5. 深度学习论文笔记:Fast R-CNN

    知识点 mAP:detection quality. Abstract 本文提出一种基于快速区域的卷积网络方法(快速R-CNN)用于对象检测. 快速R-CNN采用多项创新技术来提高训练和测试速度,同时 ...

  6. Deep Learning论文笔记之(四)CNN卷积神经网络推导和实现(转)

    Deep Learning论文笔记之(四)CNN卷积神经网络推导和实现 zouxy09@qq.com http://blog.csdn.net/zouxy09          自己平时看了一些论文, ...

  7. 论文笔记之:Visual Tracking with Fully Convolutional Networks

    论文笔记之:Visual Tracking with Fully Convolutional Networks ICCV 2015  CUHK 本文利用 FCN 来做跟踪问题,但开篇就提到并非将其看做 ...

  8. 论文笔记: Dual Deep Network for Visual Tracking

    论文笔记: Dual Deep Network for Visual Tracking  2017-10-17 21:57:08  先来看文章的流程吧 ... 可以看到,作者所总结的三个点在于: 1. ...

  9. 论文笔记之:Natural Language Object Retrieval

    论文笔记之:Natural Language Object Retrieval 2017-07-10  16:50:43   本文旨在通过给定的文本描述,在图像中去实现物体的定位和识别.大致流程图如下 ...

随机推荐

  1. 【BZOJ1036】[ZJOI2008] 树的统计Count(一道可怕的模板题:树剖+线段树)

    点此看题面 题解 这真的只是一道模板题:一个树链剖分套上一个线段树(令我窒息的组合). 既然是模板题,那就直接上代码吧. 代码 #include<bits/stdc++.h> #defin ...

  2. 【BZOJ2243】[SDOI2011] 染色(树链剖分)

    点此看题面 大致题意: 有一棵\(n\)个节点的无根树和\(m\)个操作,且每个节点有一个颜色.操作有两种:一种是将两点树上路径之间所有点染成颜色\(c\),另一种是询问两点树上路径之间颜色段的数量. ...

  3. linux 查看帐号创建时间

    查看用户的home目录的创建时间 查看日志 用stat 命令,可以看到目录的三个时间.不过这个时间只是用来参考的,确定一个范围. 查看日志是最准确的方法 /var/log/auth.log ,前提是你 ...

  4. object-detection-crowdai数据处理

    import os file=os.listdir('/home/xingyuzhou/object-detection-crowdai') file.sort(key= lambda x:int(x ...

  5. JS中的async/await的执行顺序详解

    虽然大家知道async/await,但是很多人对这个方法中内部怎么执行的还不是很了解,本文是我看了一遍技术博客理解 JavaScript 的 async/await(如果对async/await不熟悉 ...

  6. javaweb基础(26)_jsp标签库开发二

    一.JspFragment类介绍 javax.servlet.jsp.tagext.JspFragment类是在JSP2.0中定义的,它的实例对象代表JSP页面中的一段符合JSP语法规范的JSP片段, ...

  7. XGBoost算法原理小结

    在两年半之前作过梯度提升树(GBDT)原理小结,但是对GBDT的算法库XGBoost没有单独拿出来分析.虽然XGBoost是GBDT的一种高效实现,但是里面也加入了很多独有的思路和方法,值得单独讲一讲 ...

  8. GNU汇编 程序状态字访问指令

    .text .global  _start _start: mrs r0,cpsr orr r0,#0b100 msr cpsr,r0

  9. 使用eclipse导入web项目

    第一步 第二步 第三步 第四步 最后就多了一个web项目

  10. 2018 Multi-University Training Contest 1 H - RMQ Similar Sequence(HDU - 6305 笛卡尔树)

    题意: 对于一个序列a,构造一个序列b,使得两个序列,对于任意的区间 [l, r] 的区间最靠近左端点的那个最大值的位置,并且序列 b 满足 0 < bi < 1. 给定一个序列 a ,求 ...