def img2tensor(img): ''' ''' img = image.img_to_array(img) img = np.expand_dims(img,axis=0) img = preprocess_input(img) return img