rust-av / ssimulacra2_bin

Binary interface for the ssimulacra2 Rust port
BSD 2-Clause "Simplified" License
40 stars 10 forks source link

Question on inputs #34

Closed mabushey closed 7 months ago

mabushey commented 11 months ago

This is awesome, thank you. One of my applications is slightly different, I would like to compare two different sources and determine which is better.

target/debug/ssimulacra2_rs image ~/test/0001.png ~/test/0001_50.jpg
Score: 67.41938821
target/debug/ssimulacra2_rs image ~/test/0001_50.jpg ~/test/0001.png
Score: 67.77785910

Is there a way to determine which image is the better one? Right now it just assumes the first is. This may be out of scope for what this algo does. Thanks for the help!

FreezyLemon commented 7 months ago

This is not an intended use case of the metric, and I can't think of a simple trick to achieve what you want with the algorithm. Sorry.

Note that this project is more or less a port of the C implementation of the SSIMULACRA2 metric. If you have questions related to the metric or the algorithm itself, it might make more sense to ask a question over there.

mabushey commented 7 months ago

Thank you for answering my question!

shssoichiro commented 7 months ago

To clarify a bit more, I don't think there's a good way to achieve this with any metric, without having some "original" to compare to. Video metrics are typically used to compute loss when compressing a source. In the case of having two different sources without an original that they were encoded from, the only real way to determine the better one is with your eyes.