diff --git a/src/ptbench/engine/saliency/interpretability.py b/src/ptbench/engine/saliency/interpretability.py index 1275ea5db38ede44b98d811ac802b22aa016cc6a..dba6eee30efb2d1d431a4c7ac5274f659ab8a902 100644 --- a/src/ptbench/engine/saliency/interpretability.py +++ b/src/ptbench/engine/saliency/interpretability.py @@ -285,6 +285,7 @@ def _compute_binary_mask( the value False everywhere except at the positions inside the bounding boxes, which will be True. """ + binary_mask = numpy.zeros_like(saliency_map, dtype=numpy.bool_) for bbox in gt_bboxes: binary_mask[ diff --git a/src/ptbench/scripts/saliency/view.py b/src/ptbench/scripts/saliency/view.py index 028b141734a101aeaf002ed68cbea24448572b3c..af08086f7dac2be643cd0728f2e29bf5d3929656 100644 --- a/src/ptbench/scripts/saliency/view.py +++ b/src/ptbench/scripts/saliency/view.py @@ -79,7 +79,7 @@ logger = setup(__name__.split(".")[0], format="%(levelname)s: %(message)s") @click.option( "--threshold", "-t", - help="""The pixel values above ``threshold``% of max value are kept in the + help="""The pixel values above ``threshold`` % of max value are kept in the original saliency map. Everything else is set to zero. The value proposed on [SCORECAM-2020]_ is 0.2. Use this value if unsure.""", show_default=True, diff --git a/src/ptbench/scripts/train.py b/src/ptbench/scripts/train.py index e8149a418a40f6d8bfce79015c75d29d388b0a70..b2663208b3c3bbb2ce9f3c895a49076cb6daf9ba 100644 --- a/src/ptbench/scripts/train.py +++ b/src/ptbench/scripts/train.py @@ -16,7 +16,7 @@ logger = setup(__name__.split(".")[0], format="%(levelname)s: %(message)s") def reusable_options(f): - """Options that can be re-used by top-level scripts (i.e. ``experiment```). + """Options that can be re-used by top-level scripts (i.e. ``experiment``). This decorator equips the target function ``f`` with all (reusable) ``train`` script options.