KatInterview

Video anomaly detection pipeline for real-time surveillance

Machine LearningModel answer
MediumModel answerMachine Learningcomputer-visionreal-time-systemsrare-event-detection

Last updated

Design an ML system to identify threatening behaviors in live camera feeds, handling extreme class imbalance and deployment constraints.

Problem Statement

Design a computer vision pipeline that monitors live security camera feeds to identify threatening behaviors—such as weapon display, forced access, or hostile movements—and generates silent notifications to monitoring staff when potential incidents occur.

System Requirements

  1. Architecture: Outline an approach to recognize threat patterns in continuous video streams. Consider whether frame-by-frame analysis, temporal modeling, or hybrid methods are appropriate.

  2. Data Collection: Threatening events occur extremely infrequently, creating severe class imbalance. Describe how you would gather, organize, and annotate training data when real incidents are scarce.

  3. Operational Constraints: The system must run on existing on-premises infrastructure with limited compute capacity, processing multiple camera feeds simultaneously with minimal latency.

  4. Evaluation Framework: Define how you would measure system performance given the unusual cost asymmetry—missing a genuine threat is critically expensive, but excessive false notifications undermine trust and waste resources.

  5. Risk Mitigation: Identify potential biases, failure modes, and ethical concerns in automated surveillance, and propose concrete mitigation strategies.

Expected Deliverable

Present a structured technical design covering:

  • Data acquisition strategy for extremely rare events
  • Model architecture selection and justification
  • Deployment approach balancing accuracy and resource constraints
  • Evaluation methodology appropriate for extreme imbalance
  • Safeguards addressing bias and operational risks

Hints

Hint 1

Think about multi-stage pipelines where cheap filters eliminate most normal footage before expensive models run

Hint 2

Synthetic data and staged scenarios may be more valuable than waiting for organic incidents

Hint 3

The base rate of genuine threats (perhaps 1 per million camera-hours) makes traditional accuracy metrics misleading