ken2576 / nelf

Official PyTorch Implementation of paper "NeLF: Neural Light-transport Field for Single Portrait View Synthesis and Relighting", EGSR 2021.
50 stars 9 forks source link

where is the code for data preperation? #6

Open zshyang opened 2 years ago

zshyang commented 2 years ago

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.

ken2576 commented 2 years ago

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