[Python] AttributeError: module 'scipy.ndimage' has no attribute 'imread' 해결

es.Seong·2024년 4월 19일
0

예제 코드를 돌리던 중 scipy를 통해 이미지를 읽는 코드에서 오류가 발생했다.

  • 원인
    scipy.ndiamge는 deprecated 되었다고 합니다.

  • 해결 방법

!pip install imageio

from imageio import imread

data = imageio.v2.imread("test.jpg")

imageio 라이브러리를 설치 후 imageio.v2.imread를 사용해주면 정상적으로 코드가 작동하게된다.

profile
Graduate student at Pusan National University, majoring in Artificial Intelligence

0개의 댓글