Expand description
Subject references and identity resolution for SightLoom.
Pipeline:
Detection → TrackId → TrackFragment → embedding aggregation → SubjectId.
Provides:
- reference galleries with positive / negative samples
- threshold resolver with uncertain band
- merge / split subject clusters
- manual confirmation hooks
- audit trail for identity decisions
Structs§
- AnnHit
- One ANN hit: external id + cosine similarity.
- Brute
Force Ann - Exact cosine ANN (linear scan).
- Calibration
Report - Result of ROC / EER calibration.
- Camera
Edge - One directed travel constraint between cameras.
- Camera
Topology - Sparse camera topology for cross-camera identity gating.
- Embedding
Model Id - Identity of the embedding model that produced vectors in a store.
- Embedding
Observation - One embedding observation on a track used for aggregation.
- Embedding
Store - Host-owned store mapping
EmbeddingRefhandles to dense vectors. - HnswAnn
- Hierarchical NSW graph ANN (cosine via distance
1 - sim). - Identity
Audit Event - One audited identity decision.
- Identity
Interval - One continuous interval where an identity decision held.
- Identity
Match - Result of comparing an embedding or track fragment to a subject.
- Identity
Score Factors - Per-factor identity evidence used for accept / reject / uncertain decisions.
- Labeled
Score - One labeled similarity score for calibration.
- LshAnn
- Random-projection sign LSH with exact re-rank of candidates.
- Photo
Query - Search query produced from one or more reference photos (embeddings).
- Photo
Search Hit - One ranked hit from a photo / embedding search.
- Reference
Sample - One reference sample contributing to a subject identity.
- Resolve
Config - Configuration for
ThresholdResolver. - RocPoint
- One operating point on the ROC curve.
- Score
Context - Optional context that modulates cosine scores before thresholding.
- Subject
Gallery - In-memory gallery of subjects plus embeddings and audit log.
- Subject
Reference - A subject identity with modality-specific reference samples.
- Threshold
Resolver - Cosine + multi-factor resolver using an embedding store and thresholds.
- Track
Fragment - A contiguous track fragment used during identity aggregation.
Enums§
- AnnBackend
- Owned ANN backend selected by
AnnKind. - AnnKind
- Which ANN implementation to use when building an index.
- Embedding
Error - Errors produced by embedding operations.
- Match
Decision - Confidence band for an identity match decision.
- Negative
Evidence Policy - How negative reference samples influence resolve decisions.
- Subject
Modality - How a subject is described by reference material.
Traits§
- AnnIndex
- Common operations over ANN backends.
- Host
AnnAdapter - Host-supplied ANN (e.g. FAISS via FFI).
SightLoomdoes not link FAISS. - Identity
Resolver - Identity resolver contract.
Functions§
- aggregate_
fragment - Aggregates ordered embedding observations into a track fragment.
- class_
compatibility - Class compatibility: matching classes or either missing → 1.0; mismatch → 0.0.
- coalesce_
identity_ intervals - Builds intervals by coalescing consecutive audit-like samples with the same
(source, track, subject, decision). - coalesce_
identity_ intervals_ gapped - Coalesces points but only merges when the time gap is ≤
max_gap_ns. - compute_
roc - Builds an ROC curve and EER estimate from labeled scores.
- cosine_
similarity - Cosine similarity in
[-1.0, 1.0]. - interval_
from_ match - Builds a synthetic interval from a single match at time
at. - labeled_
scores_ from_ pairs - Builds labeled cosine scores from pairs of embedding handles.
- mean_
pool - Mean-pools finite equal-dimension vectors into
output. - rank_
subjects_ by_ cosine - Direct cosine ranking of a query vector against all positive reference samples.
- resolve_
config_ from_ calibration - Applies calibration recommendations onto a
ResolveConfig. - search_
gallery_ by_ photo - Scores a photo embedding against gallery subjects (linear scan, multi-factor).
- search_
with_ host_ ann - Runs search through a host FAISS/HNSWlib/etc. adapter.
- temporal_
plausibility - Temporal plausibility from last-seen time on a subject.
- uncertain_
only - Filters intervals to uncertain decisions only.
Type Aliases§
- Identity
Point - One audit-like sample used to build intervals.
- Subject
Last Seen - Subject last-seen map keyed by [
SubjectId::0].