pub struct MetricConfig {
pub dssim: bool,
pub ssimulacra2: bool,
pub butteraugli: bool,
pub psnr: bool,
}Expand description
Configuration for which metrics to calculate.
Fields§
§dssim: boolCalculate DSSIM (structural dissimilarity).
ssimulacra2: boolCalculate SSIMULACRA2 (perceptual similarity, higher is better).
butteraugli: boolCalculate Butteraugli (perceptual difference, lower is better).
psnr: boolCalculate PSNR (peak signal-to-noise ratio). NOT RECOMMENDED.
Implementations§
Source§impl MetricConfig
impl MetricConfig
Sourcepub fn perceptual() -> Self
pub fn perceptual() -> Self
Perceptual metrics only (DSSIM, SSIMULACRA2, Butteraugli). RECOMMENDED.
Sourcepub fn ssimulacra2_only() -> Self
pub fn ssimulacra2_only() -> Self
SSIMULACRA2 only - good balance of speed and accuracy.
Trait Implementations§
Source§impl Clone for MetricConfig
impl Clone for MetricConfig
Source§fn clone(&self) -> MetricConfig
fn clone(&self) -> MetricConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetricConfig
impl Debug for MetricConfig
Source§impl Default for MetricConfig
impl Default for MetricConfig
Source§fn default() -> MetricConfig
fn default() -> MetricConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MetricConfig
impl<'de> Deserialize<'de> for MetricConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MetricConfig
impl RefUnwindSafe for MetricConfig
impl Send for MetricConfig
impl Sync for MetricConfig
impl Unpin for MetricConfig
impl UnwindSafe for MetricConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more