Giter VIP home page Giter VIP logo

opencv_ocr_dnn's Introduction

OpenCV_OCR_DNN

output image output image

Recognize text with deep learning on a bare Raspberry Pi 4.

License

Paper: https://arxiv.org/pdf/1507.05717.pdf
Special made for a bare Raspberry Pi 4, see Q-engineering deep learning examples


Tip.

๐Ÿ‘‰ See also PaddleOCR-Lite solution. It is 5 times faster and more accurate.


Dependencies.

To run the application, you have to:

  • A raspberry Pi 4 with a 32 or 64-bit operating system. It can be the Raspberry 64-bit OS, or Ubuntu 18.04 / 20.04. Install 64-bit OS
  • OpenCV version 4.5.1 or higher 64-bit installed. Install OpenCV 4.5
  • Code::Blocks installed. ($ sudo apt-get install codeblocks)

Notes.

The image is resized to 100x32 pixels (line 56 at main.cpp) before being processed by OpenCV's deep learning engine.
Obvious, your text must be one line and not too long to be recognized properly.
In contrast to tesseract, deep learning models are less sensitive to font, colour, noise, scale, and skew.
For more models, check the OpenCV tutorial. Most consume considerably more computer power, hence more significant interference times.


Installing the app.

To extract and run the network in Code::Blocks
$ mkdir MyDir
$ cd MyDir
$ wget https://github.com/Qengineering/OpenCV_OCR_DNN/archive/refs/heads/main.zip
$ unzip -j master.zip
Remove master.zip, LICENSE and README.md as they are no longer needed.
$ rm master.zip
$ rm LICENSE
$ rm README.md

Your MyDir folder must now look like this:
*.png
alphabet_36.txt
alphabet_94.txt
OpenCV_OCR.cpb
main.cpp
DenseNet_CTC.onnx


Running the app.

To run the application load the project file OpenCV_OCR.cbp in Code::Blocks.
Next, follow the instructions at Hands-On.


paypal

opencv_ocr_dnn's People

Contributors

qengineering avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  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.