1. 程式人生 > >論文速讀(Jiaming Liu——【2019】Detecting Text in the Wild with Deep Character Embedding Network )

論文速讀(Jiaming Liu——【2019】Detecting Text in the Wild with Deep Character Embedding Network )

整體 text one ext red more show 檢測 another

Jiaming Liu——【2019】Detecting Text in the Wild with Deep Character Embedding Network

論文

Jiaming Liu——【2019】Detecting Text in the Wild with Deep Character Embedding Network

作者

技術分享圖片

亮點
  • 通過將文字的字符合並問題轉成字符embedding問題,利用一個網絡來學習字符間的連接關系
方法概述

針對任意文字檢測(水平、傾斜、曲文),采用從字符到文本行的自底向上的pipeline:

  • 先用一個網絡CENet學習兩個任務,包括單個字符的檢測,以及一個字符對的embedding向量(表示兩個字符是否可以構成一個pair)。
  • 然後再用一個字符分類閾值提取檢測到的字符,和一個合並閾值提取group的字符對。
  • 最後利用WordSup中的文本線形成算法(圖模型+一階線性模型)得到文本行。

實際test時步驟:

  • 運行CENet,得到字符候選集合+字符對候選集合
  • 利用分數閾值s過濾非字符噪聲
  • 對每個字符運用r-KNN,查找local的character pairs(參數d、k)
  • 使用piecewise linear model(分段線性擬合)來得到character group的最外接任意多邊形

技術分享圖片

Fig. 2. Overall process of the model. Blue bounding boxes in \character proposals" are character candidates with high confidence scores. \Character Clusters" is the character clusters in embedding space, where candidates in the same cluster use the same color. The final detected words represented in quadrangles are shown in \Detected text". Better view in color.

方法細節
  • 網絡損失函數 = 字符分類損失 + 字符回歸損失 + 字符embedding損失
    • 字符分類損失:hinge-loss損失
    • 字符回歸損失:Iou損失(對框大小比L2損失更不敏感)
    • 字符embedding損失:contrastive loss(對比損失,專門用於pair對相似性的損失)

技術分享圖片

技術分享圖片

技術分享圖片

? D(vi, vj)表示歐氏距離。l_ij表示vi和vj是否match。如果相似,D越大,J越大。如果不相似,D越大,J越小。

技術分享圖片

? 上圖表示的就是contrastive損失函數值與樣本特征的歐式距離之間的關系,其中紅色虛線表示的是相似樣本的損失值,藍色實線表示的不相似樣本的損失值。

  • 字符弱監督學習(利用單詞級/文本線級的annotation學習字符級的prediction)

    • Step1:沿長邊均勻切分,得到coarse-char,如Fig3中a的藍色框

    • Step2:查找和每個coarse-char匹配的pred-char,如Fig3中的b的橘色框

      • 匹配原則:分數高且IOU大

技術分享圖片

  • Step3:利用coarse-char和matched pred-char得到fine-char,如Fig3中的c的綠色框
    • 原則
      • 水平框:fine_h = coarse_h,fine_w = pred_w
      • 豎直框:fine_w = coarse_w,fine_h = pred_h

技術分享圖片

Fig. 3. Learning character detector from word-level annotation. (a) are some coarsechar boxes (blue) with the polygon annotation (red), (b) are some pred-char boxes, and (c) are the fine-char boxes whose height is the same as (a).

  • r-KNN算法(查找pair對條件)

    • 前k個最近的框

    • box的大小相似

    • 距離<d

技術分享圖片

  • 文章實驗中實際用的小技巧

    • mix batch trick:一半用VGG-50k的合成字符標註數據,另一個半用ICDAR15、MSAR這些文本行標註數據訓練(還是用了額外的字符標註數據...)
    • reweighting:考略正pair對的冗余性,把負pari加權
      • the positive pairs are redundant. The minimum requisite for error-less positive pairs is that at least one chain connects all characters in a text unit. Positive pairs with large embedding distances do not contribute any text level error as long as the minimum requisite is satisfied. However, a negative pair with small embedding distance will certainly mis-connect two text units and generate text level error. Meanwhile, we found there are about 3/4 of local character pairs are positive. According to the above analysis, we assume the negative pairs should be weighted more than the positive pairs in training.
    • short word removal:在ICDAR15上把小於2個字符的去掉

技術分享圖片

問題和疑問
  • 文章沒有說速度,KNN去算embedding,框多的情況下,速度肯定慢
  • 網絡部分文章沒說清楚兩個Embedding Subnet和Detection Subnet的具體結構
  • 在構成pair對的地方並沒有說清楚在哪裏用了similar box size這一點

Another useful heuristic rule is that a character is more likely to be connected with characters with similar box size. Therefore, only characters within radius were kept.

實驗結果
  • ICDAR13
    技術分享圖片

  • ICDAR15
    技術分享圖片

  • MSRA-TD500

技術分享圖片

  • Total-Text
    技術分享圖片
收獲點與問題
  1. 用embedding來學習字符間的關系還是比較新的一個出發點。整個方法還是傳統方法字底向上的思路,多步驟而且速度應該比較慢。整體感覺偏engineering,實驗上標明也是一些比較工程上的trick對實驗結果提升較明顯

論文速讀(Jiaming Liu——【2019】Detecting Text in the Wild with Deep Character Embedding Network )