Loading docs/source/_libs/benchmark.py +4 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,9 @@ class BaseBenchmark: def __init__(self): self.all_images = _DEFAULT_IMAGE_POOL def prepare(self): pass def load(self): raise NotImplementedError Loading @@ -42,6 +45,7 @@ class BaseBenchmark: logs.append((name, current_process.memory_info().rss, time.time())) # make sure the model is downloaded self.prepare() self.load() self.unload() Loading imgutils/metrics/lpips.py +5 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,11 @@ Overview: When threshold is `0.45`, the `adjusted rand score <https://scikit-learn.org/stable/modules/generated/sklearn.metrics.adjusted_rand_score.html>`_ can reach `0.995`. This is an overall benchmark of all the operations in LPIPS models: .. image:: lpips.benchmark.py.svg :align: center """ from functools import lru_cache from typing import Tuple, Union, List Loading Loading
docs/source/_libs/benchmark.py +4 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,9 @@ class BaseBenchmark: def __init__(self): self.all_images = _DEFAULT_IMAGE_POOL def prepare(self): pass def load(self): raise NotImplementedError Loading @@ -42,6 +45,7 @@ class BaseBenchmark: logs.append((name, current_process.memory_info().rss, time.time())) # make sure the model is downloaded self.prepare() self.load() self.unload() Loading
imgutils/metrics/lpips.py +5 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,11 @@ Overview: When threshold is `0.45`, the `adjusted rand score <https://scikit-learn.org/stable/modules/generated/sklearn.metrics.adjusted_rand_score.html>`_ can reach `0.995`. This is an overall benchmark of all the operations in LPIPS models: .. image:: lpips.benchmark.py.svg :align: center """ from functools import lru_cache from typing import Tuple, Union, List Loading