File size: 518 Bytes
f6f8d06 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import numpy as np
from .base import OCRBase, register_OCR, List, TextBlock
@register_OCR('none_ocr')
class OCRNone(OCRBase):
def __init__(self, **params) -> None:
super().__init__(**params)
params = {
'NOTICE': 'Not a OCR, just return original text.',
'description': 'Not a OCR, just return original text.'
}
def _ocr_blk_list(self, img: np.ndarray, blk_list: List[TextBlock], *args, **kwargs):
pass
def ocr_img(self, img: np.ndarray) -> str:
return '' |