nperraud / download-celebA-HQ

Python script to download the celebA-HQ dataset from google drive
139 stars 27 forks source link

celebA-HQ output is 3*3 image replication with 1024*1024? #8

Closed HavenFeng closed 6 years ago

HavenFeng commented 6 years ago

Hi nperraud, Thanks for your code, I'm running the make_HQ_images.py without any problem, but the result is not a single subject 1024by1024 image but a 3by3 replication of the subject(and the image is in grey scale). Is this normal or I missed some steps? Here is an example: celebhq_test

HavenFeng commented 6 years ago

Oh, I just found it's a numpy reshape problem. The code runs very well.

vjtrost88 commented 5 years ago

@HavenFeng I'm having the same problem here - what was your reshaping solution?

vjtrost88 commented 5 years ago

Figured it out. For anyone else who might be encountering this problem, use the following: img = img.transpose(0,2,3,1) where img is the numpy array for the image. Just need to reorder things, so image stays first, height second, width third, and channels fourth.

nperraud commented 5 years ago

So should I change something in my code?

vjtrost88 commented 5 years ago

@nperraud I don't think so - unless you want your code to save image files too. The code does a great job of reconstructing the .npy files. Images are icing on the cake. Thanks for this repo, it worked great and helped a ton!

nperraud commented 5 years ago

Happy that you found it useful! Thanks for your clear answer.