Comments (3)
Hello,
Thank you for raising this point. Note that the avg_pool2d stride defaults to the kernel size (which is (2, 2)).
As far as I understand, from the original implementation of MS-SSIM:
downsample_filter = ones(2)./4;
(...)
for l = 1:level
(...)
filtered_im1 = imfilter(im1, downsample_filter, 'symmetric', 'same');
filtered_im2 = imfilter(im2, downsample_filter, 'symmetric', 'same');
clear im1, im2;
im1 = filtered_im1(1:2:end, 1:2:end);
im2 = filtered_im2(1:2:end, 1:2:end);
At each iteration, the image is averaged over a 2x2 window using the downsample_filter and then each odd value in width and height is kept using the range selection (every 2 values, so that no window overlaps). I believe this is the same behaviour as an avg_pool2d of kernel_size (2, 2) and stride (2, 2) as is used in the code. The tensorflow code provided seems to use the same logic as the original implementation.
Please let me know if I understood your point incorrectly or misinterpreted the original implementation. Thank you for your contribution
from pytorch-msssim.
Sorry about not read the docs carefully. I checked the pytorch documents and your implementation is correct.
from pytorch-msssim.
No problem. Thank you for using the library, and feel free to open other issues if you have any more questions.
Closing this issue.
from pytorch-msssim.
Related Issues (20)
- nan problem HOT 2
- Output is out of range HOT 2
- Is the threshold necessary? HOT 1
- Inquiry about standard deviations HOT 1
- ssim on mnist HOT 1
- Index map HOT 1
- Contrast Sensitivity (CS) for batch size > 1 HOT 1
- Typo in calculation? HOT 2
- Arbitrary NAN for very low MS-SSIM comparisons HOT 15
- Big in SSIM implementation, don't use this code for perceptual quality estimation HOT 3
- SSIM result is different from skimage.measure.compare_ssim HOT 1
- parameter misspelled in readme HOT 1
- Usage of this loss in the binary segmentation
- SSIM loss output range
- Artifacts on color images HOT 5
- MS-SSIM Usage HOT 1
- Expected object of scalar type Double but got scalar type Float for argument #2 'weight' HOT 2
- Possible mistake in your implementation? HOT 3
- functools.lru_cache can be used for saving the window HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch-msssim.