Git Product home page Git Product logo

vietnameseocr's Introduction

VietnameseOCR - Vietnamese Optical Character Recognition

Apply Deep Learning ( CNN networks ) to train a model uses for recognizing Vietnamese characters, it works well with Latin characters.

Dataset in big image ( 10.000 samples, 2800 x 2800 pixel)

Requirements

python 3.6.5
tensorflow
PIL

Model Summary

Layer Shape Kernel Stride Padding
INPUT [28, 28, 1]
CONV1 [3, 3, 32, 32] [1, 1] SAME
POOL1
CONV2 [3, 3, 32, 64] [1, 1] SAME
POOL2
CONV3 [3, 3, 64, 128] [1, 1] SAME
POOL3
FC1
FC2 [625, 190]

Results

Training...

......
Epoch: 38 cost = 0.312853018
Epoch: 39 cost = 0.298816641
Epoch: 40 cost = 0.293328794

Evaluation
------------------------------
Test Accuracy: 0.974867469544

Training

Prepare dataset for training

git clone https://github.com/miendinh/VietnameseOCR.git
cd VietnameseOCR/data/train/characters
unzip dataset.zip

Let's train.

python train.py

Create you own dataset

Prepare fonts for generating text-image
  • You could add more fonts
cd VietnameseOCR/data/train/characters
unzip google.zip
unzip win.zip
Create font list, then save it in fonts.list
source ./list.sh
Generate Text Image Dataset
python generate_data.py

Play with pretrained model

  • All pretrained weights of model is save to file vocr.brain
  • Let's test with random character in dataset
python predict.py

Further working

  • Character classification.
  • Dataset augmentation.
  • Improve accuracy.
  • Text location.
  • Text recognition.
  • Apply NLP for spell checking.

References

  1. STN-OCR: A single Neural Network for Text Detection and Text Recognition
  2. Automatic Dataset Augmentation
  3. VGG16 implementation in TensorFlow
  4. Vietnamese Dict (VietOCR3)

Author mien.hust [at] gmail [dot] com

vietnameseocr's People

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.