Download anomalib/loggers/base.py from zhiqing0205/LogSAD: direct link, hf CLI and curl.
- Browser
- Download file 557 Bytes
-
https://huggingface.co/zhiqing0205/LogSAD/resolve/main/anomalib/loggers/base.py
- Command line
-
hf download hf://zhiqing0205/LogSAD/anomalib/loggers/base.py
-
curl -L -o base.py https://huggingface.co/zhiqing0205/LogSAD/resolve/main/anomalib/loggers/base.py
557 Bytes
| """Base logger for image logging consistency across all loggers used in anomalib.""" | |
| # Copyright (C) 2022-2024 Intel Corporation | |
| # SPDX-License-Identifier: Apache-2.0 | |
| from abc import abstractmethod | |
| import numpy as np | |
| from matplotlib.figure import Figure | |
| class ImageLoggerBase: | |
| """Adds a common interface for logging the images.""" | |
| def add_image(self, image: np.ndarray | Figure, name: str | None = None, **kwargs) -> None: | |
| """Interface to log images in the respective loggers.""" | |
| raise NotImplementedError | |