cuiaiyu / dressing-in-order

(ICCV'21) Official code of "Dressing in Order: Recurrent Person Image Generation for Pose Transfer, Virtual Try-on and Outfit Editing" by Aiyu Cui, Daniel McKee and Svetlana Lazebnik
https://cuiaiyu.github.io/dressing-in-order
Other
507 stars 126 forks source link

colab Load Pretrained Model Error #98

Open KihongK opened 5 months ago

KihongK commented 5 months ago

Errors occured at colab Step2 (without any modifications)

download DIORv1_64.
/usr/local/lib/python3.10/dist-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=VGG19_Weights.IMAGENET1K_V1`. You can also use `weights=VGG19_Weights.DEFAULT` to get the most up-to-date weights.
  warnings.warn(msg)
Downloading: "https://download.pytorch.org/models/vgg19-dcbb9e9d.pth" to /root/.cache/torch/hub/checkpoints/vgg19-dcbb9e9d.pth
100%|██████████| 548M/548M [00:06<00:00, 92.7MB/s]
load vgg ckpt from torchvision dict.
[init] init pre-trained model vgg.
initialize network with orthogonal
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
[<ipython-input-5-77bd5b5628e0>](https://localhost:8080/#) in <cell line: 34>()
     32 download_from_gdrive("checkpoints", "DIORv1_64", "1MyHq-P0c8zz7ey7p_HTTZKeMie5ZuNlb")
     33 
---> 34 model = DIORModel(opt)
     35 model.setup(opt)
     36 

12 frames
[/usr/local/lib/python3.10/dist-packages/skimage/_shared/utils.py](https://localhost:8080/#) in copy_func(f, name)
    195 
    196     """
--> 197     return types.FunctionType(f.__code__, f.__globals__, name or f.__name__,
    198                               f.__defaults__, f.__closure__)
    199 

AttributeError: 'numpy._ArrayFunctionDispatcher' object has no attribute '__code__'
ArnabChatterjee20k commented 4 months ago

Facing the same error

rizavelioglu commented 2 months ago

@KihongK @ArnabChatterjee20k Resolved the issue with:

pip install numpy==1.22

So, downgrading numpy works.

Edit: scipy complains about numpy version, so, it's better to install pip install numpy==1.22.4