FirasGit / medicaldiffusion

Medical Diffusion: This repository contains the code to our paper Medical Diffusion: Denoising Diffusion Probabilistic Models for 3D Medical Image Synthesis
355 stars 62 forks source link

Key 'severity' is not in struct #16

Open Nnafi1211 opened 1 year ago

Nnafi1211 commented 1 year ago

I am having this error. I have moved the train_ddpm.py and train_vqgan.py file in the medicaldiffusion-master directory. My dataset is also in the same directory.

My given command was: PL_TORCH_DISTRIBUTED_BACKEND=gloo python train_vqgan.py dataset=brats dataset.root_dir='imagesTr/' model=vq_gan_3d model.gpus=1 model.default_root_dir_postfix='flair' model.precision=16 model.embedding_dim=8 model.n_hiddens=16 model.downsample=[2,2,2] model.num_workers=32 model.gradient_clip_val=1.0 model.lr=3e-4 model.discriminator_iter_start=10000 model.perceptual_weight=4 model.image_gan_weight=1 model.video_gan_weight=1 model.gan_feat_weight=4 model.batch_size=2 model.n_codes=16384 model.accumulate_grad_batches=1

The Error Message: Traceback (most recent call last): File "train_vqgan.py", line 20, in run train_dataset, val_dataset, sampler = get_dataset(cfg)

File "home/medicaldiffusion-master/train/get_dataset.py", line 16, in get_dataset root_dir=cfg.dataset.root_dir, imgtype=cfg.dataset.imgtype, train=True, severity=cfg.dataset.severity, resize=cfg.dataset.resize) omegaconf.errors.ConfigAttributeError: Key 'severity' is not in struct full_key: dataset.severity object_type=dict Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

daming876 commented 1 year ago

I have same error.

zhao9chen99999 commented 1 year ago

same

JBnoJB commented 11 months ago

same, is it solved?

zhao9chen99999 commented 11 months ago

I have already received your e-mail,Thanks a lot!我已收到您发送的邮件,感谢您的来信!

975827738 commented 4 months ago

same, is it solved?

zhao9chen99999 commented 4 months ago

I have already received your e-mail,Thanks a lot!我已收到您发送的邮件,感谢您的来信!

supgy commented 4 months ago

问题解决了嘛,求助万能的网友

mjhatami commented 3 months ago

same, is it solved?

zhao9chen99999 commented 3 months ago

I have already received your e-mail,Thanks a lot!我已收到您发送的邮件,感谢您的来信!

zfw-cv commented 3 months ago

same, is it solved???

zhao9chen99999 commented 3 months ago

I have already received your e-mail,Thanks a lot!我已收到您发送的邮件,感谢您的来信!

yichuan1998 commented 2 months ago

I am having this error. I have moved the train_ddpm.py and train_vqgan.py file in the medicaldiffusion-master directory. My dataset is also in the same directory.

My given command was: PL_TORCH_DISTRIBUTED_BACKEND=gloo python train_vqgan.py dataset=brats dataset.root_dir='imagesTr/' model=vq_gan_3d model.gpus=1 model.default_root_dir_postfix='flair' model.precision=16 model.embedding_dim=8 model.n_hiddens=16 model.downsample=[2,2,2] model.num_workers=32 model.gradient_clip_val=1.0 model.lr=3e-4 model.discriminator_iter_start=10000 model.perceptual_weight=4 model.image_gan_weight=1 model.video_gan_weight=1 model.gan_feat_weight=4 model.batch_size=2 model.n_codes=16384 model.accumulate_grad_batches=1

The Error Message: Traceback (most recent call last): File "train_vqgan.py", line 20, in run train_dataset, val_dataset, sampler = get_dataset(cfg)

File "home/medicaldiffusion-master/train/get_dataset.py", line 16, in get_dataset root_dir=cfg.dataset.root_dir, imgtype=cfg.dataset.imgtype, train=True, severity=cfg.dataset.severity, resize=cfg.dataset.resize) omegaconf.errors.ConfigAttributeError: Key 'severity' is not in struct full_key: dataset.severity object_type=dict Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

Hi, same error here, can you tell me the solution? And my Brats dataset like this: image

zhao9chen99999 commented 2 months ago

I have already received your e-mail,Thanks a lot!我已收到您发送的邮件,感谢您的来信!