-
Originally posted by @hlydecker Issue When running the sahi colab notebooks, an error occurs when attempting to run inference using a pretrained model: ImportError Traceback (most recent call last) 14 frames ImportError: cannot import name 'is_directory' from 'PIL._util' (/usr/local/lib/python3.8/dist-packages/PIL/_util.py) A solution to this problem (as per this stack overflow post) is to downgrade Pillow and freeze it at version 6.2.2. Using this version of Pillow allows users to successfully execute the entire notebook demonstrating the functionality of sahi. Risks Freezing the version of Pillow to an earlier state may result in unexpected behaviour, and lead to vulnerabilities in the future if more up to date versions of Pillow are not supported. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You have to restart the runtime after installing sahi and yolov5. After restating, I get no errors in Colab. |
Beta Was this translation helpful? Give feedback.
You have to restart the runtime after installing sahi and yolov5. After restating, I get no errors in Colab.