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

Add test for correct data range #195

Merged
merged 17 commits into from
Jan 15, 2021
Merged

Add test for correct data range #195

merged 17 commits into from
Jan 15, 2021

Conversation

zakajd
Copy link
Collaborator

@zakajd zakajd commented Dec 10, 2020

Closes #194 and #196

Proposed Changes

  • Test that values are always lower than data_range
  • Test that results is consistent for different data ranges

Progres

  • BRISQUE
  • FSIM
  • GMSD
  • HaarPSI
  • MDSI
  • PSNR
  • SSIM
  • VIF
  • VSI
  • PieAPP

@codecov
Copy link

codecov bot commented Dec 24, 2020

Codecov Report

Merging #195 (65cf43d) into master (5ee4839) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #195      +/-   ##
==========================================
+ Coverage   95.32%   95.34%   +0.01%     
==========================================
  Files          26       26              
  Lines        1777     1784       +7     
==========================================
+ Hits         1694     1701       +7     
  Misses         83       83              
Flag Coverage Δ
unittests 95.34% <100.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
piq/brisque.py 99.02% <100.00%> (-0.01%) ⬇️
piq/fsim.py 100.00% <100.00%> (ø)
piq/functional/colour_conversion.py 100.00% <100.00%> (ø)
piq/gmsd.py 100.00% <100.00%> (ø)
piq/haarpsi.py 100.00% <100.00%> (ø)
piq/mdsi.py 100.00% <100.00%> (ø)
piq/pieapp.py 100.00% <100.00%> (ø)
piq/psnr.py 83.33% <100.00%> (ø)
piq/ssim.py 100.00% <100.00%> (ø)
piq/utils/common.py 100.00% <100.00%> (ø)
... and 2 more

@zakajd zakajd marked this pull request as ready for review December 24, 2020 12:25
@zakajd zakajd requested a review from snk4tr December 24, 2020 12:25
@zakajd
Copy link
Collaborator Author

zakajd commented Dec 24, 2020

Let's merge this first, then #184

@snk4tr
Copy link
Contributor

snk4tr commented Jan 12, 2021

Let's merge this first, then #184

Well, I think I missed this one. #184 is already merged. Is it a problem?
@zakajd do you need to add something now (probably one more test from the PieAPP metric) to make this PR complete?

@zakajd
Copy link
Collaborator Author

zakajd commented Jan 12, 2021

Yes, I need to add data range tests to PieAPP before merge.
Will do it tomorrow and merge if you don't have any additional questions

@snk4tr
Copy link
Contributor

snk4tr commented Jan 12, 2021

Yes, I need to add data range tests to PieAPP before merge.
Will do it tomorrow and merge if you don't have any additional questions

I will add my review now and revise tomorrow evening after the data range tests for the PieAPP will be added. Then we can merge 😄

Copy link
Contributor

@snk4tr snk4tr left a comment

Choose a reason for hiding this comment

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

I like the PR a lot. Only small remarks from my side.

piq/brisque.py Outdated Show resolved Hide resolved
piq/gmsd.py Outdated Show resolved Hide resolved
piq/gmsd.py Outdated Show resolved Hide resolved
piq/haarpsi.py Outdated Show resolved Hide resolved
piq/ssim.py Outdated Show resolved Hide resolved
piq/utils/common.py Show resolved Hide resolved


@pytest.mark.parametrize(
"data_range", [128, 255],
Copy link
Contributor

Choose a reason for hiding this comment

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

General remark to all the series of tests: could you add more options of the data_range values if it is not too computationally heavy? It would be very interesting to see what happens if data_range is 1.0, <1.0 (for instance 0.5) of some weird huge number like 3000.

@zakajd
Copy link
Collaborator Author

zakajd commented Jan 15, 2021

@snk4tr Ready to be merged

@sonarcloud
Copy link

sonarcloud bot commented Jan 15, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@snk4tr snk4tr merged commit b4c4919 into master Jan 15, 2021
@snk4tr snk4tr deleted the bug/data_range branch January 15, 2021 15:15
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.

Incorrect support for different data ranges
2 participants