garyfeng / Global-Flow-Local-Attention

The source code for paper "Deep Image Spatial Transformation for Person Image Generation"
https://renyurui.github.io/GFLA-web
Other
1 stars 0 forks source link

error in skimage.draw import disk #4

Closed garyfeng closed 3 years ago

garyfeng commented 3 years ago

for the fashion animation model:

!python demo.py \
--name=dance_fashion_checkpoints \
--model=dance \
--attn_layer=2,3 \
--kernel_size=2=5,3=3 \
--gpu_id=0 \
--dataset_mode=dance \
--sub_dataset=fashion \
--dataroot=./dataset/danceFashion \
--results_dir=./demo_results/dance_fashion \
--test_list=val_list.csv

We get the following error:

Traceback (most recent call last):
  File "demo.py", line 10, in <module>
    opt = ValOptions().parse()
  File "/content/Global-Flow-Local-Attention/options/base_options.py", line 74, in parse
    opt = self.gather_options()
  File "/content/Global-Flow-Local-Attention/options/base_options.py", line 60, in gather_options
    model_option_set = model.get_option_setter(opt.model)
  File "/content/Global-Flow-Local-Attention/model/__init__.py", line 25, in get_option_setter
    model = find_model_using_name(model_name)
  File "/content/Global-Flow-Local-Attention/model/__init__.py", line 10, in find_model_using_name
    modellib = importlib.import_module(model_file_name)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/content/Global-Flow-Local-Attention/model/dance_model.py", line 5, in <module>
    from util import task, util, openpose_utils
  File "/content/Global-Flow-Local-Attention/util/openpose_utils.py", line 3, in <module>
    from skimage.draw import disk, line_aa, polygon, circle_perimeter_aa
ImportError: cannot import name 'disk'

see https://github.com/scikit-image/scikit-image/issues/4504, where disk was introduced in v0.17; before that it was called circle.

Indeed in the requirements.txt file sklearn-image did not specify the version. Checking the installation log, we got

Requirement already satisfied: scikit-image in /usr/local/lib/python3.6/dist-packages (from -r requirement.txt (line 6)) (0.16.2)

confirming it's v0.16.2, <0.17