Skip to main content

ArtFID: Quantitative Evaluation of Neural Style Transfer (GCPR Oral 2022)

ArtFID: Quantitative Evaluation of Neural Style Transfer
Matthias Wright and Björn Ommer.

Abstract

The field of neural style transfer has experienced a surge of research exploring different avenues ranging from optimization-based approaches and feed-forward models to meta-learning methods. The developed techniques have not just progressed the field of style transfer, but also led to breakthroughs in other areas of computer vision, such as all of visual synthesis. However, whereas quantitative evaluation and benchmarking have become pillars of computer vision research, the reproducible, quantitative assessment of style transfer models is still lacking. Even in comparison to other fields of visual synthesis, where widely used metrics exist, the quantitative evaluation of style transfer is still lagging behind. To support the automatic comparison of different style transfer approaches and to study their respective strengths and weaknesses, the field would greatly benefit from a quantitative measurement of stylization performance. Therefore, we propose a method to complement the currently mostly qualitative evaluation schemes. We provide extensive evaluations and a large-scale user study to show that the proposed metric strongly coincides with human judgment.

Installation

> pip install art-fid

Usage

CUDA_VISIBLE_DEVICES=0 python -m art_fid --style_images path/to/style-images --content_images path/to/content-images --stylized_images path/to/stylized-images

The content images and the corresponding stylized images are compared in pairs. In order to ensure that a content image is matched up with the correct stylized image, both the content images and the stylized images are processed in lexicographical order. A simple way of pairing the content images and the stylized images is to use the name of content image for the corresponding stylized image.

Arguments

--batch_size - Batch size for computing activations.
--num_workers - Number of threads used for data loading.
--mode - Evaluate ArtFID or ArtFID_infinity, choices = ['art_fid', 'art_fid_inf'].
--content_metric - Content metric, choices = ['lpips', 'vgg', 'alexnet'].
--device - Device to use, choices = ['cuda', 'cpu'].
--style_images - Path to style images.
--content_images - Path to content images.
--stylized_images - Path to stylized images.

Data

The dataset is contained in artfid_dataset.csv. It consists of 250k labeled artworks.

Acknowledgments

Citation

@article{wright_gcpr_2022,
    title={ArtFID: Quantitative Evaluation of Neural Style Transfer},
    author={Matthias Wright and Bj{\"o}rn Ommer},
    journal={GCPR},
    year={2022}
}

License

MIT

Metadata

Release files for art-fid 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for art-fid 0.0.2
File Size Uploaded
art_fid-0.0.2.tar.gz 11.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for art-fid 0.0.2
File Interpreter ABI Platform
art_fid-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 23.2 kB

Release files / art_fid-0.0.2.tar.gz

Download URL art_fid-0.0.2.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bcaa39e8c7b5de3fcb71425f065062ca246e066cd3c4f1169435b3e6ba602407
BLAKE2b-256 checksum
How to use checksums
46f78c88715a6067b8b3257c07ad49868d601c5ebc8f76febff0c904e4d9dc71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / art_fid-0.0.2-py3-none-any.whl

Download URL art_fid-0.0.2-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eecf4d9682a263d7cd9264e40c4d2326ae97bb9b2b2b586d4530784c47daf864
BLAKE2b-256 checksum
How to use checksums
e2ef714cf2e50a204a07d11e983bcb1f1d3110917379496bb66943323238a00d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page