Zhangjinso / PISE

123 stars 28 forks source link

How to test my own images? #5

Closed lwhkop closed 3 years ago

lwhkop commented 3 years ago

Hi, I'm very interested in your project. Now I have my own dataset includes pairs of images and keypoints. Could I use your pre-trained model to test my own images (256 * 192)?

Zhangjinso commented 3 years ago

To test your own images, you first need to resize your image as 256X176 and padding to 256X256. Then, you need to prepare your data to produce keypoints of the source image and target image in the same format of fasion-annotation-test.csv(you can refer to https://github.com/tengteng95/Pose-Transfer to obtain a npy file of keypoints and change the dataloader of keypoints.). Besides, you need to get the parsing map using https://github.com/Engineering-Course/CIHP_PGN, and re-organize the labels as from_label = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 , 18, 19, 20] to_label = [0, 1, 1, 0, 0, 2, 3, 2, 7, 3, 6, 0, 3, 5, 6, 6, 7, 7, 4, 4, 0]. After that, you can test your own images. I do not think good results can be obtained, because the model is trained on one dataset. But if the image is similar to the images of DeepFashion, it can work.

confifu commented 3 years ago

Anyone looking for the parsing model, I created a colab notebook that uses PGN. The labels need to be reorganized. https://colab.research.google.com/drive/15uGzI5adMsZ7mIfVsr3Ruda25JswraPU?usp=sharing