Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 1.14 KB

README.md

File metadata and controls

51 lines (33 loc) · 1.14 KB

LAS-OCR

OCR model made of using LAS's speller and image encoder.


Example

from model import InferenceModel

model_path = './models/LAS_number_enclstm3_declstm3_3440.pt'
inference_model = InferenceModel(model_path)
import matplotlib.pyplot as plt
import cv2

img = cv2.imread(your_img_path)
s, _ = inference_model(img, is_bgr=True, use_beam=True)
print(s)

plt.imshow(img[...,::-1])
51.55

download


Preview

download

Loss Graph

download


Visual Attention Score

image


Reference

Listen-Attend-and-Spell-Pytorch

Chan, William, et al. “Listen, attend and spell.” arXiv preprint arXiv:1508.01211 (2015).APA