Skip to content

#5498 issues fix pull request for SSIMMetric#5502

Merged
wyli merged 17 commits intoProject-MONAI:devfrom
Joeycho:dev
Nov 10, 2022
Merged

#5498 issues fix pull request for SSIMMetric#5502
wyli merged 17 commits intoProject-MONAI:devfrom
Joeycho:dev

Conversation

@Joeycho
Copy link
Copy Markdown
Contributor

@Joeycho Joeycho commented Nov 9, 2022

Fixes #5498

Description

simply add arguments (reduction and get_not_nans) for parent class and update ssim loss function to inherit loss, not nn.module.

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.

DCO Remediation Commit for Joeycho <[email protected]>

I, Joeycho <[email protected]>, hereby add my Signed-off-by to this commit: 75f6c53
I, Joeycho <[email protected]>, hereby add my Signed-off-by to this commit: 57a7a6f

Signed-off-by: Joeycho <[email protected]>
@wyli
Copy link
Copy Markdown
Contributor

wyli commented Nov 9, 2022

/black
thank you, could you please also include the test case here?

def test3d(self, x, y, drange, res):
result = SSIMMetric(data_range=drange, spatial_dims=3)._compute_metric(x, y)
self.assertTrue(isinstance(result, torch.Tensor))
self.assertTrue(torch.abs(res - result).item() < 0.001)

@wyli wyli changed the title #5498 issues fix pull request #5498 issues fix pull request for SSIMMetric Nov 9, 2022
@Joeycho
Copy link
Copy Markdown
Contributor Author

Joeycho commented Nov 9, 2022

@wyli Sure, I just added test part.

a444ea8

Joeycho and others added 4 commits November 9, 2022 19:28
@wyli
Copy link
Copy Markdown
Contributor

wyli commented Nov 10, 2022

/build

@wyli wyli merged commit 614c2ca into Project-MONAI:dev Nov 10, 2022
bhashemian pushed a commit to bhashemian/MONAI that referenced this pull request Nov 23, 2022
…NAI#5502)

Fixes Project-MONAI#5498

### Description

simply add arguments (reduction and get_not_nans) for parent class and
update ssim loss function to inherit loss, not nn.module.

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] 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.

Signed-off-by: Joeycho <[email protected]>
Signed-off-by: Behrooz <[email protected]>
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.

__call__() and _compute_metric() in SSIMMetric

3 participants