Changes I made (compared to original repo, see fork origin):
- Added multithreading support for substantial speedup.
- Save images using original filename (instead of index).
A modified approach to generate CelebA-HQ Dataset
The CelebA-HQ is a dataset introduced in Progressive Growing of GANs for Improved Quality (progressive_growing_of_gans), containing 30,000 high quality images from CelebA.
The images are originally stored as HDF5 format (.h5), which are not suitable for common data loaders. Therefore, I modified the h5tool.py
to generate and save CelebA-HQ images in JPEG format (.jpg).
- Clone the original repository
git clone https://github.com/tkarras/progressive_growing_of_gans/tree/original-theano-version
- Clone this repository
git clone https://github.com/willylulu/celeb-hq-modified
- Replace
h5tool.py
in the original repo with the one in this repo
cp celeb-hq-modified/h5tool.py progressive_growing_of_gans/h5tool
- Create target directory in the original repository
cd progressive_growing_of_gans
mkdir celeba-hq
cd celeba-hq
mkdir celeba-64
mkdir celeba-128
mkdir celeba-256
mkdir celeba-512
mkdir celeba-1024
- Go back to home path
cd
-
Create a directory B and download CelebA non-aligned version and put them in directory A
-
Create a directory A and download CelebA-HQ zip file and put them in directory B
-
Download annotation files and put them in directory B
-
Execute
h5tool.py
python h5tool.py create_celeba_hq 123456.h5 <path to directory A> <path to directory B>