Skip to content

Latest commit

 

History

31 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SlicePartitioningMethod

環境

※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.txt

スクリプトの実行

step1. DCMファイルからniftiファイルに変換

cd ~/SlicePartitioningMethod/totalSegmentator/script
python dcm2nifti.py 

step2. 3領域に分割するための元となる(例:甲状腺,肺,腎臓)のセグメンテーションを作成

pyhton totalseg.py

step3. 作成したセグメンテーションをもとにデータセットを3領域に分割(dataset:upper, middle, lowerの作成)

cd 
cd ~/SlicePartitioningMethod/slicePartitioning/script

# データ分割用のセグメンテーションが3つの場合
python slicepartitioning.py

# データ分割用のセグメンテーションが2つの場合
python slicePt_2segmentation.py

⚠️ 以下はPix2Pixでの処理

作成した3つのデータセットをPix2Pixで学習

テストデータも同様にして,step1~step3を実行

各領域ごとの学習済みモデルを用いてテストセットに対しinference.ipynbを実行

ここで3つのテストセットの生成画像が得られる  

step4. 3つのモデルから得られた各テストセットの生成画像を平均化

python unity_dcmfolder.py





About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages