from tensorflow.python.keras.preprocessing.image import load_img,img_to_array

def main():
    #tagert_size 修改图像大小
    image = load_img("./bus/300.jpg",target_size=(50,50))
    print(image)
    image.show()
    print(img_to_array(image))


if __name__ == '__main__':
    main()

                                  TensorFlow keras读取图片