Skip to content

feat(IBA): Add FLIP perceptual image difference metric#5154

Open
lgritz wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
lgritz:lg-flip
Open

feat(IBA): Add FLIP perceptual image difference metric#5154
lgritz wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
lgritz:lg-flip

Conversation

@lgritz
Copy link
Copy Markdown
Collaborator

@lgritz lgritz commented Apr 20, 2026

Implements the FLIP algorithm from Andersson et al. 2020, rewritten with OIIO idioms (no source code from the BSD-licensed reference FLIP.h is directly incorporated). Included are C++ and Python API for ImageBufAlgo::FLIP_diff(), and oiiotool --flipdiff command. The basic operation is to compare two images and produce a per-pixel error map that conveys perceptual difference to human observers.

I won't explain it all here; see the extensive comments in imagebufalgo.h, imagebufalgo_flip.cpp, oiiotool.cpp, imagebufalgo.rst, oiiotool.rst.

There are some important changes (especially for how we expose this via oiiotool) versus the way the original NVIDIA reference implementation's command line tool worked. Please read the extensive comments at the top of imagebufalgo_flip.cpp for details.

This is a preliminary, experimental implementation. It's hidden behind an experimental namespace (and the oiiotool command requires use of the --experimental argument) to emphasize that it may change and is not yet considered part of OIIO's public API, and thus is exempt from our usual strict rules about breaking backward compatibility. Try it out and give feedback, but do not rely on this yet!

Assisted-by: Claude Code / sonnet-4.6 + opus-4.6

I used Claude Code for the inital stab at transforming the NVIDIA reference implementation into OIIO idiomatic equivalents. But to be honest, that got me over the hump of the blank page, but I rewrote most of it bit by bit as I continued to refine my design ideas for how it should work and be exposed to users.

Implements the FLIP algorithm from Andersson et al. 2020, rewritten
with OIIO idioms (no source code from the BSD-licensed reference
FLIP.h is directly incorporated). Included are C++ and Python API for
ImageBufAlgo::FLIP_diff(), and `oiiotool --flipdiff` command.  The
basic operation is to compare two images and produce a per-pixel error
map that conveys perceptual difference to human observers.

I won't explain it all here; see the extensive comments in
imagebufalgo.h, imagebufalgo_flip.cpp, oiiotool.cpp, imagebufalgo.rst,
oiiotool.rst.

There are some important changes (especially for how we expose this
via oiiotool) versus the way the original NVIDIA reference
implementation's command line tool worked. Please read the extensive
comments at the top of imagebufalgo_flip.cpp for details.

This is a preliminary, experimental implementation. It's hidden behind
an `experimental` namespace (and the oiiotool command requires use of
the `--experimental` argument) to emphasize that it may change and is
not yet considered part of OIIO's public API, and thus is exempt from
our usual strict rules about breaking backward compatibility. Try it
out and give feedback, but do not rely on this yet!

Assisted-by: Claude Code / sonnet-4.6 + opus-4.6

I used Claude Code for the inital stab at transforming the NVIDIA
reference implementation into OIIO idiomatic equivalents. But to be
honest, that got me over the hump of the blank page, but I rewrote
most of it bit by bit as I continued to refine my design ideas for how
it should work and be exposed to users.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant