An Open-Source Python3 tool with SMALL models for recognizing layouts, tables, math formulas (LaTeX), and text in images, converting them into Markdown format. A free alternative to Mathpix, empowering seamless conversion of visual content into text-based representations. 80+ languages are supported.
73。 What is the compound interest (i Rs) on a sum Of Rs. 8192 for
$$
1 {\frac{1} {4}} \ \mathrm{y e a r s \; a t \; 1 5 \% \; p e r \; a n n u m, \; i f}
$$
"" coooounoed #~ nonths4p (2) 1740 1640
1634 (4)1735
Exassccotzoeolshier]
13.08.2020 (Shift-J)
and I am using easyocr I know as I have changed the prepare_ocr_engine function
def prepare_ocr_engine(languages: Sequence[str], ocr_engine_config):
ocr_engine_config = deepcopy(ocr_engine_config) if ocr_engine_config else {}
if 1==2:
from cnocr import CnOcr
if 'ch_sim' not in languages and 'cand_alphabet' not in ocr_engine_config: # only recognize english characters
ocr_engine_config['cand_alphabet'] = string.printable
ocr_engine = CnOcr(**ocr_engine_config)
engine_wrapper = CnOCREngine(languages, ocr_engine)
else:
print("using easyocr")
try:
from easyocr import Reader
except:
raise ImportError('Please install easyocr first: pip install easyocr')
gpu = False
if 'context' in ocr_engine_config:
context = ocr_engine_config.pop('context').lower()
gpu = 'gpu' in context or 'cuda' in context
ocr_engine = Reader(lang_list=['en'], gpu=gpu, **ocr_engine_config)
engine_wrapper = EasyOCREngine(languages, ocr_engine)
return engine_wrapper
bug
here is pix2tex output :
here is easyocr output:
extracted texts are perfect in this raw easyocr
and I am using easyocr I know as I have changed the
prepare_ocr_engine
functionOriginally posted by @KTBsomen in https://github.com/breezedeus/Pix2Text/issues/130#issuecomment-2232664131
here is the image