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

dp2coor.py is extremely slow #16

Closed tuallen closed 2 years ago

tuallen commented 2 years ago

Hello,

I'm running dp2coor.py on the DeepFashion high resolution test data as instructed in Dataset and Downloads. However, it takes a long time (>20 seconds) to process each image. I believe it is because scipy.interpolate.griddata is slow on large matrices.

Is this expected behavior from dp2coor.py, and is there a way to speed it up? It would take an exorbitantly long time to process the training data at my current rate. Thank you.

tasinislam21 commented 2 years ago

Have you found the solution?

tuallen commented 2 years ago

@1702609 I remember making two changes. First, I implemented a faster griddata, but I'm afraid you'll need to do that yourself as I cannot share my code either.

The second change also speeds up the code a lot; however, it might not be the best fit for your dataset. Change line 110 of dpcoor.py to the following:

            uv_coor, uv_mask, uv_symm_mask  = getSymXYcoordinates(iuv, resolution = 256)

My images were 256x174 and I didn't find any impact on the quality of the outputs.