mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
refactor motion calculation (#10380)
* refactor motion calculation * Use float
This commit is contained in:
parent
838ef636f8
commit
3515361320
@ -404,6 +404,9 @@ def motion_activity():
|
||||
|
||||
# normalize data
|
||||
df = df.resample(f"{scale}S").sum().fillna(0.0)
|
||||
mean = df["motion"].mean()
|
||||
std = df["motion"].std()
|
||||
df["motion"] = (df["motion"] - mean) / std
|
||||
df["motion"] = (
|
||||
(df["motion"] - df["motion"].min())
|
||||
/ (df["motion"].max() - df["motion"].min())
|
||||
|
Loading…
Reference in New Issue
Block a user