Skip to content

6676 port losses from monai-generative - #6729

Merged
wyli merged 26 commits into
Project-MONAI:devfrom
marksgraham:6676_port_generative_losses
Aug 3, 2023
Merged

6676 port losses from monai-generative #6729
wyli merged 26 commits into
Project-MONAI:devfrom
marksgraham:6676_port_generative_losses

Conversation

@marksgraham

@marksgraham marksgraham commented Jul 14, 2023

Copy link
Copy Markdown
Contributor

Work towards addressing issue #6676

Description

This PR ports spectral, perceptual and patch adversial losses from MONAI Generative.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@marksgraham
marksgraham marked this pull request as ready for review July 19, 2023 13:20
@marksgraham marksgraham changed the title [WIP] 6676 port losses from monai-generative 6676 port losses from monai-generative Jul 19, 2023
@marksgraham

Copy link
Copy Markdown
Contributor Author

This PR requires a new package, lpips. I've updated requirements-dev.txt, but all the automated checks fails because the package isn't found. I'm not sure how to fix this - any tips @wyli or @mingxin-zheng ?

@wyli

wyli commented Jul 19, 2023

Copy link
Copy Markdown
Contributor

sure, probably there are a few places to be updated with the new package, please see https://github.com/Project-MONAI/MONAI/blob/dev/CONTRIBUTING.md#adding-new-optional-dependencies

@mingxin-zheng

Copy link
Copy Markdown
Collaborator

Hi @marksgraham the min and package tests do not install packages in requirements-dev.txt, because they are just doing "fast" checks. So, the first step to try is to exclude the new tests in this PR from the min tests in this file.

marksgraham and others added 15 commits July 19, 2023 15:22
Signed-off-by: Mark Graham <markgraham539@gmail.com>
I, Mark Graham <markgraham539@gmail.com>, hereby add my Signed-off-by to this commit: a21c7f1
I, Mark Graham <markgraham539@gmail.com>, hereby add my Signed-off-by to this commit: 79a3784
I, Mark Graham <markgraham539@gmail.com>, hereby add my Signed-off-by to this commit: 89c4e83
I, Mark Graham <markgraham539@gmail.com>, hereby add my Signed-off-by to this commit: 3faaca5
I, Mark Graham <markgraham539@gmail.com>, hereby add my Signed-off-by to this commit: 086b8a9
I, Mark Graham <markgraham539@gmail.com>, hereby add my Signed-off-by to this commit: 105c3b8
I, Mark Graham <markgraham539@gmail.com>, hereby add my Signed-off-by to this commit: 700096d
I, Mark Graham <markgraham539@gmail.com>, hereby add my Signed-off-by to this commit: cd01b59
I, Mark Graham <markgraham539@gmail.com>, hereby add my Signed-off-by to this commit: a5e092e

Signed-off-by: Mark Graham <markgraham539@gmail.com>
I, Mark Graham <markgraham539@gmail.com>, hereby add my Signed-off-by to this commit: 36d7ed6

Signed-off-by: Mark Graham <markgraham539@gmail.com>
@wyli

wyli commented Jul 31, 2023

Copy link
Copy Markdown
Contributor

/build

@wyli

wyli commented Jul 31, 2023

Copy link
Copy Markdown
Contributor

/build

@wyli wyli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, it looks good to me, there's a minor issue about the torch.hub.set_dir usage

Comment thread monai/losses/perceptual.py
Comment thread tests/test_perceptual_loss.py
Signed-off-by: Mark Graham <markgraham539@gmail.com>
Signed-off-by: Mark Graham <markgraham539@gmail.com>
Comment thread monai/losses/adversarial_loss.py Outdated
Comment thread monai/losses/adversarial_loss.py Outdated
Comment thread monai/losses/perceptual.py Outdated
Comment thread monai/losses/perceptual.py Outdated
Comment thread monai/losses/perceptual.py
@mingxin-zheng

Copy link
Copy Markdown
Collaborator

Hi @marksgraham , none of my commented items is critical to fix. Please feel free to skip and close them as you see fit.

marksgraham and others added 4 commits August 3, 2023 13:05
… version

Signed-off-by: Mark Graham <markgraham539@gmail.com>
Signed-off-by: Mark Graham <markgraham539@gmail.com>
Signed-off-by: Mark Graham <markgraham539@gmail.com>
@wyli

wyli commented Aug 3, 2023

Copy link
Copy Markdown
Contributor

/build

@wyli
wyli enabled auto-merge (squash) August 3, 2023 13:19
@wyli
wyli merged commit 6f5cea3 into Project-MONAI:dev Aug 3, 2023
Comment thread monai/losses/spectral_loss.py
@marksgraham marksgraham mentioned this pull request Jul 6, 2023
7 tasks
@marksgraham marksgraham mentioned this pull request Nov 3, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants