Skip to content

Commit c49a6fd

Browse files
authored
Merge pull request #1105 from openvinotoolkit/sstrehlk/anomaly_templates_directories_structure_changed
sstrehlk/Changed directories structure for anomaly templates.
2 parents db05702 + 7b567b3 commit c49a6fd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+13
-64
lines changed

CONTRIBUTING.md

+1-1

external/README.md

+6-6

external/anomaly/anomaly_classification/__init__.py

-17
This file was deleted.

external/anomaly/anomaly_detection/__init__.py

-17
This file was deleted.

external/anomaly/anomaly_segmentation/__init__.py

-17
This file was deleted.

external/anomaly/tests/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def ote_templates_root_dir_fx():
5858

5959
logger = logging.getLogger(__name__)
6060
root = osp.dirname(osp.dirname(osp.realpath(__file__)))
61-
root = f"{root}/anomaly_classification/"
61+
root = f"{root}/configs/"
6262
logger.debug(f"overloaded ote_templates_root_dir_fx: return {root}")
6363
return root
6464

external/anomaly/tests/test_configurable_parameters.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
import os
2121

2222
import pytest
23-
from anomaly_classification.configs.padim import PadimAnomalyClassificationConfig
24-
from anomaly_classification.configs.stfpm import STFPMAnomalyClassificationConfig
23+
from configs.anomaly_classification.padim import PadimAnomalyClassificationConfig
24+
from configs.anomaly_classification.stfpm import STFPMAnomalyClassificationConfig
2525
from ote_anomalib.configs import get_anomalib_config
2626
from ote_sdk.configuration.helper import convert, create
2727
from tests.helpers.config import get_config_and_task_name
@@ -35,7 +35,7 @@
3535
)
3636
def test_configuration_yaml(configurable_parameters, model_name):
3737
# assert that we can parse the template.yaml
38-
template_file_path = os.path.join("anomaly_classification", "configs", model_name, "template.yaml")
38+
template_file_path = os.path.join("configs", "anomaly_classification", model_name, "template.yaml")
3939
configuration_yaml_loaded, task_name = get_config_and_task_name(template_file_path)
4040

4141
configuration = configurable_parameters()

external/anomaly/tools/sample.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def __init__(
7676
7777
If MVTec dataset is placed under the above directory, then we could run,
7878
79-
>>> model_template_path = "./anomaly_classification/configs/padim/template.yaml"
79+
>>> model_template_path = "./configs/anomaly_classification/padim/template.yaml"
8080
>>> dataset_path = "./datasets/MVTec"
8181
>>> seed = 0
8282
>>> task = OteAnomalyTask(
@@ -337,7 +337,7 @@ def parse_args() -> Namespace:
337337
)
338338
parser.add_argument(
339339
"--model_template_path",
340-
default="./anomaly_classification/configs/padim/template.yaml",
340+
default="./configs/anomaly_classification/padim/template.yaml",
341341
)
342342
parser.add_argument("--dataset_path", default="./datasets/MVTec")
343343
parser.add_argument("--category", default="bottle")

0 commit comments

Comments
 (0)