Chainer implementation for realismCNN.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images
.gitignore
README.md
_config.yml
image_blending_with_gan.py
image_editing.py
load_caffe_model.py
mat2list_human_eval.py
mat2list_image_editing.py
model.py
modified_possion_image_editing.py
poisson_image_editing.py
predict_realism.py
utils.py

README.md

chainer-realismCNN

Chainer implementation for realismCNN proposed in Learning a Discriminative Model for the Perception of Realism in Composite Images.

Download pretrained caffe model

  1. Download pretrained caffe model.
  2. Run python load_caffe_model.py to transform pretrained caffe model into Chainer model.

Predict image's realism

  1. Download dataset Realism Prediction Data.
  2. Run python mat2list_human_eval.py to obtain image list & ground truth.
  3. Run python predict_realism.py to obtain prediction results. AUC score will be printed out, prediction score for each image will be stored in plain text file.

Image Editing towards generating more realistic composited images

  1. Download dataset Color Adjustment Data.
  2. Run python mat2list_image_editing.py to obtain image list.
  3. Run python image_editing.py to obtain more realistic images. (cut_and_paste image, generated image) will be saved in the result folder, and a plain file will be generated recording (cut_and_paste loss, generated loss) for each image.

Results

python image_editing.py

python poisson_image_editing.py

python modified_possion_image_editing.py

python image_blending_with_gan.py

NOTE

  • Run python [SCRIPT_NAME].py -h for more options.
  • Download converted Chainer VGG-19 model from here.
  • If you want to download Transient Attributes Dataset, please see the project website for more details