If you have followed this series from the complete CSI guide through presence detection, you have seen CSI answer simple yes-or-no questions. Activity recognition is the step up: not "is someone there?" but "what are they doing?" That is a classification problem, and it is where Wi-Fi sensing starts to need machine learning — and where honest expectations matter most.
01Why different activities look different
Every activity moves the body in a particular way, and the Wi-Fi channel responds to the specifics of that movement, not just its presence. Three properties of the motion show up strongly in CSI:
- How much of the body moves. Walking moves the whole body through space and disturbs many signal paths; a small hand gesture moves a little and disturbs few.
- How fast it moves. A brisk wave produces faster changes in the channel than slowly standing up. Speed shows up as higher-frequency content in the CSI over time.
- How it repeats. Walking has a rhythm, one step after another, that appears as a periodic pattern. Sitting down is a one-off transition. That rhythm, or its absence, is a strong clue.
Put together, these give each activity a rough signature: an empty room is flat, sitting still is nearly flat with only breathing-scale micro-motion, walking is large and rhythmic, a gesture is a short, localised burst. The job of activity recognition is to measure those differences well enough to name the activity.
02From raw CSI to features
Raw CSI is a flood of amplitude and phase values per packet, far too much and too noisy to feed a classifier directly. The standard first step is to boil each short window of CSI down to a handful of descriptive numbers — features — that capture the signature. After the cleaning described in cleaning CSI data, common choices include:
| Feature | What it captures |
|---|---|
| Mean and variance of energy | How much movement there is overall |
| Rate of change | How fast the channel is shifting |
| Dominant frequency | The rhythm, for example a walking cadence |
| Spread across subcarriers | Whether the disturbance is broad or localised |
A more powerful representation is the spectrogram: instead of one frequency number, you compute how the frequency content of the CSI evolves over time, producing an image-like map of the activity. Walking draws steady bands at its cadence; a gesture draws a short smear; standing up draws a brief sweep. Spectrograms turn "recognise an activity" into something close to "recognise an image", which is why they pair naturally with the neural networks used for images.
03Adding a classifier
With features or spectrograms in hand, recognition becomes a standard pattern-matching task, and the choice of method follows the difficulty of the problem.
- Thresholds, for two or three very different classes. If you only need empty versus walking versus still, a couple of rules on motion energy — the same statistic driving the CSI motion alarm — can separate them with no learning at all.
- Classic machine learning, for a handful of classes. Feed the hand-made features into a model such as a decision-tree ensemble or a support vector machine. These are light enough to run near the edge and work well when good features are available.
- Deep learning, for many or subtle classes. Feed spectrograms into a convolutional network, or sequences into a recurrent model, and let it learn the patterns itself. This is the most capable route and the most data-hungry.
04What is reliable, and what is hard
This is the part to be honest about, because demos show the easy cases and hide the hard ones. The reliability of CSI activity recognition tracks almost perfectly with how different the activities are.
Reliable: coarse, whole-body activities that differ clearly in amount and speed of motion. Empty room, walking, and sitting still are the classic example, and they separate cleanly because their signatures barely overlap. Counting steps or spotting that someone is pacing is in reach for the same reason.
Hard: fine distinctions between similar movements. Telling a left wave from a right wave, or two gestures that use the same limb at the same speed, produces signatures that overlap heavily. Worse, these fine signatures depend strongly on where the person stands and which way they face, so a model trained with the subject in one spot often fails when they move a metre or turn around. Fine gesture work is its own specialised topic, covered in CSI gesture recognition.
The practical rule: design your set of activities so they are as different from each other as the application allows. Four well-separated classes will beat ten overlapping ones every time.
05How much data you really need
The quiet truth behind every working activity classifier is the dataset, and it is almost always bigger and more varied than people expect. A model learns exactly what you show it, including things you did not mean to teach.
- Many examples per activity, not a handful, so the model sees the natural variation in how a movement is performed.
- Different people, because body size, height and style change the signature; a model trained on one person tends to learn that person, not the activity.
- Different positions and orientations, since CSI signatures shift with where and which way the subject is, and this is the single biggest cause of a model that works in testing and fails in use.
- Ideally different rooms, because the channel is shaped by the whole environment, and a model overfit to one layout generalises poorly to another.
Rather than record all of this yourself, it is often smarter to start from existing public CSI datasets and tools, then add your own data to adapt a model to your space. We round those up in Wi-Fi CSI datasets and tools for machine learning. Either way, budget most of your effort for data collection and labelling, not for the model architecture — that is where real accuracy is won or lost.
06Hardware, and keeping it to your own space
You can collect activity data with the same minimal setup as the rest of this series: one ESP32-class board on your own Wi-Fi, streaming CSI while you perform and label each activity. The capture guide covers getting the raw stream; from there you log windows tagged with what you were doing, then build features and train offline.
Keep the framing right. Record yourself, or people who have agreed to take part, in a space you control. Activity recognition is powerful precisely because it can describe what a person is doing from radio alone, and that power deserves consent and your own four walls. Used that way it is a genuinely rewarding project; used to watch others it is neither acceptable nor, with a single link, even reliable.
07FAQ
What activities can Wi-Fi CSI reliably recognise?
Coarse, whole-body activities that differ clearly in how much and how fast the body moves, such as empty room versus walking versus sitting still. These leave distinct signatures that even a simple classifier can separate, which is why they are where CSI activity recognition is most dependable.
Can CSI tell apart very similar movements?
Much less reliably. Fine distinctions, such as which hand you waved or two similar gestures, produce signatures that overlap heavily, and they are sensitive to where you stand and which way you face. These are the cases where accuracy drops and where a system trained in one spot often fails in another.
Do I need machine learning for CSI activity recognition?
For two or three very different activities, simple thresholds on features like motion energy can be enough. Once you want several classes or finer distinctions, you extract features or spectrograms and train a classifier, because hand-written rules cannot capture the patterns that separate similar activities.
How much data do I need to train an activity classifier?
More than you expect, and varied. You need many labelled examples of each activity, recorded by different people, in different positions and ideally different rooms, because a model trained on one person in one spot tends to overfit and degrade badly when anything about the setup changes.