Video anomaly detection

On this page 7

Video anomaly detection is the task of automatically identifying frames, time segments or spatial regions in video that deviate from learned normal patterns of appearance and motion. Within anomaly detection in artificial intelligence, it extends outlier detection from static data to spatio-temporal signals, where an event is often abnormal only because of where, when or how fast it happens.

Typical targets include falls, fights, intrusions, abandoned objects and wrong-way traffic in surveillance footage, as well as process deviations on production lines. Because real anomalies are rare and diverse, most systems learn what normal activity looks like and flag whatever they cannot explain, rather than learning every possible incident from labeled examples.

How video anomaly detection models normality

Most video anomaly detection systems model normal behavior and score departures from it. A model is trained on footage assumed to contain only ordinary activity, and at inference time each frame or region receives an anomaly score. A threshold, often tuned per camera, turns these scores into alerts.

The defining difficulty is context. A person running is normal on a sports field and abnormal in a hospital corridor; a bicycle is normal on a road and abnormal on a pedestrian walkway. Many video anomalies are therefore contextual or collective anomalies rather than point anomalies, and the model must learn scene-specific regularities of position, speed, direction and interaction.

  1. Decode the stream and sample frames or short clips.
  2. Extract features such as appearance, optical flow or object tracks.
  3. Score each frame, clip or region against the model of normality.
  4. Smooth scores over time to suppress single-frame noise.
  5. Apply a threshold and raise an alert with its location.

Main families of video anomaly detection methods

Methods differ mainly in how they define deviation from normal. The table summarizes the established families and their characteristic strengths and weaknesses.

ApproachAnomaly signalStrengthWeakness
Reconstruction-basedHigh reconstruction errorSimple, needs only normal dataOften reconstructs anomalies too well
Prediction-basedPoor future frame predictionCaptures motion dynamicsSensitive to camera shake
Object-centricUnusual object appearance or motionLocalizes events, more interpretableDepends on detector quality
Weakly supervisedLearned ranking from video labelsDetects known incident types wellNeeds labeled anomalous videos
Vision-language modelsMismatch with text descriptionsOpen vocabulary, explanationsHigh compute cost, latency
Approaches to video anomaly detection

Reconstruction-based methods, usually convolutional autoencoders, learn to reproduce normal frames and treat large reconstruction error as suspicious. Prediction-based methods forecast the next frame from previous ones; because motion is harder to predict than appearance, they often separate anomalies more clearly. Object-centric pipelines first detect people and vehicles, then score each object’s appearance and trajectory, which yields a precise anomaly localization within the frame.

Weakly supervised learning uses only video-level labels such as “contains an incident” and applies multiple instance learning, ranking the most abnormal segment of an anomalous video above all segments of a normal one. This approach performs well on crime and violence datasets but inherits the label bias of its training set.

Benchmarks and evaluation metrics

Research progress is measured on a small set of public benchmark datasets, each with a different notion of what counts as abnormal. Results on one benchmark rarely transfer directly to another scene.

DatasetSettingTypical anomaliesSupervision
UCSD Ped1 and Ped2Pedestrian walkwaysCyclists, carts, skatersNormal-only training
CUHK AvenueCampus avenueRunning, throwing objectsNormal-only training
ShanghaiTech CampusMultiple campus scenesFighting, chasing, vehiclesNormal-only training
UCF-CrimeReal surveillance footageRobbery, assault, accidentsVideo-level labels
XD-ViolenceFilms and online videoViolence with audio cuesVideo-level labels
Widely used video anomaly detection benchmarks

The standard metric is the frame-level area under the ROC curve (AUC), computed over all test frames; some datasets report average precision instead because anomalies are rare. Region-level and track-level criteria additionally check whether the model points to the right place. A high frame-level AUC can hide poor localization and an unusable false alarm rate at practical thresholds.

Deploying video anomaly detection in practice

Operational systems are judged by false alarms per camera per day more than by benchmark AUC. An operator monitoring hundreds of streams can review only a limited number of alerts, so thresholds are tuned to an acceptable alert budget, and scores are usually smoothed over several seconds.

SituationRecommended choiceReason
Fixed camera, no incident labelsPer-scene prediction or object modelLearns local norms
Known incident types with labelsWeakly supervised classifierHigher recall on target events
Many cameras, limited computeEdge feature extraction, central scoringReduces bandwidth
Need for operator trustObject-centric model with localizationExplains why an alert fired
Deployment decisions and recommended choices

Concept drift is a constant concern. Lighting changes, seasons, construction work and new layouts alter what normal looks like, so models need periodic retraining or online adaptation. Privacy rules also matter: many deployments process video at the edge and store only alert clips, and some use pose skeletons instead of raw pixels to reduce exposure of personal data.

Limitations and open problems

Video anomaly detection remains an ill-posed problem because abnormal is defined by the training data, not by intent or harm. A model trained on weekday footage may flag a harmless weekend market, while a dangerous event that looks visually ordinary can pass unnoticed.

  • Training contamination: rare anomalies hidden in supposedly normal footage teach the model to accept them.
  • Generalization across scenes: models tuned on one camera often degrade sharply on another.
  • Bias and fairness: unusual clothing, mobility aids or group behavior can be flagged as abnormal.
  • Evaluation gaps: small benchmarks with staged anomalies overstate real-world accuracy.

For these reasons, responsible systems keep a human in the loop to confirm alerts and treat scores as prompts for attention rather than automatic judgments about people.

Explained without jargon

A security guard who watches the same entrance every day learns what normal looks like. People walk in, swipe a card and leave. If someone climbs the fence, the guard notices at once. Video anomaly detection teaches a computer the same habit.

The system watches many hours of ordinary footage. Then it flags anything that does not fit. It does not need to know every possible problem in advance. A person still checks each alert and decides what to do.

A typical use case

A metro operator runs 120 cameras on station platforms. Staff in the control room cannot watch every feed, so the operator deploys an object-centric video anomaly detection system. For two weeks it learns ordinary platform activity for each camera: boarding crowds, waiting passengers and cleaning carts at night.

After deployment, the system scores every tracked person and object several times per second. It flags a person lying on the platform edge, a bag left unattended for more than five minutes and a child moving toward the tracks. Thresholds are set so that each camera produces about two alerts per day on average. Operators confirm or dismiss each alert, and the confirmed cases feed into quarterly retraining, which gradually reduces false alarms caused by seasonal crowds and maintenance work.