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. 将bat批处理文件注册成windows服务

    C:\Users\lenovo>sc create MyService binPath= "C:\Program Files\restartOracle.bat"  type ...

  2. Nginx学习记录(二)

    1. 什么是反向代理 正向代理 反向代理: 反向代理服务器决定哪台服务器提供服务. 返回代理服务器不提供服务器.也是请求的转发. 反向代理(Reverse Proxy)方式是指以代理服务器来接受Int ...

  3. 2018年ElasticSearch6.2.2教程ELK搭建日志采集分析系统(目录)

    章节一  2018年 ELK课程计划和效果演示 1.课程安排和效果演示 简介:课程介绍和主要知识点说明,ES搜索接口演示,部署的ELK项目演示 章节二 elasticSearch 6.2版本基础讲解到 ...

  4. shell脚本,awk结合正则来打印文件里面的内容。

    文件内容如下:key1abc d key2 1.想得到如下结果: abc d 2.想得到如下结果: key1key2

  5. BZOJ3679: 数字之积(数位dp)

    题意 题目链接 Sol 推什么结论啊. 直接大力dp,$f[i][j]$表示第$i$位,乘积为$j$,第二维直接开map 能赢! /* */ #include<iostream> #inc ...

  6. ElasticSearch High Level REST API【4】多搜索

    1.Multi-Search多搜索请求 Multi-Search可同时添加多个search搜索请求,并行地在一个http请求中执行多个搜索请求,相较多次单请求查询可提升查询效率.ES客户掉通过mget ...

  7. python字典按照k,v来排序

    按照 k 排序 按照 v 排序

  8. Docker容器学习--1

    Docker是PaaS 提供商 dotCloud 开源的一个基于 LXC 的高级容器引擎,源代码托管在 Github 上, 基于go语言并遵从Apache2.0协议开源.Docker是通过内核虚拟化技 ...

  9. May I see you again?【我可以再见到你吗?】

    May I see you again "May I see you again?" he asked. There was an endearing nervousness in ...

  10. [Hdu3555] Bomb(数位DP)

    Description 题意就是找0到N有多少个数中含有49. \(1\leq N \leq2^{63}-1\) Solution 数位DP,与hdu3652类似 \(F[i][state]\)表示位 ...