menyifang / ADGAN

The Implementation of paper "Controllable Person Image Synthesis with Attribute-Decomposed GAN" CVPR 2020 (Oral); Pose and Appearance Attributes Transfer;
473 stars 90 forks source link

Run time error during test #43

Open EMHussain opened 2 years ago

EMHussain commented 2 years ago

I tested with bash python ./scripts/test.sh to test using pre-trained 800-netG model.

data is arranged as follows:

+—deepfashion
|   +—fashion_resize
|       +--train (files in 'train.lst')
|          +-- e.g. fashionMENDenimid0000008001_1front.jpg
|       +--test (files in 'test.lst')
|          +-- e.g. fashionMENDenimid0000056501_1front.jpg
|       +--trainK(keypoints of person images)
|          +-- e.g. fashionMENDenimid0000008001_1front.jpg.npy
|       +--testK
|          +-- e.g. fashionMENDenimid0000056501_1front.jpg.npy
|   +—semantic_merge
|   +—fashion-resize-pairs-train.csv
|   +—fashion-resize-pairs-test.csv
|   +—fashion-resize-annotation-pairs-train.csv
|   +—fashion-resize-annotation-pairs-test.csv
|   +—train.lst
|   +—test.lst
|   +—vgg19-dcbb9e9d.pth
|   +—vgg_conv.pth
... 

code reference

https://github.com/menyifang/ADGAN/blob/c76647172e923573b4012b6c17a1b3938155aedd/data/keypoint.py#L52:L88

I got following runtime error :

/ADGAN/data/keypoint.py", line 80, in __getitem__
 BP1 = BP1.transpose(2, 0) #c,w,h
 IndexError: Dimension out of range (expected to be in range of [-2, 1], but got 2)

debug output :

>>>BP1_img.shape
(256, 176)

Any suggestions how to solve this!