Skip to content

Scene Text Detection and Style Classification into Machine Printed and Handwritten Text

Notifications You must be signed in to change notification settings

mohammaduzair9/Style-Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Style Classification into Machine Printed and Handwritten Text

Keras implementation of Faster R-CNN to classify text into Machine Printed and Handwritten Text

Getting Started

Prerequisites

  • numpy
$ pip install numpy
  • h5py
$ pip install h5py
  • opencv-python
$ pip install opencv-python
  • sklearn
$ pip install scikit-learn
  • Keras==2.0.3 (Both theano and tensorflow backends are supported. However tensorflow is recommended)
$ pip install Keras==2.0.3
  • Tensorflow
$ pip install Tensorflow

Trained Model

Trained model can be downloaded from: https://drive.google.com/drive/folders/1eymjiH7_oWJbSI4LOAVhMzzNFtkbYcPz?usp=sharing

How to run Training:

  • Copy pretrained weights for resnet50 (resnet50_weights_tf_dim_ordering_tf_kernels.h5) in Style-Classification directory.

  • train_frcnn.py can be used to train a model. To train the data, it must be in PASCAL VOC format. To train simply do:

$ python train_frcnn.py -p /path/to/train_data/
  • Running train_frcnn.py will write weights to disk to an hdf5 file, as well as all the setting of the training run to a pickle file. These settings can then be loaded by test_frcnn.py for any testing.

How to run Testing:

  • Copy trained model(model_frcnn.hd5) and config.pickle file in Style-Classification diectory.

  • test_frcnn.py can be used to perform inference, given pretrained weights and a config file. Specify a path to the folder containing images:

$ python test_frcnn.py -p /path/to/test_data/

CREDITS

This code is inspired from https://github.com/yhenon/keras-frcnn

About

Scene Text Detection and Style Classification into Machine Printed and Handwritten Text

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published