Open terrainer opened 7 months ago
Could this issue be related to the problem you mentioned ? https://github.com/hongyuanyu/SPAN/issues/9
Could this issue be related to the problem you mentioned ? #9
Very likely to be the case
I noticed you finetuned some SPAN models yourself (like SPANkendata). Have you managed to correct this issue or at least mitigate pixel artifacts on output image ? It doesn't seem to appear on the comparison shot related to your SPANkendata model (https://github.com/terrainer/AI-Upscaling-Models/blob/main/4xSPANkendata/comparison/Upscale.png). Thanks.
The issue is fixed within chaiNNer and neosr.
On Wed, 24 July 2024, 8:00 pm reddured, @.***> wrote:
I noticed you finetuned some SPAN models yourself (like SPANkendata). Have you managed to correct this issue or at least mitigate pixel artifacts on output image ? It doesn't seem to appear on the comparison shot related to your SPANkendata model ( https://github.com/terrainer/AI-Upscaling-Models/blob/main/4xSPANkendata/comparison/Upscale.png). Thanks.
— Reply to this email directly, view it on GitHub https://github.com/hongyuanyu/SPAN/issues/6#issuecomment-2247452000, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHQ7OIQ2CXJXUOOZH77YCEDZN53L3AVCNFSM6AAAAABLL2ZFM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBXGQ2TEMBQGA . You are receiving this because you authored the thread.Message ID: @.***>
Do you mean this is fixed in chaiNNer / neosr by using a denoising algorithm on output image (like NLM denoising) ?
ChaiNNer and neosr have changed the code itself to fix the img_range issue.
This also makes models trained using this repos code incompatible with those two.
On Fri, 2 Aug 2024, 1:09 am reddured, @.***> wrote:
Do you mean this is fixed in chaiNNer / neosr by using a denoising algorithm on output image (like NLM denoising) ?
— Reply to this email directly, view it on GitHub https://github.com/hongyuanyu/SPAN/issues/6#issuecomment-2263314557, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHQ7OITNEDS2TZW2WFFOIO3ZPJFRVAVCNFSM6AAAAABLL2ZFM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRTGMYTINJVG4 . You are receiving this because you authored the thread.Message ID: @.***>
Hi,
Thank you for your code! This performs very impressively at such fast speeds and low memory usage. This BasicSR implementation has one major flaw in its
img_range
parameter. The default value is255.
, but a much more suitable value would be1.
.This is because BasicSR normalizes inputs to a range of
[0,1]
. EDSR, which is seemingly where the255.
value comes from, does not do this, and also does its zero-centering via a much different MeanShift function. You'll notice that any other network with a BasicSR implementation and this same mean/range code, such as SwinIR , uses the value of1.
.Currently, the usage of this value vastly blows up expected ranges of
[0,1]
or[-0.5, 0.5]
to[-127.5, 127.5]
, causing high instability. Unfortunately, the editing of this parameter also breaks inference for anything expectingimg_range
to be255.
, and so the current official pretrains would not work if inference were to be done withimg_range: 1.
. They would have to be re-trained with the updated value.Kind regards, terrainer