Giter VIP home page Giter VIP logo

essim-staging's Introduction

essim

build

eSSIM[1] is an evolution of SSIM which improves correlation with subjective scores by employing Coefficient of Variation (CoV) pooling and reduces complexity by employing box filters and striding.

This is similar to the original algorithm implemented at https://github.com/utlive/enhanced_ssim but this project is designed for use at scale and uses optimized floating point and integer SIMD instructions.

In addition to the CoV pooled eSSIM score this library will also calculate the arithmetic mean pooled SSIM score. While CoV pooling has better correlation to subjective scores, and works well in practice for evaluating typical compression and scaling artifacts, it can exhibit unstable behaviors for adversarially generated image pairs. Therefore, mean pooled SSIM may be needed as a fallback when evaluated images with unknown distortion types.

[1] A. K. Venkataramanan, C. Wu, A. C. Bovik, I. Katsavounidis and Z. Shahid, "A Hitchhiker’s Guide to Structural Similarity," in IEEE Access, vol. 9, pp. 28872-28896, 2021, doi: 10.1109/ACCESS.2021.3056504 https://ieeexplore.ieee.org/document/9344648

Building

This project uses CMake to build and depends on clang-tidy and clang-format for linting and auto formatting of source files. You can install both by installing llvm. On OS X you can use homebrew, but it won't link llvm so you need to manualy symlink the related binaries.

brew install llvm
sudo ln -s "$(brew --prefix llvm)/bin/clang-tidy" "/usr/local/bin/clang-tidy"
sudo ln -s "$(brew --prefix llvm)/bin/clang-tidy" "/usr/local/bin/clang-format"
sudo ln -s "$(brew --prefix llvm)/bin/clang-apply-replacements" "/usr/local/bin/clang-apply-replacements"\n

To build the project, use the following

mkdir build
cd build
cmake ..
make

CMake will download and install GoogleTest. To skip building tests you can uses

cmake .. -DBUILD_TESTS=OFF

Assuming you didn't skip building tests you can run tests using ctest

ctest --output-on-failure

Build x86 on ARM based MacOS

To build x86 code instead of ARM on MacOS machines with M1 or later ARM CPUs you can use the CMAKE_OSX_ARCHITECTURES flag

cmake .. -DCMAKE_OSX_ARCHITECTURES=x86_64

Build testsuite for eSSIM score by reading reference and distorted files

First build the project. While building the project, don't skip building tests.

Copy "essim-staging/yuvtestsuite/gtest_main.cc" file to "build/_deps/googletest-src/googletest/src/"

In below mentioned file add "essim" folder path in "gtest_build_include_dirs". "build/_deps/googletest-src/googletest/CMakeLists.txt".

Example is shown here :

set(gtest_build_include_dirs "${gtest_SOURCE_DIR}/../../../../essim" "${gtest_SOURCE_DIR}/include" "${gtest_SOURCE_DIR}")

To get eSSIM score for ref & dist YUV files, enable "FR_LVL_eSSIM_SUPPORT" macro which is present in "gtest_main.cc" file.

FFmpeg Integration

You can use ESSIM as an ffmpeg filter, using the included vf_essim.c filter definition in the ffmpeg folder, and the associated patch to ffmpeg to enable building support for essim.

License

ESSIM is licensed the BSD-3 license, see LICENSE file in the root of this source tree for details.

The ffmpeg filter vf_essim.c is licensed under the LGPG license, same as vf_ssim.c in FFmpeg itself, upon which it is based.

essim-staging's People

Contributors

cosmin avatar shhiva5 avatar

Watchers

 avatar

Forkers

shhiva5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.