Giter Club home page Giter Club logo

fdl's Introduction

Misalignment-Robust Frequency Distribution Loss for Image Transformation

The IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2024

Zhangkai Ni1, Juncheng Wu1, Zian Wang1, Wenhan Yang2, Hanli Wang1, Lin Ma3

1Tongji University, 2Peng Cheng Laboratory, 3Meituan

This repository provides the official PyTorch implementation for the paper “Misalignment-Robust Frequency Distribution Loss for Image Transformation”, CVPR-2024. Paper

About FDL

This paper aims to address a common challenge in deep learning-based image transformation methods, such as image enhancement and super-resolution, which heavily rely on precisely aligned paired datasets with pixel-level alignments. However, creating precisely aligned paired images presents significant challenges and hinders the advancement of methods trained on such data. To overcome this challenge, this paper introduces a novel and simple Frequency Distribution Loss (FDL) for computing distribution distance within the frequency domain. Specifically, we transform image features into the frequency domain using Discrete Fourier Transformation (DFT). Subsequently, frequency components (amplitude and phase) are processed separately to form the FDL loss function. Our method is empirically proven effective as a training constraint due to the thoughtful utilization of global information in the frequency domain. Extensive experimental evaluations, focusing on image enhancement and super-resolution tasks, demonstrate that FDL outperforms existing misalignment-robust loss functions. Furthermore, we explore the potential of our FDL for image style transfer that relies solely on completely misaligned data.

TL;DR: We propose a novel Frequency Distribution Loss (FDL) for image transformation models trained with misaligned data, opening up new avenues for addressing the broad issue of misalignment in image transformation tasks.

image-20240309205241968

Quick Start

Installation:

pip install fdl-pytorch

Requirements:

  • Python>=3.6
  • Pytorch>=1.0

Usage:

from FDL_pytorch import FDL_loss
fdl_loss = FDL_loss()
# X: (N,C,H,W) 
# Y: (N,C,H,W) 
loss_value = fdl_loss(X, Y)
loss_value.backward()

Citation

If you find our work useful, please cite it as

@article{ni2024misalignment,
  title={Misalignment-Robust Frequency Distribution Loss for Image Transformation},
  author={Ni, Zhangkai and Wu, Juncheng and Wang, Zian and Yang, Wenhan and Wang, Hanli and Ma, Lin},
  journal={arXiv preprint arXiv:2402.18192},
  year={2024}
}

Contact

Thanks for your attention! If you have any suggestion or question, feel free to leave a message here or contact Dr. Zhangkai Ni ([email protected]).

License

MIT License

fdl's People

Contributors

eezkni avatar chtholly17 avatar wzawza123 avatar

Stargazers

Manvile avatar GMD avatar Eli Wu avatar  avatar Flying Boy avatar  avatar Keyeh avatar Hsüan hua avatar Connor Baker avatar Fei Wang avatar  avatar pht avatar  avatar  avatar Jeff Carpenter avatar LI Minghan avatar  avatar  avatar

Watchers

 avatar Kostas Georgiou avatar  avatar  avatar

fdl's Issues

Random Once or Every Time

Dear Dr. Ni,

Thanks for your nice work. I just figured out that in current implementation of FDL, all random variables used for projection are initialized only once in the init function and the fixed random values are accordingly used in each call of forward_once function. I happened to notice that such variables are usually sampled every time for each projection in similar works such as HSW. Could you please give me some suggestions on this point? Many thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.