mirror of
https://github.com/hanzoai/anomalib.git
synced 2026-10-30 18:48:11 +00:00
The previous commit was meant to remove .github/workflows and removed every tracked path instead — 892 files, the whole repo. This puts back the 874 that were never in scope; the eighteen workflow files stay gone, for the reasons that commit gives. Content is byte-identical to 9d2aec9 outside .github/workflows.
29 lines
827 B
Python
29 lines
827 B
Python
"""Run tiled ensemble prediction."""
|
|
|
|
# Copyright (C) 2024 Intel Corporation
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
from pathlib import Path
|
|
|
|
from jsonargparse import ArgumentParser
|
|
|
|
from anomalib.pipelines.tiled_ensemble import EvalTiledEnsemble
|
|
|
|
|
|
def get_parser() -> ArgumentParser:
|
|
"""Create a new parser if none is provided."""
|
|
parser = ArgumentParser()
|
|
parser.add_argument("--config", type=str | Path, help="Configuration file path.", required=True)
|
|
parser.add_argument("--root", type=str | Path, help="Results root dir path.", required=True)
|
|
|
|
return parser
|
|
|
|
|
|
if __name__ == "__main__":
|
|
args = get_parser().parse_args()
|
|
|
|
print("Running tiled ensemble test pipeline.")
|
|
# pass the path to root dir with checkpoints
|
|
test_pipeline = EvalTiledEnsemble(args.root)
|
|
test_pipeline.run(args)
|