Skip to content
Merged
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
12 changes: 6 additions & 6 deletions deeplay/applications/detection/lodestar/lodestar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:]
Expand Down Expand Up @@ -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
`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.
"""
score = self.get_detection_score(y_pred, weights, alpha, beta)
return self.find_local_maxima(y_pred, score, cutoff, mode)
Expand All @@ -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
`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.

"""
score = score[3:-3, 3:-3]
Expand Down