Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Applications/DocXChain/modules/formula_recognition.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import sys
import numpy as np

from rapid_latex_ocr import LatexOCR
from rapid_latex_ocr import LaTeXOCR

class FormulaRecognition(object):
"""
Expand All @@ -31,7 +31,7 @@ def __init__(self, configs):
encoder_path = configs['encoder_path']
decoder_path = configs['decoder_path']
tokenizer_json = configs['tokenizer_json']
self.formula_recognizer = LatexOCR(image_resizer_path = image_resizer_path, encoder_path = encoder_path, decoder_path = decoder_path, tokenizer_json = tokenizer_json)
self.formula_recognizer = LaTeXOCR(image_resizer_path = image_resizer_path, encoder_path = encoder_path, decoder_path = decoder_path, tokenizer_json = tokenizer_json)

def __call__(self, image):
"""
Expand Down Expand Up @@ -64,4 +64,4 @@ def release(self):
if self.formula_recognizer is not None:
del self.formula_recognizer

return
return