diff --git a/openvino_xai/methods/black_box/aise/base.py b/openvino_xai/methods/black_box/aise/base.py index 4fa2c9a7..e1c98289 100644 --- a/openvino_xai/methods/black_box/aise/base.py +++ b/openvino_xai/methods/black_box/aise/base.py @@ -1,19 +1,17 @@ # Copyright (C) 2024 Intel Corporation # SPDX-License-Identifier: Apache-2.0 +import collections import math -from openvino_xai.common.utils import IdentityPreprocessFN -from openvino_xai.methods.black_box.base import BlackBoxXAIMethod - +from abc import ABC, abstractmethod +from typing import Callable, Dict, List, Mapping, Tuple import numpy as np import openvino.runtime as ov from scipy.optimize import direct - -import collections -from abc import ABC, abstractmethod -from typing import Callable, Dict, List, Mapping, Tuple +from openvino_xai.common.utils import IdentityPreprocessFN +from openvino_xai.methods.black_box.base import BlackBoxXAIMethod class AISEBase(BlackBoxXAIMethod, ABC): diff --git a/openvino_xai/methods/black_box/aise/classification.py b/openvino_xai/methods/black_box/aise/classification.py index 46b62523..3796877f 100644 --- a/openvino_xai/methods/black_box/aise/classification.py +++ b/openvino_xai/methods/black_box/aise/classification.py @@ -1,20 +1,23 @@ # Copyright (C) 2024 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -from openvino_xai.common.utils import IdentityPreprocessFN, infer_size_from_image, logger, scaling, sigmoid -from openvino_xai.methods.black_box.aise.base import GaussianPerturbationMask -from openvino_xai.methods.black_box.aise.base import AISEBase -from openvino_xai.methods.black_box.base import Preset - +import collections +from typing import Callable, Dict, List, Tuple import numpy as np import openvino.runtime as ov from openvino.runtime.utils.data_helpers.wrappers import OVDict from scipy.optimize import Bounds - -import collections -from typing import Callable, Dict, List, Tuple +from openvino_xai.common.utils import ( + IdentityPreprocessFN, + infer_size_from_image, + logger, + scaling, + sigmoid, +) +from openvino_xai.methods.black_box.aise.base import AISEBase, GaussianPerturbationMask +from openvino_xai.methods.black_box.base import Preset class AISEClassification(AISEBase): diff --git a/openvino_xai/methods/black_box/aise/detection.py b/openvino_xai/methods/black_box/aise/detection.py index e6765169..bac7c3f4 100644 --- a/openvino_xai/methods/black_box/aise/detection.py +++ b/openvino_xai/methods/black_box/aise/detection.py @@ -1,21 +1,23 @@ # Copyright (C) 2024 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -from openvino_xai.common.parameters import Task -from openvino_xai.common.utils import IdentityPreprocessFN, infer_size_from_image, logger, scaling -from openvino_xai.methods.black_box.aise.base import GaussianPerturbationMask -from openvino_xai.methods.black_box.aise.base import AISEBase -from openvino_xai.methods.black_box.base import Preset - +import collections +from typing import Any, Callable, Dict, List, Tuple import numpy as np import openvino.runtime as ov from openvino.runtime.utils.data_helpers.wrappers import OVDict from scipy.optimize import Bounds - -import collections -from typing import Any, Callable, Dict, List, Tuple +from openvino_xai.common.parameters import Task +from openvino_xai.common.utils import ( + IdentityPreprocessFN, + infer_size_from_image, + logger, + scaling, +) +from openvino_xai.methods.black_box.aise.base import AISEBase, GaussianPerturbationMask +from openvino_xai.methods.black_box.base import Preset class AISEDetection(AISEBase):