本文是論文《DeepAtlas: Joint Semi-Supervised Learning of Image Registration and Segmentation》的閱讀筆記。
文章第一個提出了一個圖像配準和圖像分割聯合學習的網絡模型 DeepAtlas,該模型實現了弱監督的圖像配準和半監督的圖像分割。在圖像配準時使用圖像的分割標籤作爲監督數據,如果沒有分割標籤,則通過分割網絡產生;而經過配準後的圖像增加了在圖像分割時可利用的訓練數據的量,相當於是一種數據增強。該模型不僅在分割和配準的精度上有所提升,並且還可以在訓練數據有限的情況下實現較好的效果。
一、記號
I m I_m I m :浮動圖像(moving image)
I t I_t I t :目標圖像(target image)
F R \mathcal{F}_R F R :配準網絡
θ r \theta_r θ r :配準網絡的參數
F S \mathcal{F}_S F S :分割網絡
θ s \theta_s θ s :分割網絡的參數
u = F R ( I m , I t ; θ r ) u=\mathcal{F}_R(I_m,I_t;\theta_r) u = F R ( I m , I t ; θ r ) :形變場
ϕ − 1 = u + i d \phi^{-1}=u+id ϕ − 1 = u + i d :形變圖,其中 i d id i d 是恆等變換
I m w = I m ∘ ϕ − 1 I_m^w=I_m\circ\phi^{-1} I m w = I m ∘ ϕ − 1 :配準後的圖像
S t S_t S t :目標圖像分割標籤
S m w = S m ∘ ϕ − 1 S_m^w=S_m\circ\phi^{-1} S m w = S m ∘ ϕ − 1 :配準後圖像分割標籤
二、網絡結構
DeepAtlas 的目的是當數據集中只有少量的分割標籤可用時,通過聯合訓練來讓分割和配準實現較高的精度。
網絡的結構如上圖所示,藍色的實線表示弱監督的配準,黃色虛線表示半監督的分割。
文章在附件中給出了分割網絡和配準網絡的具體結構,如下圖左右兩圖所示:
1. 配準網絡
配準網絡的損失主要有三個損失函數組成:配準正則損失 L r \mathcal{L}_r L r ,圖像相似度損失 L i \mathcal{L}_i L i 和解剖損失(分割相似度損失) L a \mathcal{L}_a L a 。配準正則損失 L r \mathcal{L}_r L r 可以讓形變場 ϕ \phi ϕ 變得光滑,圖像相似度損失 L i \mathcal{L}_i L i 用來評價浮動圖像 I m I_m I m 和配準後圖像 I m w I_m^w I m w 之間的相似度,解剖損失(分割相似度損失) L a \mathcal{L}_a L a 是目標圖像分割標籤 S t S_t S t 和配準後圖像分割標籤 S m w S_m^w S m w 之間的相似度損失。
如此一來,配準學習的過程可以由下式表示:
θ r ⋆ = argmin θ r { L i ( I m ∘ Φ − 1 , I t ) + λ r L r ( Φ − 1 ) + λ a L a ( S m ∘ Φ − 1 , S t ) }
\theta_{r}^{\star}=\underset{\theta_{r}}{\operatorname{argmin}}\left\{\mathcal{L}_{i}\left(I_{m} \circ \Phi^{-1}, I_{t}\right)+\lambda_{r} \mathcal{L}_{r}\left(\Phi^{-1}\right)+\lambda_{a} \mathcal{L}_{a}\left(S_{m} \circ \Phi^{-1}, S_{t}\right)\right\}
θ r ⋆ = θ r a r g m i n { L i ( I m ∘ Φ − 1 , I t ) + λ r L r ( Φ − 1 ) + λ a L a ( S m ∘ Φ − 1 , S t ) }
其中 λ r , λ a ≥ 0 \lambda_r,\lambda_a\geq0 λ r , λ a ≥ 0 。
2. 分割網絡
分割網絡的輸入是一張圖像 I I I ,輸出相應的分割結果 S ^ = F S ( I ; θ s ) \hat{S}=\mathcal{F}_S(I;\theta_s) S ^ = F S ( I ; θ s ) ,分割網絡的損失主要有兩個損失函數組成:解剖損失 L a \mathcal{L}_a L a 和有監督分割損失 L s p \mathcal{L}_{sp} L s p 。解剖損失和配準網絡中的相同,有監督的分割損失 L s p ( S ^ , S ) \mathcal{L}_{sp}(\hat{S},S) L s p ( S ^ , S ) 是分割網絡的分割結果 S ^ \hat{S} S ^ 和人工分割結果 S S S 之間的相似度損失。但是浮動圖像 I m I_m I m 和目標圖像 I t I_t I t 的分割標籤的存在情況有多種可能,所以相應的損失函數也存在以下四種情況:
{ L a = L a ( S m ∘ Φ − 1 , F S ( I t ) ) and L s p = L s p ( F S ( I m ) , S m ) , if I t is unlabeled; L a = L a ( F S ( I m ) ∘ Φ − 1 , S t ) and L s p = L s p ( F S ( I t ) , S t ) , if I m is unlabeled; L a = L a ( S m ∘ Φ − 1 , S t ) and L s p = L s p ( F S ( I m ) , S m ) , if I m and I t are labeled; L a = L s p = 0 , if both I t and I m are unlabeled.
\left\{\begin{array}{l}
\mathcal{L}_{a}=\mathcal{L}_{a}\left(S_{m} \circ \Phi^{-1}, \mathcal{F}_{\mathcal{S}}\left(I_{t}\right)\right) \text { and } \mathcal{L}_{s p}=\mathcal{L}_{s p}\left(\mathcal{F}_{\mathcal{S}}\left(I_{m}\right), S_{m}\right), \text { if } I_{t} \text { is unlabeled; } \\
\mathcal{L}_{a}=\mathcal{L}_{a}\left(\mathcal{F}_{\mathcal{S}}\left(I_{m}\right) \circ \Phi^{-1}, S_{t}\right) \text { and } \mathcal{L}_{s p}=\mathcal{L}_{s p}\left(\mathcal{F}_{\mathcal{S}}\left(I_{t}\right), S_{t}\right), \text { if } I_{m} \text { is unlabeled; } \\
\mathcal{L}_{a}=\mathcal{L}_{a}\left(S_{m} \circ \Phi^{-1}, S_{t}\right) \text { and } \mathcal{L}_{s p}=\mathcal{L}_{s p}\left(\mathcal{F}_{\mathcal{S}}\left(I_{m}\right), S_{m}\right), \text { if } I_{m} \text { and } I_{t} \text { are labeled; } \\
\mathcal{L}_{a}=\mathcal{L}_{s p}=0, \text { if both } I_{t} \text { and } I_{m} \text { are unlabeled. }
\end{array}\right.
⎩ ⎪ ⎪ ⎨ ⎪ ⎪ ⎧ L a = L a ( S m ∘ Φ − 1 , F S ( I t ) ) and L s p = L s p ( F S ( I m ) , S m ) , if I t is unlabeled; L a = L a ( F S ( I m ) ∘ Φ − 1 , S t ) and L s p = L s p ( F S ( I t ) , S t ) , if I m is unlabeled; L a = L a ( S m ∘ Φ − 1 , S t ) and L s p = L s p ( F S ( I m ) , S m ) , if I m and I t are labeled; L a = L s p = 0 , if both I t and I m are unlabeled.
分割的學習過程可以由下式表示:
θ s ⋆ = argmin θ s ( λ a L a + λ s p L s p ) , λ a , λ s p ≥ 0
\theta_{s}^{\star}=\underset{\theta_{s}}{\operatorname{argmin}}\left(\lambda_{a} \mathcal{L}_{a}+\lambda_{s p} \mathcal{L}_{s p}\right), \quad \lambda_{a}, \lambda_{s p} \geq 0
θ s ⋆ = θ s a r g m i n ( λ a L a + λ s p L s p ) , λ a , λ s p ≥ 0
三、實施細節
解剖相似度損失 L a \mathcal{L}_{a} L a 和有監督的分割損失 L s p \mathcal{L}_{sp} L s p 採用的是 soft multi-class Dice loss:
L dice ( S , S ⋆ ) = 1 − 1 K ∑ k = 1 K ∑ x S k ( x ) S k ⋆ ( x ) ∑ x S k ( x ) + ∑ x S k ⋆ ( x )
\mathcal{L}_{\text {dice}}\left(S, S^{\star}\right)=1-\frac{1}{K} \sum_{k=1}^{K} \frac{\sum_{x} S_{k}(x) S_{k}^{\star}(x)}{\sum_{x} S_{k}(x)+\sum_{x} S_{k}^{\star}(x)}
L dice ( S , S ⋆ ) = 1 − K 1 k = 1 ∑ K ∑ x S k ( x ) + ∑ x S k ⋆ ( x ) ∑ x S k ( x ) S k ⋆ ( x )
其中 k k k 表示分割標籤的下標,x x x 是體素位置,S S S 和 S ∗ S^* S ∗ 是兩個要比較的分割標籤。
圖像相似度損失 L i \mathcal{L}_i L i 採用的是正則化的互相關(NCC):
L i ( I m w , I t ) = 1 − N C C ( I m w , I t )
\mathcal{L}_{i}\left(I_{m}^{w}, I_{t}\right)=1-N C C\left(I_{m}^{w}, I_{t}\right)
L i ( I m w , I t ) = 1 − N C C ( I m w , I t )
配準正則損失 L r \mathcal{L}_r L r 採用的是彎曲能(bending energy):
L r ( u ) = 1 N ∑ x ∑ i = 1 d ∥ H ( u i ( x ) ) ∥ F 2
\mathcal{L}_{r}(\mathbf{u})=\frac{1}{N} \sum_{\mathbf{x}} \sum_{i=1}^{d}\left\|H\left(u_{i}(\mathbf{x})\right)\right\|_{F}^{2}
L r ( u ) = N 1 x ∑ i = 1 ∑ d ∥ H ( u i ( x ) ) ∥ F 2
其中 ∣ ∣ ⋅ ∣ ∣ F ||\cdot||_F ∣ ∣ ⋅ ∣ ∣ F 表示弗羅貝尼烏斯範數(Frobenius norm),H ( u i ( x ) ) H(u_i(x)) H ( u i ( x ) ) 是第 i i i 個成分 u ( x ) u(x) u ( x ) 的 Hessian 矩陣,d d d 表示維度,N N N 表示體素數。
在訓練時,會交替的訓練分割網絡和配準網絡,當一個網絡在訓練時,另一個網絡的參數保持不變,並且是每訓練配準網絡20次才訓練分割網絡1次,這是因爲分割網絡更容易收斂。
四、實驗結果