Skip to content

Streaming Violence Anticipation System

My senior capstone at Lawrence Technological University, from fall 2025 to May 2026. I built it on my own, with Dr. Eric Martinson as my advisor. The goal is a model that warns before violence starts in video, rather than one that recognizes it afterwards. In October 2026 I went back to it and rebuilt the evaluation, and that is where the first results that beat a baseline with no video content came from.

  • Type Senior capstone, solo
  • School Lawrence Technological University
  • Advisor Dr. Eric Martinson
  • When Fall 2025 to May 2026; rebuilt October 2026
  • Data UCF-Crime · XD-Violence · UBI-Fights
  • Model SigLIP 2 prompt scores, linear probe
  • Stack PyTorch · SigLIP 2 · Computer Vision · Evaluation
A grainy black-and-white security camera frame labeled CAMERA05, looking down on people behind a bar counter

The idea

The idea is to predict risk before something happens, rather than classify it after the fact. The model has to make that call from what the video shows in the moments leading up to it, second by second, without seeing what comes next. That is a harder framing than detection.

The targets I set were 30 seconds of warning, with fewer than 6 false alarms an hour. In the rebuild a nearer target, a warning at least 10 seconds ahead, became the main one, with 30 seconds as the stretch. It was a solo project, built with AI coding assistance, which did much of the coding in the October rebuild.

The capstone year

What I tried first

From November 2025 to April 2026 I worked mostly from XD-Violence and UCF-Crime clips and tried several approaches in PyTorch:

  • A transformer over person boxes, VideoMAE crops and a CLIP summary of each clip.
  • Embeddings from Qwen2.5-VL, a vision-language model, with a small model trained on top of them.
  • A fusion of motion, audio and pose.
  • A live feed, which I tried, though I mainly ran it on recorded clips.

When I audited that work, most of the impressive numbers did not hold up. They came from labels that did not line up with the frames, test clips that shared footage with training clips, and alarm metrics that were too forgiving. The best honest result ranked the moments before a fight only a little better than chance, with a test AUC of 0.56 to 0.62.

October 2026

Rebuilding the evaluation

  1. One benchmark. I combined UCF-Crime, XD-Violence and UBI-Fights into 7,604 videos and about 419 hours, split into five folds that keep near-duplicates and clips from the same film together. One fold is held back for a single final check.
  2. Scored as it would run. The model scores each second using only what it has seen so far. An alarm counts as a warning only if it starts at least 30 (or 10) seconds before the first physical aggression, and no more than two minutes before.
  3. A baseline with no video. Fights tend to start early in these clips, so an alarm at the start of every clip would look like anticipation. Every result is compared with the best a rule can do using only what kind of source a clip came from and how far into it the model is, with no video content at all.
  4. Start times re-checked. The start time of every fight with enough footage before it was re-checked against the frames, which cut those events from 551 to 419. AI models did that review, not people, and 162 of the 419 could not be settled and keep their original time.

Signals

Which signals carry a warning

I fixed pass and fail rules before running the screen on the corrected start times, then tested each kind of feature on its own against them. I had already seen an earlier run on the uncorrected times, and the 10 second target came after it. A stream has to tell the lead-up to violence from ordinary footage, tell it from the lead-up to a non-violent incident such as a theft, and add something beyond the scene itself. Only the SigLIP 2 prompt scores, which compare each frame with short text descriptions such as an argument or a shove, passed the main test. The first set, the one the model uses, was not clearly specific to violence; the second set passed every rule. Audio never entered the rebuilt model: too few real-world clips have their own sound, and the movie clips carry soundtracks, so I only audited it.

Single streams, screened one at a time
Stream AUROC 30–120 s AUROC 0–10 s Result
SigLIP 2 prompts, first set 0.844 0.881 Anticipation
SigLIP 2 prompts, second set 0.813 0.853 Anticipation, and passes every gate
SigLIP 2 image embeddings 0.847 0.886 Context shortcut
V-JEPA 2 0.780 0.812 Context shortcut
Pose: how people interact 0.614 0.640 Context shortcut
Pose state and both motion streams 0.55–0.56 0.56–0.63 Inconclusive
Pose: pairs of people 0.475 0.551 Dropped

AUROC for telling seconds that come 30 to 120 seconds, or 0 to 10 seconds, before violence from seconds of clean footage, after matching on dataset and position in the clip, so 0.50 is chance. Each horizon has its own trained probe. A context shortcut has a real signal but fails a control: it cannot tell the lead-up to violence from the lead-up to a non-violent incident, or it adds nothing beyond the scene. Inconclusive means too weak to decide; dropped means no signal. The pairs stream covers UCF-Crime and UBI-Fights only.

Outcome

How it turned out

The early-warning model is the first set of prompt scores, read by a linear probe over the last 10 seconds, minute and three minutes. Its alarm threshold is tuned on validation data for a target number of false alarms an hour, then tested on 344 violent events with at least 30 seconds of footage before them, and about 126 hours of clean video. At about 2 false alarms an hour on the clean footage it warned at least 30 seconds ahead for 31% of the events, against 10% for the baseline with no video content.

Warnings on the screening folds
Threshold tuned for False alarms / h (test) Warned 30 s+ ahead Baseline, 30 s+ (no video) Warned 10 s+ ahead Median lead
1 an hour 1.16 21% 7% 31% 35 s
2 an hour 2.12 31% 95% CI 24–38% 10% 42% 43 s
5 an hour 4.99 39% 16% 51% 43 s

“Warned 30 s+ ahead” is the share of events whose first alarm started at least 30 seconds, and at most two minutes, before the violence. The baseline is the best any rule using only the kind of source and the time since the clip started can reach at the same false-alarm rate, for the 30 second column. Both warning columns come from the same model. The interval also re-picks the threshold in each bootstrap sample. Median lead is over the events with an alarm in the two minutes before the violence.

Limits

What it does and does not show

  • Not confirmed yet. These numbers come from the folds I used to choose the model. The fold held back for the final check has not been run, and a real confirmation needs new footage.
  • Mostly the kind of clip. The score is about as high two minutes before a fight as ten seconds before it, and a probe trained only to spot violence already happening scores as well, so much of it seems to come from recognizing the type of footage rather than watching tension build. Some of it goes beyond the scene, but not most.
  • Movies are easier. At one shared threshold it raised about 4.3 false alarms an hour on movie footage but 0.1 on UCF-Crime’s CCTV, and warned 30 seconds ahead for 41% of the movie events against 17% of the UCF-Crime ones.
  • One video stream. Pose and motion were tested and did not make it in; audio was only audited.
  • A risk estimate, not proof. The output is an uncertain estimate for a person to review, not evidence of anyone’s intent and not something to act on automatically.

So far it is a much better-measured answer than I had in May, not a working early-warning system. The code, the benchmark and the results are on GitHub.

Questions about this research?

I am happy to talk through the approach. nathanpaulgamache@gmail.com

Ask me about it