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. 如何让图片相对于上层DIV始终保持水平、垂直都居中

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  2. 使用 Repeater方式和完全静态页面使用AJAX读取和提交数据

    1.使用Repeater方式: Comments.aspx <html xmlns="http://www.w3.org/1999/xhtml"> <head r ...

  3. Maven和Gradle对比(转载)

    转载出处:http://www.cnblogs.com/huang0925 Java世界中主要有三大构建工具:Ant.Maven和Gradle.经过几年的发展,Ant几乎销声匿迹.Maven也日薄西山 ...

  4. mysql 查询条件 默认不区分大小写

    mysql查询默认是不区分大小写的 如: 1 2 select * from some_table where str=‘abc'; select * from some_table where st ...

  5. jenkins+svn+pipeline+kubernetes部署java应用(三)

    将jar包.Dockerfile.kubernetes部署yaml文件上传至svn自定义目录 一.生成流水线脚本 二.配置jenkins pipeline构建语句 三.点击构建java工程

  6. 小象学院Python数据分析第二期【升级版】

    点击了解更多Python课程>>> 小象学院Python数据分析第二期[升级版] 主讲老师: 梁斌 资深算法工程师 查尔斯特大学(Charles Sturt University)计 ...

  7. MVP模式与MVVM模式

    1.mvp模式(Model层 Presenter层 View 层) Model层 :数据层(ajax请求) Presenter层:呈现层,view逻辑相关的控制层,控制层可以去调Model去发ajax ...

  8. 微信小程序 input组件type属性3个值的作用

    input组件是小程序的内容输入框组件,通常是这样来使用的: <input type="text" placeholder="输入点内容吧" /> ...

  9. JZOJ 5809. 【NOIP2008模拟】数羊

    5809. [NOIP2008模拟]数羊 (File IO): input:sheep.in output:sheep.out Time Limits: 1000 ms  Memory Limits: ...

  10. 虚拟机中配置SQL SERVER2008R2远程访问

    VM虚拟机中配置数据库访问 选择虚拟机设置--硬件--网络适配器,选择桥接模式:直接连接物理网络 不可选用主机模式(与主机共享专用网络) 数据库远程配置,转自:http://jingyan.baidu ...