Skip to content
This repository has been archived by the owner. It is now read-only.
A simple realization of the paper Automatic Content-Aware Color and Tone Stylization
Branch: master
Clone or download
Latest commit 1d983a1 Dec 29, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
craw Code Dec 27, 2016
data-demo Code Dec 27, 2016
data Code Dec 27, 2016
debug Code Dec 27, 2016
docs Report and Issue Dec 29, 2016
feature Code Dec 27, 2016
result Code Dec 27, 2016
sample Code Dec 27, 2016
similarity Code Dec 27, 2016
transfer Code Dec 27, 2016
util Code Dec 27, 2016
.gitignore Initial commit Dec 27, 2016
LICENSE Initial commit Dec 27, 2016
README.md Demo images Dec 27, 2016
config.py Code Dec 27, 2016
process_deep_feature.py Code Dec 27, 2016
process_feature_extract.py Code Dec 27, 2016
process_kmeans.py Code Dec 27, 2016
process_mapping.py Code Dec 27, 2016
run_transfer_multi.py Code Dec 27, 2016
run_transfer_single.py Code Dec 27, 2016
run_transfer_test.py Code Dec 27, 2016
util_flickr_crawler.py
util_reshape_demo_image.py Code Dec 27, 2016

README.md

Automatic Content-Aware Color and Tone Stylization

This is a simple realization of the paper Automatic Content-Aware Color and Tone Stylization .

Change the style of your image, automatically.

Example

Before After
 

How to use

Environment

  1. Caffe
  2. Python 3.5
  3. Numpy
  4. Scipy
  5. Scikit-learn
  6. Scikit-image
  7. OpenCV
  8. Redis [Optional]

Claw Images From Flickr

You can get a temporary API KEY from THIS PAGE.

Create Image Style Dataset

I create this database by hand: visit https://500px.com/popular , press "Page Down" button, and save the page. Then, delete non-image files.

Clean the Dataset [Optional]

Run util_reshape_demo_image.py to reshape the images. The longest edge will be changed into 800px.

Feature Extract

Run process_deep_feature.py to extract deep feature in BAD database.

Run process_feature_extract.py to extract style features in GOOD and BAD database.

K-Means

Run process_kmeans.py to obtain semantic clusters.

Get the Relation Between Semantic and Style

Run process_mapping.py

RUN

  1. run_transfer_test.py transfers image style using example image you specified.
  2. run_transfer_single.py transfers image style using example image find in GOOD dataset. We will mapping your image to ONE cluster.
  3. run_transfer_multi.py transfers image style using example image find in GOOD dataset. We will mapping your image to SEVERAL clusters.

Notice

  • We MUST made something wrong while coding. The result is not really good. Please correct bugs using PR.

  • If you just want to run a demo, please rename the folder data-demo to data, and RUN.

Cite

Please refer to Automatic Content-Aware Color and Tone Stylization by Lee et.al.

@article{lee2015automatic,
  title={Automatic Content-Aware Color and Tone Stylization},
  author={Lee, Joon-Young and Sunkavalli, Kalyan and Lin, Zhe and Shen, Xiaohui and Kweon, In So},
  journal={arXiv preprint arXiv:1511.03748},
  year={2015}
}

WARNING

THE PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY WARRANTY. IT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW THE AUTHOR WILL BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

You can’t perform that action at this time.