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
513 stars 127 forks source link

Missing images in dtd #7

Closed srch07 closed 3 years ago

srch07 commented 3 years ago

Attempting the demo notebook.

Under Setup, first cell it's failing with.

   2842     if filename:
-> 2843         fp = builtins.open(filename, "rb")
   2844         exclusive_fp = True
   2845 

FileNotFoundError: [Errno 2] No such file or directory: '/content/dressing-in-order/dtd/images/chequered/chequered_0052.jpg'

Also just before that cell, I got return code of -1, not sure if this is related.

---------- Networks initialized -------------
[Network E_attr] Total number of parameters : 1.191 M
[Network G] Total number of parameters : 16.501 M
[Network VGG] Total number of parameters : 0.113 M
[Network Flow] Total number of parameters : 6.608 M
-----------------------------------------------
[tensorboard] init tensorboard @ checkpoints/DIOR_64/test
-1

Lastly, can you please guide on how can I generate "train/val split and keypoints from GFLA and PATN" for my own dataset.

cuiaiyu commented 3 years ago

Hi, thank you for pointing the DTD dataset dependency issue. I update the code, in which the dtd loading is removed - it shouldn't be needed anymore.

To generate annotaitons, for train/val split, you may need to decide how to split the data by yourself. For keypoints, we run OpenPose for keypoint detection. To generate the file in the desired format, please refer to PATN's instruction.

srch07 commented 3 years ago

@cuiaiyu Thanks for the fix and pointer. I ran into another one in demo notebook, np variable in demo is not defined. With my limited knowledge in DI, I am not able to gauge what should be initialized with np?


/usr/local/lib/python3.7/dist-packages/torch/nn/functional.py:3613: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
  "See the documentation of nn.Upsample for details.".format(mode)
/usr/local/lib/python3.7/dist-packages/torch/nn/functional.py:3982: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details.
  "Default grid_sample and affine_grid behavior has changed "
torch.Size([18, 256, 176])
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-19-6dc03dd3d3e1> in <module>()
      5 # generate
      6 pimg, gimgs, oimgs, gen_img, pose = dress_in_order(model, pid, pose_id=pose_id)
----> 7 plot_img(pimg, gimgs, oimgs, gen_img, pose)

<ipython-input-18-6e0e9e880c12> in plot_img(pimg, gimgs, oimgs, gen_img, pose)
     54         out = torch.cat(out, 2).float().cpu().detach().numpy()
     55         out = (out + 1) / 2 # denormalize
---> 56         out = np.transpose(out, [1,2,0])
     57 
     58         if pose != None:

NameError: name 'np' is not defined
srch07 commented 3 years ago

@cuiaiyu Nvm, looked through your existing code and found it as numpy. :)