Skip to content
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

Error when run train.py #9

Closed
shathaa1983 opened this issue Mar 14, 2022 · 3 comments
Closed

Error when run train.py #9

shathaa1983 opened this issue Mar 14, 2022 · 3 comments

Comments

@shathaa1983
Copy link

Hi,
I am trying to regenerate the result, I got the following error. Any help with this?
Thanks

AssertionError Traceback (most recent call last)
~/Desktop/projects/VT-UNet-main/train.py in
300 arguments = parser.parse_args()
301 os.environ['CUDA_VISIBLE_DEVICES'] = arguments.devices
--> 302 main(arguments)

~/Desktop/projects/VT-UNet-main/train.py in main(args)
109 optimizer = torch.optim.Adam(params, lr=args.lr, weight_decay=args.weight_decay)
110
--> 111 full_train_dataset, l_val_dataset, bench_dataset = get_datasets(args.seed, fold_number=args.fold)
112 train_loader = torch.utils.data.DataLoader(full_train_dataset, batch_size=args.batch_size, shuffle=True,
113 num_workers=args.workers, pin_memory=True, drop_last=True)

~/Desktop/projects/VT-UNet-main/dataset/brats.py in get_datasets(seed, on, fold_number, normalisation)
90 base_folder = pathlib.Path(get_brats_folder(on)).resolve()
91 print(base_folder)
---> 92 assert base_folder.exists()
93 patients_dir = sorted([x for x in base_folder.iterdir() if x.is_dir()])
94

AssertionError:

@himashi92
Copy link
Owner

Hi,

Make sure you have given the correct path for the dataset in the config file.

@shathaa1983
Copy link
Author

Hi,
I tried to save the dataset in the dataset folder, and I changed the file path in the config.py, but was not working. Also, I tried to save the dataset as a folder (BRATS2021-Data-BraTS2021_Training_Data), I am trying to follow the file structure; I understood that I have to have only 2 folders, one for the BRATS2021 and the seconds for the vtunet and save the train.py, test.py, etc inside this folder.
Is that correct? If not, please tell me the right folder to save the BRATS2021 dataset

@himashi92
Copy link
Owner

You have to rename the folder as in https://github.com/himashi92/VT-UNet/blob/main/config.py#L6 or you can modify the folder path in config.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants