From 195e43f623cb245c49d63449b0464d9f96d4e1bb Mon Sep 17 00:00:00 2001 From: Galina Date: Thu, 15 Feb 2024 13:44:59 +0200 Subject: [PATCH] Fixes from comments --- model_api/python/openvino/model_api/models/classification.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/model_api/python/openvino/model_api/models/classification.py b/model_api/python/openvino/model_api/models/classification.py index a2146294..dad16b45 100644 --- a/model_api/python/openvino/model_api/models/classification.py +++ b/model_api/python/openvino/model_api/models/classification.py @@ -177,10 +177,13 @@ def postprocess(self, outputs, meta): ) def get_saliency_maps(self, outputs: Dict) -> np.ndarray: + """ + Returns saliency map model output. In hierarchical case reorder saliency maps + to match the order of labels in .XML meta. + """ saliency_maps = outputs.get(_saliency_map_name, np.ndarray(0)) if not self.hierarchical: return saliency_maps - # In hierarchical case reorder saliency maps to match the order of labels in .XML meta reordered_saliency_maps = [[] for _ in range(len(saliency_maps))] for batch in range(len(saliency_maps)): for label in self.labels: