Details on "Semantic Soft Segmentation"

详解 Semantic Soft Segmentation 论文
(未整理完整)

研究背景==>基本假设==>数学模型==>求解算法(numerical algorithm)==>回答问题<==分析过程与参数影响

semantic soft-segments
layers -- vertical-combined layers
for high-quality image editing and compositing
keypoints:
from a spectral segmentation angle;
eigen decomposition;
the carefully generated Laplacian matrix;

introduction and background 自己去看吧

METHOD

其实看这篇或类似文章,完全可以按照Five Step Method步骤来理解;

数学建模的时候,除非有类似于物理的一些公式,一般有数学推导和数据支撑,或者某些假设,线性的或者非线性的。
因为优化算法一般适用于线性系统,所以尽量都不要使用非线性的假设。

文中假设:
each pixel of each layer () is augmented with an opacity value , with meaning fully transparent, fully opaque, and in-between values indicating the degree of partial opacity.

可以思考一个情况,就是透过玻璃看事物,可能玻璃上会有重影,那么相当于是两幅图片重合在一个视场下。
因为本文是为了得到图像中的不同对象的分割区域,所以每层的图像(vertical layer)应该只包含某一个对象的信息,至少在理想的情况下。

所以下面定义了关于图像的线性模型,假设增幅图片为个像素点:
An additive image formation model:

We express the input RGB pixels as the sum of the pixels in each layer i weighted by its corresponding value.
其第二个表达式是一个约束;
It contrains the values to sum up to 1 at each pixel.

接下去就需要用到图论中的高阶内容 - Graph Theory - Spectral Graph Theory - Spectral Matting
这里的matting也可以看作interlacing,即很多图层交织在一起;
记得读研究生的时候,问过一位来自美国的博士,有比图更复杂的数据结构吗?他说没有了。所以很多前沿性的模型构建基本都是基于图的构建。比如神经网络、隐式马尔可夫模型还有维特比算法,其实都用了图的数据结构。撇开数据结构角度,那么应该就要提及fractal and chaotic。

The core component of the method is the creation of a Laplacian matrix L that represents how likely each pair of pixels in the image is to belong to the same segment.

具体相关知识,可以看Laplacian Matrix - Graph;

Laplacian Matrix 与 Adjacency Matrix, Degree Matrix相关;

文中一个比较重要的一句话:
As noted by Levin et al., L may not always be a true graph Laplacian due to the presence negative affinities, but nonetheless shares similar properties such as being positive semidefinite.

The symmetric normalized Laplacian matrix is defined as:

The Affinities (W-matrix) include:
(1) Spatial Affinity (与位置有关)
(2) Nonlocal Color Affinity (与图像颜色信息有关) - low-level feature
(3) High-Level Semantic Affinity (与图像语义信息有关) - high-level feature

因为图像中的特征一般需要描述子、特征向量来表示,所以(2)(3)都仰赖于图像特征提取的相关知识。

基于文中如何生成Affinities的定义,可以得到如下的Laplacian Matrix:

一般取

接下去讲解其中的每一组成部分:
(待添加)

虽然这个主要的L已经被获得了关于图像中信息融合后的矩阵,就是待优化的data term,那么除了data term,按照一般优化规则,需要添加regular terms。
通常data term只有一项,也就是这里的L,而regular term就会有很多项。

define energy term by term

首先来理解一下sparsification 和 the sparsity of the layers.
我们应该学过稀疏矩阵(Sparse Matrix),其概念里的sparse,是说矩阵中为0或者无用数据的个数较多。
那么关于优化的sparsification,也就是想针对优化的一个向量,也就是针对求解的目标,使得该向量里面值有较大的区别,另一种理解也是向量中大值很大、小值很小,使得其内部向量元素值具有区分度(Discrimination)。

Constrained Sparsification
Energy Terms

is the value of the pixel in the layer.

: the number of layers;
: the number of pixels;

论文中第一个energy term,其实是regular term:

is created with the constrained sparsification procedure.
当然这个是一般表达式,而不是矩阵/向量形式;

论文中第二个energy term,其实也是regular term:
The sum-to-one requirement:

论文中第三个energy term,其实也是data term(the spatial propagation of information):

is a column vector, which has a dimension

论文中第四个energy term/sparsity term,其实也是regular term(a spatially varying sparsity energy; it can preserve accurate soft transitions):

其中,

is the color gradient in the image at pixel p computed using the separable kernels of Farid and Simoncelli.

Sparse Approximation

Sparse Approximation (also known as Sparse Representation) theory deals with sparse solutions for system of linear equations.
Techniques for finding these solutions and exploiting them in applications have found wide use in image processing, signal processing, machine learning, medical imaging, and more.

Noisy Observations:
Often the observed signal is noisy.
By relaxing the equality constraint and imposing an -norm on the data-fitting term, the sparse...

Constrained Sparsification?!

The complete energy function:

其中,

Without the sparsity term E_S, E would be a standard least-squares energy function that can be minimized by solving a linear system.

接下去是构建矩阵表达式(Matrix/Vector)的步骤:

Let the dimensionality of and has dimension ,其中

Given the Identity Matrix

那么,

Let the vector made of ones.
Let the vector made of ones.
Let the matrix made by concatenating Identity Matrices Horizontally.

那么,

以下指明了的维度信息:

再者:

is symmetric Matrix, with dimension .

For the sparsity term E_S, introducing its approximate energy:

并且,
and

Let be the diagonal matrix built with the values.
Let be the vector built with the values, with dimension .
Let be the diagonal matrix built with the values.

The derivative with respect to should be zero at a minimum.

其中(这个时候需要用到Matrix Calculus):
已知:

其第一个形式得到列向量,而第二个形式得到行向量;

那么:



最终可得需要优化的目标,即:

即与论文中所写的那样(偏导数的结果):

其实看这个最终表达式,可以写成如下形式:

其中,, 。

按照Mathematical Modeling - Five Step Method的步骤,其实到这一步,还是完成到Step 3. Formulate the model.

接下去是第四步:Step 4. Solve the model.
也就是确定具体的the general solution procedure;
本文所用的求解模型的算法为:Preconditioned Conjugate Gradient Optimization - 1994;
其实更准确的说是Conjugate Gradient方法,因为这个方法本身也是从属于迭代算法(Iterative Methods),所以肯定存在Precondition,即初始化。
接下去论文也分析了求解的复杂度问题;

(完全可以参考Mathematical Modeling - Five Step Method的步骤进行构建)
(学术研究 基本可以等同于 数学建模,或者说如何使用数学工具进行量化和建模)

吐槽

虽然看完了这个过程,但是试着问下自己,你是否都熟知这里面的数学知识。
如果这些数学知识,没一个你是接触的,还是别先说什么学术创新了。
虽然,硕士和博士期间非常想弄明白,但是现实就是现实,几乎没人可以回答你关于数学、编程、思路、实验、技术、优化等的问题。
即便是研究生期间开课的泛函分析,教师也是让我们学生自行看懂,自己做PPT,讲解,着实好坑。
而且现在在普通高校当中,较好的数学教师,也许有,但是我没见到过。
我认为高校教师只会教一些书本的知识,而且是按照死记硬背的方式,不是按照感性的认识;
会算几个带有具体数值的结果,应该不是教授高等数学的初衷吧,但是我觉得我除了本科后,学到的就是如何求解,至于背后的思想和灵感,一无所知,跟高中那种算个数字差不多,只是多了一些运算法则。
再者,国内没有那种很好的教材,可以奉为经典的教材,即使是教授级别的老师编写的教材,也是错误百出,而且很多内容虽然进行了简化,但是你永远搞不清楚你在哪里?也就是你身处于整个知识体系的哪个位置。我觉得这是最要命的。

Important References:
[1]

猜你喜欢

转载自blog.csdn.net/weixin_34320724/article/details/88295633