Skip to content

Commit

Permalink
remove duplicate link and modify default dataset dir
Browse files Browse the repository at this point in the history
Signed-off-by: Yiheng Wang <[email protected]>
  • Loading branch information
yiheng-wang-nv committed May 15, 2023
1 parent a0bab96 commit a08d963
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"device": "$torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')",
"ckpt_dir": "$@bundle_root + '/models'",
"tf_dir": "$@bundle_root + '/eval'",
"dataset_dir": "/workspace/data/medical/Task01_BrainTumour",
"dataset_dir": "/workspace/data/medical",
"pretrained": false,
"perceptual_loss_model_weights_path": null,
"train_batch_size": 2,
Expand Down
6 changes: 3 additions & 3 deletions models/brats_mri_generative_diffusion/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This model is trained on BraTS 2016 and 2017 data from [Medical Decathlon](http:

This model is a generator for creating images like the Flair MRIs based on BraTS 2016 and 2017 data. It was trained as a 3d latent diffusion model and accepts Gaussian random noise as inputs to produce an image output. The `train_autoencoder.json` file describes the training process of the variational autoencoder with GAN loss. The `train_diffusion.json` file describes the training process of the 3D latent diffusion model.

In this bundle, the autoencoder uses perceptual loss, which is based on ResNet50 with pre-trained weights (The network is frozen and will not be trained in the bundle). In default, the `pretrained` parameter is specified as `False` in `train_autoencoder.json`. To ensure correct training, changing the default settings is necessary. There are two ways to utilize pretrained weights:
In this bundle, the autoencoder uses perceptual loss, which is based on ResNet50 with pre-trained weights (the network is frozen and will not be trained in the bundle). In default, the `pretrained` parameter is specified as `False` in `train_autoencoder.json`. To ensure correct training, changing the default settings is necessary. There are two ways to utilize pretrained weights:
1. if set `pretrained` to `True`, ImageNet pretrained weights from [torchvision](https://pytorch.org/vision/stable/_modules/torchvision/models/resnet.html#ResNet50_Weights) will be used. However, the weights are for non-commercial use only.
2. if set `pretrained` to `True` and specifies the `perceptual_loss_model_weights_path` parameter, users are able to load weights from a local path. This is the way this bundle used to train, and the pre-trained weights are from some internal data.

Expand All @@ -31,7 +31,7 @@ cd ..
```

## Data
The training data is BraTS 2016 and 2017 from [Medical Decathlon](http://medicaldecathlon.com/). Users can find more details on the datasets (`Task01_BrainTumour`) at http://medicaldecathlon.com/.
The training data is BraTS 2016 and 2017 from the Medical Segmentation Decathalon. Users can find more details on the dataset (`Task01_BrainTumour`) at http://medicaldecathlon.com/.

- Target: Image Generation
- Task: Synthesis
Expand Down Expand Up @@ -107,7 +107,7 @@ For more details usage instructions, visit the [MONAI Bundle Configuration Page]
python -m monai.bundle run --config_file configs/train_autoencoder.json
```

Please note that if the default dataset path is not modified with the actual path in the bundle config files, you can also override it by using `--dataset_dir`:
Please note that if the default dataset path is not modified with the actual path (it should be the path that contains `Task01_BrainTumour`) in the bundle config files, you can also override it by using `--dataset_dir`:

```
python -m monai.bundle run --config_file configs/train_autoencoder.json --dataset_dir <actual dataset path>
Expand Down

0 comments on commit a08d963

Please sign in to comment.