SAM2MOT: A Novel Paradigm of Multi-Object Tracking by Segmentation
Paper β’ 2504.04519 β’ Published
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
This repository contains a comprehensive R&D investigation into the best modern approaches for real-time ID card detection, tracking, re-identification, and reference matching from mobile/video input, plus a working prototype implementation.
RD_REPORT.md β Full R&D report (50+ pages) covering:
enhanced/ β Prototype implementation:
config.py β Full configuration system with Edge/Production/Research presetsdetector.py β YOLOv11 / D-FINE / RT-DETR detector with mock fallbacktracker.py β OC-SORT multi-object tracker (replaces ByteTrack)feature_extractor.py β DINOv2 embedding extractorreid_manager.py β EMA gallery for card re-entry detectionreference_matcher.py β SuperPoint + LightGlue reference matchingquality_scorer.py β Card quality assessmentpipeline.py β End-to-end pipeline orchestrationscripts/ β Evaluation and data generation:
evaluate_detection.py β mAP, precision/recall evaluationevaluate_tracking.py β MOTA, IDF1, ID-switch metricsevaluate_reid.py β ROC/AUC, CMC, EER evaluationgenerate_synthetic_cards.py β Privacy-safe synthetic ID card generatortests/ β Integration tests:
test_system.py β 68 tests covering all components| Component | Model | HF Model | Latency |
|---|---|---|---|
| Detector | D-FINE-S | Fine-tune from D-FINE GitHub | 3.5ms (T4) |
| Tracker | BoT-SORT-ReID | Custom + DINOv2 | ~5ms |
| Re-ID | DINOv2-base | facebook/dinov2-base |
~15ms |
| Reference Match | SuperPoint + LightGlue | ETH-CVG/lightglue_superpoint |
sub-10ms |
| Total | ~25ms |
from enhanced.config import PipelineConfig
from enhanced.pipeline import IDCardPipeline
config = PipelineConfig.production_config()
pipeline = IDCardPipeline(config)
# Process a frame
result = pipeline.process_frame(frame)
for card in result.cards:
print(f"Card {card.track_id}: {card.quality_label} (conf={card.confidence:.2f})")
pip install opencv-python-headless numpy faker
python tests/test_system.py
# Expected: 68/68 passed
Research prototype β see individual model licenses.