From 75c9dfb3eabd90cacae0212930f74a78db58737b Mon Sep 17 00:00:00 2001 From: lart Date: Mon, 18 Dec 2023 21:48:37 +0800 Subject: [PATCH] Delete the useless return values. --- py_sod_metrics/multiscale_iou.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/py_sod_metrics/multiscale_iou.py b/py_sod_metrics/multiscale_iou.py index 614a6a3..61d3245 100644 --- a/py_sod_metrics/multiscale_iou.py +++ b/py_sod_metrics/multiscale_iou.py @@ -47,7 +47,9 @@ def shrink_by_grid(self, image: np.ndarray, cell_size: int) -> np.ndarray: if pad_w != 0: pad_w = cell_size - pad_w if pad_h != 0 or pad_w != 0: - image = np.pad(image, ((pad_h, 0), (pad_w, 0)), mode="constant", constant_values=0) + image = np.pad( + image, ((pad_h, 0), (pad_w, 0)), mode="constant", constant_values=0 + ) h = image.shape[0] w = image.shape[1] @@ -78,7 +80,6 @@ def step(self, pred: np.ndarray, gt: np.ndarray): msiou = self.cal_msiou(pred, gt) self.msious.append(msiou) - return msiou def get_results(self) -> dict: """Return the results about MSIoU.