Try   HackMD

謝朋諺(Adam Hsieh)
Mon, Aug 14, 2023 10:13 AM


Mix-Teaching: A Simple, Unified and Effective Semi-Supervised Learning Framework for Monocular 3D Object Detection

論文連結

Outline

Reference

登顶KITTI!Mix-Teaching:适用于单目3D目标检测的半监督方法【清华大学
Github yanglei18/Mix-Teaching


摘要重點

  • Mix-Teaching 透過 self-training 為 unlabeled 的影像生成 pseudo-labels,然後,通過將 Instanse-level 影像合併到只有背景的影像或已 label 的影像中,在更密集和更精確標記的混合圖像上訓練學生模型。
  • 透過引入 Uncertainty-based Filter 來幫助我們選擇可靠的 pseudo boxes 來解決因為 Confidence Score 和 Localization 之間的不一致,而導致單靠 Confidence Score 很難區分高質量的 pseudo-label 和 noise 預測的問題。

Contributions

  • 釐清實現 Semi-Supervised Learning 的困難點,並解釋為什麼現在的 SSL 沒辦法有很好的表現。
  • 提出 Uncertainty-based Filter 幫忙有效地消除 noisy pseudo labels。
  • 第一篇成功在 KITTI Dataset 做到把 SSL 放在 Monocular 3D Object Detection 的任務上,對於未來的研究可以當作一個 Baseline。

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Performance comparison

  • 青色是 Fully-Supervised Baselines
  • 橘色則是加上這篇 Mix-teaching 的方法
  • 左邊是 KITTI Validation 的資料集
  • 右邊是 KITTI Test 的資料集

Method

Problem Definition

  • Labeled data 可以用數學表示為:
    IL={(x1L,y1L),...,(xnlL,ynlL)}
    Unlabled data 可以定義為:
    IU={x1U,...,xnuU}
    • 其中
      x
      代表影像
    • y
      代表人類標註的 label 3D bbox
    • nl
      代表已標註的影像數量
    • nu
      代表未標註的影像數量

Multi-stage Training Schema

  1. Teacher model 先在 labeled data 上進行訓練,然後對 unlabled data 上進行 pseudo-label 的標記。
  2. 使用 decomposition 和 re-combination 技術後的所有 labeled data 和 unlabled data 圖像來訓練 noisy student mode。
  3. 由此產生的模型將在下一階段用作新的 Teacher model。

Mix-Teaching Framework

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Overview of Mix-Teaching Framework.
主要分為兩個重要的 process

  • Database-oriented Pseudo Labeling: 透過 teacher model 產出的 pseudo-label images,本文會產出兩種 DB ->
    • Background Database: 只有背景且沒有任何物件的影像
    • Instance Database: 有著高質量的 pseudo label instance 的影像
  • Noisy Student with Mixed Data: 通過將上述 Instance Database 中的影像貼在 Labeled Images 或 Background Database 中的影像,對具有更密集和更精確 Label 的混合影像中進行 Student Model 的訓練。

如上圖所示這邊 Mix-Teaching 架構主要分為兩個 Stages: Database-oriented Pseudo Labeling. 以及 Noisy Student with Mixed Data.

  • Database-Oriented Pseudo Labeling.

    • 如上圖所示,本文對未標記的影像透過 Teacher Model 預測來生成 Pseudo-Label。
    • 透過 Confidence-Based 和 Uncertainty-Based Filter,創建了一個由 Instance-level image 的補丁及其相應的高質量 Pseudo Label 組成的 Instance Database。
    • 另外再從 Unlabeled data 中選擇所有不包含任何物件的背景影像並創建 Background Database。
  • Noisy Student with Mixed Data.

    • Mixed Data 這邊有兩種策略,一種方法是將 Instance Database 中的物件貼到 labeled images 上;另一種方法是將物件貼到來自 Background Database 的影像上。
    • 至於貼上的 instance 則是透過 2D BBOX 從來源影像剪下,為了避免過度遮擋和其他不合理的情況,這邊還執行了 2D BBOX collision test 來刪除不合理的影像合併操作。
  • 這邊還提出幾種 Strong data augmentation 來避免已知可能發生的 bias 情況,這幾種方法都對結果有強大的幫助:

    1. Border Cut (B): 在貼上之前對水平跟垂直的邊界取一個 random ratio (0-0.3)
    2. Color Padding(C): 相似於 Border Cut,但是取代 cutting 的部分轉由顏色 padding 上去。
    3. Mixup(M): 對於前景 instance 和背景做一個加權平均,random ratio (0.6-1.0)

    Image Not Showing Possible Reasons
    • The image was uploaded to a note which you don't have access to
    • The note which the image was originally uploaded to has been deleted
    Learn More →

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →
    Visualization of box-level strong augmentations
    從左到有分別是原圖貼上、border cut、color padding、mixup 還有混合前面三種的方法。

  • 假設要訓練這些包含人類 labeled 的跟 Pseudo-label 的 mixed image,最小化聯合的 loss 可以表示為:

    L=Ls+λ×Lu
    其中
    L
    是總 loss,並使用超參數
    λ
    來控制 supervised
    Ls
    跟 unsupervised
    Lu
    的權重比例

  • Supervised Loss

    Ls 裡面包含了 classification loss
    Lcls
    還有 regression loss
    Lreg
    :
    Ls=L1Nli(Lcls(bli)+Lreg(bli))

    其中
    L
    代表 labeled image 的 index,
    Nl
    代表每張影像人類所標記的 label 數量,
    bli
    代表在第
    L
    張影像的第
    i
    個 label。

  • Unsupervised loss

    Lu 針對裡面的 pseudo labels 可以被表示為:
    Lu=L1Nui(Lcls(bui)+Lreg(bui)+B1Nui(Lcls(bui)+Lreg(bui))

    B
    指的是背景影像的 index,
    Nu
    是 pseudo label 的數量,
    bui
    是指第
    i
    個 label 在背景影像或 labeled 影像。

Uncertainty-based Filter

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
MonoFlex 在 KITTI validation set 上面的預測統計
(a) ground truth box 跟分類分數的 3D IoU 關係圖
(b) 3D IOU 跟位置不確定性之間的關係圖

  • 如上圖所示,分類分數和 bbox 的定位準確率之間存在不一致型,如果使用 pseudo label 並基於基於信心分數的過濾器進行區分時,會有大量不正確的 pseudo label 被用於半監督訓練,這反而會加強 confirmation bias。

  • 假設有

    N 個不同參數的同構模型對同個影像做預測時,對於該影像上的某個物件,將會有
    M
    個預測值,本文會從 2 點來定義定位不確定性:

    1. 與該物件相關的預測值
      M
    2. 這些預測框之間的差異

    預測數

    M 反映了
    N
    個模型中漏檢的程度,候選框的差異代表了模型預測的隨機性。

  • Uncertainty 計算方式如下:

    1. 全部
      N
      個模型的預測值會被儲存在
      B
      list 裡面
    2. G
      被使用來儲存 box 的集合,每個集合代表來自
      N
      個模型的特定物件預測;
      H
      代表每個集合中分數最高的 box;
      U
      保存
      H
      中每個 box 的定位不確定性。
    3. 跑過所有在
      B
      list 裏面的所有框,找到屬於當前 cluster
      C
      的匹配框,匹配條件定義為在
      IoU3D>thr
      的條件下與 cluster
      C
      的初始框
      bm
      有較大重疊的 box,所有匹配的 box 都會從
      B
      list 移動到 cluster
      C
      ,然後將當前 cluster
      C
      更新到
      G
      list。
    4. 如果在列表
      B
      中仍然有未處理完的 box,選擇在
      B
      list 中有最大分數的
      bm
      移動到
      H
      list,然後用 box
      bm
      初始化一個新的
      C
      集合,然後再回到第 3 步繼續執行。
    5. B
      中所有的 box 都被執行完成,就開始計算
      G
      list 中的每個 box cluster
      C
      的 Uncertainty
      u
      ,結果會被加到
      U
      list 中:
      u=uncertain(C)=
      1i=0Mj=0Maij×IoU3D(bi,bj)i=0Nj=0Naij
      aij={1     if   ijβ     if   i=j
      • 其中
        M
        是 cluster
        C
        中 boxes 的數量
      • N
        定義為模型的數量
      • bi
        是在 cluster
        C
        i
        個 box
      • aij
        代表權重
      • β
        是 hyper-parameter 是用來控制有多少候選 box 來影響 uncertainty
  • Uncertainty

    u 的範圍訂在 0~1 之間,當數值是 0 代表在
    N
    (M=N) 個模型中沒有任何 miss-detection,而且所有
    N
    的候選框有完美一致性;如果
    u
    值是 1,也就意味著全部模型預測這個物件都失敗。

Experiments

Dataset and Metrics

  • KITTI 資料集提供了 15K frames 標記數據還有 48K 未標記的影像。
  • KITTI 包含 7,481 個用於訓練的影像和 7,518 個用於測試的影像。
  • 訓練集進一步分為 3,712 個訓練樣本和 3,769 個驗證樣本。
  • 48K 的未標記影像用作半監督訓練的未標記數據。
  • 本文使用 Car、Pedestrian 和 Cyclist 的 3D 和鳥瞰 (BEV) 物件偵測的 Average Precision 作為指標。
  • 驗證集和測試集的所有評估結果均基於
    AP40
    ,而不是原始的 11 點插值 AP。

Implement Details

  • 使用 MonoFlex 跟 GUPNet 作為兩個 baseline 偵測器。
  • 定位 Uncertainty 數值主要計算在不同 rounds 的 5 個模型中。
  • 在 pseudo label 過程中,只有 Confidence Score 大於 0.7 且定位 Uncertainty 小於 0.25 的預測才會被添加到 instance DB 中。
  • 並且收集未檢測到任何物件的影像會被拿來建立背景 DB。
  • 在 Student Model 的參數初始化會用上一個 Teacher Model 的參數來初始化。
  • 從背景 DB 中選擇的影像與標記影像之間的機率為 42%。
  • 對於 box-level 的 Strong Data Augmentation 方法,其中對每個 instance image 合併時採用 mixup,border cut 還有 color padding 的機率則為 50%。
  • 設置超參數
    λ=1.0
    ,按照多重訓練方案,對所有實驗進行 3 個 cycles 的半監督式訓練。

Quantitative Results

Comparison with Fully-supervised Baselines.

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
在不同比例下訓練集訓練之後在 KITTI val set
AP3D/APBEV(IoU=0.7)|R40
的 Quantitative results

  • Abs. Imp 代表提升了多少的絕對值。
  • 上面的 % 代表用了多少比例的標記資料
  • 當僅使用 10% 的標記資料時,本文的方法比 MonoFlex 和 GUPNet baseline 在 Mod. 上獲得了約 +6.34% 和 +5.98% 的
    AP3D
    改進。

Results on KITTI Test Set.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
在 KITTI test 資料集 Car 類別的的結果

  • 粗體代表分數最高,底線代表第 2 高。
  • † 代表本文採用的 Baseline。
  • 這個表格是透過
    AP3D
    Mod. 來排序的。

Results on Pedestrian and Cyclist Categories.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Pedestrian 跟 Cyclist 在 KITTI test set 上的結果

  • Rel. Imp 代表相對改進的數值。

Ablation Studies

The Scale of Unlabeled Data & Background Database

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Ablation Study 在 Background DB 跟 Unlabled Data Scale 的比較

  • 從 24K 的 raw data 到使用 48k 的 raw data 在
    AP3D|R40
    提升了 1.66%。
  • 另外有加 Background DB 的資料也讓整體 Performance 都有提升

Box-level Data Augmentations.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Ablation Study 有關 box-level 的 Data Augmentation 影響。

  • B 代表 border cut
  • C 代表 color padding
  • M 代表 mixup

Confidence-based and Uncertainty-based Filters.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
2 種 filter 的 Ablation Study

  • Conf 代表使用 confidence 來做過濾
  • Unc 代表使用 Uncertainty-based 來做過濾

The Thresholds for Confidence-based and Uncertainty- based Filters.

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
不同的 Uncertainty 和 Confience 閾值的 Ablation Study

  • Conf 代表使用 confidence 來做過濾
  • Unc 代表使用 Uncertainty-based 來做過濾

Qualitative Analysis

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
在 KITTI val set 的 Qualitative results

  • 總共分為 6 組比較,每一組有四張圖片,左上角為 MonoFlex baseline,並且用藍色的 box 表示,左下角為它相對應的 bird’s-eye view;右上角為 Mix-Teaching 的方法,並用綠色 box 代表,右下角為相對應的 Bird’s-Eye view。
  • 在 Bird's-Eye view 裏面紅色 box 代表的是 Ground Truth
  • 這邊還用了虛線圓圈來表示不同的預測結果來且需要 highlight 的部分

Conclusion and Future Work

  • 提出 Mix-Teaching 針對 Monocular 3DOD 的半監督式學習方法
  • 一開始先對 unlabeled data 產出 pseudo label
  • 通過分解物件,在組合到影像裡的技術突破了影像的限制,可以有效地處理極低的 precision 和 recall 帶來的問題。
  • 透過 Uncertainty-based filter 能夠有效地過濾位置不佳的 pseudo labels 來減輕 confirmation bias。
  • 在實驗中也表明用上越多的 unlabeled data 可以幫助模型訓練得更好,對於自動駕駛具有巨大的經濟意義。
  • 本文目前還算是 multi-stage 的訓練方法,如果希望採用 end-to-end 的訓練方法還得留到 Future Wrok。