diff --git a/src/otx/algo/anomaly/openvino_model.py b/src/otx/algo/anomaly/openvino_model.py index 04357807e4b..495f7f8bdfd 100644 --- a/src/otx/algo/anomaly/openvino_model.py +++ b/src/otx/algo/anomaly/openvino_model.py @@ -148,10 +148,3 @@ def predict_step(self, inputs: AnomalyModelInputs, batch_idx: int) -> list[Anoma def _customize_outputs(self, outputs: list[AnomalyResult], inputs: AnomalyModelInputs) -> list[AnomalyResult]: """Return outputs from the OpenVINO model as is.""" return outputs - - def _customize_inputs(self, inputs: AnomalyModelInputs) -> dict[str, np.ndarray]: - """Return inputs as is.""" - inputs = super()._customize_inputs(inputs) - # model needs inputs in range 0-1 - inputs["inputs"] = [value / 255.0 for value in inputs["inputs"]] - return inputs diff --git a/src/otx/core/model/anomaly.py b/src/otx/core/model/anomaly.py index c3603895552..644e6875882 100644 --- a/src/otx/core/model/anomaly.py +++ b/src/otx/core/model/anomaly.py @@ -211,8 +211,8 @@ def _get_values_from_transforms( if "Resize" in name: image_size = tuple(transform.size) # type: ignore[assignment] elif "Normalize" in name: - mean_value = tuple(transform.mean) # type: ignore[assignment] - std_value = tuple(transform.std) # type: ignore[assignment] + mean_value = tuple(value * 255 for value in transform.mean) # type: ignore[assignment] + std_value = tuple(value * 255 for value in transform.std) # type: ignore[assignment] return image_size, mean_value, std_value @property diff --git a/src/otx/recipe/anomaly_detection/stfpm.yaml b/src/otx/recipe/anomaly_detection/stfpm.yaml index c89d3f6db91..e16d75c8f00 100644 --- a/src/otx/recipe/anomaly_detection/stfpm.yaml +++ b/src/otx/recipe/anomaly_detection/stfpm.yaml @@ -16,7 +16,7 @@ engine: task: ANOMALY_DETECTION device: auto -callback_monitor: image_F1Score +callback_monitor: pixel_F1Score data: ../_base_/data/torchvision_base.yaml overrides: diff --git a/src/otx/recipe/anomaly_segmentation/stfpm.yaml b/src/otx/recipe/anomaly_segmentation/stfpm.yaml index 22c2673fac1..a9c7cdfb3b4 100644 --- a/src/otx/recipe/anomaly_segmentation/stfpm.yaml +++ b/src/otx/recipe/anomaly_segmentation/stfpm.yaml @@ -16,7 +16,7 @@ engine: task: ANOMALY_SEGMENTATION device: auto -callback_monitor: image_F1Score +callback_monitor: pixel_F1Score data: ../_base_/data/torchvision_base.yaml overrides: