Skip to content

Commit

Permalink
Fix image-level heatmap normalization (#2131)
Browse files Browse the repository at this point in the history
* fix image-level heatmap normalization

* update changelog
  • Loading branch information
djdameln committed Jun 13, 2024
1 parent 22caf3b commit 56843d2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Fixed

- Fix image-level heatmap normalization in visualizer by @djdameln in https://github.com/openvinotoolkit/anomalib/pull/2131
- 🐞 Fix dimensionality mismatch issue caused by the new kornia version by @samet-akcay in https://github.com/openvinotoolkit/anomalib/pull/1944
- 🐞 Fix DFM PyTorch inference by @adrianboguszewski in https://github.com/openvinotoolkit/anomalib/pull/1952
- 🐞 Fix anomaly map shape to also work with tiling by @blaz-r in https://github.com/openvinotoolkit/anomalib/pull/1959
Expand Down
2 changes: 1 addition & 1 deletion src/anomalib/engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def _setup_anomalib_callbacks(self) -> None:

_callbacks.append(
_VisualizationCallback(
visualizers=ImageVisualizer(task=self.task),
visualizers=ImageVisualizer(task=self.task, normalize=self.normalization == NormalizationMethod.NONE),
save=True,
root=self._cache.args["default_root_dir"] / "images",
),
Expand Down
1 change: 1 addition & 0 deletions src/anomalib/utils/visualization/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ def _visualize_batch(self, batch: dict) -> Iterator[GeneratorResult]:
gt_boxes=batch["boxes"][i].cpu().numpy() if "boxes" in batch else None,
pred_boxes=batch["pred_boxes"][i].cpu().numpy() if "pred_boxes" in batch else None,
box_labels=batch["box_labels"][i].cpu().numpy() if "box_labels" in batch else None,
normalize=self.normalize,
)
yield GeneratorResult(image=self.visualize_image(image_result), file_name=file_name)

Expand Down

0 comments on commit 56843d2

Please sign in to comment.