Open noseDewdrop opened 2 years ago
That's the result after I change the roi from 96 to 48, maybe that's wrong. But I got the another error when I set that with 96.
Traceback (most recent call last):
File "/home/ljc_cnu/anaconda3/envs/swin/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
data = fetcher.fetch(index)
File "/home/ljc_cnu/anaconda3/envs/swin/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/ljc_cnu/anaconda3/envs/swin/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
Thanks for ur great job, I'm trying apply it on 2D images which were created by 3D datas of Brats2019. All of them has the shape of (160, 160). Therefore, I set them in the same folder.Dataset is ok, but I got this error when I run the main.py.
ValueError: input image size (img_size) should be divisible by stage-wise image resolution.
Here's the output on command .
python3.8 main.py --feature_size=48 --batch_size=1 --logdir=unetr_test_dir --fold=1 --optim_lr=1e-4 --lrschedule=warmup_cosine --infer_overlap=0.5 --save_checkpoint --val_every=10 --json_list='./jsons/brats21_folds.json' --data_dir=/mnt/sdb_newdisk/ljc_cnu/circle_cut/Tasks/MICCAI/ --use_checkpoint --noamp
0 gpu 0 Batch size is: 1 epochs 300 Traceback (most recent call last): File "main.py", line 230, in main() File "main.py", line 104, in main main_worker(gpu=0, args=args) File "main.py", line 130, in main_worker model = SwinUNETR( File "/home/ljc_cnu/anaconda3/envs/swin/lib/python3.8/site-packages/monai/networks/nets/swin_unetr.py", line 111, in init raise ValueError("input image size (img_size) should be divisible by stage-wise image resolution.") ValueError: input image size (img_size) should be divisible by stage-wise image resolution.
can u give me a solution?
I don't know if you still have that issue, but I would try to crop the images to a multiple of 96, so for example 192 as it is the closest to 160.
@noseDewdrop hello,do you remember how to solve this problem?
Thanks for ur great job, I'm trying apply it on 2D images which were created by 3D datas of Brats2019. All of them has the shape of (160, 160). Therefore, I set them in the same folder.Dataset is ok, but I got this error when I run the main.py.
ValueError: input image size (img_size) should be divisible by stage-wise image resolution.
Here's the output on command .
python3.8 main.py --feature_size=48 --batch_size=1 --logdir=unetr_test_dir --fold=1 --optim_lr=1e-4 --lrschedule=warmup_cosine --infer_overlap=0.5 --save_checkpoint --val_every=10 --json_list='./jsons/brats21_folds.json' --data_dir=/mnt/sdb_newdisk/ljc_cnu/circle_cut/Tasks/MICCAI/ --use_checkpoint --noamp
0 gpu 0 Batch size is: 1 epochs 300 Traceback (most recent call last): File "main.py", line 230, in
main()
File "main.py", line 104, in main
main_worker(gpu=0, args=args)
File "main.py", line 130, in main_worker
model = SwinUNETR(
File "/home/ljc_cnu/anaconda3/envs/swin/lib/python3.8/site-packages/monai/networks/nets/swin_unetr.py", line 111, in init
raise ValueError("input image size (img_size) should be divisible by stage-wise image resolution.")
ValueError: input image size (img_size) should be divisible by stage-wise image resolution.
can u give me a solution?