[論文閱讀]Chinese Street View Text: Large-scale Chinese Text Reading with Partially Supervised Learning

文章被收錄於ICCV2019
[論文地址]http://openaccess.thecvf.com/content_ICCV_2019/html/Sun_Chinese_Street_View_Text_Large-Scale_Chinese_Text_Reading_With_Partially_ICCV_2019_paper.html
[代碼地址]暫未找到


摘要

  1. 由於訓練數據有限,現有的基準很難評估大量詞彙的深度學習模型的性能,本文提出新的基準數據集Chinese Street View Text (C-SVT)。
  2. C-SVT由430,000張圖片組成,其中30,000張圖片是搶標註圖像(所有的文字區域與label),剩餘的400,000張圖片爲弱標註文本(只有感興趣區域文本的label,有些區域並不關注)。
  3. 爲了從弱標記圖像中定位出最佳匹配的文本建議,本文在整個模型中加入了一個在線建議匹配模塊,通過共享參數來定位關鍵詞區域進行端到端的訓練。

簡介

本文貢獻:

  1. 提出了全新的大規模中文文本閱讀基準C-SVT,包括強標註與弱標註圖像,是現存中文文本數據集量的14倍。
  2. 本文提出了一個端到端可訓練模塊來利用大規模弱標註圖像,該模塊既可以從強標註中學習,也可以從弱標註中學習,從而定位和識別文本。
  3. 本文提出的部分監督的模型在性能上可以超過全監督的模型,且在ICDAR 2017-RCTW上達到了最優結果。

相關工作

文本閱讀基準

英文文本數據集:

  • 規則文本
  • 彎曲文本

中文文本數據集:

  • 手寫文本
    • Liu 等人提出的 [26]
  • 自然場景文本

端到端文本閱讀

[40], [12], [18], [23]將文本閱讀分爲檢測與識別兩步,[22], [7], [5], [6], [28], [14], [29], [37]通過共享特徵的方式將兩步變爲端到端的方式。

檢測:[8], [22], [29]使用了區域推薦網絡RPN生成文本區域,[14], [28], [37]採用全卷積網絡預測文本區域。

識別:[11], [4]使用 CTC (Connectionist Temporal Classification)[7], [28]和基於注意力的LSTM解碼器,將單個字符識別爲序列。

弱監督和部分監督學習

弱監督的文本檢測方法[38], [15]使用字符級別的邊界框來檢測文本,並使用單詞級別的邊界框來提升準確率。


方法

本文提出的模型由骨幹網絡、文本檢測分支、透視RoI(感興趣區域)轉換、文本識別分支和在線推薦匹配模塊組成,如圖4所示:
在這裏插入圖片描述

端到端中文文本閱讀

文本能檢測分支:本文采用ResNet-50作爲骨幹網絡,加上全卷積模塊構成文本檢測分支,共同完成文本/非文本分類與文本位置迴歸。
訓練階段:使用的損失函數爲:Ldet=Lloc+λLclsL_{det}=L_{loc}+\lambda{L_{cls}},其中LlocL_{loc}是計算位置迴歸的平滑L1損失,LclsL_{cls}是文本/非文本分類的篩子損失(dice loss),λ\lambda是超參。
測試階段:將閾值用於文本分類的概率且使用NMS篩選選定的四邊形區域。

Perspective RoI Transform:將特徵圖FF中的對應區域,對齊爲小特徵圖FpF_p。每一個FpF_p保持在具有不變的縱橫比的固定高度,當高度/寬度大於1時,此時將每條垂直線(不太理解)沿順時針方向旋轉90度,從而實現識別水平和垂直文本。

文本識別分支:本文在識別分支中採用了基於注意力的編解碼框架和RNN作爲編碼器,將FpF_p作爲輸入,識別分支提取具有堆疊卷積層的順序文本特徵FsF_s,其中RNN的循環單元採用GRU(Gated Recurrent Unit)。

部分監督學習

Online Proposal Matching

本文提出的OPM目的是通過關鍵字註釋ywy^w來定位文本,即生成一組text proposals,記作{Pw(i)}i=1N\left\{P^{w}(i)\right\}_{i=1}^{N},其中NN爲預測得到的text proposals數目。

然後,通過perspective RoI提取每個proposal中的特徵圖,然後使用CNN-RNN編碼器編碼成爲序列特徵FswF_s^w。爲了計算FswF_s^w和弱標籤ywy^w之間的相似程度,本文在OPM模塊中採用了基於注意力的RNN解碼器來計算解碼狀態(decoder states){htw}t=1Tw\left\{{h_t^w}\right\}_{t=1}^{T^w}TwT^w是時間步長的數目,也是標籤ywy^w的長度。

爲了選擇正確的proposals,OPM直接計算嵌入空間(embedding space ) f()f(\cdot)中對於每一個text proposal的解碼狀態和標籤ywy^w的字符嵌入(character embedding) {etw}t=1Tw\left\{\mathbf{e}_{t}^{w}\right\}_{t=1}^{T^{w}}的歐幾里得距離dw(i)d^w(i)
dw(i)=1Twt=1Twf(htw,Wh)f(etw,We)d^{w}(i)=\frac{1}{T^{w}} \sum_{t=1}^{T^{w}}\left\|f\left(\mathbf{h}_{t}^{w}, \mathbf{W}_{h}\right)-f\left(\mathbf{e}_{t}^{w}, \mathbf{W}_{e}\right)\right\|

WhW_hWeW_e分別是嵌入空間中編碼htwh^w_tetwe^w_t的參數。

OPM模塊使用成對loss,
Lopm=1Ni=1N[sw(i)]2L_{o p m}=\frac{1}{N} \sum_{i=1}^{N}\left[s^{w}(i)\right]^{2}
當text proposalPw(i)P^w(i)是與ywy^w匹配的正樣本時,sw(i)=dw(i)s^{w}(i)=d^{w}(i);反之,sw(i)=max(0,1dw(i))s^{w}(i)=\max(0,1-d^w(i))。而正負樣本的劃分是通過檢查Pw(i)P^w(i)ywy^w的IoU來確定的。

全監督和弱監督的結合訓練

對於全監督的訓練來講,其中的loss爲Lfull=Ldet+βLrecogL_{\text {full}}=L_{\text {det}}+\beta L_{\text {recog}}β\beta是權衡兩個loss的超參。

對於部分監督來講,其中的loss爲Lrecogw=1i=1Nm(i)i=1Nm(i)lrecogw(i)L_{r e c o g}^{w}=\frac{1}{\sum_{i=1}^{N} m(i)} \sum_{i=1}^{N} m(i) l_{r e c o g}^{w}(i)
本文設定一個閾值τ\tau,目的是爲了選擇正確的text proposal。當
dw(i)τd^{w}(i) \leq \tau時,m(i)=1m(i)=1,否則m(i)=0m(i)=0
ii個text proposal鑑別損失函數被定義爲負對數似然函數:
lrecogw(i)=1Twt=1Twlogp(ytwyt1w,ht1w,ctw) l_{r e c o g}^{w}(i)=-\frac{1}{T^{w}} \sum_{t=1}^{T^{w}} \log p\left(\mathbf{y}_{t}^{w} | \mathbf{y}_{t-1}^{w}, \mathbf{h}_{t-1}^{w}, \mathbf{c}_{t}^{w}\right)
其中的ctwc^w_t表示的是在tt時刻,通過注意力機制計算的上下文向量。

部分監督學習總的loss爲
Ltotal=Ldet+β(Lrecog+Lrecogw) L_{t o t a l}=L_{d e t}+\beta\left(L_{r e c o g}+L_{r e c o g}^{w}\right)

訓練流水線

本文提出的部分監督框架的訓練過程建立在完全監督的文本閱讀模型的基礎上,可分爲兩個階段:
階段一:首先訓練全監督的OPM模塊,然後通過從完整標註的圖片上生成假的弱標籤。本文隨機選擇一個標記的文本實例作爲關鍵字區域,並生成一組文本建議(text proposals)。爲了訓練OPM,本文計算每一個text proposal與選擇的關鍵字區域的IoU,當IoU小於0.5時,記作負樣本;將選擇的關鍵字的區域作爲正樣本。

階段二:階段一完成後,進一步根據部分監督Loss函數LtotalL_{total}來訓練整個模型,此時全標註和部分標註的數據都被用於訓練。


實驗

本文中定義平均編輯距離Average Edit Distance記作AED。R、P、F分別代表Recall、Precision、F-score,三個值越高性能越好;AED約低性能越好。

定性與定量結果

定性結果:如圖5所示,上一行爲僅採用全標註的圖像訓練的模型效果,下一行爲部分監督模型訓練的效果。
在這裏插入圖片描述
定量結果:首先註明,End2End爲僅採用全標註圖像訓練的模型,End2End-PSL代表端到端的部分監督的學習模型。

另外,全標註4.4K額外圖像與弱標註400K需要的代價差不多,如表3所示,在測試集上,End2End-PSL + 400K Weak較End2End+4.4K Extra Full在F-score提升4.03%,在AED上降低了1.47%;而End2End-PSL + 50K Weak與End2End + 10K Extra Full效果差不多,但50K Weak的工作成本僅僅只爲10K Extra Full的112\frac{1}{12},說明了弱標註的樣本對效果的提升提供了很大的幫助。
在這裏插入圖片描述

比較其他方法

End2End2-MS爲多尺度訓練模型。從表4中可以看出End2End-PSL比End2End降低了AED3.3%;在多尺度測試中,End2End-PSL-MS在AED上取到了22.1%的最優成績。
在這裏插入圖片描述

模型設計的有效性

Online Proposal Matching:表5中使用隨機選擇的500張弱標註圖片,使用不同的閾值τ\tau來選擇text proposals。當τ=0.1\tau=0.1時,具有可接受的Recall和較高的Precision。
在這裏插入圖片描述

部分匹配樣本如下圖所示:
在這裏插入圖片描述
c圖中顯示即使GT被包含到了多個text proposals中,模型一樣可以檢測出來。d圖展示了GT被劃分到了不同的text proposals中,會導致Recall比較低。

弱標註的識別有效性

在這裏插入圖片描述


總結

  1. 提出了C-SVT最大的中文文本檢測基準
  2. 提出了在線建議匹配模塊(OPM)來訓練部分監督的端到端的模型,同時可以從強標註與弱標註樣本中學習。
  3. 與強標註相比,加入了弱標註的學習可以在F-score上提升4.03%;在 ICDAR 2017-RCTW達到了最優。

參考文獻

[19] DimosthenisKaratzasandetal.ICDAR2013robustreading competition. In Proc. of ICDAR, pages 1484–1493. IEEE, 2013.
[20] Dimosthenis Karatzas and et al. ICDAR 2015 competition on robust reading. In Proc. of ICDAR, pages 1156–1160. IEEE, 2015.
[10] Chee Kheng Chng and Chee Seng Chan. Total-text: A com- prehensive dataset for scene text detection and recognition. In Proc. of ICDAR, 2017.
[44] Liu Yuliang, Jin Lianwen, Zhang Shuaitao, and Zhang Sheng. Detecting curve text in the wild: New dataset and new solution. arXiv preprint arXiv:1712.02170, 2017.
[26] Cheng-LinLiu,FeiYin,Da-HanWang,andQiu-FengWang. CASIA online and offline chinese handwriting databases. In 2011 International Conference on Document Analysis and Recognition (ICDAR), pages 37–41. IEEE, 2011.
[42] Cong Yao, Xiang Bai, Wenyu Liu, Yi Ma, and Zhuowen Tu. Detecting texts of arbitrary orientations in natural images. In Proc. of CVPR, pages 1083–1090, 2012.
[36] BaoguangShi,CongYao,MinghuiLiao,MingkunYang,Pei Xu, Linyan Cui, Serge Belongie, Shijian Lu, and Xiang Bai. ICDAR2017 competition on reading chinese text in the wild (RCTW-17). In 2017 14th IAPR International Conference on Document Analysis and Recognition (ICDAR), volume 1, pages 1429–1434. IEEE, 2017.
[43] Tai-Ling Yuan, Zhe Zhu, Kun Xu, Cheng-Jun Li, and Shi-Min Hu. Chinese text in the wild. arXiv preprint arXiv:1803.00085, 2018.
[40] Tao Wang, David J Wu, Adam Coates, and Andrew Y Ng. End-to-end text recognition with convolutional neural net- works. In Proc. of ICPR, pages 3304–3308, 2012.
[12] Ankush Gupta, Andrea Vedaldi, and Andrew Zisserman. Synthetic data for text localisation in natural images. In Proc. of CVPR, pages 2315–2324, 2016.
[18] Max Jaderberg, Karen Simonyan, Andrea Vedaldi, and An- drew Zisserman. Reading text in the wild with convolutional neural networks. International Journal of Computer Vision, 116(1):1–20, 2016.
[23] Minghui Liao, Baoguang Shi, and Xiang Bai. Textboxes++: A single-shot oriented scene text detector. IEEE Transac- tions on Image Processing, 27(8):3676–3690, 2018.
[22] Hui Li, Peng Wang, and Chunhua Shen. Towards end-to-end text spotting with convolutional recurrent neural networks. In Proc. of ICCV, pages 5238–5246, 2017.
[7] Michal Busˇta, Luka ́sˇ Neumann, and Jirı Matas. Deep textspotter: An end-to-end trainable scene text localization and recognition framework. Proc. of ICCV, 2017.
[5] Christian Bartz, Haojin Yang, and Christoph Meinel. Stn- ocr: A single neural network for text detection and text recognition. arXiv preprint arXiv:1707.08831, 2017.
[6] Christian Bartz, Haojin Yang, and Christoph Meinel. See: towards semi-supervised end-to-end scene text recognition. In AAAI, 2018.
[28] Xuebo Liu, Ding Liang, Shi Yan, Dagui Chen, Yu Qiao, and Junjie Yan. Fots: Fast oriented text spotting with a unified network. In Proc. of CVPR, pages 5676–5685, 2018.
[14] Tong He, Zhi Tian, Weilin Huang, Chunhua Shen, Yu Qiao, and Changming Sun. An end-to-end textspotter with explicit alignment and attention. In Proc. of CVPR, pages 5020– 5029, 2018.
[29] Pengyuan Lyu, Minghui Liao, Cong Yao, Wenhao Wu, and Xiang Bai. Mask textspotter: An end-to-end trainable neural network for spotting text with arbitrary shapes. In Proc. of ECCV, pages 67–83, 2018.
[37] Yipeng Sun, Chengquan Zhang, Zuming Huang, Jiaming Liu, Junyu Han, and Errui Ding. Textnet: Irregular text read- ing from images with an end-to-end trainable network. In Proc. of ACCV, 2018.
[8] Michal Busˇta, Luka ́sˇ Neumann, and Jirı Matas. Deep textspotter: An end-to-end trainable scene text localization and recognition framework. In Proc. of CVPR, pages 2223– 2231. IEEE, 2017.
[22] Hui Li, Peng Wang, and Chunhua Shen. Towards end-to-end text spotting with convolutional recurrent neural networks. In Proc. of ICCV, pages 5238–5246, 2017.
[38] Shangxuan Tian, Shijian Lu, and Chongshou Li. Wetext: Scene text detection under weak supervision. In Proc. of CVPR, pages 1501–1509. IEEE, 2017.
[15] Han Hu, Chengquan Zhang, Yuxuan Luo, Yuzhuo Wang, Junyu Han, and Errui Ding. Wordsup: Exploiting word anno- tations for character based text detection. In Proc. of ICCV, 2017.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章