This is a pytorch re-implementation of EAST: An Efficient and Accurate Scene Text Detector.

Overview

EAST: An Efficient and Accurate Scene Text Detector

Description:

This version will be updated soon, please pay attention to this work. The motivation of this version is to build a easy-training model. This version can automatically update best_model by comparing current hmean and the former. At the same time, we can see evaluation info about every sample easily.

  • 1.train
  • 2.predict
  • 3.compress
  • 4.compute Hmean(if Hmean is higher than before, update best_weight.pkl)
  • 5.visualization(blue, green, red)
  • 6.multi-scale test (update soon) multi-scale vis. (vis with score, scales)

Thanks

The version is ported from argman/EAST, from Tensorflow to Pytorch

Check On Website

If you have no confidence of the result of our program, you could use submit.zip to submit on website,then you can see result of every image.

Performance

  • right -- green || wrong -- red || miss -- blue visualization visualization

  • recall/precision/hmean for every test image hmean

Introduction

This is a pytorch re-implementation of EAST: An Efficient and Accurate Scene Text Detector. The features are summarized blow:

  • Only RBOX part is implemented.
  • A fast Locality-Aware NMS in C++ provided by the paper's author.(g++/gcc version 6.0 + will be ok)
  • Evalution see here for the detailed results.
  • Differences from original paper
    • Use ResNet-50 rather than PVANET
    • Use dice loss (optimize IoU of segmentation) rather than balanced cross entropy
    • Use linear learning rate decay rather than staged learning rate decay

Thanks for the author's (@zxytim) help! Please cite his paper if you find this useful.

Contents

  1. Installation
  2. Download
  3. Prepare dataset/pretrain
  4. Test
  5. Train
  6. Examples

Installation

  1. Any version of pytorch version > 0.4.0 should be ok.

Download

  1. Pretrained model is not provided temporarily. Web site is updating now, please continue to pay attention

Prepare dataset/pretrain weight

[1]. dataset(you need to prepare for dataset for train and test) suggestions: you could do a soft-link to root_to_this_program/dataset/train/img/*.jpg

  • -- train ./dataset/train/img/img_###.jpg ./dataset/train/gt/img_###.txt (you need to change name)
  • -- test ./data/test/img_###.jpg (img only)
  • -- gt.zip ./result/gt.zip(ICDAR15 gt.zip is avaliable on website

** Note: you can download dataset here

[2]. pretrained

  • In config.py set resume True and set checkpoint path/to/weight/file
  • I will provide pretrianed weight soon

[3]. check GPUs and CPUs you can use following to check aviliable gpu, this is for train

watch -n 0.1 nvidia-smi

then, you will see 2,3 is avaliable, modify config.py gpu_ids = [0,1], gpu = 2, and modify run.sh - CUDA_VISIBLE_DEVICES=2,3

Train

If you want to train the model, you should provide the dataset path in config.py and run

sh run.py

** Note: you should modify run.sh to specify your gpu id

If you have more than one gpu, you can pass gpu ids to gpu_list(like gpu_list=0,1,2,3) in config.py

** Note: you should change the gt text file of icdar2015's filename to img_*.txt instead of gt_img_*.txt(or you can change the code in icdar.py), and some extra characters should be removed from the file. See the examples in training_samples/**

Test

By default, we set train-eval process into integer. If you want to use eval independently, you can do it by yourself. Any question can contact me.

Examples

Here are some test examples on icdar2015, enjoy the beautiful text boxes! image_1 image_2 image_3 image_4 image_5

You might also like...
👄 The most accurate natural language detection library for Java and the JVM, suitable for long and short text alike
👄 The most accurate natural language detection library for Java and the JVM, suitable for long and short text alike

Quick Info this library tries to solve language detection of very short words and phrases, even shorter than tweets makes use of both statistical and

OCR, Scene-Text-Understanding, Text Recognition

Scene-Text-Understanding Survey [2015-PAMI] Text Detection and Recognition in Imagery: A Survey paper [2014-Front.Comput.Sci] Scene Text Detection and

Implement 'Single Shot Text Detector with Regional Attention, ICCV 2017 Spotlight'

SSTDNet Implement 'Single Shot Text Detector with Regional Attention, ICCV 2017 Spotlight' using pytorch. This code is work for general object detecti

Single Shot Text Detector with Regional Attention
Single Shot Text Detector with Regional Attention

Single Shot Text Detector with Regional Attention Introduction SSTD is initially described in our ICCV 2017 spotlight paper. A third-party implementat

TextBoxes: A Fast Text Detector with a Single Deep Neural Network https://github.com/MhLiao/TextBoxes 基于SSD改进的文本检测算法,textBoxes_note记录了之前整理的笔记。

TextBoxes: A Fast Text Detector with a Single Deep Neural Network Introduction This paper presents an end-to-end trainable fast scene text detector, n

caffe re-implementation of R2CNN: Rotational Region CNN for Orientation Robust Scene Text Detection

R2CNN: Rotational Region CNN for Orientation Robust Scene Text Detection Abstract This is a caffe re-implementation of R2CNN: Rotational Region CNN fo

Implementation of our paper 'PixelLink: Detecting Scene Text via Instance Segmentation' in AAAI2018
Implementation of our paper 'PixelLink: Detecting Scene Text via Instance Segmentation' in AAAI2018

Code for the AAAI18 paper PixelLink: Detecting Scene Text via Instance Segmentation, by Dan Deng, Haifeng Liu, Xuelong Li, and Deng Cai. Contributions

A curated list of papers and resources for scene text detection and recognition

Awesome Scene Text A curated list of papers and resources for scene text detection and recognition The year when a paper was first published, includin

End-to-end pipeline for real-time scene text detection and recognition.
End-to-end pipeline for real-time scene text detection and recognition.

Real-time-Scene-Text-Detection-and-Recognition-System End-to-end pipeline for real-time scene text detection and recognition. The detection model use

Comments
  • Exception continueException in getitem

    Exception continueException in getitem

    After the pre-trained, I want to train the model on my own datasets, and I prepared my training set according to the requirements in the README. But when I run the run.py , problems occured: EAST <==> Prepare <==> Network <==> Done Exception continue Exception in getitem, and choose another index:133 Exception continue

    So how could I solve this problem? Thank you.

    opened by Echo0125 0
  • LOSS 始终是0.01

    LOSS 始终是0.01

    您好!利用自己的数据集,数据格式为 x1, y1, x2, y2, x3, y3, x4, y4, "###" 训练的时候loss始终是0.01,具体如下: image EAST <==> TRAIN <==> Epoch: [0][372/430] Loss 0.0100 Avg Loss 0.0100)

    EAST <==> TRAIN <==> Epoch: [0][373/430] Loss 0.0100 Avg Loss 0.0100)

    EAST <==> TRAIN <==> Epoch: [0][374/430] Loss 0.0100 Avg Loss 0.0100)

    EAST <==> TRAIN <==> Epoch: [0][375/430] Loss 0.0100 Avg Loss 0.0100)

    EAST <==> TRAIN <==> Epoch: [0][376/430] Loss 0.0100 Avg Loss 0.0100)

    EAST <==> TRAIN <==> Epoch: [0][377/430] Loss 0.0100 Avg Loss 0.0100)

    EAST <==> TRAIN <==> Epoch: [0][378/430] Loss 0.0100 Avg Loss 0.0100)

    EAST <==> TRAIN <==> Epoch: [0][379/430] Loss 0.0100 Avg Loss 0.0100)

    EAST <==> TRAIN <==> Epoch: [0][380/430] Loss 0.0100 Avg Loss 0.0100)

    EAST <==> TRAIN <==> Epoch: [0][381/430] Loss 0.0100 Avg Loss 0.0100)

    EAST <==> TRAIN <==> Epoch: [0][382/430] Loss 0.0100 Avg Loss 0.0100)

    EAST <==> TRAIN <==> Epoch: [0][383/430] Loss 0.0100 Avg Loss 0.0100)

    EAST <==> TRAIN <==> Epoch: [0][384/430] Loss 0.0100 Avg Loss 0.0100)

    EAST <==> TRAIN <==> Epoch: [0][385/430] Loss 0.0100 Avg Loss 0.0100)

    EAST <==> TRAIN <==> Epoch: [0][386/430] Loss 0.0100 Avg Loss 0.0100)

    EAST <==> TRAIN <==> Epoch: [0][387/430] Loss 0.0100 Avg Loss 0.0100)

    EAST <==> TRAIN <==> Epoch: [0][388/430] Loss 0.0100 Avg Loss 0.0100)

    EAST <==> TRAIN <==> Epoch: [0][389/430] Loss 0.0100 Avg Loss 0

    opened by jdmking2019 2
  • where is the run.py

    where is the run.py

    l have download your code,then change the dataset path,but i couldn't find where is run.py In your readme.md, you have noticed as fllows: If you want to train the model, you should provide the dataset path in config.py and run

    sh run.py
    
    opened by xianyu-123 0
Owner
Dejia Song
Computer Vision & Machine Learning
Dejia Song
huoyijie 1.2k Dec 29, 2022
Implementation of EAST scene text detector in Keras

EAST: An Efficient and Accurate Scene Text Detector This is a Keras implementation of EAST based on a Tensorflow implementation made by argman. The or

Jan Zdenek 208 Nov 15, 2022
A tensorflow implementation of EAST text detector

EAST: An Efficient and Accurate Scene Text Detector Introduction This is a tensorflow re-implementation of EAST: An Efficient and Accurate Scene Text

null 2.9k Jan 2, 2023
python ocr using tesseract/ with EAST opencv detector

pytextractor python ocr using tesseract/ with EAST opencv text detector Uses the EAST opencv detector defined here with pytesseract to extract text(de

Danny Crasto 38 Dec 5, 2022
EAST for ICPR MTWI 2018 Challenge II (Text detection of network images)

EAST_ICPR2018: EAST for ICPR MTWI 2018 Challenge II (Text detection of network images) Introduction This is a repository forked from argman/EAST for t

QichaoWu 49 Dec 24, 2022
TextBoxes++: A Single-Shot Oriented Scene Text Detector

TextBoxes++: A Single-Shot Oriented Scene Text Detector Introduction This is an application for scene text detection (TextBoxes++) and recognition (CR

Minghui Liao 930 Jan 4, 2023
Forked from argman/EAST for the ICPR MTWI 2018 CHALLENGE

EAST_ICPR: EAST for ICPR MTWI 2018 CHALLENGE Introduction This is a repository forked from argman/EAST for the ICPR MTWI 2018 CHALLENGE. Origin Reposi

Haozheng Li 157 Aug 23, 2022
An Implementation of the alogrithm in paper IncepText: A New Inception-Text Module with Deformable PSROI Pooling for Multi-Oriented Scene Text Detection

InceptText-Tensorflow An Implementation of the alogrithm in paper IncepText: A New Inception-Text Module with Deformable PSROI Pooling for Multi-Orien

GeorgeJoe 115 Dec 12, 2022
Packaged, Pytorch-based, easy to use, cross-platform version of the CRAFT text detector

CRAFT: Character-Region Awareness For Text detection Packaged, Pytorch-based, easy to use, cross-platform version of the CRAFT text detector | Paper |

null 188 Dec 28, 2022