Skip to main content

A Difference Evaluator for Alternating Images

Project description

Teaser image

FLIP: A Tool for Visualizing and Communicating Errors in Rendered Images (v1.5)

By Pontus Ebelin and Tomas Akenine-Möller, with Jim Nilsson, Magnus Oskarsson, Kalle Åström, Mark D. Fairchild, and Peter Shirley.

This repository holds implementations of the LDR-FLIP and HDR-FLIP image error metrics. It also holds code for the FLIP tool, presented in Ray Tracing Gems II.

The changes made for the different versions of FLIP are summarized in the version list.

A list of papers that use/cite FLIP.

A note about the precision of FLIP.

An image gallery displaying a large quantity of reference/test images and corresponding error maps from different metrics.

Note: since v1.5, the Python version of FLIP can now be installed via pip install flip-evaluator.

Note: in v1.3, we switched to a single header (FLIP.h) for C++/CUDA for easier integration.

License

Copyright © 2020-2024, NVIDIA Corporation & Affiliates. All rights reserved.

This work is made available under a BSD 3-Clause License.

The repository distributes code for tinyexr, which is subject to a BSD 3-Clause License,
and stb_image, which is subject to an MIT License.

For individual contributions to the project, please confer the Individual Contributor License Agreement.

For business inquiries, please visit our website and submit the form: NVIDIA Research Licensing.

Simplest Way To Get Started

The simplest way to run FLIP to compare a test image testImage.png to a reference image referenceImage.png is as follows:

pip install flip-evaluator
flip -r referenceImage.png -t testImage.png

For more information about the tool's capabilities, try running flip -h.

If you wish to use FLIP in your Python or C++ evaluation scripts, please read the next sections.

Python (API and Tool)

Setup (with pip):

pip install flip-evaluator

Usage:

API:
See the example script src/python/api_example.py.

Tool:

flip --reference reference.{exr|png} --test test.{exr|png} [--options]

See the README in the python folder and run flip -h for further information and usage instructions.

C++ and CUDA (API and Tool)

Setup:

The src/cpp/FLIP.sln solution contains one CUDA backend project and one pure C++ backend project.

Compiling the CUDA project requires a CUDA compatible GPU. Instruction on how to install CUDA can be found here.

Alternatively, a CMake build can be done by creating a build directory and invoking CMake on the source dir (add --config Release to build release configuration on Windows):

mkdir build
cd build
cmake ..
cmake --build . [--config Release]

CUDA support is enabled via the FLIP_ENABLE_CUDA, which can be passed to CMake on the command line with -DFLIP_ENABLE_CUDA=ON or set interactively with ccmake or cmake-gui. FLIP_LIBRARY option allows to output a library rather than an executable.

Usage:

API:
See the README.

Tool:

flip[-cuda].exe --reference reference.{exr|png} --test test.{exr|png} [options]

See the README in the src/cpp folder and run flip[-cuda].exe -h for further information and usage instructions.

PyTorch (Loss Function)

Setup (with Anaconda3 or Miniconda):

conda create -n flip_dl python numpy matplotlib
conda activate flip_dl
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c conda-forge
conda install -c conda-forge openexr-python

Usage:

Remember to activate the flip_dl environment through conda activate flip_dl before using the loss function.

LDR- and HDR-FLIP are implemented as loss modules in src/pytorch/flip_loss.py. An example where the loss function is used to train a simple autoencoder is provided in src/pytorch/train.py.

See the README in the pytorch folder for further information and usage instructions.

Citation

If your work uses the FLIP tool to find the errors between low dynamic range images, please cite the LDR-FLIP paper:
Paper | BibTeX

If it uses the FLIP tool to find the errors between high dynamic range images, instead cite the HDR-FLIP paper:
Paper | BibTeX

Should your work use the FLIP tool in a more general fashion, please cite the Ray Tracing Gems II article:
Chapter | BibTeX

Acknowledgements

We appreciate the following peoples' contributions to this repository: Jonathan Granskog, Jacob Munkberg, Jon Hasselgren, Jefferson Amstutz, Alan Wolfe, Killian Herveau, Vinh Truong, Philippe Dagobert, Hannes Hergeth, Matt Pharr, Tizian Zeltner, Jan Honsbrok, Chris Zhang, and Wenzel Jakob.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

flip_evaluator-1.5-cp310-cp310-win32.whl (186.3 kB view details)

Uploaded CPython 3.10Windows x86

flip_evaluator-1.5-cp310-cp310-musllinux_1_2_x86_64.whl (908.8 kB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

flip_evaluator-1.5-cp310-cp310-musllinux_1_2_i686.whl (978.1 kB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ i686

flip_evaluator-1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (417.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

flip_evaluator-1.5-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl (446.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ i686

flip_evaluator-1.5-cp310-cp310-macosx_11_0_arm64.whl (191.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

flip_evaluator-1.5-cp310-cp310-macosx_10_15_x86_64.whl (202.6 kB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

File details

Details for the file flip_evaluator-1.5-cp310-cp310-win32.whl.

File metadata

  • Download URL: flip_evaluator-1.5-cp310-cp310-win32.whl
  • Upload date:
  • Size: 186.3 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for flip_evaluator-1.5-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 e5a996e9d70d20271c1f1cb0160e98c2723891112fb013adfbd3c87de0071e5e
MD5 c1de49f2a7d100e7f7cd3bd99053e67f
BLAKE2b-256 f907100f84326b5571b912553e89c1770dc68569bc48db5f33da2ef1e41e5e78

See more details on using hashes here.

File details

Details for the file flip_evaluator-1.5-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for flip_evaluator-1.5-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 803ffd5e67f2551d783a644f700dcde622e1987162da34c055112100185484fd
MD5 62912496c3f770d67df2a200fd5f3d84
BLAKE2b-256 bfc2fe19459573c8e4b7d499e8fa7a5bf8c24a0771606090ced6d2f4c795b1d7

See more details on using hashes here.

File details

Details for the file flip_evaluator-1.5-cp310-cp310-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for flip_evaluator-1.5-cp310-cp310-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 e7b614f8f83cafb226072d11343ebb8ef7958ac8578b18c137a83107741ff996
MD5 dbaaa6124d16ad8e0e82f934952f62c4
BLAKE2b-256 9ae2d4ba4502fe60737b195852ba34acaae94b5af6ccbc7f45dc548437b213a4

See more details on using hashes here.

File details

Details for the file flip_evaluator-1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flip_evaluator-1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 878ee029ab5f6412a918648b45f892b949b25efed84ee8ab92d8105c5c71ede8
MD5 9a4023332862acfa493045c7f2a42900
BLAKE2b-256 3074a61dd9a1941fd1f8db99b5a8b6ceb8faadfb4a41e54da540049adae44fbf

See more details on using hashes here.

File details

Details for the file flip_evaluator-1.5-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for flip_evaluator-1.5-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 cdff630b00350397ba4e67fead167f0cc6969e31504a29d7c802cabfa01cd049
MD5 c839b3219efb53c49c4e83be043ff6f1
BLAKE2b-256 8a0b6a84fb4bda00516e37dafe747d660d2edd4ff5876586aa2ee4e5ff8241a0

See more details on using hashes here.

File details

Details for the file flip_evaluator-1.5-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for flip_evaluator-1.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1f2198184e8977cb8f0996716585578113396b06873f94f6d834ec985b883ba0
MD5 cbd7c6ed5d0074c1047e0224d4442560
BLAKE2b-256 207b1d05f29a019b3061b6c2b672fa06a6ae02a4ecef72eb588afa1bf394be38

See more details on using hashes here.

File details

Details for the file flip_evaluator-1.5-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for flip_evaluator-1.5-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 f8459097e7db3760d0614d0b691c095b4f63199946afbc24ec872def47ff6d65
MD5 ccb7a25ca070d0ebe5b3068fdfa54197
BLAKE2b-256 03fdfabefa754eb52442bae0c8e537f469af914f6634c7199720c641144d078f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page