Skills/Error
[Error] AttributeError: module 'PIL.Image' has no attribute 'LINEAR'
Suyeon Cha
2024. 1. 18. 03:06
728x90
detectorron2/Detectron2/data/transforms/transform.py
이 파일 내에서 일어난 오류로 detectron2를 사용하는 지점에서 발생한 오류인데, pillow version을 10.0.0 이하로 낮추는 방법으로도 해결이 될 순 있는데, 그 다음부턴 안 됐다.
방법 1
pip install pillow==9.5.0
그래서 아래의 방법으로 해결하였다.
방법 2
python3 -m pip install -U 'git+https://github.com/facebookresearch/detectron2.git@ff53992b1985b63bd3262b5a36167098e3dada02'
728x90