Skip to content

Commit

Permalink
1587 add regularizer demo (Project-MONAI#1589)
Browse files Browse the repository at this point in the history
Fixes Project-MONAI#1587.

### Description
As mentioned in Project-MONAI#1587, the notebook should contain
- [x] Formula for bending energy and diffusion,
- [x] Demonstration that bending energy is not scale invariant while
diffusion is not scale invariant in some cases (maybe display examples
of these cases), and
- [x] How both losses are made invariant by specifying `normalize=True`.

### Checks
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Avoid including large-size files in the PR.
- [x] Clean up long text outputs from code cells in the notebook.
- [x] For security purposes, please check the contents and remove any
sensitive info such as user names and private key.
- [ ] Ensure (1) hyperlinks and markdown anchors are working (2) use
relative paths for tutorial repo files (3) put figure and graphs in the
`./figure` folder
- [x] Notebook runs automatically `./runner.sh -t <path to .ipynb file>`

---------

Signed-off-by: kaibo <ktang@unc.edu>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ebrahim Ebrahim <ebrahim.ebrahim@kitware.com>
  • Loading branch information
3 people authored Dec 27, 2023
1 parent 165d26b commit ec19304
Show file tree
Hide file tree
Showing 3 changed files with 652 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ Tutorial that demonstrates how monai `SlidingWindowInferer` can be used when a 3
This tutorial uses the MedNIST hand CT scan dataset to demonstrate MONAI's autoencoder class. The autoencoder is used with an identity encode/decode (i.e., what you put in is what you should get back), as well as demonstrating its usage for de-blurring and de-noising.
##### [batch_output_transform](./modules/batch_output_transform.ipynb)
Tutorial to explain and show how to set `batch_transform` and `output_transform` of handlers to work with MONAI engines.
##### [bending_energy_diffusion_loss_notes](./modules/bending_energy_diffusion_loss_notes.ipynb)
This notebook demonstrates when and how to compute normalized bending energy and diffusion loss.
##### [compute_metric](./modules/compute_metric.py)
Example shows how to compute metrics from saved predictions and labels with PyTorch multi-processing support.
##### [csv_datasets](./modules/csv_datasets.ipynb)
Expand Down
649 changes: 649 additions & 0 deletions modules/bending_energy_diffusion_loss_notes.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ doesnt_contain_max_epochs=("${doesnt_contain_max_epochs[@]}" 01_bundle_intro.ipy
doesnt_contain_max_epochs=("${doesnt_contain_max_epochs[@]}" 02_mednist_classification.ipynb)
doesnt_contain_max_epochs=("${doesnt_contain_max_epochs[@]}" 03_mednist_classification_v2.ipynb)
doesnt_contain_max_epochs=("${doesnt_contain_max_epochs[@]}" 04_integrating_code.ipynb)
doesnt_contain_max_epochs=("${doesnt_contain_max_epochs[@]}" bending_energy_diffusion_loss_notes.ipynb)

# Execution of the notebook in these folders / with the filename cannot be automated
skip_run_papermill=()
Expand Down

0 comments on commit ec19304

Please sign in to comment.