Code Monkey home page Code Monkey logo

s2crnet's Introduction

Spatial-Separated Curve Rendering Network for Efficient and High-Resolution Image Harmonization

Jingtang Liang*, Xiaodong Cun*, Chi-Man Pun, Jue Wang

Paper: https://arxiv.org/abs/2109.05750

Demos: https://github.com/vinthony/S2CRNet-demos

Image harmonization aims to modify the color of the composited region with respect to the specific background. Previous works model this task as a pixel-wise image-to-image translation using UNet family structures. However, the model size and computational cost limit the performability of their models on edge devices and higher-resolution images. To this end, we propose a novel spatial-separated curve rendering network(S2CRNet) for efficient and high-resolution image harmonization for the first time. In S2CRNet, we firstly extract the spatial-separated embeddings from the thumbnails of the masked foreground and background individually. Then, we design a curve rendering module(CRM), which learns and combines the spatial-specific knowledge using linear layers to generate the parameters of the pixel-wise curve mapping in the foreground region. Finally, we directly render the original high-resolution images using the learned color curve. Besides, we also make two extensions of the proposed framework via the Cascaded-CRM and Semantic-CRM for cascaded refinement and semantic guidance, respectively. Experiments show that the proposed method reduces more than 90% parameters compared with previous methods but still achieves the state-of-the-art performance on both synthesized iHarmony4 and real-world DIH test set. Moreover, our method can work smoothly on higher resolution images in real-time which is more than 10× faster than the existing methods.

Citation
@misc{liang2021spatialseparated,
      title={Spatial-Separated Curve Rendering Network for Efficient and High-Resolution Image Harmonization}, 
      author={Jingtang Liang and Xiaodong Cun and Chi-Man Pun and Jue Wang},
      year={2021},
      eprint={2109.05750},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}
Related Work

s2crnet's People

Contributors

stefanleong avatar vinthony avatar

Stargazers

S avatar Tho avatar Weize Quan avatar  avatar Zihao Zhang avatar Dong Yi avatar  avatar  avatar Tianshu Kuai avatar Ruoxi avatar  avatar  avatar XY avatar  avatar coallar avatar Ethan avatar Junjie avatar  avatar  avatar  avatar Rafael Silva avatar Zhendong Wang avatar  avatar  avatar An-zhi WANG avatar  avatar  avatar

Watchers

James Cloos avatar  avatar  avatar  avatar xiaosi avatar  avatar

s2crnet's Issues

Code

Hi, recently I am doing the research about the image harmonization, so I would like to enquire you whether you could upload your code? Thank you very much!

Waiting for code

I'm doing some research for my university and I'd like to know when will you release your code. Thank you in advance!

A little bug when running the model and the evaluation on the

Hello, this is a very good work, bu when I run the model, I occur a problem:"ModuleNotFoundError: No module named 'scripts.models.patchNCE'". What's more, this work performs well on the iHarmony4 dataset, can you release the code about the evaluation on the iHarmony4 dataset? Thank you.

about code running

hello, thanks for your sharing! I try to run your code in train model, but get some error:

  1. when import trilinear package, it still ping during running code
  2. code need scripts.models.patchNCE

dataset

Excuse me, could you please provide the DIH99 dataset?

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.