Coder Social home page Coder Social logo

aymenbouguerra / udm-trocrm Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.84 MB

Inclusive mathematics education based on digital learning Project Reference : 2021-1-FR01-KA220-HED-000023486. This work is part of the IMEDiL (Inclusive Mathematics Education based on Digital Learning) program that seeks to create digital tools to help and assist the impaired persuing STEM education.

Python 100.00%

udm-trocrm's Introduction

Inclusive mathematics education based on digital learning

Project Reference : 2021-1-FR01-KA220-HED-000023486.

This work is part of the IMEDiL (Inclusive Mathematics Education based on Digital Learning) program that seeks to create digital tools to help and assist the impaired persuing STEM education.

U-net De-noising model for Transformer Optical Recognition for Mathematical equations.

License GitHub Issues GitHub Pull Requests

Brief description of your project.

Table of Contents

Features

  • Creation and training from scratch of a U-net model for de-noising and removing grids from the images of student's textbooks and only keeping the necessary data to be fed to the OCR.
  • the use of transfer learning and retraining on TrOCR on handwritten mathematical equations with latex outputs to create a model to help solve the problem.

Getting Started

Prerequisites

Python 3.9.

An Nvidia GPU will be needed.

Installation

  • Glone this project:

git clone https://github.com/AymenBOUGUERRA/UDM-TrOCRM.git

  • Install the dependencies and prepare the environment

pip install -r requirements.txt

Usage

Argparse was not used in these scripts, you can directly run the needed script without any arguments.

  • You can train the models using the Data_preparation_and_UDM_model_training.py and TrOCRM_training.py scripts.

Warning: TrOCR models have a large volume, make use to have the necessary space (about 5 Go per model/checkpoint)

  • You can test the models using the UDM_testing.py and TrOCRM_test.py scripts.

  • You can compute the scores the TrOCRM model using the TrOCRM_score.py script.

Results

On random images from the test sets: (not even loaded during training).

  • UDM:
    • Example UDM training image:

Example UDM training image

  • Multiple example of UDM de-noising:

Example UDM training image

Example UDM training image

Example UDM training image

  • TrOCR:

    • Multiple examples of the model's predictions on random input images from the test set with no noise:

Multiple examples of the model's predictions on random input images from the test set with no noise

  • Multiple examples of the model's predictions on random input images from the test set with noise:

Multiple examples of the model's predictions on random input images from the test set with noise

  • Multiple examples of the model's predictions on random input images from the test set with noise the were de-noised with UDM before the inference:

Multiple examples of the model's predictions on random input images from the test set with noise the were de-noised with UDM before the inference

  • Exact Match rate (Exp Rate) on noised test set: 0.4% with a Character Error Rate (CER) of 76.6%

  • Exact Match rate (Exp Rate) on clear test set: 26.3% with a Character Error Rate (CER) of 32.2%

License

This project is licensed under the MIT License.

Acknowledgments

  • The research summarized in this article is part of the EU-fundend project IMEDiL (Inclusive Mathematics Education based on Digital Learning).
  • Francesco Salvarani & Christophe Rodrigues from the DVRC for the help and guidance during this research and implementation.

udm-trocrm's People

Contributors

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