Skip to content

Commit 30811fb

Browse files
Repair the bug in the inference script for LaTeX OCR (#13750)
* test * dataprocess_abspath2relpath * repair bug in infer/predict_rec for latexocr
1 parent ba1c813 commit 30811fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/infer/predict_rec.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ def norm_img_latexocr(self, img):
510510
shape = (1, 1, 3)
511511
mean = [0.7931, 0.7931, 0.7931]
512512
std = [0.1738, 0.1738, 0.1738]
513-
scale = 255.0
513+
scale = np.float32(1.0 / 255.0)
514514
min_dimensions = [32, 32]
515515
max_dimensions = [672, 192]
516516
mean = np.array(mean).reshape(shape).astype("float32")

0 commit comments

Comments
 (0)