carolreis / mathreader

An API that recognizes handwritten mathematical expressions through the use of a Convolutional Neural Network, to facilitate the input ofmathematical notation in computational devices.
GNU General Public License v3.0
23 stars 4 forks source link

MathReader: API for handwritten mathematical expressions recognition

Paper: MathReader: API for handwritten mathematical expressions recognition, published in 2020 IEEE 32nd International Conference on Tools with Artificial Intelligence (ICTAI)

Details about implementation are described in the paper.


Interface for validation:

GitHub Project: MathReader Validation


MathReader Neural Network Training

If you want to re-train the neural network model. Feel free to improve it (details about the training process is described in the paper mentioned above).

GitHub Project: MathReader Training


About:

Usage:

Example in: main.py

from api import *

hme_recognizer = HME_Recognizer()

image = ['images/numbers/teste10.png']

try:
    hme_recognizer.load_image(image)
    expression, img = hme_recognizer.recognize()
    print("Latex: ", expression)
except Exception as e:
    print('Exception: ', e)

Configuration

Configuration file is in docs/config.json

{
    "application": {
        "debug_mode": "active",
        "debug_mode_image": "active"
    }
}

HME_Recognizer

All attributes and methods avaiable in __HME_Recognizer__ class at api.py

Attributes:

- image
- parsed_expression
- processed_image
- predictions
- configurations
- expression_after_recognition
- expression_after_parser
- expression_after_grammar
- parser_tree
- parser_list
- lex_errors
- yacc_errors
- pure_lex_errors
- pure_yacc_errors

Methods