google-coral / pycoral

Python API for ML inferencing and transfer-learning on Coral devices
https://coral.ai
Apache License 2.0
340 stars 138 forks source link

Pillow 10.0.0 breaking change -- Image.ANTIALIAS deprecated #119

Open cestorer opened 1 year ago

cestorer commented 1 year ago

Description

Following coral setup documentation and ran into a breaking change introduced with Pillow 10.0.0. Image.ANTIALIAS has been deprecated and instead should just use Image.LANCZOS.

Issue Type

Bug

Operating System

No response

Coral Device

USB Accelerator

Other Devices

No response

Programming Language

Python 3.9

Relevant Log Output

home-mini@Mini MINGW64 /c/coral/pycoral (master)
$ python3 examples/classify_image.py \
--model test_data/mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite \
--labels test_data/inat_bird_labels.txt \
--input test_data/parrot.jpg
Traceback (most recent call last):
  File "C:\coral\pycoral\examples\classify_image.py", line 121, in <module>
    main()
  File "C:\coral\pycoral\examples\classify_image.py", line 79, in main
    image = Image.open(args.input).convert('RGB').resize(size, Image.ANTIALIAS)
AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'
feranick commented 4 months ago

This has been fixed in the repo. Should be closed.