Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dataset/default.py

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor typo no ?

Before: self.root_dir, nifti_file_name) for nifti_file_name in nifti_file_names if nifti_file_names.endswith('.nii')]

After: self.root_dir, nifti_file_name) for nifti_file_name in nifti_file_names if nifti_file_name.endswith('.nii')]

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self, root_dir: str):
def get_data_files(self):
nifti_file_names = os.listdir(self.root_dir)
folder_names = [os.path.join(
self.root_dir, nifti_file_name) for nifti_file_name in nifti_file_names if nifti_file_names.endsiwth('.nii')]
self.root_dir, nifti_file_name) for nifti_file_name in nifti_file_names if nifti_file_names.endswith('.nii')]
return folder_names

def __len__(self):
Expand Down
1 change: 1 addition & 0 deletions train/get_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ def get_dataset(cfg):
val_dataset = DEFAULTDataset(
root_dir=cfg.dataset.root_dir)
sampler = None
return train_dataset, val_dataset, sampler
raise ValueError(f'{cfg.dataset.name} Dataset is not available')
2 changes: 2 additions & 0 deletions train/train_vqgan.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"Adapted from https://github.com/SongweiGe/TATS"

import os
import sys
sys.path.append('/Users/dmnk/Documents/GitHub/segmentation_diffusion/medicaldiffusion')
import pytorch_lightning as pl
from pytorch_lightning.callbacks import ModelCheckpoint
from torch.utils.data import DataLoader
Expand Down