megvii-research / NAFNet

The state-of-the-art image restoration model without nonlinear activation functions.
Other
2.18k stars 267 forks source link

部分文本图像的修复效果会存在文字模糊(文字被加粗)的问题 #102

Open locusbear opened 1 year ago

locusbear commented 1 year ago

我注意到似乎PSNR loss函数中存在l2 loss

(self.loss_weight self.scale torch.log(((pred - target) ** 2).mean(dim=(1, 2, 3)) + 1e-8).mean())

是否是l2 loss造成的部分文本图像文字模糊的问题呢?我能否将其修改为l1 loss?另外还有没有什么好的方法,在基本不改变原始效果的前提下能优化文字模糊的问题呢?谢谢