Share
Embed
RSNA 2023 Abdominal Trauma Detection 反省会
Kaggle Competition "RSNA 2023 Abdominal Trauma Detection" の自チームのソリューション解説およびトップソリューションの紹介
yu4u
October 24, 2023
Transcript
33 slides
-
AI 2 ▪CTスキャン画像から、臓器の損傷有無・レベルを推定 ▪対象 ▪Liver(肝臓), spleen(脾臓), kidney(腎臓), bowel(腸) ▪Bowelは食道とかも入っている (which
combined esophagus, stomach, duodenum, small bowel and colon) ▪Extravasation(血管外漏出) ▪Liver, spleen, kidneyはhealthy, low, highの3レベル ▪Bowel, extravasationはhealthy, injuryの2レベル タスク -
AI 3 ▪Weighted log loss ▪1 for all healthy labels.
▪2 for low grade solid organ injuries (liver, spleen, kidney). ▪4 for high grade solid organ injuries. ▪2 for bowel injuries. ▪6 for extravasation. ▪6 for the auto-generated any_injury label. ▪Any_injuryは maxorgan 1-healthy から自動計算される メトリック -
AI 4 ▪train.csv ▪[bowel/extravasation]_[healthy/injury] - The two injury types with
binary targets. ▪[kidney/liver/spleen]_[healthy/low/high] - The three injury types with three target levels. ▪[train/test]_images/[patient_id]/[series_id]/[image_instance_n umber].dcm ▪CTスキャン画像(voxel)。1 patientにつき1 or 2 study ▪image_level_labels.csv ▪Bowel, extravasation injuryに関する画像レベルのラベル ▪segmentations ▪Liver, spleen, left kidney, right kidney, bowelのセグメンテーションラベル。 206ファイルだけ データ -
AI 5 ▪Image levelのラベルに追加してextravasationのbboxが 参加者から公開された ▪Disclaimer: I am not yet
a board-certified radiologist. I am a US radiology resident at the beginning of my 3rd year of residency. However, I am confident that I correctly identified the finding in >95% of images. Active Extravasation Bounding Boxes https://www.kaggle.com/competitions/rsna-2023-abdominal-trauma-detection/discussion/441402 -
AI 7 10th Place Solution - Overview C1 Segmentation Crop
Liver Model C1 C1 C1 Liver Spleen Kidney Bowel Spleen Model Kidney Model Bowel Model Bowel + Extravasation Models (tattaka’s part) Stacking Model -
AI 8 ▪Voxel全体を128x128x128にリサイズしてsegmentation ▪Model ▪RSNA2022でも少量のラベルでオーバーフィットせず segmentationができたので同様に3D segmentationを採用 ▪去年の1st solutionは2D segmentationを利用していた
▪3D SwinUNETR from MONAIが良かった ▪去年はResNet + Unetを使った ▪Augmentation ▪RandAffined Segmentation Model -
AI 9 ▪2.5D + bi-LSTM + GAP ▪EfffientnetV2-sしか手なづけられなかった ▪Segmentation結果の外接矩形でcrop、resizeして入力 ▪3sliceずつoverlapさせながら2D
CNNに入力 ▪3D Convで上記のサンプリングは実装 ▪Organごとに個別に学習 ▪OrganごとにMultilabelStratifiedKFoldでpatientをsplit ▪MultilabelStratifiedGroupKFoldはよ Organごとのモデル -
AI 11 ▪それぞれの相対的な大きさからリサイズサイズを決定 ▪liver, spleen ▪16x336x336 ▪Kidney ▪16x224x224、左右をw方向に連結(w→448)、hflip aug ▪Bowel
▪64x224x224 ▪Image levelのlabelの同時学習 ▪Augmentation ▪ShiftScaleRotate、RandomBrightnessContrast Organごとのモデル -
AI 12 ▪ BowelとExtravasation(以降bwとevと呼ぶ)は 発症する範囲が広くSegmentationが有効でないと 考えたため、分担して福井が担当 ▪ 特にevはseriesあたりのpositive sampleが少ないため、 z方向の情報損失をなるべく抑えたモデリングをしたい
Bowel + Extravasationモデル (tattaka’s part) -
AI resize or pad 13 ▪ CT画像を全てカバーできる手法をベースに開発を進める ▪ 2D backboneで隣接フレームを入力としてimage
labelを学習 -> head前のfeatureをz方向に繋げてRNNで集約し patient labelを学習(2 stage training) bw + evモデル (基本戦略) resnet rs50 MLP embedding 512D image label N // 3 x 512D M x 512D M x 1536D diff GRU image label attn + max pooling series label N: 全系列長 M: 今回は256を使用 -
AI 14 ▪ 非常にpos/neg比が不均衡 ▪ patient labelでbwが2%、evが6% ▪ image labelではseriesの一部にしかpositive
labelがないので より不均衡になる (特にevはseriesごとのpositiveが少ない) ▪ -> 対策としてpos labelを10倍にupsampleして学習 ▪ stage2でもevは10倍、bwは5倍にupsample ▪ focal lossも使う ▪ bw: 0.549 -> 0.833, ev: 0.590 -> 0.755 (AUC) bw + evモデル (うまく学習するためのtrick①) -
AI 15 ▪ そのままのCT画像を用いると、画像が大きいため 推論に時間がかかる(512 x 512) -> ルールベースで有効な領域をcropして384 x
384で 学習・推論させる ▪ bw: 0.833 -> 0.881, ev: 0.755 -> 0.774 bw + evモデル (うまく学習するためのtrick②) -
AI 16 ▪ image labelで学習したモデルの出力logitと image label GTのmaxをとり、 新たなimage label
GTとして使用する ▪ 2回繰り返す ▪ bw: 0.881 -> 0.917, ev: 0.774 -> 0.826 bw + evモデル (うまく学習するためのtrick③) bowel logloss bowel auc ev logloss ev auc stage1 0.2719 0.9314 0.4602 0.8287 stage2 0.1167 0.9167 0.4579 0.8264 -
AI 17 ▪各モデルは対応するinjuryのmetricには最適化されている ▪一方、自動計算されるany_injuryは考慮されていない ▪Any_injuryはpositiveをnegativeと間違えた際のペナルティ大 ▪各モデルの出力を全て入力して、改めてsubmissionに必要な probabilityを出力するモデルを構築 ▪全ラベル(any_injury含む)でMultilabelStratifiedKFold ▪2つのstudyがあるpatientはconcatして入力。1つのものはコピー ▪Lossはコンペmetricと同じ
▪4-layer MLP ▪Linear, ReLU, skip connectionのみの構成 ▪Does not work: bn, dropout Stacking Model -
AI 19 ▪Object detectionモデル(stackingの入力として) ▪2つのvoxelをalignして入力 ▪時間差で造影剤の影響が異なるのでevが見つけやすくならない? ▪Alignmentアルゴリズム ▪extract feature from
each slice using image copy detection model ▪calculate similarity matrix between two voxels ▪binarize the above matrix by taking max in horizontal or vertical direction ▪detect line (= correspondence of two voxels) using Hough Transformation What Does Not Work https://www.kaggle.com/competitions/rsna-2023-abdominal-trauma-detection/discussion/448282 -
AI 23 ▪1) 3D segmentation for generating masks / crops
▪2) 2D CNN + RNN based approach for Kidney, Liver, Spleen, Bowel ▪3) 2D CNN + RNN based approach for Bowel + Extravasation ▪Coat Lite Medium/Lite + GRU, Efficientnet v2s + GRU ▪Auxiliary Segmentation Loss ▪Segmentation modelで推論したmaskをtargetとして利用 ▪入力はcrop -> 96x384x384 -> 32x3x384x384 ▪メインtargetはorganの各sliceにおけるmaskを0-1に正規化(最大 sliceの面積で割る)したものをソフトラベルとして利用 ▪?bowel, extravasationのimage labelは使っている? 1st Place Solution https://www.kaggle.com/competitions/rsna-2023-abdominal-trauma-detection/discussion/447449 -
AI 25 ▪Organ classification modelで 各organの存在確率を推定 ▪これで各imageに全クラスのラベルが付加される? ▪Injury classification modelで
全organのinjuryの確率を推定 ▪学習時は patient x organ数で1epoch ▪対象のorganのlabelによってサンプリング 方法を変更 ▪kidney / liver / spleen / negative bowel : Pick a random frame inside the organ. ▪positive bowel / positive extravasation : Use the frame-level labels. ▪Negative extravasation : Sample anywhere 2nd Place Solution – 2D Model https://github.com/TheoViel/kaggle_rsna_abdominal_trauma/blob/cleaning/src/data/dataset.py -
AI 26 ▪3D resnet18 to crop the organs ▪2D CNN
+ RNN model ▪Best model uses 11 frames sampled uniformly in the organ ▪Different number of frames for ensembling. ▪coatnet_1_rw_224 + RNN was best. I used different heads (RNN + attention, transformers) and other models CoatNet variants for ensembling. ▪3 class cross-entropy loss. 2nd Place Solution – Crop Model -
AI 28 ▪3D segmentationで各organをcrop ▪Crop時には、周辺にもinjuryの手がかりが含まれている可能性があるため マージンを追加してcrop ▪Crop領域を2.5D + RNNモデルで分類 ▪特定のorgan専用モデルや複数organ対応モデル、backbone/neck、crop
サイズ等を色々変えたモデルをweighted average ▪Bowel/extravasationのimage level labelでpretrain(一部) ▪特に効果があったもの ▪masking for liver model ▪custom sampler for all class models ▪Organ毎に入力サイズを変更しているので必要 ▪2types of crops 3rd Place Solution https://www.kaggle.com/competitions/rsna-2023-abdominal-trauma-detection/discussion/447464 -
AI 29 ▪TotalSegmentatorの推論結果を利用して liver, spleen, bowel, kidney, body の2D segmentationモデルを構築
▪Voxelを (1, 1, 5) (pixel spacing?)にrescale、マスクと一緒に保存 ▪Classification + segmentationの2Dマルチタスクモデル ▪学習時には14フレームをサンプリング、body maskでフィルタ( crop?)、z方向はorgan mask情報でサンプリング位置を限定 ▪不明点が多い & シンプルな解法(本当?)なのでコード出たら見たい ▪入力は1 slice? 1 sliceで全organのlossをかける? ▪6 classification heads? 4th Place Solution -
AI 31 ▪Segmentation Model ▪各organをcrop、15 sliceを抽出 ▪Organ Model ▪CNN +
LSTM with cropped volumes and study label ▪Bowel Model ▪30 sliceを抽出、study label + image label ▪Extra Model ▪隣接5 sliceの2D CNNをまず学習 ▪その後sequenceモデル(GRU)を学習 6th Place Solution -
AI 33 ▪全体のpipelineはRSNA2022が参考にされsegmentationの訓練コード 等も公開されているので似たりよったり ▪個別モデルのチューニングで差がついている ▪Maskの利用、マルチタスク学習、image level labelでの事前学習 ▪とはいえ公開ノートブックはラベルの平均値を出すみたいなのを超え るものがなく、敷居は高かった?
▪Extravasation以外はcropモデルが多い ▪Extravasationは画像レベルの学習 → RNN系 ▪Dicomsdl使おう? ▪https://www.kaggle.com/competitions/rsna-breast-cancer- detection/discussion/371033 まとめ