劉 俠,甘 權,李 冰,劉 曉,王 波
融合加權隨機森林的自動3D椎骨CT圖像主動輪廓分割方法
劉 俠,甘 權,李 冰,劉 曉,王 波*
哈爾濱理工大學自動化學院,黑龍江 哈爾濱 150080
為了解決CT圖像主動輪廓分割方法對初始輪廓的敏感和分割不準確的問題,本文提出一種融合加權隨機森林的自動3D椎骨CT主動輪廓分割方法WRF-AC。該方法提出加權隨機森林算法和包含邊緣能量的主動輪廓能量函數。首先,通過提取椎骨CT的3D Haar-like特征值訓練加權隨機森林獲得的椎骨中心作為分割的初始輪廓,然后,求解包含邊緣能量的主動輪廓能量函數最小值完成椎骨CT圖像的分割。實驗結果表明,本方法在相同數據集上能夠更加準確、快速地分割脊柱CT圖像提取椎骨部分。
3D分割;CT圖像;加權隨機森林;主動輪廓
醫(yī)學圖像分割已廣泛應用于醫(yī)學影像診斷技術,并成為臨床治療不可缺少的手段之一[1]?,F代醫(yī)學中使用計算機處理分析脊柱CT圖像已經成為一個重要的研究方向,并有十分重要的臨床實際應用價值。由于椎體結構復雜,差異較小,人們很難精確地提取椎體感興趣區(qū)域[2]。
在早期的工作中,自適應閾值處理、區(qū)域生長和邊界調整等無監(jiān)督圖像處理方法應用于圖像分割[3],但是準確度較低。在之后的工作中,相關研究人員將改進的水平集框架和分水嶺分割方法[4-6]用于椎骨CT圖像分割,這些方法雖然對CT圖像分割達到了一定的分割精度,但需要手動輔助不具有普適性。隨著機器學習等算法的發(fā)展,一些學者將隨機森林算法用于圖像定位分割[7-9],這些方法不能準確分割興趣區(qū)域,有較大誤差?,F今學者們提出許多基于輪廓模型和形狀模型的分割方法[10-12]用于椎骨CT圖像的分割。后續(xù)研究人員將模糊理論融入主動輪廓模型中并提出基于模糊能量的主動輪廓模型[13-15],此模型對噪聲和初始輪廓不敏感可以實現快速收斂,但不能正確分割灰度不均勻圖像。在之前的研究中我們嘗試直接手動設置初始輪廓,構造交互式半自動分割方案,但是由于人體脊柱的椎骨數量較多且形狀相似,手動設置初始輪廓點需要有一定的醫(yī)學基礎,并需要消耗大量的時間。因此,提出一種三維空間內的全自動椎骨CT圖像分割方法十分必要。由于上述方法大多數針對二維區(qū)域進行圖像分割,不能充分利用CT圖像的三維空間信息,并且大多數需要根據期望區(qū)域對原始模型進行手動修改,這樣做不僅耗費人力且耗時巨大。
針對上述問題,本文提出加權隨機森林算法解決初始輪廓選取的問題;為了能夠更好地突出圖像的邊緣信息,本文提出包含邊緣能量的主動輪廓能量函數。通過提取椎骨CT的3D Haar-like特征值訓練加權隨機森林獲得的椎骨中心并作為分割的初始輪廓位置,求解包含邊緣能量的主動輪廓能量函數最小值完成椎骨CT圖像的三維分割。實驗結果與對比表明,本文方法不僅能夠快速準確地分割健康椎骨CT圖像,并且能夠高效地分割患病椎骨CT圖像。
3D Haar-like[16]特征能在完整描述輸入數據的同時提供良好的泛化能力,可充分利用椎骨CT圖像的三維特征信息。選取合適的分割初始輪廓其本質是椎骨中心點的選取問題,利用提取的圖像特征,隨機回歸森林能在三維區(qū)域內定位椎骨中心候選點,并結合隨機分類森林去除假椎骨中心候選點,準確地找到椎骨中心。將3D主動輪廓分割的初始輪廓置于椎骨中心,解決了手動選取初始輪廓的問題和初始輪廓選取不佳導致分割效果不佳的問題。通過定義求解聯(lián)合邊緣能量的主動輪廓能量函數最小值完成分割,解決了主動輪廓分割不能準確分割椎骨邊緣的問題。本文的流程圖如圖1所示。
在提取圖像3D Haar-like特征時,為加快計算用式(1)計算積分圖,用式(2)計算引用位置強度的和差值sum。
圖1 本文的流程圖
本文除了在原始CT圖像中提取特征之外,在橫斷面、矢狀面、冠狀面3個方向上提取梯度特征,這樣每個體素就得到了4個特征,分別對體素單元使用[2,2,2]、[4,4,4]和[8,8,8]盒過濾器[17],盒過濾器(box filter)的響應作為CT圖像中單個體素的3D Haar-like特征值,最終獲得一個48維的特征來表示每個體素。
隨機決策森林(Random decision forests)是根據決策樹算法,由Breiman[18]提出的利用多棵決策樹對樣本進行訓練并預測的一種分類器。根據應用目的的不同,隨機森林分為分類森林和回歸森林,分類森林與回歸森林在決策樹每個節(jié)點的判別原理上是基本相似的,只是葉子節(jié)點的輸出原理不同[19]。
本文中利用隨機回歸森林得到椎骨中心候選點,通過Mean-shift算法對候選點進行聚類操作,減少候選點個數,利用隨機分類森林去除非椎骨區(qū)域候選點,最終建立3D距離圖譜,選取距離最小的點作為椎骨中心點。
定義為
通過求解式(4)的最小值,使輪廓曲線收斂在圖像的最大梯度點,而圖像的最大梯度一般在目標的邊緣處取得,也即檢測出了目標的邊緣。
3.2.1 加權隨機森林
隨機森林算法中樣本特征相對集中,不同特征對結果的影響會有很大差異,導致有些決策樹對結果有很大影響,而有些決策樹則不會產生顯著的影響結果。不同決策樹選擇不同訓練樣本特征,導致不同決策樹的性能不同。為了提高決策樹的性能,有必要改進決策樹在隨機森林中所占權重。為此,本文對傳統(tǒng)隨機森林決策樹的權重進行改進權衡。加權投票時,如果權重合理,可以提高隨機森林的分類回歸效果,但如果權重不適合則會導致數據過擬合,降低決策效果。因此隨機森林中決策樹的性能越好,其權重應越高。本文由后驗概率結果表示的決策樹可靠性,分別提出改進的加權隨機森林算法。
本文提出隨機分類森林權重公式為
同理,隨機回歸森林權重公式為
本文提出的加權參數均滿足歸一化:
會計的職業(yè)道德建設是一項長期的、艱苦的實踐活動,任重而道遠,要靠我們每個會計人員的不懈努力。有道是:“人無信不立,國無信不強”,只有進一步加強會計職業(yè)道德建設,全面提升會計從業(yè)人員的道德素質,牢固樹立良好的職業(yè)道德,讓“誠實守信”這一道德規(guī)范深深植根于每個會計人員的心中,我國的會計職業(yè)道德水平才會躍上一個新的臺階。
3.2.2 3D邊緣能量的主動輪廓分割
由于本文方法第一次進行樣本訓練需要一定的時間,在之后的測試集實際應用中不需要再次訓練模型,為了減少訓練時間,本文在以下幾個方面做出改進:
1) 為加快運算,將權重小于0.005的樹權重賦值為0,剩余權重按比例重新賦值,減少決策樹數量;
4) 為了能更準確找出中心點位置,選擇回歸后的距離圖譜中值最小的150個點進行Mean-shift聚類得到更準確的椎骨中心點的候選點。
綜上所述,本文提出的融合加權隨機森林的自動3D椎骨CT圖像主動輪廓分割方法具體實現步驟如下。
步驟1:導入訓練集后,提取圖像特征向量,構建隨機森林并初始化參數;
步驟2:訓練隨機森林,根據式(6)、式(7)進行加權運算,將權重小于0.005的樹權重重新賦值為0,其余權重按比例重新賦值;
步驟3:重復步驟2,直至到達預定迭代次數,輸出椎骨中心點位置;
步驟4:根據式(10)、式(11)定義聯(lián)合邊緣能量的主動輪廓分割能量函數,并初始化參數;
步驟5:以隨機森林輸出的中心點為初始輪廓中心構造初始輪廓球;
步驟6:使用梯度下降法根據式(12)更新距離符號函數S ;
本文分割方法在公開的CT數據集上進行評估,本文數據來源于Forsberg[24]與Hammernik[25]實驗所用數據集,CSI(Collaborative Platform for Research on Spine Imaging and Image Analysis)挑戰(zhàn)提供發(fā)布于Spine Web網站(http://spineweb.digitalimaginggroup.ca /spineweb/index.php?n=Main.Datasets)上,該數據共20組CT圖像(包括健康椎骨和患病椎骨),總計10991張切片圖像,數據集覆蓋整個胸椎和腰椎,沒有靜脈對比。本文椎骨分割算法實驗環(huán)境為Intel(R) Core(TM) 3.4 GHz CPU,32 GB RAM,4 GHz GPU,Caffe,Matlab R2016b。我們用ITK和VTK工具包結合Python語言編程實現分割結果可視化。為使圖像強度大致在相同的范圍之內,通過調整窗寬/窗位對圖像進行歸一化處理。
本文從分割常用指標DC(Dice coeffcient,用DC表示)、ASD(absolute surface distance,用ASD表示)、正確分類率(CCR,簡寫為CCR)和Jaccard[26]對本文提出的方法進行評估和對比,其定義如下:
圖3 椎骨中心及初始輪廓
4.3.1 初始輪廓選取
本文使用均值漂移聚類來找到具有最高回歸概率的150個點中的中心候選點,通過隨機分類森林去除非椎骨點,將候選點中概率最大的點確定為椎骨中心點,建立一個三維距離圖,圖2(a)給出了第4節(jié)腰椎的回歸點及其中心點;圖2(b)顯示了回歸森林得到的回歸點,藍色點為Mean-shift聚類中心,經過隨機分類森林去除非椎骨區(qū)域的點為椎骨中心候選點,黃色點為隨機森林最終選定的椎骨中心點,紅色點為專家標記中心點。
為了避免分割時陷入局部能量極小值,將初始輪廓球置于隨機森林選取的中心點位置,設定曲線由內向外演化,如圖3所示。圖3(a)為健康椎骨的中心點(黃色圓點)及初始輪廓球(白色圓圈),圖3(b)對應為患病椎骨的中心點及初始輪廓球。
4.3.2 初始輪廓和邊緣能量
如圖4所示,從左到右、從上到下依次為CT原始圖像(a)、無邊緣能量主動輪廓分割的任意初始輪廓(b)、邊緣能量主動輪廓分割的任意初始輪廓(c)、無邊緣能量主動輪廓分割(weighted random forest,WRF)初始輪廓(d)、WRF-EAC(weighted random forest-active contour)分割(e)和通過后操作平滑邊界最終分割的結果(f)。初始輪廓分割不能將椎骨區(qū)域和目標外部區(qū)域正確地分割。隨機森林位置的主動輪廓分割產生分割缺陷和過分割。與前三種方法相比,該方法可以提供椎骨的準確分割。
圖4 控制變量實驗分割結果
分割效果的定量表征結果如表1所示。不同方法對于多個椎骨的分割結果如圖5所示,第一行是任意初始輪廓和非邊緣能量項方法的分割結果。該方法不能完成CT圖像的器官分割。第二是任意初始輪廓和邊緣能量項方法的分割結果。該方法可以找到準確的器官輪廓并完成分割,并且一些非器官部分也被分割是不夠的。第三行是權重RF初始輪廓和非邊緣能量項方法的分割結果。但是沒有足夠的細分和過度細分。第四行是本文的分割結果,該方法可以準確地分割目標區(qū)域并正確分割目標區(qū)域,分割結果最佳。
表1 定量實驗分割結果
圖5 分析實驗分割結果
為了便于比較,將脊柱分成三個區(qū)段(T1~T6,T7~T12和L1~L5)并計算分割的DC和ASD系數。本文的脊柱CT分割方法對健康和患病的椎骨具有良好的分割效果,具體系數對比結果如圖6所示,分割效果的各評價指標如表2所示。由于健康椎骨的形狀和形狀差異較小,患病椎體的差異顯著,健康椎骨分割的結果明顯優(yōu)于患病椎骨的分割結果。胸椎的尺寸和骨密度小于腰椎的尺寸和骨密度,肋骨關節(jié)和周圍結構的成像更復雜。這些原因導致腰椎分割的結果優(yōu)于胸椎分割。圖7為10例健康和10例非健康椎體的CT數據分割結果的DC系數和ASD系數。無論DC系數或ASD系數如何,健康的椎骨分割結果明顯優(yōu)于患病的椎骨分割結果。DC系數越大,分割結果的ASD系數越低,反之亦然。
如圖8所示,第一行是健康椎體CT的橫斷面分割結果(a);第二行是患病椎體患病部位的橫斷面分割結果(b);第三行是整個椎骨表面的水平分割結果(c);第四行是對應于患者椎骨的分割結果(d)。將椎骨分割結果(紅色部分)放在專家手動分割數據(白色部分)和原始CT數據上,第五行是椎骨的部分矢狀切面(e),第六行是整個椎骨冠狀面的分割結果(f)。
圖6 DC和ASD統(tǒng)計結果
圖7 20例DC系數和ASD系數
表2 分割結果各評價指標
表3 分割結果的DC系數比較
圖8 方法分割結果
圖9 本文方法與其他方法之間分割效果的比較
為了能夠更直觀的觀察椎體的分割效果,用VTK對脊柱分割結果進行三維重建如圖10所示。圖10(a)為健康椎骨分割結果三維重建圖,圖10(b)為患病椎骨分割結果三維重建圖。
圖10 椎骨三維重建可視化效果
實驗結果表明,本文提出的融合加權隨機森林的3D椎骨CT圖像主動輪廓分割方法平均分割準確率能達到92%以上,雖然第一次進行樣本訓練需要一定的時間,但在之后的測試集實際應用中不需要再次訓練模型,本文提出的分割方法能夠幫助臨床醫(yī)生快速、高效地進行診斷治療。本文方法存在一定的優(yōu)勢:自動定位椎骨中心并準確分割椎骨區(qū)域;脊柱CT圖像易于獲取,利用本文提出的分割模型,進行椎骨區(qū)域分割,結合后續(xù)的三維重建、3D打印工作易于幫助臨床應用、治療。由于椎骨CT數據較難收集,在之后的研究中需要補充更多分割數據進行模型訓練,提高分割模型的分割準確率,實現脊柱的多級分割。
[1] Roth H R, Farag A, Lu L,. Deep convolutional networks for pancreas segmentation in CT imaging[J]., 2015, 9413: 94131G.
[2] Glocker B, Feulner J, Criminisi A,. Automatic localization and identification of vertebrae in arbitrary field-of-view CT scans[M]//Ayache N, Delingette H, Golland P,.. Berlin Heidelberg: Springer, 2012: 590–598.
[3] Kang Y, Engelke K, Kalender W A. A new accurate and precise 3-D segmentation method for skeletal structures in volumetric CT data[J]., 2003, 22(5): 586–598.
[4] Lim P H, Bagci U, Bai L. Introducing Willmore flow into level set segmentation of spinal vertebrae[J]., 2013, 60(1): 115–122.
[5] Huang J Y, Jian F Z, Wu H,. An improved level set method for vertebra CT image segmentation[J]., 2013, 12: 48.
[6] Tang L M, Tian X Q, Huang D R,Image segmentation model combined with FCMS and variational level set[J]., 2014, 40(6): 1233–1248.
唐利明, 田學全, 黃大榮, 等. 結合FCMS與變分水平集的圖像分割模型[J]. 自動化學報, 2014, 40(6): 1233–1248.
[7] Criminisi A, Shotton J, Robertson D,. Regression forests for efficient anatomy detection and localization in CT studies[M]//Menze B, Langs G, Tu Z W,.. Berlin Heidelberg: Springer, 2010: 106–117.
[8] Criminisi A, Robertson D, Konukoglu E,. Regression forests for efficient anatomy detection and localization in computed tomography scans[J]., 2013, 17(8): 1293–1303.
[9] Cuingnet R, Prevost R, Lesage D,. Automatic detection and segmentation of kidneys in 3D CT images using random forests[M]//Ayache N, Delingette H, Golland P,.Berlin Heidelberg: Springer, 2012: 66–74.
[10] Klinder T, Ostermann J, Ehm M,. Automated model-based vertebra detection, identification, and segmentation in CT images[J]., 2009, 13(3): 471–482.
[11] Huang S H, Chu Y H, Lai S H,. Learning-based vertebra detection and iterative normalized-cut segmentation for spinal MRI[J]., 2009, 28(10): 1595–1605.
[12] Roberts M G, Cootes T F, Pacheco E,. Segmentation of lumbar vertebrae using part-based graphs and active appearance models[M]//Yang G Z, Hawkes D, Rueckert D,.. Berlin Heidelberg: Springer, 2009: 1017–1024.
[13] Chen K, Li B, Tian L F. A segmentation algorithm of pulmonary nodules using active contour model based on fuzzy speed function[J]., 2013, 39(8): 1257–1264.
陳侃, 李彬, 田聯(lián)房. 基于模糊速度函數的活動輪廓模型的肺結節(jié)分割[J]. 自動化學報, 2013, 39(8): 1257–1264.
[14] Thieu Q T, Luong M, Rocchisani J M,. E?cient segmentation with the convex local-global fuzzy Gaussian distribution active contour for medical applications[J]., 2015, 75(1–2): 249–266.
[15] Sun W Y, Dong E Q, Cao Z L,A robust local segmentation method based on fuzzy-energy based active contour[J]., 2017, 43(4): 611–621.
孫文燕, 董恩清, 曹祝樓, 等. 一種基于模糊主動輪廓的魯棒局部分割方法[J]. 自動化學報, 2017, 43(4): 611–621.
[16] Viola P, Jones M J. Robust real-time face detection[J]., 2004, 57(2): 137–154.
[17] Tu Z W, Zhou X S, Bogoni L,. Probabilistic 3D polyp detection in CT images: the role of sample alignment[C]//, New York, 2006: 1544–1551.
[18] Breiman L. Random forests[J]., 2001, 45: 5–32.
[19] Li X H. Using “random forest” for classification and regression[J]., 2013, 50(4): 1190–1197.
李欣海. 隨機森林模型在分類與回歸分析中的應用[J]. 應用昆蟲學報, 2013, 50(4): 1190–1197.
[20] Kass M, Witkin A, Terzopoulos D. Snake: active contour models[J]., 1988, 1(4): 321–331.
[21] Malladi R, Sethian J A, Vemuri B C. Shape modeling with front propagation: a level set approach[J]., 1995, 17(2): 158–175.
[22] Hajiaghayi M, Groves E M, Jafarkhani H,. A 3-D active contour method for automated segmentation of the left ventricle from magnetic resonance images[J]., 2017, 64(1): 134–144.
[23] Osher S, Fedkiw R, Piechor K. Level set methods and dynamic implicit surfaces[J]., 2004, 57(3): B15.
[24] Forsberg D. Atlas-based segmentation of the thoracic and lumbar vertebrae[M]//Yao J H, Glocker B, Klinder T,.Cham: Springer, 2015: 215–220.
[25] Hammernik K, Ebner T, Stern D,. Vertebrae segmentation in 3D CT Images based on a variational framework[M]// Yao J H, Glocker B, Klinder T,.Cham: Springer, 2015: 227–233.
[26] Dice L R. Measures of the amount of ecologic association between species[J]., 1945, 26(3): 297–302.
[27] Castro-Mateos I, Pozo J M, Lazary A,. 3D vertebra segmentation by feature selection active shape model[M]//Yao J H, Glocker B, Klinder T,.. Cham: Springer, 2015: 241–245.
Automatic 3D vertebrae CT image active contour segmentation method based on weighted random forest
Liu Xia, Gan Quan, Li Bing, Liu Xiao, Wang Bo*
School of Automation, Harbin University of Science and Technology, Harbin, Heilongjiang 150080, China
Random forest center point positioning. (a) 3D distance map; (b) Regression points obtained by regression forest
Overview:Medical image segmentation has been widely used in medical image diagnosis technology and has become one of the indispensable means of clinical treatment. The use of computer processing to analyze spine CT images in modern medicine has become an important research direction, and has very important clinical application values. Due to the complicated structure of the vertebral body and the small difference, it is difficult for people to accurately extract the vertebral body of interest. In previous studies, we tried to manually set the initial contour directly to construct an interactive semi-automatic segmentation scheme. However, due to a large number of vertebrae in the human spine and the similar shape of the vertebrae, the manual setting of initial contour points requires a certain medical foundation and consumes much time. In order to solve the problems of sensitive initial contours and inaccurate segmentation caused by active contour segmentation of CT images, this paper proposes an automatic 3D vertebral CT active contour segmentation method combined weighted random forest called “WRF-AC”. This method proposes a weighted random forest algorithm and an active contour energy function that includes edge energy. First, the weighted random forest is trained by extracting 3D Haar-like feature values of the vertebra CT, and the ‘vertebra center’ obtained is used as the initial contour of the segmentation. Then, the segmentation of the vertebra CT image is completed by solving the active contour energy function minimum containing the edge energy. The experimental results show that this method can segment the spine CT images more accurately and quickly on the same datasets to extract the vertebrae. Experimental results show that the average segmentation accuracy of the active contour segmentation method of 3D vertebra CT image fusion weighted random forest proposed in this paper can reach more than 92%. This method has certain advantages: it can automatically locate the center of the vertebrae and accurately segment the vertebral area; it is easy to obtain CT images of the spine, using the segmentation model proposed in this paper to segment the vertebral area, and combining the subsequent 3D reconstruction and 3D printing can easily help clinical applications and treatment. Due to the difficulty in collecting CT data of vertebrae, it is necessary to add more segmentation data for model training in the subsequent research to improve the segmentation accuracy of the segmentation model and achieve multi-level segmentation of the spine.
Citation: Liu X, Gan Q, Li B,. Automatic 3D vertebrae CT image active contour segmentation method based on weighted random forest[J]., 2020,47(12): 200002
* E-mail: hust_wb@126.com
Automatic 3D vertebrae CT image active contour segmentation method based on weighted random forest
Liu Xia, Gan Quan, Li Bing, Liu Xiao, Wang Bo*
School of Automation, Harbin University of Science and Technology, Harbin, Heilongjiang 150080, China
In order to solve the problems of sensitive initial contours and inaccurate segmentation caused by active contour segmentation of CT images, this paper proposes an automatic 3D vertebral CT active contour segmentation method combined weighted random forest called “WRF-AC”. This method proposes a weighted random forest algorithm and an active contour energy function that includes edge energy. First, the weighted random forest is trained by extracting 3D Haar-like feature values of the vertebra CT, and the 'vertebra center' obtained is used as the initial contour of the segmentation. Then, the segmentation of the vertebra CT image is completed by solving the active contour energy function minimum containing the edge energy. The experimental results show that this method can segment the spine CT images more accurately and quickly on the same datasets to extract the vertebrae.
3D segmentation; CT images; weighted random forest; active contour
National Natural Science Foundation of China (61172167) and Natural Science Foundation of Heilongjiang Province (QC2017076)
10.12086/oee.2020.200002
TP391.4
A
劉俠,甘權,李冰,等. 融合加權隨機森林的自動3D椎骨CT圖像主動輪廓分割方法[J]. 光電工程,2020,47(12): 200002
: Liu X, Gan Q, Li B,Automatic 3D vertebrae CT image active contour segmentation method based on weighted random forest[J]., 2020, 47(12): 200002
2020-01-02;
2020-04-16基金項目:國家自然科學基金資助項目(61172167);黑龍江省自然科學基金資助項目(QC2017076)
劉俠(1975-),男,博士,教授,碩士生導師,主要從事模式識別,圖像處理的研究。E-mail:liuxia@hrbust.edu.cn
王波(1982-),男,博士,副教授,碩士生導師,主要從事模式識別,機器學習,醫(yī)學影像分析與處理,自然語言處理等的研究。E-mail:hust_wb@126.com