New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data preprocess #28
Comments
Thank you. Inside your vtunetTrainerV2_vtunet_liver_base.py script, modify the file name prefix in the code line: splits[self.fold]['train'] = np.array(['LiverXX', ... ]) |
Thanks for the reply. Just to clarify I should change all the prefix for the data splits? i.e. change from this to this
|
fyi @himashi92, I made the change but I'm still getting this error RuntimeError: Could not find trainer class in vtunet.training.network_training. I'm updating the class function in the vtunetTrainerV2_vtunet_liver_base.py file to vtunetTrainerV2_vtunet_liver_base from vtunetTrainerV2_vtunet_tumor_base. I guess I have to change the classes as well |
I was able to resolve the above errors but now getting this I understand a little now. The vtunetTrainerV2_vtunet_liver_base.py file generates based on both train and test while the output data splits is correctly only on the train segment. I'll remove the unneeded entries from the vtunetTrainerV2_vtunet_liver_base.py and see if it works. |
Hi @himashi92, resolved above but getting this error |
create a script like vtunet_tumor.py for liver dataset and change in_channels=1 https://github.com/himashi92/VT-UNet/blob/main/VTUNet/vtunet/network_architecture/vtunet_tumor.py#L780 |
Thanks, works now. |
Hi @himashi92
Thanks for this awesome work and repo. I am trying to replicate this on the Liver data in the decathlon. When I run the the train command for the base training
CUDA_VISIBLE_DEVICES=0 nohup vtunet_train 3d_fullres vtunetTrainerV2_vtunet_tumor_base 3 0 &> base.out &
I get the following error below
KeyError: 'BRATS_001'
():`stage: 0
{'batch_size': 2, 'num_pool_per_axis': [5, 5, 5], 'patch_size': array([128, 128, 128]), 'median_patient_size_in_voxels': array([195, 207, 207]), 'current_spacing': array([2.473119 , 1.89831205, 1.89831205]), 'original_spacing': array([1. , 0.76757812, 0.76757812]), 'do_dummy_2D_data_aug': False, 'pool_op_kernel_sizes': [[2, 2, 2], [2, 2, 2], [2, 2, 2], [2, 2, 2], [2, 2, 2]], 'conv_kernel_sizes': [[3, 3, 3], [3, 3, 3], [3, 3, 3], [3, 3, 3], [3, 3, 3], [3, 3, 3]]}
stage: 1
{'batch_size': 2, 'num_pool_per_axis': [5, 5, 5], 'patch_size': array([128, 128, 128]), 'median_patient_size_in_voxels': array([482, 512, 512]), 'current_spacing': array([1. , 0.76757812, 0.76757812]), 'original_spacing': array([1. , 0.76757812, 0.76757812]), 'do_dummy_2D_data_aug': False, 'pool_op_kernel_sizes': [[2, 2, 2], [2, 2, 2], [2, 2, 2], [2, 2, 2], [2, 2, 2]], 'conv_kernel_sizes': [[3, 3, 3], [3, 3, 3], [3, 3, 3], [3, 3, 3], [3, 3, 3], [3, 3, 3]]}
I am using stage 1 from these plans
I am using batch dice + CE loss
I am using data from this folder: /home/VT-UNet/VTUNet/DATASET/vtunet_preprocessed/Task003_Liver/vtunetData_plans_v2.1
###############################################
loading dataset
loading all case properties
2022-08-16 04:36:37.549490: Creating new 5-fold cross-validation split...
2022-08-16 04:36:37.550782: Desired fold for training: 0
2022-08-16 04:36:37.550879: This split has 387 training and 73 validation cases.
Traceback (most recent call last):
File "/home/VT-UNet/transegvenv/bin/vtunet_train", line 33, in
sys.exit(load_entry_point('vtunet', 'console_scripts', 'vtunet_train')())
File "/home/VT-UNet/VTUNet/vtunet/run/run_training.py", line 134, in main
trainer.initialize(not validation_only)
File "/home/VT-UNet/VTUNet/vtunet/training/network_training/vtunetTrainerV2_vtunet_liver_base.py", line 90, in initialize
self.dl_tr, self.dl_val = self.get_basic_generators()
File "/home/VT-UNet/VTUNet/vtunet/training/network_training/vtunetTrainer.py", line 401, in get_basic_generators
self.do_split()
File "/home/VT-UNet/VTUNet/vtunet/training/network_training/vtunetTrainerV2_vtunet_liver_base.py", line 410, in do_split
self.dataset_tr[i] = self.dataset[i]
KeyError: 'BRATS_001'`
Any idea how to fix this, also but separately I get an error when I try to do the vtunet_train_3d?
The text was updated successfully, but these errors were encountered: