Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sstrehlk/Changed directories structure for anomaly templates. #1105

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ If you want to add training code of your model to this repository, make sure:
1. [IInferenceTask](https://github.com/openvinotoolkit/training_extensions/blob/develop/ote_sdk/ote_sdk/usecases/tasks/interfaces/inference_interface.py) - your model must be inferable on some datasets.
1. [IEvaluationTask](https://github.com/openvinotoolkit/training_extensions/blob/develop/ote_sdk/ote_sdk/usecases/tasks/interfaces/evaluate_interface.py) - it must be possible to evaluate some quality metric of you model.
1. [IExportTask](https://github.com/openvinotoolkit/training_extensions/blob/develop/ote_sdk/ote_sdk/usecases/tasks/interfaces/export_interface.py) - your model must be exportable to the OpenVINO format.
4. You provide a model `template.yaml` file, that describes your model and its configurable parameters. See an example [here](external/anomaly/anomaly_classification/configs/padim/template.yaml).
4. You provide a model `template.yaml` file, that describes your model and its configurable parameters. See an example [here](external/anomaly/configs/anomaly_classification/padim/template.yaml).
5. You create a PR to the `develop` branch.
6. You provide `requirements.txt` file and a bash `init_venv.sh` script for creating virtual environment.

Expand Down
12 changes: 6 additions & 6 deletions external/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ Every sub-project is fully indepedent from each other, and each of them has its
## Anomaly Classification
ID | Name | Complexity (GFlops) | Model size (MB) | Path
------- | ------- | ------- | ------- | -------
ote_anomaly_classification_padim | PADIM | 3.9 | 168.4 | anomaly/anomaly_classification/configs/padim/template.yaml
ote_anomaly_classification_stfpm | STFPM | 5.6 | 21.1 | anomaly/anomaly_classification/configs/stfpm/template.yaml
ote_anomaly_classification_padim | PADIM | 3.9 | 168.4 | anomaly/configs/anomaly_classification/padim/template.yaml
ote_anomaly_classification_stfpm | STFPM | 5.6 | 21.1 | anomaly/configs/anomaly_classification/stfpm/template.yaml

## Anomaly Detection
ID | Name | Complexity (GFlops) | Model size (MB) | Path
------- | ------- | ------- | ------- | -------
ote_anomaly_detection_padim | PADIM | 3.9 | 168.4 | anomaly/anomaly_detection/configs/padim/template.yaml
ote_anomaly_detection_stfpm | STFPM | 5.6 | 21.1 | anomaly/anomaly_detection/configs/stfpm/template.yaml
ote_anomaly_detection_padim | PADIM | 3.9 | 168.4 | anomaly/configs/anomaly_detection/padim/template.yaml
ote_anomaly_detection_stfpm | STFPM | 5.6 | 21.1 | anomaly/configs/anomaly_detection/stfpm/template.yaml

## Anomaly Segmentation
ID | Name | Complexity (GFlops) | Model size (MB) | Path
------- | ------- | ------- | ------- | -------
ote_anomaly_segmentation_padim | PADIM | 3.9 | 168.4 | anomaly/anomaly_segmentation/configs/padim/template.yaml
ote_anomaly_segmentation_stfpm | STFPM | 5.6 | 21.1 | anomaly/anomaly_segmentation/configs/stfpm/template.yaml
ote_anomaly_segmentation_padim | PADIM | 3.9 | 168.4 | anomaly/configs/anomaly_segmentation/padim/template.yaml
ote_anomaly_segmentation_stfpm | STFPM | 5.6 | 21.1 | anomaly/configs/anomaly_segmentation/stfpm/template.yaml

## Image Classification
ID | Name | Complexity (GFlops) | Model size (MB) | Path
Expand Down
17 changes: 0 additions & 17 deletions external/anomaly/anomaly_classification/__init__.py

This file was deleted.

17 changes: 0 additions & 17 deletions external/anomaly/anomaly_detection/__init__.py

This file was deleted.

17 changes: 0 additions & 17 deletions external/anomaly/anomaly_segmentation/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion external/anomaly/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def ote_templates_root_dir_fx():

logger = logging.getLogger(__name__)
root = osp.dirname(osp.dirname(osp.realpath(__file__)))
root = f"{root}/anomaly_classification/"
root = f"{root}/configs/anomaly_classification/"
logger.debug(f"overloaded ote_templates_root_dir_fx: return {root}")
return root

Expand Down
4 changes: 2 additions & 2 deletions external/anomaly/tools/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __init__(

If MVTec dataset is placed under the above directory, then we could run,

>>> model_template_path = "./anomaly_classification/configs/padim/template.yaml"
>>> model_template_path = "./configs/anomaly_classification/padim/template.yaml"
>>> dataset_path = "./datasets/MVTec"
>>> seed = 0
>>> task = OteAnomalyTask(
Expand Down Expand Up @@ -337,7 +337,7 @@ def parse_args() -> Namespace:
)
parser.add_argument(
"--model_template_path",
default="./anomaly_classification/configs/padim/template.yaml",
default="./configs/anomaly_classification/padim/template.yaml",
)
parser.add_argument("--dataset_path", default="./datasets/MVTec")
parser.add_argument("--category", default="bottle")
Expand Down