Repair the bug in the inference script for LaTeX OCR (#13750)

* test

* dataprocess_abspath2relpath

* repair bug in infer/predict_rec for latexocr
pull/13757/head
liuhongen1234567 2024-08-26 14:21:41 +08:00 committed by GitHub
parent ba1c81358f
commit 30811fba3c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -510,7 +510,7 @@ class TextRecognizer(object):
shape = (1, 1, 3)
mean = [0.7931, 0.7931, 0.7931]
std = [0.1738, 0.1738, 0.1738]
scale = 255.0
scale = np.float32(1.0 / 255.0)
min_dimensions = [32, 32]
max_dimensions = [672, 192]
mean = np.array(mean).reshape(shape).astype("float32")