An Image Reconstruction Loss Function Based on 2D Discrete Cosine Transform
摘要
When supervising the training of an auto-encoder-based image generative model, we usually define the degree of difference between the image generated by the auto-encoder and the corresponding input image as the image reconstruction loss, and make the reduction of the image reconstruction loss as the optimization objective of the model. The traditional method is to calculate the mean pixel values L1/MSE error between the input image and the generated image as the reconstruction loss. The image reconstruction loss defined by this method is sensitive to the difference of individual pixels and ignores the local structural features of the image. To address this problem, we propose Weighted DCT, a DCT-based loss function for image reconstruction, which aims to use a procedure that is consistent with currently widely used lossy image compression algorithms (e.g., JPEG, HEIC), for the property that human vision is sensitive to low-frequency images but relatively insensitive to high-frequency images. By calculating the local 2D spectral difference between the two images and weighting the different frequency components, and taking the mean weighted difference as the image reconstruction loss. We demonstrate that the proposed image reconstruction loss function is superior to the loss function based on the mean pixel value distance.