Home

Awesome

TF-A2RL: Automatic Image Cropping

[Project] [Paper] [Online Demo] [API] [Related Work: GP-GAN (for Image Blending)]

The official implementation for A2-RL: Aesthetics Aware Rinforcement Learning for Automatic Image Cropping

Overview

sourcestep 1step 2step 3step 4step 5output

A2-RL (aka. Aesthetics Aware Reinforcement Learning) is the author's implementation of the RL-based automatic image cropping algorithm described in:

A2-RL: Aesthetics Aware Reinforcement Learning for Automatic Image Cropping   
Debang Li, Huikai Wu, Junge Zhang, Kaiqi Huang

Given a source image, our algorithm could take actions step by step to find almost the best cropping window on source image.

Contact: Hui-Kai Wu (huikaiwu@icloud.com)

Getting started

git clone https://github.com/wuhuikai/TF-A2RL.git
cd TF-A2RL
python A2RL.py --image_path test_images/3846.jpg --save_path test_images/3846_cropped.jpg

or

sh example.sh

Results compared with baseline methods (more results)

SourceVFN+Sliding windowA2-RLGround Truth

Requirements

The code requires the following 3rd party libraries:

pip install scikit-image

Details see the official README for installing skimage.

Details see the official README for installing TensorFlow.

Command line arguments:

Type python A2RL.py --help for a complete list of the arguments.

Citation

@article{li2017a2,
  title={A2-RL: Aesthetics Aware Reinforcement Learning for Automatic Image Cropping},
  author={Li, Debang and Wu, Huikai and Zhang, Junge and Huang, Kaiqi},
  journal={arXiv preprint arXiv:1709.04595},
  year={2017}
}