I got following error after upgrading skimage package
1 2 3 4 5 6 7 8 9 10 11 12 |
Traceback (most recent call last): File "afy/yanderify.py", line 21, in <module> from afy.predictor_local import PredictorLocal File "K:\QQData\519329064\FileRecv\yanderifier\yanderify\cuda100\afy\afy\predictor_local.py", line 9, in <module> from animate import normalize_kp File "K:\QQData\519329064\FileRecv\yanderifier\yanderify\cuda100\afy\fomm\animate.py", line 7, in <module> from frames_dataset import PairedDataset File "K:\QQData\519329064\FileRecv\yanderifier\yanderify\cuda100\afy\fomm\frames_dataset.py", line 10, in <module> from augmentation import AllAugmentationTransform File "K:\QQData\519329064\FileRecv\yanderifier\yanderify\cuda100\afy\fomm\augmentation.py", line 12, in <module> from skimage.util import pad ImportError: cannot import name 'pad' from 'skimage.util' (L:\ProgramData\Anaconda3\envs\fomm\lib\site-packages\skimage\util\__init__.py) |
It's because skimage has removed pad API starting from version 0.18 (https://github.com/scikit-image/scikit-image/issues/4147)
Solution
So we should use np.pad
instead of skimage.util.pad
, and this issue will be fixed.