Activity and behaviour recognition
Recognising actions over time: per-frame scores, temporal windows, smoothing, and the two-stream / 3-D convolutional architectures that made video classification work.
A single frame can tell you someone is standing. Only a sequence tells you they are walking, running, waving or falling. Activity recognition is the problem of assigning a label to a stretch of video, and its central difficulty is temporal: the evidence is spread across time, and a classifier that scores each frame independently will flicker between wrong answers.
The widget makes that flicker visible and shows the standard cure — smoothing the per-frame scores over a temporal window before taking the argmax.
Classification plus temporal structure
Motion gives you features per frame; recognition needs a decision per segment. The gap is filled by a temporal model — a sliding window, a recurrent state, a temporal convolution, or an HMM/CRF decoder. Raw per-frame argmax is almost never the answer you want.
A per-frame classifier flickers between classes; a temporal moving average cleans it up. Widen the window and watch the frame-level accuracy change.
- raw accuracy
- 86.7%
- smoothed accuracy
- 96.7%
- frame class
- waving
- smoothed class
- walking
Synthetic per-frame scores with injected flicker, real moving-average smoothing and accuracy counts. Production systems add temporal convolutions, HMM/CRF decoding or recurrent/temporal-attention heads on top of exactly this signal.
Formulating the problem
There are two classic framings. Segmented recognition takes a clip already trimmed to contain one action and predicts its class. Temporal detection takes a long video and must find when each action occurs, producing intervals with labels. The widget sits in between: a fixed-length timeline of frames each carrying class scores, from which you derive per-frame and smoothed predictions.
Learning spatiotemporal features
- Two-stream networks. One CNN sees a single RGB frame (appearance), a second sees stacked optical-flow fields (motion). Their scores are fused. The insight is that appearance and motion are complementary and can be learned separately.
- 3-D convolutions. Replace 2-D spatial kernels with 3-D kernels that also slide over time, so the network sees local motion directly. C3D and its successors are the natural extension of the convolution you already know.
- I3D and inflating. Take a strong image model and "inflate" its 2-D kernels into 3-D ones, initialising from ImageNet; combine with two-stream input. This is the template for most modern action models before Transformers.
Temporal decoding
Given scores for frame and class , a simple and surprisingly strong decoder is a moving average followed by argmax:
More principled decoders treat the smoother output as emission probabilities in an HMM or CRF and run Viterbi to enforce valid transitions — the same dynamic-programming idea as tagging, now over time.
Smoothing trades latency for stability
Widening the temporal window suppresses flicker and raises frame accuracy, but it also delays the response to a real change and blurs short actions into their neighbours. There is no free stability: every deployed system chooses a latency it can tolerate and a minimum action duration it must resolve.
Illustrative vs real
The widget uses synthetic per-frame scores with injected flicker; no video is decoded and no network runs. Real pipelines compute features with 2-D or 3-D CNNs (sometimes with optical flow), train on datasets such as Kinetics or UCF101, and evaluate segment-level accuracy or temporal-IoU detection metrics. The moving-average/Viterbi decoding and the latency–stability trade-off are genuine.
Check yourself
Eduspheria wiki · Applied AI, Video analytics
0 / 5 answered
From the assignment paper
Modeled on NITJ AI-604, Assignment/Quiz
0 / 5 answered
Where next: the same temporal machinery, applied to recognising who — from the geometry of a face and the rhythm of a walk.