【论文笔记】Deep Direct Regression for Multi-Oriented Scene Text Detection

本文提出了一种基于直接回归的多方向场景文本检测算法,包括特征提取、特征融合、多任务学习和后处理四个部分。网络结构通过多层卷积获取大感受野特征,Groundtruth和Loss函数用于指导学习,Recalled NMS后处理方法解决了结果冗余问题。实验在ICDAR2013、ICDAR2015和MSRA-TD500数据集上进行。

文献: Wenhao He, Xu-Yao Zhang, Fei Yin, Cheng-Lin Liu. Deep Direct Regression for Multi-Oriented Scene Text Detection[J]. arXiv preprint arXiv:1703.08289v1.

  本文将目前的检测方法归类为以下两种:直接回归和间接回归。间接回归指通过预测bounding box proposals的offsets进行的检测方法,如faster-rcnn,ssd等;直接回归指通过一个给定的点预测它的offsets得到边界的检测方法。本文提出了一种基于直接回归的自然场景下的多方向文本检测算法。

-网络结构
-Groundtruth和Loss函数
-Post Processing
-实验设置


  本文的检测系统如下图所示,主要包括四个部分:特征提取,特征融合,多任务学习以及后处理。


这里写图片描述

1. 网络结构

  检测系统的前三个部分组成了文章的网络结构。
1)特征提取:在多个卷积层进行特征提取,增加了最大感受野的范围。确保回归任务可以检测出更长的文本,同时提高边界预测的准确度。
2)特征融合:从多个尺度的feature map上提取特征,再进行融合。为了减少计算量,文章仅将融合特征map上采样至原图像尺寸的1/4,具体见下图所示(在原论文图基础上做了尺寸的标注)。
3)多任务学习:主要有两个任务的学习,分类任务和回归任务。分类任务的输出Mcls是一个大小为S4×S4的2维张量,用来预测是否为文本,张量内的元素分数越高是文本的可能性就越大;回归任务的输出Mloc是一个大小为S4×S4×8的3维张量,Mloc中位置(w,h,c)的值L(w,h,c)表示原始图像中点(4w,4h)到文本bounding box的4个顶点的offsets。所以,四边形B(w,h)的计算公式如下:

B(w,h)={L(w,h,2n1)+4w,L(w,h,2n)+4h|n{1,2,3,4}}

结合两个任务,即得到S4×S4的map中每一个点对应的原始图像中的四边形及分数。

这里写图片描述

2. Groundtruth和Loss函数

  整体多任务的loss函数公式如下:

L=Lcls+λlocLloc
其中LclsLloc分别代表分类任务和回归任务的loss函数,λloc用来控制两个loss的平衡。
1)classification task:分类任务的groundtruth基于每一个像素进行标注,距离文本中心线r以内的像素记为positive,在靠近positive区域的边界记为not care,其他区域记为negative。参数r是文本高度的比例,文中设置为0.2。loss函数定义为:
Lcls=1S2iLclsmax(0,sign(0.5yi)(y^iyi))2
文中采用hard negative mining来筛选训练样本。
2)regression task:回归任务的groundtruth值在一个范围内变化,文中采用一个Scale&Shift 模块实现快速收敛,具体网络结构见上图。Scale&Shift 通过以下公式将输入z转换成z^
z^=800z400. z(0,1)
由公式所示,设定正样本的尺寸小于400。设一个已知点的groundtruth为zi,预测值为z^i,loss函数定义为:
Lloc=iLloc[yi>0]smoothL1(ziz^i)
smoothL1(x)={0.5x2|x|0.5if|x|<1,otherwise.

3. Post Processing

  output map上的每一个点都对应了一个有分数的四边形,通过分类任务过滤掉分数低的点,仍然会有多个点对应的四边形有重叠,即结果有冗余。故再采用一种后处理算法解决这个问题。文中提出一种后处理方法叫做Recalled Non-Maximum Suppression(Recalled NMS)。
  对于一个检测结果,字符间的紧密程度与分数有关,我们既希望踢除掉那些包含了文本间间隙的检测结果,又希望保留那些字符间间隙较大但属于同一文本的检测结果,而Recalled NMS可以在这两个目标中取得一个平衡。传统的NMS方法,简单的说,就是对于有相交的就选取其中置信度最高的一个作为最后结果,对于没相交的就直接保留下来,作为最后结果,本文的方法如下图所示:1)按传统的方法先从有大量overlap的四边形集合B中得到抑制后的Bsup;2)Bsup中的每一个四边形用B中的一个overlap大于某一阈值且分数最高的一个四边形代替,这样包含了文本间空隙的四边形将会被踢除;3)经过上一步,可能又会得到一个有密集overlap的四边形集合,此时不采用原本的抑制方法,而是将Bsup中距离接近的四边形进行融合。


这里写图片描述

4. 实验设置

  1. 训练样本在原始图片进行旋转后裁切,旋转角度在0,π/2,π ,or 3π/2,大小为320×320
  2. λloc设置为[0.01,0.5]
  3. 先学习分类任务,再学习回归任务
  4. 测试阶段,采用一个多尺度sliding window,window的尺寸为320×320,步长为160
  5. 分类任务中判断一个像素是否为text的阈值为0.7
  6. 后处理阶段,IoU设置为0.5
  7. 训练数据:ICDAR2013和ICDAR2015,以及网络上下载的200个负样本
  8. 测试数据:ICDAR2013, ICDAR2015 Incidental Scene Text和MSRA-TD500
### Sparse Variational Gaussian Process Implementation and Application in Multi-output Regression In the context of multi-output regression using sparse variational Gaussian processes (SVGP), these models aim to efficiently handle large datasets while maintaining predictive performance. The key idea is to approximate a full Gaussian process with a smaller set of inducing points that summarize the data distribution effectively. The formulation for SVGP involves introducing pseudo-inputs or inducing variables \( \mathbf{u} \). These are strategically chosen locations where function values can be evaluated, thereby reducing computational complexity from O(N³) to approximately O(M²N)[^1], making it feasible to apply GPs on larger datasets. For implementing an SVGP model tailored towards multi-output scenarios: #### Model Definition A common approach employs independent latent functions per output dimension but shares some parameters across them. This setup allows capturing correlations between outputs through shared kernels or other mechanisms like coregionalization matrices. ```python import gpflow class MultiOutputSVGPR(gpflow.models.SVGP): def __init__(self, kernel_list, likelihood, Z, num_latent_gps=1): super().__init__( kernel=gpflow.kernels.SharedIndependent(kernels=kernel_list), likelihood=likelihood, inducing_variable=Z, q_diag=False, whiten=True, num_latent_gps=num_latent_gps ) ``` This code snippet defines a custom class inheriting from `gpflow.models.SVGP` which supports multiple outputs by specifying different kernels within `kernel_list`. #### Training Procedure Training such models typically relies on stochastic optimization techniques due to their scalability properties when dealing with big data sets. One popular method mentioned previously includes Bayesian posterior sampling via stochastic gradient Fisher scoring[^3]. However, more commonly used algorithms involve Adam optimizer combined with mini-batch training strategies. #### Practical Considerations When applying SVGPs for real-world problems involving high-dimensional inputs/output spaces, several factors should be considered: - Selection criteria for choosing optimal number M of inducing points based on trade-offs between accuracy vs speed; - Efficient selection methods for placing those inducing points either randomly sampled from dataset or optimized positions learned during inference phase; - Choice of appropriate covariance structures capable of modeling complex dependencies among various dimensions without overfitting issues;
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值