Commit 4a728937 authored by narugo1992's avatar narugo1992
Browse files

dev(narugo): add doc for lpips

parent df82a909
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -25,6 +25,9 @@ class BaseBenchmark:
    def __init__(self):
        self.all_images = _DEFAULT_IMAGE_POOL

    def prepare(self):
        pass

    def load(self):
        raise NotImplementedError

@@ -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()

+5 −0
Original line number Diff line number Diff line
@@ -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