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

Fix OV batch inference (saliency map generation) #1965

Merged
Show file tree
Hide file tree
Changes from all commits
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 otx/algorithms/classification/tasks/openvino.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def explain(
dataset_item.append_labels(item_labels)
add_saliency_maps_to_dataset_item(
dataset_item=dataset_item,
saliency_map=np.copy(saliency_map),
saliency_map=saliency_map,
model=self.model,
labels=self.task_environment.get_labels(),
predicted_scored_labels=item_labels,
Expand Down
2 changes: 1 addition & 1 deletion otx/algorithms/detection/tasks/openvino.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def explain(

add_saliency_maps_to_dataset_item(
dataset_item=dataset_item,
saliency_map=np.copy(saliency_map),
saliency_map=saliency_map,
model=self.model,
labels=labels,
predicted_scored_labels=predicted_scored_labels,
Expand Down
2 changes: 1 addition & 1 deletion otx/api/entities/result_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __init__(
self.annotation_scene = annotation_scene
self.roi = Annotation(Rectangle.generate_full_box(), labels=[]) if roi is None else roi
self.label = label
self.numpy = numpy
self.numpy = np.copy(numpy)

def __repr__(self):
"""Returns a string with all the attributes of the ResultMediaEntity."""
Expand Down