Skip to content

Add bending energy and diffusion regularizer demo #1587

Closed

Description

@kvttt

Is your feature request related to a problem? Please describe.

          Would be great to add the demo to the tutorial repo and mention it in the docstring.

Originally posted by @KumoLiu in Project-MONAI/MONAI#7272 (comment)

Describe the solution you'd like
Add the demo, similar to the one here.

Describe alternatives you've considered
/

Additional context

  • I'm not sure if @ebrahimebrahim would mind me doing both bending energy and diffusion in the same notebook, or we could work on demos for the two losses separately. I wouldn't mind doing both but let me know what your preference is! :)
  • In addition to the existing stuff in my personal demo, I think it would also be helpful to include explanations of some of the examples used for unit testing.
  • After this, need to update the docstring in MONAI core for both losses.
  • Looking even further, maybe the 3d unpaired registration tutorial would also need to be updated to reflect this change.

Activity

  1. ebrahimebrahim commented on Dec 5, 2023

    @ebrahimebrahim
    Contributor

    I agree that covering bending energy and diffusion in the same notebook makes sense.

    I think that the scale invariance and scaling law stuff in the personal demo that you and I put together should not go into the tutorials repo. Or at least it should be simplified before going in, since it was originally designed to verify that an algorithm was behaving correctly and not really designed to be tutorial material. Someone interested in a tutorial on bending/diffusion loss functions would just want to see an example DDF and see the loss functions applied. Then we can be like "here's what normalize=True does" and show the effect.

    Thanks for posting this task and for any work that you end up doing on it :D

  2. kvttt commented on Dec 5, 2023

    @kvttt
    ContributorAuthor

    I agree that covering bending energy and diffusion in the same notebook makes sense.

    I think that the scale invariance and scaling law stuff in the personal demo that you and I put together should not go into the tutorials repo. Or at least it should be simplified before going in, since it was originally designed to verify that an algorithm was behaving correctly and not really designed to be tutorial material. Someone interested in a tutorial on bending/diffusion loss functions would just want to see an example DDF and see the loss functions applied. Then we can be like "here's what normalize=True does" and show the effect.

    Thanks for posting this task and for any work that you end up doing on it :D

    Thank you! And I agree that scaling laws should not go into the tutorial repo. With that being said, I think what are necessary to include in this tutorial would be

    • Formula for bending energy and diffusion,
    • Demonstration that bending energy is not scale invariant (a visual example just like the one you provided in your notebook would suffice), diffusion is not scale invariant in some cases (maybe display examples of these cases), and
    • How both losses are made invariant by specifying normalize=True.

    And the emphasis should be on how to use these two losses instead of on the more technical aspects.

    I will go ahead and put together a draft :)

  3. added a commit that references this issue on Dec 27, 2023
    936c548
  4. added a commit that references this issue on Apr 21, 2024
    ec19304
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions