BadourAlBahar / pose-with-style

[SIGGRAPH Asia 2021] Pose with Style: Detail-Preserving Pose-Guided Image Synthesis with Conditional StyleGAN
https://pose-with-style.github.io/
MIT License
268 stars 41 forks source link

IndexError: index 24 is out of bounds for axis 0 with size 24 #29

Closed shrinivasait closed 1 year ago

shrinivasait commented 1 year ago

Hi,

I was testing the garment transfer.py code, But it's showing the following error. while I followed every step. Please Guide through.

Error::

Traceback (most recent call last): File "/content/drive/MyDrive/pose-with-style/garment_transfer.py", line 196, in generate(args, g_ema, device, mean_latent) File "/content/drive/MyDrive/pose-with-style/garment_transfer.py", line 58, in generate input_uv_coor, input_uv_mask, input_uv_symm_mask = getSymXYcoordinates(input_pose, resolution = 512) File "/content/drive/MyDrive/pose-with-style/util/dp2coor.py", line 9, in getSymXYcoordinates xy, xyMask = getXYcoor(iuv, resolution = resolution) File "/content/drive/MyDrive/pose-with-style/util/dp2coor.py", line 35, in getXYcoor x, y, u, v = mapper(iuv, resolution) File "/content/drive/MyDrive/pose-with-style/util/dp2coor.py", line 73, in mapper uv_smpl = dp_uv_lookup_256_np[ IndexError: index 24 is out of bounds for axis 0 with size 24

cuiaiyu commented 1 year ago

This is probably because you load the densepose as VUI rather than IUV (so a RGB or BGR image loading/saving problem.)

shrinivasait commented 1 year ago

Thank you for taking the time to answer my query. I have resolved the issue.

ghost commented 9 months ago

@shrinivasait @cuiaiyu @BadourAlBahar @fyviezhao Could you please guide me how to fix the below issue. I encountered while trying Repose - Upper Body

/content/PWS Traceback (most recent call last): File "/content/PWS/inference.py", line 144, in generate(args, g_ema, device, mean_latent) File "/content/PWS/inference.py", line 48, in generate input_pose = np.array(Image.open(os.path.join(path, input_name+'_iuv.png'))) File "/usr/local/lib/python3.10/dist-packages/PIL/Image.py", line 3227, in open fp = builtins.open(filename, "rb") FileNotFoundError: [Errno 2] No such file or directory: './test_data/source_iuv.png'