Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/anomalib/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from importlib import import_module

from jsonargparse import Namespace
from lightning_utilities.core.imports import module_available
from omegaconf import DictConfig, OmegaConf

from anomalib.models.components import AnomalyModule
Expand All @@ -30,7 +31,6 @@
Rkde,
Stfpm,
Uflow,
VlmAd,
WinClip,
)
from .video import AiVad
Expand Down Expand Up @@ -58,11 +58,16 @@ class UnknownModelError(ModuleNotFoundError):
"Rkde",
"Stfpm",
"Uflow",
"VlmAd",
"WinClip",
"AiVad",
]

if module_available("anomalib.models.image.vlm_ad"):
from .image import VlmAd

__all__.append("VlmAd")


logger = logging.getLogger(__name__)


Expand Down
9 changes: 7 additions & 2 deletions src/anomalib/models/image/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# Copyright (C) 2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

from lightning_utilities.core.imports import module_available

from .cfa import Cfa
from .cflow import Cflow
from .csflow import Csflow
Expand All @@ -20,7 +22,6 @@
from .rkde import Rkde
from .stfpm import Stfpm
from .uflow import Uflow
from .vlm_ad import VlmAd
from .winclip import WinClip

__all__ = [
Expand All @@ -41,6 +42,10 @@
"Rkde",
"Stfpm",
"Uflow",
"VlmAd",
"WinClip",
]

if module_available("anomalib.models.image.vlm_ad"):
from .vlm_ad import VlmAd

__all__.append("VlmAd")
Loading