※CUDA,cuDNN等ライブラリのインストール済,GPUの動作を確認していることを前提としています CUDAのバージョンに対応したPyTorchをインストールしてください(公式Pytorchインストールページ).
# Pytorchをinstallしていない場合(例:CUDA 11.8)
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
# 必要なライブラリのダウンロード
pip install -r requirements.txtstep1. DCMファイルからniftiファイルに変換
cd ~/SlicePartitioningMethod/totalSegmentator/script
python dcm2nifti.py step2. 3領域に分割するための元となる(例:甲状腺,肺,腎臓)のセグメンテーションを作成
pyhton totalseg.pystep3. 作成したセグメンテーションをもとにデータセットを3領域に分割(dataset:upper, middle, lowerの作成)
cd
cd ~/SlicePartitioningMethod/slicePartitioning/script
# データ分割用のセグメンテーションが3つの場合
python slicepartitioning.py
# データ分割用のセグメンテーションが2つの場合
python slicePt_2segmentation.py
⚠️ 以下はPix2Pixでの処理
↓
step4. 3つのモデルから得られた各テストセットの生成画像を平均化
python unity_dcmfolder.py