GithubHelp home page GithubHelp logo

mercurial24 / bert_ocr.pytorch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chenjun2hao/bert_ocr.pytorch

0.0 1.0 0.0 2.28 MB

Unofficial PyTorch implementation of 2D Attentional Irregular Scene Text Recognizer

Python 100.00%

bert_ocr.pytorch's Introduction

2D Attentional Irregular Scene Text Recognizer

Unofficial PyTorch implementation of the paper, which transforms the irregular text with 2D layout to character sequence directly via 2D attentional scheme. They utilize a relation attention module to capture the dependencies of feature maps and a parallel attention module to decode all characters in parallel.

At present, the accuracy of the paper cannot be achieved. And i borrowed code from deep-text-recognition-benchmark

model

result
Test on ICDAR2019 with only 51.15%, will continue to improve.

Feature

  1. Output image string once not like the seqtoseq model

Requirements

Pytorch >= 1.1.0

Test

  1. download the pretrained model Baidu password: kdah.

  2. test on images which in demo_image folder

python demo.py --image_folder demo_image --saved_model <model_path/best_accuracy.pth>
  1. some examples
demo images Bert_OCR
available
shakesshack
london
greenstead
toast
merry
underground
ronaldo
bally
university
  1. result on benchmark data sets
IIIT5k_3000 SVT IC03_860 IC03_867 IC13_857 IC13_1015 IC15_1811 IC15_2077 SVTP CUTE80
84.367 79.907 91.860 91.465 88.448 86.010 65.654 63.215 68.527 81.185

total_accuracy: 78.423


Train

  1. I prepared a small dataset for train.The image and labels are in ./dataset/BAIDU.
python train.py --root ./dataset/BAIDU/images/ --train_csv ./dataset/BAIDU/small_train.txt --val_csv ./dataset/BAIDU/small_train.txt

Reference

  1. deep-text-recognition-benchmark
  2. 2D Attentional Irregular Scene Text Recognizer

bert_ocr.pytorch's People

Contributors

chenjun2hao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.