EDSR-PyTorch icon indicating copy to clipboard operation
EDSR-PyTorch copied to clipboard

Issue in Meanshift while training on 16 bit, 1 channel tiff images?

Open ahanagemini opened this issue 4 years ago • 2 comments

Meanshift assumes 3 channels and so the code needs to be re-written for 1 channel? Also, the default RGB mean values are around 0.4 for each channel. This seems to indicate that data should be in the range 0-1. However, from the code, it seems that the data is in the range of 0-255. If so, then how are the means so small?

ahanagemini avatar Mar 25 '20 03:03 ahanagemini

I think it should be: out = (in - mean * 255) / sigma, according to author's codes, if input images are at 0 ~ 255. So the final range is -(mean * 255) ~ +(255 - mean * 255), roughly at -127~+127.

HaolyShiit avatar Mar 26 '20 11:03 HaolyShiit

I see. So, that part of the code should be modified/ corrected?

On Thu, 26 Mar 2020 at 07:02, haodejun [email protected] wrote:

I think it should be: out = (in - mean * 255) / sigma, according to author's codes, if input images are at 0255. So the final range is -(mean

    1. ~ +(255 - mean * 255), roughly at -127+127.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thstkdgus35/EDSR-PyTorch/issues/257#issuecomment-604365188, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTJUXLRP7BXSEILUGW3I3LRJMY3DANCNFSM4LTEUWHQ .

ahanagemini avatar Mar 26 '20 20:03 ahanagemini