Skip to content

Commit

Permalink
Update default values for Yolo Fish and Megadetector
Browse files Browse the repository at this point in the history
  • Loading branch information
humphd committed Oct 15, 2023
1 parent 1bcc9c2 commit 7df32ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/megadetector_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,18 @@ def __init__(self, logger, min_duration, buffer, confidence):
Args:
logger (Logger): Logger object for logging.
min_duration (float): The minimum duration of a generated clip (defaults to 15.0)
min_duration (float): The minimum duration of a generated clip (defaults to 10.0)
buffer (float): An optional number of seconds to add before/after a clip (defaults to 5.0)
confidence (float): The confidence level to use (defaults to 0.40)
confidence (float): The confidence level to use (defaults to 0.50)
"""
logger.info(
"Initializing Megadetector Model and Optimizing (this will take a minute...)"
)
# Use some defaults if any of these aren't already set
min_duration = 15.0 if min_duration is None else min_duration
min_duration = 10.0 if min_duration is None else min_duration
buffer = 5.0 if buffer is None else buffer
confidence = 0.40 if confidence is None else confidence
confidence = 0.50 if confidence is None else confidence
providers = get_available_providers()
super().__init__(
logger,
Expand Down
4 changes: 2 additions & 2 deletions src/yolo_fish_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ def __init__(self, logger, min_duration, buffer, confidence):
logger (Logger): Logger object for logging.
min_duration (float): The minimum duration of a generated clip (defaults to 3.0)
buffer (float): An optional number of seconds to add before/after a clip (defaults to 1.0)
confidence (float): The confidence level to use (defaults to 0.45)
confidence (float): The confidence level to use (defaults to 0.50)
"""
logger.info("Initializing YOLO-Fish Model")
# Use some defaults if any of these aren't already set
min_duration = 3.0 if min_duration is None else min_duration
buffer = 1.0 if buffer is None else buffer
confidence = 0.45 if confidence is None else confidence
confidence = 0.50 if confidence is None else confidence
super().__init__(
logger,
yolo_fish_model_path,
Expand Down

0 comments on commit 7df32ea

Please sign in to comment.