The single reader: data.py of the tools repository (sibling ~/aimsight-tools), located once in categories.py
scripts/data.py removed; the detectors' standalone CLIs go (categories.py runs them). Benchmark identical to the baseline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
908369b9e9
commit
5e9a7aa9d1
11 files changed
+16
-215
No files matched your search
@@ -47,13 +47,10 @@ so that the threshold does not depend on the cadence. The targets may move in op
|
||||
Without a pose or without a temperature, nothing. The heat is not taken: in fine weather, it is the day's cycle.
|
||||
"""
|
||||
import math
|
||||
import os
|
||||
import statistics
|
||||
import sys
|
||||
from datetime import datetime, timedelta, timezone
|
||||
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) # data.py, next to it
|
||||
from data import iso, load # noqa: E402
|
||||
from data import iso
|
||||
|
||||
MIN_HOURS = 20 # a UTC day counts in the profile if it has at least 20 measured hours
|
||||
PARTIAL = 12 # an incomplete day of at least 12 hours gets its episode if it looks like the profile
|
||||
@@ -280,16 +277,3 @@ def _episodes(measurements, cols, name, camera):
|
||||
episodes.append({"start": iso(start), "end": iso(end),
|
||||
"kind": "Thermal displacement", "label": label, "text": "", "ignore": False, "sensors": sensors})
|
||||
return episodes
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
measurements = load(sys.argv[1])
|
||||
for e in detect(measurements):
|
||||
print(e["start"], "→", e["end"], e["label"], len(e["sensors"]), "targets")
|
||||
for cols in (("corr_x", "corr_y"), ("x", "y")):
|
||||
concerned, n = cycle(measurements, cols)
|
||||
k = len({c[0] for c in concerned})
|
||||
amp = statistics.median(max(c[2]) - min(c[2]) for c in concerned) if concerned else 0
|
||||
yes, evaluated = sine(measurements, cols)
|
||||
print(f"{cols[0][:-2] or 'raw'}: targets {k}/{n}, median amplitude {amp:.3f} px, warm hours (UTC) "
|
||||
f"{warm_hours(concerned) if concerned else '-'}; sinusoid: targets {len(yes)}/{len(evaluated)}")
|
||||
Reference in new issue
Block a user