Cadene / pretrained-models.pytorch

Pretrained ConvNets for pytorch: NASNet, ResNeXt, ResNet, InceptionV4, InceptionResnetV2, Xception, DPN, etc.
BSD 3-Clause "New" or "Revised" License
9.02k stars 1.83k forks source link

DeprecationWarning: BILINEAR is deprecated and will be removed in Pillow 10 #221

Open adamjstewart opened 2 years ago

adamjstewart commented 2 years ago

When running pytest with the latest version of Pillow, you'll see:

../../../anaconda/envs/adam-py37-min/lib/python3.7/site-packages/pretrainedmodels/datasets/utils.py:33
  /anaconda/envs/adam-py37-min/lib/python3.7/site-packages/pretrainedmodels/datasets/utils.py:33: DeprecationWarning: BILINEAR is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BILINEAR instead.
    def __init__(self, size, interpolation=Image.BILINEAR):

This attribute was moved to an enum in Pillow 9.1 and the old attribute will be removed in Pillow 10. We should update this soon.

Related to https://github.com/pytorch/vision/pull/5898 and https://github.com/rwightman/pytorch-image-models/pull/1256.

Fzz123 commented 2 years ago

您的邮件已收到!