은 내가 roi.jpg 같은 디렉토리에 저장된 이미지입니다image.load_img 오류, Keras
from keras.preprocessing import image
test_image = image.load_img('roi.jpg', target_size = (64, 64),grayscale=True)
test_image = image.img_to_array(test_image)
test_image = np.expand_dims(test_image, axis = 0)
다음 코드를 가지고있다. 실행 후 다음 오류가 발생했습니다.
test_image = image.load_img('roi.jpg', target_size = (64, 64),grayscale=True)
File "C:\ProgramData\Anaconda3\lib\site-packages\keras\preprocessing\image.py", line 345, in load_img raise ImportError('Could not import PIL.Image. ')
ImportError: Could not import PIL.Image. The use of `array_to_img` requires PIL.
이 오류를 해결하는 데 도움을주십시오. 나는 당신은 PIL 모듈이 필요 windows 10
및 python version : Python 3.6.3 :: Anaconda custom (64-bit)
기본적으로이 메시지는 PIL을 설치하라는 메시지를 표시합니다. 너 그거 해봤 니? – usr2564301
예, 베개를 설치했습니다. 그러나 그것을 해결하지 못했습니다. –
@ usr2564301 감사합니다 –