Getting the data

In this section, we will define some helper functions that will help us to download the CelebA dataset. We'll start off by importing their required packages for this implementation:

import math
import os
import hashlib
from urllib.request import urlretrieve
import zipfile
import gzip
import shutil

import numpy as np
from PIL import Image
from tqdm import tqdm
import utils

import tensorflow as tf

Next up, we are going to use the utils script to download the dataset:

#Downloading celebA dataset
celebA_data_dir = 'input'
utils.download_extract('celeba', celebA_data_dir)
Output:

Downloading celeba: 1.44GB [00:21, 66.6MB/s]
Extracting celeba...
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset