Giter Site home page Giter Site logo

ocr_sb's Introduction

About this repository

📌 In this repository, you'll find scripts and instructions for both training (from scratch) and testing an ensemble of five character recognition models using a cross––folding technique. It also includes five pre––trained character recognition models derived from experiments detailed in the research paper titled 'OCR Processing of Swedish Historical Newspapers Using Deep Hybrid CNN–LSTM Networks,' which can be accessed here.

📌 Our experiments, conducted with the open––source OCR engine Calamari, showcased the superiority of mixed deep CNN––LSTM hybrid models over previous methods for character recognition of Swedish historical newspaper text dated between 1818 and 1848. The models achieved an average character accuracy rate (CAR) of 97.43%, setting a new state––of––the––art standard in the analysis of 19th––century Swedish newspaper text.

Instructions for the command–line interface

Training

The calamari-cross-fold-train command will train an ensemble of 5 models based on a cross–fold of the provided training data. Training duration is adapted by the --early_stopping_nbest=5 parameter.

usage: calamari-cross-fold-train --network=cnn=80:3x3,pool=2x2,cnn=100:3x3,pool=2x2,lstm=200,dropout=0.5,lstm=200,dropout=0.5 --files path_to_training_data/*.png --best_models_dir some_output_dir --early_stopping_nbest=5 

Voting

Confidence voting to different predictions of the five best models.

 usage: calamari-predict --checkpoint path_to_model_0.ckpt ... path_to_model_4.ckpt --files path_to_test_data/*.bin.png --output_dir some_output_dir

Evaluation

Evaluate the predicted sentences produced by the calamari-predict script against the provided ground truth.

 usage: calamari-eval --gt path_to_test_data/*.gt.txt --pred path_to_predictions/*.pred.txt

Version

Calamari 2.1.2 (2022/01/18) https://github.com/Calamari-OCR/calamari

Dataset

The dataset contains text line images (bin.png) and their corresponding ground truth (gt.txt) from selected Swedish newspapers spanning between 1818 and 1848. The dataset has been further divided into training and test subsets.

test dataset: 1671 lines
training dataset: 6742 lines 

ocr_sb's People

Contributors

mskelb avatar

Stargazers

 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.