From 7df32ea5af5dcfd65fced9476651ed2f1e9597a2 Mon Sep 17 00:00:00 2001 From: David Humphrey Date: Sun, 15 Oct 2023 18:50:51 -0400 Subject: [PATCH] Update default values for Yolo Fish and Megadetector --- src/megadetector_detector.py | 8 ++++---- src/yolo_fish_detector.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/megadetector_detector.py b/src/megadetector_detector.py index a6841b2..3386169 100644 --- a/src/megadetector_detector.py +++ b/src/megadetector_detector.py @@ -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, diff --git a/src/yolo_fish_detector.py b/src/yolo_fish_detector.py index ad28ad9..259792c 100644 --- a/src/yolo_fish_detector.py +++ b/src/yolo_fish_detector.py @@ -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,