• Stars
    star
    189
  • Rank 204,649 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created about 7 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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

source step 1 step 2 step 3 step 4 step 5 output

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 ([email protected])

Getting started

  • Install the python libraries. (See Requirements).
  • Download the code from GitHub:
git clone https://github.com/wuhuikai/TF-A2RL.git
cd TF-A2RL
  • Download the pretrained models vfn_rl.pk from Google Drive, then put them in current directory (TF-A2RL/).

  • Run the python script:

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)

Source VFN+Sliding window A2-RL Ground 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.

  • --image_path: path of the input image
  • --save_path: path of output image

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}
}

More Repositories

1

FastFCN

FastFCN: Rethinking Dilated Convolution in the Backbone for Semantic Segmentation.
Python
835
star
2

DeepGuidedFilter

Official Implementation of Fast End-to-End Trainable Guided Filter, CVPR 2018
Python
823
star
3

FaceSwap

Swap face between two photos.
Python
691
star
4

GP-GAN

Official Chainer implementation of GP-GAN: Towards Realistic High-Resolution Image Blending (ACMMM 2019, oral)
Python
448
star
5

MSC

MSC: A Dataset for Macro-Management in StarCraft II
Python
138
star
6

PointCloudSuperResolution

Point Cloud Super Resolution with Adversarial Residual Graph Networks
Python
56
star
7

SparseMask

SparseMask: Differentiable Connectivity Learning for Dense Image Prediction.
Python
51
star
8

chainer-pix2pix

Chainer implementation for Image-to-Image Translation Using Conditional Adversarial Networks
Python
39
star
9

DeepCV

A set of RESTful APIs for computer vision and image processing with PyTorch and Flask.
HTML
8
star
10

chainer-neural-style

Chainer implementation for Neural Style Transfer & Fast Neural Style Transfer
Python
6
star
11

chainer-realism-cnn

Chainer implementation for realismCNN.
Python
6
star
12

a3c-deepmind-pytorch

Python
6
star
13

pytorch-a3c

Python
3
star
14

SIFT

SIFT in C++
C++
3
star
15

pytorch-dqn-universe

Deep Reinforcement learning with pytorch on universe platform
Python
2
star
16

GP-GAN-Project

Project Website for GP-GAN: Towards Realistic High-Resolution Image Blending
HTML
2
star
17

wuhuikai

2
star
18

CNN_CUT

Using CNN to boot up GrabCut
C++
2
star
19

FastFCNProject

HTML
1
star
20

ProximalGradientOptimization

Python source code & example for use proximal gradient optimization
Python
1
star
21

DeepDrone

A python library for running image (video) processing, computer vision, and deep learning algorithms on Tello (DJI drone).
Python
1
star
22

DeepJS

HTML
1
star
23

DeepGuidedFilterProject

HTML
1
star