Skip to content

Rotational region detection based on Faster-RCNN.

Notifications You must be signed in to change notification settings

sauradip/RCNN_Tensorflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R2CNN_Faster_RCNN_Tensorflow

Abstract

This is a tensorflow re-implementation of R2CNN: Rotational Region CNN for Orientation Robust Scene Text Detection.
It should be noted that we did not re-implementate exactly as the paper and just adopted its idea.

This project is based on Faster-RCNN

Requirements

1、tensorflow >= 1.2
2、cuda8.0
3、python2.7 (anaconda2 recommend)
4、opencv(cv2)

Download Model

1、please download resnet50_v1resnet101_v1 pre-trained models on Imagenet, put it to data/pretrained_weights.
2、please download mobilenet_v2 pre-trained model on Imagenet, put it to data/pretrained_weights/mobilenet.

Compile

cd $PATH_ROOT/libs/box_utils/
python setup.py build_ext --inplace
cd $PATH_ROOT/libs/box_utils/cython_utils
python setup.py build_ext --inplace

Data Prepare

  1. This data is prepare using the Label Image tool Label_Image

  2. Format

├── Data_source
│   ├── Train
│       ├── Images
│       ├── json
│    ├── Test
│       ├── Images
│       ├── json

Inference

python inference_origin.py --data_dir < data path for test>
							--type_test < name output folder>
							--gpu '0'

Train

1、If you want to train your own data, please note:

(1) Modify parameters (such as CLASS_NUM, DATASET_NAME, VERSION, etc.) in $PATH_ROOT/libs/configs/cfgs.py
(2) Add category information in $PATH_ROOT/libs/label_name_dict/lable_dict.py     
(3) Add data_name to line 75 of $PATH_ROOT/data/io/read_tfrecord.py

2、make tfrecord

cd $PATH_ROOT/data/io/  
python convert_data_to_tfrecord.py --data_dir <path_to_data_dir> 
                                   --json_dir json
                                   --image_dir images
                                   --save_name train 
                                   --img_format .jpg
                                   --dataset <name_dataset>

3、train

cd $PATH_ROOT/tools
python train.py

Tensorboard

cd $PATH_ROOT/output/summary
tensorboard --logdir=.

About

Rotational region detection based on Faster-RCNN.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published