Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional PSNR evaluations for the normalized synthesis case #703

Merged
merged 4 commits into from
Aug 4, 2023

Conversation

FelixSteinbauer
Copy link
Contributor

As we normalize the data to [0;1], we have top-down knowledge now about the data range. For this knowledge I added two cases/columns of PSNR evaluations.

Proposed Changes

  • Added psnr_01 and psnr_01_eps evaluation (psnr with data range of 0 to 1. With and without epsilon)
  • Added/removed/changed comments respectively

This PR should be very minor, but relevant for the in-painting-chellange.

Checklist

  • I have read the CONTRIBUTING guide.
  • My PR is based from the current GaNDLF master .
  • Non-breaking change (does not break existing functionality): provide as many details as possible for any breaking change.
  • Function/class source code documentation added/updated.
  • Code has been blacked for style consistency.
  • If applicable, version information has been updated in GANDLF/version.py.
  • If adding a git submodule, add to list of exceptions for black styling in pyproject.toml file.
  • Usage documentation has been updated, if appropriate.
  • Tests added or modified to cover the changes; if coverage is reduced, please give explanation.
  • If customized dependency installation is required (i.e., a separate pip install step is needed for PR to be functional), please ensure it is reflected in all the files that control the CI, namely: python-test.yml, and all docker files [1,2,3].

As we normalize the data to [0;1], we have top-down knowledge now about the data range. For this knowledge I added two cases/columns of PSNR evaluations.
@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@FelixSteinbauer FelixSteinbauer changed the title Additional PSNR versions/columns for the normalized synthesis case Additional PSNR evaluations for the normalized synthesis case Aug 2, 2023
@sarthakpati
Copy link
Collaborator

Thanks! 👍🏽

Can you put the comment before the line that it represents for readability? Basically, instead of this:

overall_stats_dict[current_subject_id]["psnr"] = peak_signal_noise_ratio( #torchmetrics PSNR using "max"
                gt_image_infill, output_infill 
            ).item()

You put this:

#torchmetrics PSNR using "max"
overall_stats_dict[current_subject_id]["psnr"] = peak_signal_noise_ratio(gt_image_infill, output_infill).item()

And then run black.

@sarthakpati sarthakpati self-requested a review August 2, 2023 14:27
@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Merging #703 (b66a7c6) into master (6d901ee) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #703      +/-   ##
==========================================
- Coverage   94.69%   94.68%   -0.02%     
==========================================
  Files         117      117              
  Lines        8225     8228       +3     
==========================================
+ Hits         7789     7791       +2     
- Misses        436      437       +1     
Flag Coverage Δ
unittests 94.68% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
GANDLF/cli/generate_metrics.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator

@sarthakpati sarthakpati left a comment

Choose a reason for hiding this comment

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

LGTM

@sarthakpati sarthakpati merged commit c2040ea into mlcommons:master Aug 4, 2023
15 of 16 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants