From 2b715bc34f65ec416d381cf181728c71e805f5cf Mon Sep 17 00:00:00 2001 From: Harry Tung Date: Wed, 3 Jul 2024 11:12:19 -0700 Subject: [PATCH] Added confidence logging messages --- app/api/routes/image_queries.py | 3 ++- test/api/test_motdet.py | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/routes/image_queries.py b/app/api/routes/image_queries.py index b8922a03..05cffb28 100644 --- a/app/api/routes/image_queries.py +++ b/app/api/routes/image_queries.py @@ -151,7 +151,8 @@ async def post_image_query( detector_metadata=get_detector_metadata(detector_id=detector_id, gl=gl), confidence_threshold=confidence_threshold, ): - logger.debug("Motion detection confidence is high enough to return") + logger.debug(f"Motion detection confidence is high enough to return. Current confidece: " + f"{new_image_query.result.confidence}. Target confidence: {confidence_threshold}.") app_state.db_manager.create_iqe_record(record=new_image_query) return new_image_query diff --git a/test/api/test_motdet.py b/test/api/test_motdet.py index 1cba77a7..59c93dd0 100644 --- a/test/api/test_motdet.py +++ b/test/api/test_motdet.py @@ -263,7 +263,6 @@ def test_motion_detection_not_sufficient_if_doesnt_meet_conf_threshold(gl: Groun image=original_image, wait=wait_time, confidence_threshold=base_iq_response.result.confidence + 1e-3, # Require a higher confidence than before - human_review="ALWAYS" ) time_diff = time.time() - current_time