GithubHelp home page GithubHelp logo

satoshirobatofujimoto / handwritten-japanese-ocr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yas-sim/handwritten-japanese-ocr

0.0 1.0 0.0 793 KB

Handwritten Japanese OCR demo using touch panel to draw the input text using Intel OpenVINO toolkit

License: Apache License 2.0

Python 100.00%

handwritten-japanese-ocr's Introduction

Handwritten Japanese Deep Learning Based OCR with Touch Panel Demo

This is a handwritten Japanese OCR demo program based on a sample program from Intel(r) Distribution of OpenVINO(tm) Toolkit 2020.2 (handwritten-japanese-recognition.py)
The demo program has simple UI and you can write Japanese on the screen with the touch panel by your finger tip and try Japanese OCR performance.
The demo uses a pre-trained text-detection DL model (text-detection-0003) from Intel(r) Open Model Zoo to detect the text regions from the canvas and run a DL based OCR model for those text regions.

手書き日本語OCRデモです。Intel(r) Distribution of OpenVINO(tm) toolkit 2020.2に付属のhandwritten-japanese-recognition.pyデモを大幅に書き換えています。
簡単なUIを用意していますのでタッチパネル付きPCがあれば指で字を書いて認識させるデモを行うことが可能です。
Intel(r) Open Model Zooの文字検出DLモデル(text-detection-0003)で自動領域識別も行ない、DL-OCRモデルで文字認識を行います。

OCR demo

Required DL Models to Run This Demo

The demo expects the following models in the Intermediate Representation (IR) format:

  • handwritten-japanese-recognition-0001
  • text-detection-0003

You can download those models from OpenVINO Open Model Zoo. In the models.lst is the list of appropriate models for this demo that can be obtained via Model downloader. Please see more information about Model downloader here.

How to Run

(Assuming you have successfully installed and setup OpenVINO 2020.2. If you haven't, go to the OpenVINO web page and follow the Get Started guide to do it.)

1. Install dependencies

The demo depends on:

  • opencv-python
  • numpy

To install all the required Python modules you can use:

(Linux) pip3 install -r requirements.txt
(Win10) pip install -r requirements.txt

2. Download DL models from OMZ

Use Model Downloader to download the required models.

(Linux) python3 $INTEL_OPENVINO_DIR/deployment_tools/tools/model_downloader/downloader.py --list models.lst
(Win10) python "%INTEL_OPENVINO_DIR%\deployment_tools\tools\model_downloader\downloader.py" --list models.lst

3. Run the demo app

This program doesn't take any command line arguments. All file names and paths are hard coded in the source code.

(Linux) python3 handwritten-japanese-OCR-touch-panel-demo.py
(Win10) python handwritten-japanese-OCR-touch-panel-demo.py

Please make sure the following files are placed at the proper location.

./  
+ handwritten_japanese-OCR-touch-panel-demo.py  
+ data  
| + kondate_nakayosi_char_list.txt  
+ intel  
| + handwritten-japanese-recognition-0001  
| | + FP16  
| | | + handwritten-japanese-recognition-0001.xml  
| | | + handwritten-japanese-recognition-0001.bin  
| + text-detection-0003  
| | + FP16  
| | | + text-detection-0003.xml  
| | | + text-detection-0003.bin  

Demo Output

The application uses the terminal to show resulting recognition text strings.

Tested Environment

  • Windows 10 x64 1909 and Ubuntu 18.04 LTS
  • Intel(r) Distribution of OpenVINO(tm) toolkit 2020.2
  • Python 3.6.5 x64

See Also

handwritten-japanese-ocr's People

Contributors

yas-sim 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.