Self-Distilled Internet Photos (SDIP) Dataset

Self-Distilled Flickr (SD-Flickr) Self-Distilled LSUN (SD-LSUN)
SD-Dogs SD-Bicycles
SD-Elephants SD-Horses

Self-Distilled Internet Photos (SDIP) is a multi-domain image dataset. The dataset consists of Self-Distilled Flickr (SD-Flickr) and Self-Distilled LSUN (SD-LSUN) that were crawled from Flickr and LSUN dataset, respectively, and then curated using the method described in our Self-Distilled StyleGAN paper:

Self-Distilled StyleGAN: Towards Generation from Internet Photos
Ron Mokady, Michal Yarom, Omer Tov, Oran Lang, Daniel Cohen-Or, Tali Dekel, Michal Irani, Inbar Mosseri
https://arxiv.org/abs/2202.12211

Overview

StyleGAN’s fascinating generative and editing abilities are limited to structurally aligned and well-curated datasets. It does not work well on raw datasets downloaded from the Internet. The SDIP domains presented here, which are StyleGAN-friendly, were automatically curated by our method from raw images collected from the Internet. The raw uncurated images in Self-Distilled Flicker (SD-Flickr) were first crawled from Flickr using a simple keyword (e.g. ‘dog’ or ‘elephant’).

The dataset in this page exhibits 4 domains: SD-Dogs (126K images), SD-Elephants (39K images), SD-Bicycles (96K images), and SD-Horses (162K images). Our curation process consists of a simple pre-processing step (off-the-shelf object detector to crop the main object and then rescale), followed by a sophisticated StyleGAN-friendly filtering step (which removes outlier images while maintaining dataset diversity). This results in a more coherent and clean dataset, which is suitable for training a StyleGAN2 generator (see more details in our paper).

The data itself is saved in a json format: for SD-Flickr we provide urls of the original images and bounding boxes used for cropping; for SD-LSUN we provide image identifiers with the bounding boxes. In addition to the SDIP dataset, we also provide weights of pre-trained StyleGAN2 models trained using each image domain presented in the paper.

How to Download

We provide a script (download.py) for downloading and cropping the SDIP dataset images.

For SD-Flickr Domains (SD-Dogs, SD-Elephants):

Run the download.py script, e.g.:

python download.py --dataset dog

For SD-LSUN Domains (SD-Bicycles, SD-Horses):

  1. Download the data from http://dl.yf.io/lsun/objects/. Then, unzip it and extract the images as presented in https://github.com/fyu/lsun. For example:
python3 lsun/data.py export bicycle/ --out_dir ./bicycles/
  1. Process the images using the download.py script, e.g.:
python download.py --lsun_data ../lsun/bicycles/ --dataset bicycle

Self-Distilled Flickr (SD-Flickr)

Image Domains

We provide high-quality image collections for two domains curated from Flickr: ‘Dogs’ and ‘Elephants’.
Each image in SD-Flickr is given by a URL to the original image and a bounding box that indicates the crop we performed to obtain StyleGAN training data.

Domain Name File #Images Description
SD-Dogs ├  dogs.json 126K Metadata for SD-Dogs including URLs and object bounding boxes.
SD-Elephants ├  elephants.json 39K Metadata for SD-Elephants including URLs and object bounding boxes.

Pre-trained StyleGAN2 models

We provide weights of pre-trained StyleGAN2 models trained using the image domains provided above. The weights are given for the official StyleGAN2 pytorch implementation.

Model Name File Description
Dogs Model ├  dogs_1024_pytorch.pkl Weights for a pre-trained model trained on 1024X1024 images from the SD-Dogs collection.
Elephants Model ├  elephants_512_pytorch.pkl Weights for a pre-trained model trained on 512X512 SD-Elephants collection.

Below are sampled images generated by the provided Dogs model:

SDFA generated samples

Below are sampled images generated by the provided Elephants model:

SDFA generated samples

Self-Distilled LSUN (SD-LSUN)

Image Domains

We provide image collections for two LSUN domains: ‘Horses’ and ‘Bicycles’. Each image in SD-LSUN is given by the image name, as appears in the LSUN dataset, and a bounding box that indicates the crop we performed to obtain StyleGAN training data. The LSUN images can be downloaded from here.

Domain Name File #Images Description
SD-Horses ├  horses.json 162K Metadata for SD-Horse including the names of the filtered images and object bounding boxes.
SD-Bicycles ├  bicycles.json 96K Metadata for SD-Bicycles including the names of the filtered images and object bounding boxes.

Pre-trained StyleGAN2 models

We provide weights of pre-trained StyleGAN2 models trained using the image domains provided above. The weights are given for the official StyleGAN2 pytorch implementation.

Model Name File Description
Horses Model ├  horses_256_pytorch.pkl Weights for a pre-trained model for the 256X256 SD-LSUN-Horse.
Bicycles Model ├  bicycles_256_pytorch.pkl Weights for a pre-trained model for the 256X256 SD-LSUN-Bicycles.

Below are random sampled images generated by the provided Horses model:

SD-LSUN generated samples

Below are random sampled images generated by the provided Bicycles model:

SD-LSUN generated samples

Additional Pre-Trained Models

We provide weights of pre-trained StyleGAN2 models for additional domains presented in our paper: Internet Lions, Internet Giraffes and Internet Parrots.

Model Name File Description
Lions Model ├  lions_512_pytorch.pkl Weights for a pre-trained model on 512×512 lion images.
Giraffes Model ├  giraffes_512_pytorch.pkl Weights for a pre-trained model on 512×512 giraffes images.
Parrots Model ├  parrots_512_pytorch.pkl Weights for a pre-trained model on 512×512 parrot images.

Below are random sampled images generated by the provided Lions model:

Lions

Below are random sampled images generated by the provided Giraffes model:

Giraffes

Below are random sampled images generated by the provided Parrots model:

Parrots

Citation

If you plan to use this dataset, or the published code, please cite it as:

@misc{mokady2022selfdistilled,
      title={Self-Distilled StyleGAN: Towards Generation from Internet Photos}, 
      author={Ron Mokady and Michal Yarom and Omer Tov and Oran Lang and Daniel Cohen-Or and Tali Dekel and Michal Irani and Inbar Mosseri},
      year={2022},
      eprint={2202.12211},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

If you are using LSUN images, please also follow the citation instructions on the LSUN website.

Licenses

The individual images were published in Flickr by their respective authors under either Creative Commons BY 2.0, Public Domain Mark 1.0, or Public Domain CC0 1.0. All of these licenses allow free use, redistribution, and adaptation. However, some of them require giving appropriate credit to the original author, as well as indicating any changes that were made to the images.

The datasets (including JSON metadata and documentation) and pre-trained models are made available under CC-BY-4.0. If you use the data or models, please give appropriate credit by citing our paper.

The download script is made available under apache-2.0.

Privacy

When collecting the data, we were careful to only include photos that – to the best of our knowledge – were intended for free use and redistribution by their respective authors. That said, we are committed to protecting the privacy of individuals who do not wish their photos to be included. To get your photo removed from Contact [email protected]. Please include the image URL in the mail.

GitHub

View Github