Giter Club home page Giter Club logo

imagesmoothing's Introduction

Image Smoothing via Unsupervised Learning

This is the implementation of SIGGRAPH Asia 2018 paper "Image Smoothing via Unsupervised Learning" by Qingnan Fan, et al.

Our work is the first unsupervised learning approach for the image smoothing problem. Our proposed objective function can be slightly modifed to achieve different image processing effects, for example,

Edge-preserving smoothing image Image abstraction image Detail enhancement image Background smooth image Foreground enhancement image

Getting Started

This paper is implemented with Torch framework.

Compilation

Our codes are implemented in Torch framework. Some self-defined layers are included in the 'compilation' folder. Before testing or training the models, you need to install the latest torch framework and compile the *.lua under the nn module, the *.cu and *.h under the cunn module, and adam_state.lua under optim module.

To be specific, the lua files have to be put in ./torch/extra/nn/ module directory, and editing init.lua file to include the corresponding file. Finally run the command under nn directory, luarocks make ./rocks/nn-scm-1.rockspec. Then nn module will be independently compiled.

Similarly for the cuda files, they need to be put into ./torch/extra/cunn/lib/THCUNN/ module directory, then editing the ./torch/extra/cunn/lib/THCUNN/generic/THCUNN.h to include the corresponding files, and finally run the command luarocks make ./rocks/cunn-scm-1.rockspec under ./torch/extra/cunn folder to compile them.

Accordingly, the adam lua file has to be put in ./torch/pkg/optim, edit the init.lua file and then run luarocks make optim-1.0.5-0.rockspec.

Data Generation

Run run_edgedetector.lua to compute the edges for edge-preserving smoothing or texture removal. To learn the content-aware image smoothing effects, we need saliency map for each training sample, which could be generated by existing saliency prediction methods.

Training

The trained models are all in the netfiles folder.

Run train_*.lua to learn specific smoothing effects.

Evaluation

To test our trained model, run test_smooth.lua.

Cite

You can use our codes for research purpose only. And please cite our paper when you use our codes.

@Article{fan2018smoothing,
Title = {Image Smoothing via Unsupervised Learning},
Author = {Qingnan Fan and Jiaolong Yang and David Wipf and Baoquan Chen and Xin Tong},
Journal = {ACM Transactions on Graphics (Proceedings of SIGGRAPH ASIA 2018)},
Year = {2018},
Volume = {37}
Number = {6},
}

Contact

If you find any bugs or have any ideas of optimizing these codes, please contact me via fqnchina [at] gmail [dot] com

imagesmoothing's People

Contributors

fqnchina avatar

Watchers

 avatar

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.