Belval / CRNN

A TensorFlow implementation of https://github.com/bgshih/crnn
MIT License
299 stars 101 forks source link

the resize_image function in utils should add "dtype=np.uint8" #26

Open Incenter2016 opened 6 years ago

Incenter2016 commented 6 years ago

def resize_image(image, input_width): im_arr = imread(image, mode='L') r, c = np.shape(im_arr)

if c > input_width:
    c = input_width
    ratio = float(input_width) / c
    final_arr = imresize(im_arr, (int(32 * ratio), input_width))
else:
    final_arr = np.zeros((32, input_width))

final_arr = np.zeros((32, input_width), dtype=np.uint8)