Skip to main content

Crate sightloom_reid

Crate sightloom_reid 

Source
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.
BruteForceAnn
Exact cosine ANN (linear scan).
CalibrationReport
Result of ROC / EER calibration.
CameraEdge
One directed travel constraint between cameras.
CameraTopology
Sparse camera topology for cross-camera identity gating.
EmbeddingModelId
Identity of the embedding model that produced vectors in a store.
EmbeddingObservation
One embedding observation on a track used for aggregation.
EmbeddingStore
Host-owned store mapping EmbeddingRef handles to dense vectors.
HnswAnn
Hierarchical NSW graph ANN (cosine via distance 1 - sim).
IdentityAuditEvent
One audited identity decision.
IdentityInterval
One continuous interval where an identity decision held.
IdentityMatch
Result of comparing an embedding or track fragment to a subject.
IdentityScoreFactors
Per-factor identity evidence used for accept / reject / uncertain decisions.
LabeledScore
One labeled similarity score for calibration.
LshAnn
Random-projection sign LSH with exact re-rank of candidates.
PhotoQuery
Search query produced from one or more reference photos (embeddings).
PhotoSearchHit
One ranked hit from a photo / embedding search.
ReferenceSample
One reference sample contributing to a subject identity.
ResolveConfig
Configuration for ThresholdResolver.
RocPoint
One operating point on the ROC curve.
ScoreContext
Optional context that modulates cosine scores before thresholding.
SubjectGallery
In-memory gallery of subjects plus embeddings and audit log.
SubjectReference
A subject identity with modality-specific reference samples.
ThresholdResolver
Cosine + multi-factor resolver using an embedding store and thresholds.
TrackFragment
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.
EmbeddingError
Errors produced by embedding operations.
MatchDecision
Confidence band for an identity match decision.
NegativeEvidencePolicy
How negative reference samples influence resolve decisions.
SubjectModality
How a subject is described by reference material.

Traits§

AnnIndex
Common operations over ANN backends.
HostAnnAdapter
Host-supplied ANN (e.g. FAISS via FFI). SightLoom does not link FAISS.
IdentityResolver
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§

IdentityPoint
One audit-like sample used to build intervals.
SubjectLastSeen
Subject last-seen map keyed by [SubjectId::0].