├── .gitignore
├── LICENSE
├── README.md
├── artbench.py
└── assets
├── example.png
└── pytorch_usage.png
/.gitignore:
--------------------------------------------------------------------------------
1 | __pycache__/*
2 | artbench-10-batches-py/*
3 | .DS_Store
4 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The data sources of ArtBench-10 is released under a Fair Use license,
2 | as requested by WikiArt, Ukiyo-e.org database and The Surrealism Website. For more information, see https://www.wikiart.org/en/terms-of-use, https://ukiyo-e.org/about and https://surrealism.website/
3 |
4 | Other artifacts are released under a MIT license.
5 |
6 | MIT License
7 |
8 | Copyright (c) 2022 Peiyuan Liao
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ArtBench
2 |
3 | 
4 |
5 | ### [Preprint](https://arxiv.org/abs/2206.11404) | [Kaggle](https://www.kaggle.com/datasets/alexanderliao/artbench10) | [Papers With Code](https://paperswithcode.com/dataset/artbench-10)
6 |
7 | **The ArtBench Dataset: Benchmarking Generative Models with Artworks**
8 | [Peiyuan Liao*](https://liaopeiyuan.com/), [Xiuyu Li*](https://xiuyuli.com/), [Xihui Liu](https://xh-liu.github.io/), [Kurt Keutzer](http://people.eecs.berkeley.edu/~keutzer/)
9 | \* equal contribution
10 |
11 | ArtBench-10 is the first class-balanced, high-quality, cleanly annotated, and standardized dataset for benchmarking artwork generation. It comprises 60,000 images of artwork from 10 distinctive artistic styles, with 5,000 training images and 1,000 testing images per style.
12 |
13 | ArtBench-10 has several advantages over previous artwork datasets:
14 |
15 | * it is **class-balanced** while most previous artwork datasets suffer from the long tail class distributions
16 | * the images are of **high quality** with clean annotations
17 | * it is created with **standardized** data collection, annotation, filtering, and preprocessing procedures.
18 |
19 | We provide three versions of the dataset with different resolutions (32 x 32, 256 x 256, and original image size), formatted in a way that is easy to be incorporated by popular machine learning frameworks.
20 | ## Accessing Dataset
21 |
22 | * [Metadata](https://artbench.eecs.berkeley.edu/files/ArtBench-10.csv) as a csv file
23 | * [32x32 CIFAR-python:](https://artbench.eecs.berkeley.edu/files/artbench-10-python.tar.gz) works seamlessly with implementations using [the CIFAR-10 dataset](http://www.cs.toronto.edu/~kriz/cifar.html)
24 | * [32x32 CIFAR-binary:](https://artbench.eecs.berkeley.edu/files/artbench-10-binary.tar.gz) great compatibility with C programs, [tensorflow-datasets](https://www.tensorflow.org/datasets), etc.
25 | * [256x256 ImageFolder](https://artbench.eecs.berkeley.edu/files/artbench-10-imagefolder.tar), [256x256 ImageFolder with train-test split](https://artbench.eecs.berkeley.edu/files/artbench-10-imagefolder-split.tar) (**recommended**) work seamlessly with PyTorch Vision's [ImageFolder implementation](https://pytorch.org/vision/stable/generated/torchvision.datasets.ImageFolder.html)
26 | * [original size LSUN, per-style:](https://drive.google.com/drive/folders/1gWdbot6wfmvsI1UDY8WC_-vkZsK9VEhM?usp=sharing) works seamlessly with implementations using [LSUN datasets](https://www.yf.io/p/lsun)
27 |
28 | ## Using
29 |
30 | See `artbench.py` for PyTorch usage. *You only need ~20 lines of code to start using ArtBench-10 in your PyTorch workloads!*
31 |
32 | 
33 |
34 | ## Citation
35 |
36 | If you find the work useful in your research, please consider citing:
37 |
38 | ```bibtex
39 | @article{liao2022artbench,
40 | title={The ArtBench Dataset: Benchmarking Generative Models with Artworks},
41 | author={Liao, Peiyuan and Li, Xiuyu and Liu, Xihui and Keutzer, Kurt},
42 | journal={arXiv preprint arXiv:2206.11404},
43 | year={2022}
44 | }
45 | ```
46 |
--------------------------------------------------------------------------------
/artbench.py:
--------------------------------------------------------------------------------
1 | from torchvision.datasets import CIFAR10
2 |
3 | class ArtBench10(CIFAR10):
4 |
5 | base_folder = "artbench-10-batches-py"
6 | url = "https://artbench.eecs.berkeley.edu/files/artbench-10-python.tar.gz"
7 | filename = "artbench-10-python.tar.gz"
8 | tgz_md5 = "9df1e998ee026aae36ec60ca7b44960e"
9 | train_list = [
10 | ["data_batch_1", "c2e02a78dcea81fe6fead5f1540e542f"],
11 | ["data_batch_2", "1102a4dcf41d4dd63e20c10691193448"],
12 | ["data_batch_3", "177fc43579af15ecc80eb506953ec26f"],
13 | ["data_batch_4", "566b2a02ccfbafa026fbb2bcec856ff6"],
14 | ["data_batch_5", "faa6a572469542010a1c8a2a9a7bf436"],
15 | ]
16 |
17 | test_list = [
18 | ["test_batch", "fa44530c8b8158467e00899609c19e52"],
19 | ]
20 | meta = {
21 | "filename": "meta",
22 | "key": "styles",
23 | "md5": "5bdcafa7398aa6b75d569baaec5cd4aa",
24 | }
25 |
--------------------------------------------------------------------------------
/assets/example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liaopeiyuan/artbench/57fbb923e35409c26cb3e3827ade81b78bc259a4/assets/example.png
--------------------------------------------------------------------------------
/assets/pytorch_usage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liaopeiyuan/artbench/57fbb923e35409c26cb3e3827ade81b78bc259a4/assets/pytorch_usage.png
--------------------------------------------------------------------------------