【发布时间】:2021-07-20 23:53:16
【问题描述】:
在 jupyter notebook 的 keras 中的“load_img”中输入图像时出现 FileNotFoundError
import pickle
import numpy as np
from tensorflow.keras.preprocessing.image import ImageDataGenerator,load_img
import json
import requests
import PIL
import matplotlib.pyplot as plt
img=np.array(load_img("IMG_2996.jpg").resize((224,224))).tolist() #Iam getting problem here,in jupyter notebook it is showing filenotfound
url='http://127.0.0.1:5000/model'
requested_data=json.dumps({'img':img})
response = requests.post(url,requested_data)
response.text
【问题讨论】:
标签: python image-processing keras jupyter-notebook jupyter