diff --git a/fluid/ocr_recognition/ctc_reader.py b/fluid/ocr_recognition/ctc_reader.py index aa7c4eddd559d320a387285881fdd241e2c03558..ae8912b36933f6165babb8fb866bee5e074da850 100644 --- a/fluid/ocr_recognition/ctc_reader.py +++ b/fluid/ocr_recognition/ctc_reader.py @@ -136,6 +136,7 @@ class DataGenerator(object): img = Image.open(img_path).convert('L') img = np.array(img) - 127.5 img = img[np.newaxis, ...] + label = [int(c) for c in line.split(' ')[3].split(',')] yield img, label else: while True: