How cvar-vision-dl/remind-reid-tracker works
Purpose and entry points
REMIND is a Python long-term multi-object re-identification tracker for indoor sequences. It assigns persistent IDs using visual descriptors, semantic parts, relational context, and adaptive memory rather than motion tracking. Interactive/local runs enter at main.py; the executable pipeline is assembled in pipeline/reid_pipeline.py. Evaluation-oriented runners are under testing/run_tracking_test.py and batch variants.
Input perception and feature construction
Frames are converted into instance detections through interchangeable segmentation backends: YOLO for user data and DAVIS masks for ground-truth evaluation. Perception then computes DINO-based object, part, and background descriptors.
Grounding: perception/perception_engine.py, detection/yolo_segmenter.py, detection/davis_segmenter.py, features/dino_extractor.py, features/object_features.py, features/part_features.py.
Frame orchestration
The pipeline follows an ordered per-frame lifecycle: perception, association against current memory, then memory update. Initialization establishes runtime state and existing models; stage modules isolate each lifecycle boundary.
Grounding: pipeline/reid_pipeline.py, pipeline/initialization.py, pipeline/perception_stage_full.py, pipeline/association_stage.py, pipeline/update_stage.py.
Association evidence and candidate formation
Association builds detection-to-track candidates from appearance and relational scores, shapes score paths, and applies policy-based eligibility/confidence decisions. Models and reports provide the shared domain contracts and diagnostic output.
Grounding: association/engine/data_association.py, association/engine/candidate_generation.py, association/engine/candidate_shaping/score_path.py, association/models.py, association/reports.py.
Context, disambiguation, and global resolution
Neighbor-set context represents local scene structure and contributes scoring evidence. Ambiguous visually similar groups undergo anchor selection, component construction, and known-set distance disambiguation before global one-to-one matching. Hungarian assignment is the central resolver; lock resolution handles constrained matches.
Grounding: association/context/sets_context_builder.py, association/scores/sets/sets_scoring.py, association/disambiguation/known_set_distance_disambiguator.py, association/resolver/hungarian_resolver.py, association/resolver/lock_resolver.py.
Assignment outcomes and adaptive memory
Assignment execution applies accepted matches, while post-assignment policies guard outcomes and preserve explicit ambiguous or provisional-new-track states. The update subsystem evolves each tracked object's appearance, part, background, and neighbor models, making later re-identification depend on accumulated evidence.
Grounding: association/engine/assignment_executor.py, association/engine/assignment_result_applier.py, memory/memory_store.py, memory/tracked_object.py, update/memory_manager.py, update/descriptors/.
Runtime dependencies and external boundaries
The runtime targets Python 3.10+ with the Conda environment in environment.yml. DINOv3 is fetched from HuggingFace on first use; YOLO segmentation weights are local files under yolo/. Configuration is YAML-driven, centered on config/default_config.yaml, with detector and ablation overrides. Inputs are frame directories or videos; rendered outputs and telemetry are produced by the main/evaluation runners.
Main entry points: reid_pipeline.py ReID pipeline · candidate_generation.py Candidate generation and shaping · perception_engine.py Perception engine · main.py Main and evaluation runners
Components 20
Runtime
- Frames or video
- Main and evaluation runners · Interactive runs start at main.py; evaluation uses testing runners.
main.py - ReID pipeline · Orders perception, association, and memory update for every frame.
pipeline/reid_pipeline.py - Runtime initialization · Establishes runtime state and loads existing models.
pipeline/initialization.py - YAML configuration
config/default_config.yaml - Rendered output and telemetry
Perception
- Segmentation backends · YOLO serves user data; DAVIS masks serve ground-truth evaluation.
detection/yolo_segmenter.py - Perception engine · Converts frames and masks into instance detections.
perception/perception_engine.py - DINO descriptors · Extracts visual embeddings for objects, parts, and background.
features/dino_extractor.py - Object and part features
features/object_features.py
Association
- Association stage
pipeline/association_stage.py - Association engine · Builds detection-to-track evidence and policy decisions.
association/engine/data_association.py - Candidate generation and shaping · Combines appearance and relational score paths into eligible candidates.
association/engine/candidate_generation.py - Neighbor-set context · Represents local scene structure for association scoring.
association/context/sets_context_builder.py - Known-set disambiguation · Separates visually similar groups using anchors and set distance.
association/disambiguation/known_set_distance_disambiguator.py - Global assignment · Hungarian matching resolves assignments; locks handle constraints.
association/resolver/hungarian_resolver.py - Assignment application · Applies accepted matches and preserves ambiguous or provisional states.
association/engine/assignment_executor.py
Adaptive Memory
- Memory update stage
pipeline/update_stage.py - Tracked-object memory · Stores persistent identities and their accumulated models.
memory/memory_store.py - Adaptive model updates · Updates appearance, part, background, and neighbor evidence.
update/memory_manager.py
Connections 26
- Frames or video → Main and evaluation runners: provided to
- Main and evaluation runners → ReID pipeline: runs
- YAML configuration → Runtime initialization: configures
- ReID pipeline → Runtime initialization: initializes
- Runtime initialization → Perception engine: prepares
- ReID pipeline → Perception engine: per frame
- Frames or video → Segmentation backends: frames
- Segmentation backends → Perception engine: instance masks
- Perception engine → DINO descriptors: instance crops
- DINO descriptors → Object and part features: embeddings
- Object and part features → Association stage: detections
- ReID pipeline → Association stage: after perception
- Association stage → Association engine: invokes
- Tracked-object memory → Association engine: current tracks
- Association engine → Candidate generation and shaping: forms
- Neighbor-set context → Candidate generation and shaping: relational scores
- Tracked-object memory → Neighbor-set context: neighbor models
- Candidate generation and shaping → Known-set disambiguation: ambiguous groups
- Known-set disambiguation → Global assignment: refined candidates
- Candidate generation and shaping → Global assignment: eligible candidates
- Global assignment → Assignment application: assignments
- Assignment application → Memory update stage: outcomes
- ReID pipeline → Memory update stage: after association
- Memory update stage → Adaptive model updates: updates
- Adaptive model updates → Tracked-object memory: evolves tracks
- Main and evaluation runners → Rendered output and telemetry: renders and reports