修改了v3(支持自然场景、混合文字场景识别)版本的inference.py模版
This commit is contained in:
19
src/utils.py
Normal file
19
src/utils.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import numpy as np
|
||||
|
||||
from models.ocr_model.utils.inference import inference as latex_inference
|
||||
|
||||
|
||||
def load_lang_models(language: str):
|
||||
...
|
||||
# language: 'ch' or 'en'
|
||||
# return det_model, rec_model (or model)
|
||||
|
||||
|
||||
def load_det_tex_model():
|
||||
...
|
||||
# return the loaded latex detection model
|
||||
|
||||
|
||||
def mix_inference(latex_det_model, latex_rec_model, lang_model, img: np.ndarray, use_cuda: bool) -> str:
|
||||
...
|
||||
# latex_inference(...)
|
||||
Reference in New Issue
Block a user