Skip to content
Source code of RRPN ---- Arbitrary-Oriented Scene Text Detection via Rotation Proposals
Branch: master
Clone or download
Latest commit fe6c592 May 3, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
caffe-fast-rcnn Update Jan 16, 2018
data code Sep 6, 2017
experiments code Sep 6, 2017
lib Update Jan 24, 2018
models remove bak Sep 6, 2017
tools Update Nov 6, 2017
LICENSE Update LICENSE Sep 6, 2017 Update May 3, 2019 code Sep 6, 2017

Paper source

Arbitrary-Oriented Scene Text Detection via Rotation Proposals


We re-implement RRPN in pytorch 1.0! View for more details.


RRPN is released under the MIT License (refer to the LICENSE file for details). This project is for research purpose only, further use for RRPN should contact authors.

Citing RRPN

If you find RRPN useful in your research, please consider citing:

    Author = {Jianqi Ma and Weiyuan Shao and Hao Ye and Li Wang and Hong Wang and Yingbin Zheng and Xiangyang Xue},
    Title = {Arbitrary-Oriented Scene Text Detection via Rotation Proposals},
    journal = {IEEE Transactions on Multimedia},


  1. Requirements: software
  2. Requirements: hardware
  3. Basic installation
  4. Demo
  5. Beyond the demo: training and testing

Requirements: software

  1. Requirements for Caffe and pycaffe (see: Caffe installation instructions)

Note: Caffe must be built with support for Python layers!

# In your Makefile.config, make sure to have this line uncommented
# Unrelatedly, it's also recommended that you use CUDNN

You can download my Makefile.config for reference. 2. Python packages you might not have: cython, python-opencv, easydict

Requirements: hardware

  1. For training the end-to-end version of RRPN with VGG16, 4~5G of GPU memory is sufficient (using CUDNN)

Installation (sufficient for the demo)

  1. Clone the RRPN repository
# git clone
  1. We'll call the directory that you cloned RRPN into RRPN_ROOT

  2. Build the Cython modules

    cd $RRPN_ROOT/lib
  3. Build Caffe and pycaffe

    cd $RRPN_ROOT/caffe-fast-rcnn
    # Now follow the Caffe installation instructions here:
    # If you're experienced with Caffe and have all of the requirements installed
    # and your Makefile.config in place, then simply do:
    make -j4 && make pycaffe
  4. Download pre-computed RRPN detectors

    Trained VGG16 model download link:

    Then move the model into $RRPN_ROOT/data/faster_rcnn_models.


After successfully completing basic installation, you'll be ready to run the demo.

To run the demo

python ./tools/

The txt results will be saved in $RRPN_ROOT/result

Beyond the demo: installation for training and testing models

You can use the function get_rroidb() in $RRPN_ROOT/lib/rotation/ to manage your training data:

Each training sample should be managed in a python dict like:

im_info = {
	'gt_classes': # Set to 1(Only text)
	'max_classes': # Set to 1(Only text)
	'image': # image path to access
	'boxes': # ground truth box
	'flipped' : # Flip an image or not (Not implemented)
	'gt_overlaps' : # overlap of a class(text)
	'seg_areas' : # area of an ground truth region
	'height': # height of an image data
	'width': # width of an image data
	'max_overlaps' : # max overlap with each gt-proposal
	'rotated': # Random angle to rotate an image

Then assign your database to the variable 'roidb' in main function of $RRPN_ROOT/tools/

116: roidb = get_rroidb("train") # change to your data manage function

Download pre-trained ImageNet models

Pre-trained ImageNet models can be downloaded for the networks described in the paper: VGG16.


VGG16 comes from the Caffe Model Zoo, but is provided here for your convenience. ZF was trained at MSRA.

Then you can train RRPN by typing:

./experiment/scripts/ [GPU_ID] [NET] rrpn

[NET] usually takes VGG16

Trained RRPN networks are saved under:(We set the directory to './' by default.)


One can change the directory in variable output_dir in $RRPN_ROOT/tools/

Any question about this project please send message to Jianqi Ma(, and enjoy it!

You can’t perform that action at this time.