download_pix2pix_data.py 762 字节
Newer Older
L
LielinJiang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
import os
import argparse

from ppgan.utils.download import get_path_from_url

PIX2PIX_URL_ROOT = 'http://efrosgans.eecs.berkeley.edu/pix2pix/datasets/'

parser = argparse.ArgumentParser(description='download datasets')
parser.add_argument('--name',
                    type=str,
                    required=True,
                    help='dataset name, \
                    support dataset name: cityscapes, night2day, edges2handbags, \
                    edges2shoes, facades, maps')

if __name__ == "__main__":
    args = parser.parse_args()

    data_url = PIX2PIX_URL_ROOT + args.name + '.tar.gz'

    path = get_path_from_url(data_url)

    dst = os.path.join('data', args.name)
    print('symlink {} to {}'.format(path, dst))
    os.symlink(path, dst)