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. 【洛谷5113】Sabbat of the witch(毒瘤分块)

    点此看题面 大致题意: 给你一个序列,要你支持三种操作:区间赋值,区间求和,撤回之前任一区间赋值操作. 分块 这道题应该是一道十分毒瘤的分块题. 这道题要用到的算法并不是很难,但是思维难度是真的高. ...

  2. CUDA:Supercomputing for the Masses (用于大量数据的超级计算)-第三节

    原文链接 第三节:错误处理和全局内存性能局限 恭喜!通过对CUDA(Compute Unified DeviceArchitecture,即计算统一设备架构的首字母缩写)系列文章第一节和第二节,您现在 ...

  3. N-gram的原理、用途和研究

    N-gram的原理.用途和研究 N-gram的基本原理 转自:http://blog.sciencenet.cn/blog-713101-797384.html N-gram是计算机语言学和概率论范畴 ...

  4. 1042: [HAOI2008]硬币购物

    Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 3209  Solved: 2001[Submit][Status][Discuss] Descript ...

  5. IE console报错

    需要注意的是,使用console对象查看对象信息,在IE8浏览器下未打开开发人员工具(F12)的情况下 会报'console'未定义错误. 解决办法:1.打开开发人员调试工具(F12)        ...

  6. Ansible学习 安装

    对于运维人员来说,自动化工具是日常工作中比不可少的.Ansible是一个很好的自动化工具. Ansible默认使用SSH协议管理机器,在管理主机上安装Ansible,管理主机和被管理主机只要安装了py ...

  7. WebUploader压缩图片上传

    WebUploader,由Baidu FEX 团队开发,以H5为主,FLASH为辅,兼容 IE6+,iOS 6+, android 4+,采用大文件分片并发上传,极大的提高了文件上传效率,看了官方文档 ...

  8. Django API 为 D3 提供数据

    在工作中见过有的人即便使用了Django,依然还在采取json或geojson的文件形式为页面提供数据,相当于嵌入数据而非加载.下面是个简单有效的例子: 先从 model.py 开始 # models ...

  9. 南阳 ACM16 矩形嵌套 动态规划

    矩形嵌套 时间限制:3000 ms  |           内存限制:65535 KB 难度:4   描述 有n个矩形,每个矩形可以用a,b来描述,表示长和宽.矩形X(a,b)可以嵌套在矩形Y(c, ...

  10. Kubernetes master服务定制编译docker镜像

    前言 之前部署了Kubernetes 1.13.0,发现master服务的启动方式与1.10.4版本有所区别,kube-apiserver.kube-controller-manager和kube-s ...