tflite
tflite copied to clipboard
Replace ANTIALIAS with LANCZOS in classify_image.py to fix compatibility issue with Pillow 10.0.0
Background
In the latest version of Pillow (10.0.0), the ANTIALIAS
attribute has been removed. This change caused the classify_image.py
script to fail with an AttributeError
.
Changes
- Replaced
ANTIALIAS
withLANCZOS
in theclassify_image.py
script to ensure compatibility with Pillow 10.0.0. - Verified that the script runs successfully with the updated attribute.
Testing
- Ran the
classify_image.py
script with the updated code. - Confirmed that the script executes without errors and produces the expected results.
Impact
This change ensures that the classify_image.py
script remains compatible with the latest version of Pillow, preventing runtime errors and improving overall stability.
Additional Notes
No other parts of the codebase were affected by this change. The modification is backward compatible with previous versions of Pillow.