From 45a318dfed4825dacecd553b8e709ca97d63e3f3 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 14 Mar 2024 08:31:33 -0600 Subject: [PATCH] Reduce outliers in motion data to ensure consistent scaling (#10452) --- frigate/api/review.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frigate/api/review.py b/frigate/api/review.py index 937f7948d..6c159c66f 100644 --- a/frigate/api/review.py +++ b/frigate/api/review.py @@ -407,6 +407,8 @@ def motion_activity(): mean = df["motion"].mean() std = df["motion"].std() df["motion"] = (df["motion"] - mean) / std + outliers = df.quantile(0.999)["motion"] + df[df > outliers] = outliers df["motion"] = ( (df["motion"] - df["motion"].min()) / (df["motion"].max() - df["motion"].min())