nelf icon indicating copy to clipboard operation
nelf copied to clipboard

where is the code for data preperation?

Open zshyang opened this issue 3 years ago • 1 comments

Hi, Thanks for sharing this repo. Could you guide me on how to process the CelebAHQ dataset as you've mentioned in your homepage? Best regards.

zshyang avatar Jun 06 '22 18:06 zshyang

Hi You could just load the mask (remember to set a threshold to keep only the face) and multiply it with the RGB image to remove the background. Also, I would suggest using resize function from Pillow (https://pillow.readthedocs.io/en/stable/). Set argument to PIL.Image.LANCZOS for the best result.

Steps:

  1. Download images
  2. Mask out the background
  3. Resize

ken2576 avatar Jun 08 '22 21:06 ken2576