From 9300b14cf8ecc67941d1f9db95666c5eaeb769ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aar=C3=B3n=20Domenzain=20Del=20Castillo=20Cerecer?= Date: Tue, 13 May 2025 11:35:04 +0200 Subject: [PATCH 1/3] fix typo --- deeplay/applications/detection/lodestar/lodestar.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deeplay/applications/detection/lodestar/lodestar.py b/deeplay/applications/detection/lodestar/lodestar.py index 18081141..afcc8ba6 100644 --- a/deeplay/applications/detection/lodestar/lodestar.py +++ b/deeplay/applications/detection/lodestar/lodestar.py @@ -228,7 +228,7 @@ def detect_single( Threshold for detection mode: string Mode for thresholding. Can be either "quantile" or "ratio" or "constant". If "quantile", then - `ratio` defines the quantile of scores to accept. If "ratio", then cutoff defines the ratio of the max + cutoff defines the quantile of scores to accept. If "ratio", then cutoff defines the ratio of the max score as threshhold. If constant, the cutoff is used directly as treshhold. """ score = self.get_detection_score(y_pred, weights, alpha, beta) @@ -244,7 +244,7 @@ def find_local_maxima(pred, score, cutoff=0.9, mode="quantile"): Output from model, score-map cutoff, mode: float, string Treshholding parameters. Mode can be either "quantile" or "ratio" or "constant". If "quantile", then - `ratio` defines the quantile of scores to accept. If "ratio", then cutoff defines the ratio of the max + cutoff defines the quantile of scores to accept. If "ratio", then cutoff defines the ratio of the max score as threshhold. If constant, the cutoff is used directly as treshhold. """ From 39c6a79c8322f42274a4e295f58fb3a234209b1c Mon Sep 17 00:00:00 2001 From: Giovanni Volpe <46021832+giovannivolpe@users.noreply.github.com> Date: Tue, 13 May 2025 20:40:42 +0200 Subject: [PATCH 2/3] Update lodestar.py --- deeplay/applications/detection/lodestar/lodestar.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deeplay/applications/detection/lodestar/lodestar.py b/deeplay/applications/detection/lodestar/lodestar.py index afcc8ba6..6fac2f3a 100644 --- a/deeplay/applications/detection/lodestar/lodestar.py +++ b/deeplay/applications/detection/lodestar/lodestar.py @@ -180,8 +180,8 @@ def detect(self, x, alpha=0.5, beta=0.5, cutoff=0.97, mode="quantile"): Threshold for detection mode: string Mode for thresholding. Can be either "quantile" or "ratio" or "constant". If "quantile", then - `ratio` defines the quantile of scores to accept. If "ratio", then cutoff defines the ratio of the max - score as threshhold. If constant, the cutoff is used directly as treshhold. + "cutoff" defines the quantile of scores to accept. If "ratio", then "cutoff" defines the ratio of the max + score as threshhold. If "constant", the "cutoff" is used directly as treshhold. """ y = self(x.to(self.device)) y_pred, weights = y[:, :-1], y[:, -1:] @@ -228,8 +228,8 @@ def detect_single( Threshold for detection mode: string Mode for thresholding. Can be either "quantile" or "ratio" or "constant". If "quantile", then - cutoff defines the quantile of scores to accept. If "ratio", then cutoff defines the ratio of the max - score as threshhold. If constant, the cutoff is used directly as treshhold. + "cutoff" defines the quantile of scores to accept. If "ratio", then "cutoff" defines the ratio of the max + score as threshhold. If "constant", the "cutoff" is used directly as treshhold. """ score = self.get_detection_score(y_pred, weights, alpha, beta) return self.find_local_maxima(y_pred, score, cutoff, mode) From 011b5ce6f0b117e3356811927cb41b3501f1d8f5 Mon Sep 17 00:00:00 2001 From: Giovanni Volpe <46021832+giovannivolpe@users.noreply.github.com> Date: Tue, 13 May 2025 20:41:28 +0200 Subject: [PATCH 3/3] Update lodestar.py --- deeplay/applications/detection/lodestar/lodestar.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deeplay/applications/detection/lodestar/lodestar.py b/deeplay/applications/detection/lodestar/lodestar.py index 6fac2f3a..d7e7b2e7 100644 --- a/deeplay/applications/detection/lodestar/lodestar.py +++ b/deeplay/applications/detection/lodestar/lodestar.py @@ -244,8 +244,8 @@ def find_local_maxima(pred, score, cutoff=0.9, mode="quantile"): Output from model, score-map cutoff, mode: float, string Treshholding parameters. Mode can be either "quantile" or "ratio" or "constant". If "quantile", then - cutoff defines the quantile of scores to accept. If "ratio", then cutoff defines the ratio of the max - score as threshhold. If constant, the cutoff is used directly as treshhold. + "cutoff" defines the quantile of scores to accept. If "ratio", then "cutoff" defines the ratio of the max + score as threshhold. If "constant", the "cutoff" is used directly as treshhold. """ score = score[3:-3, 3:-3]