Skip to content

yakhyo/east-pytorch

Repository files navigation

EAST: An Efficient and Accurate Scene Text Detector

PyTorch re-implementation of EAST: An Efficient and Accurate Scene Text Detector (CVPR 2017).

Table of Contents

Project Description

Training results of EAST model with 600 epochs on ICDAR2015 dataset.

Model Loss Recall Precision F-score
Original CE 72.75 80.46 76.41
Re-Implement Dice 81.27 80.61 80.93

Installation

git clone https://github.com/yakhyo/east-pytorch.git
cd east-pytorch 
pip install -r requirements.txt

Pre-trained backbone weight can be downloaded from here and put it inside weights folder.

Dataset:

  • Download the dataset here and place them as shown below:
  • Task 4.1: Text Localization (2015 edition)
├── east-pytorch
    ├── assets
    ├── evaluate
    ├── east
    |    ├── models
    |    └── utils
    │── weights
    └── data
        ├── ch4_test_gt
        ├── ch4_test_images
        ├── ch4_train_gt
        └── ch4_train_images

Usage

Usage:

usage: train.py [-h] [--cfg CFG] [--data-path DATA_PATH] [--pretrained PRETRAINED] [--checkpoint CHECKPOINT] [--save-dir SAVE_DIR]
                [--batch-size BATCH_SIZE] [--learning-rate LEARNING_RATE] [--num-workers NUM_WORKERS] [--epochs EPOCHS]

Train:

python train.py

Usage of detect.py:

usage: detect.py [-h] [--cfg CFG] [--weights WEIGHTS] [--input INPUT] [--output OUTPUT]

Inference:

python detect.py --weights weights/model.pt --input [input_image] --output [output_file_name]

Evaluation and Inference:

  1. The evaluation scripts are from ICDAR Offline evaluation and have been modified to run successfully with Python 3.8.
  2. Change the evaluate/gt.zip if you test on other datasets.
  3. Modify the parameters in east/tools/eval.py and run:

Contributing

If you find any issues within this code, feel free to create PR or issue.

License

The project is licensed under the MIT license.

Reference

  1. Some part of the code refers to https://github.com/SakuraRiven/EAST.

About

Reimplementation of "EAST: An Efficient and Accurate Scene Text Detector" using PyTorch

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages