commit 9cf20766a5ce8f5b1196b7adfda9d3999f5c9bac Author: maxime Date: Mon Nov 16 15:40:17 2026 +0100 aimsight-models: the pilot of learned detectors (README) Co-Authored-By: Claude Opus 5.5 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d4fed21 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +__pycache__/ +.venv/ +/cache/ +/runs/ +*.pt diff --git a/README.md b/README.md new file mode 100644 index 0000000..9931f4b --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# aimsight-models + +Learned detectors for AIMsight: models trained on the reviewed labels to tell, at each measurement instant of a station, which families are present (`labeling/families.md`), and which sensors carry them. A pilot, not yet in use: the detectors in production are the rules of `aimsight-detectors`. + +## The pilot + +- **Families**: Visibility and Obstruction; the others stay rules for now. +- **Model**: multiple-instance learning, since a label names a station and a range, not its sensors, and each station has its own number of sensors: one small MLP shared by every sensor, attention pooling to a score per family for the station; the attention weights give the sensors. +- **Inputs**: each sensor against its own usual level (median and MAD over the 3 days before), on windows in hours (the step goes from 5 min to 4 h); the station context (share of high and rejected sensors, `sigma0`, references, camera pose, housing temperature, common mode by PCA); the image quality metrics when present, with a mask. +- **Training**: pre-training on the outputs of the current detectors over all the data, then fine-tuning on the reviewed labels of `labeling/auto/`. +- **Evaluation**: leave one station out; the measure of `detectors/bench/score.py` (found, correct, per family and per instant), against the rules on the same stations. +- **Steps**: dataset, evaluator (reproducing the rules' figures first), gradient boosting baseline, the PyTorch model, pre-training compared with and without, decoding into episodes. + +## Contracts + +- Reads the measurements through `detectors/scripts/data.py`, the reading of the benchmark; the labels from `labeling/auto/`; the data from `data/` (read-only). Paths are passed as arguments. +- Never changes `aimsight-detectors` (neither `scripts/` nor `bench/`): the benchmark is the measure. +- Episodes in the format of the detectors' contract (`start`, `end`, `kind`, `label`, `text`, `ignore`, `sensors`), so that a model can later sit behind `detect(measurements)`. + +## Rules + +- Every time is in UTC. No rule specific to a station, a target or a date. +- English for code, identifiers and docs.