AI Crowd Detection: How Technology Can Spot a Stampede Before It Starts
Lessons from the 2025 Karur stampede, and what AI crowd detection and real-time crowd monitoring can change

Most people picture a stampede as a crowd running in panic. The reality is usually quieter, and far more frightening. In most of these disasters, nobody is running at all. People are pressed together so tightly that they can't move, can't fall properly, and eventually can't breathe.
The good news, if there is any, is that crowds give off warning signs long before anyone gets hurt. Space fills up. Movement slows. People start swaying in waves. Then everyone pushes towards the same narrow point at once. Every one of those signals can be measured, and that's exactly where AI crowd detection comes in. The harder question is whether anyone is watching for those signals, and whether they can act in time.
What Happened in Karur on 27 September 2025
On the evening of Saturday, 27 September 2025, a political campaign meeting in Karur, Tamil Nadu, turned into one of the state's worst crowd disasters in recent memory. Actor and Tamilaga Vettri Kazhagam (TVK) president Vijay was due to address supporters at Velusamypuram, along the Karur–Erode road. Forty-one people lost their lives, among them women and children, and dozens more were taken to hospital.
The details reported in the days that followed are painfully familiar to anyone who studies crowd safety:
A long wait. Supporters began gathering in the late morning, around 10–11 am. The leader had been expected around noon but reportedly reached the venue only around 7.40 pm. That's thousands of people standing in heat for hours, many without water or food.
A crowd far larger than the space. Media reports, citing AFP, put the gathering at roughly 27,000 people on a public road, a setting that was never designed to hold that many.
A sudden trigger. Reports said the generator and sound system were switched off at a crucial moment, so people at the back couldn't hear. Many moved towards the campaign vehicle, and the crowd surged.
Slow access for help. There were reports of ambulances struggling to get through to people who had fainted.
Police said they had deployed roughly one officer for every 20 people, more than their usual norm for dense crowds. Even so, the crush happened. Tamil Nadu first set up a one-member inquiry commission. On 13 October 2025, the Supreme Court transferred the investigation to the CBI and appointed a committee headed by retired Supreme Court judge Justice Ajay Rastogi to oversee it.
The aim here isn't to assign blame. That's the investigators' job. The point is simpler: nearly every factor in Karur built up gradually over several hours, in plain view, which means it could have been measured.
Why Stampedes Happen: It's Density, Not Panic
Crowd scientists have known this for years. A crowd becomes dangerous mostly because of how many people share each square metre, and how fast that number is climbing.
| Crowd density | What it feels like | Risk level |
|---|---|---|
| Under 3 people per m² | You can walk freely without touching anyone | Safe |
| 4–5 people per m² | You bump into people without meaning to | Rising, time to steer people away from the centre |
| About 6 people per m² | Small pushes ripple through the crowd as waves | Critical, crowd turbulence can start on its own |
| Beyond that | You can barely lift your hands | Acute danger of a crowd crush |
Thresholds as described by crowd-movement researchers; see Sources.
Once density passes that critical point, people stop moving as individuals. Instead, they move like a fluid. One stumble near a bottleneck can drag others down, and the pressure from behind keeps coming because the people at the back can't see what is happening at the front. That's why the people who die in a crowd crush mostly suffocate rather than get trampled.
This is also why traditional crowd control struggles. A police officer standing inside a dense crowd can see perhaps a few metres around them. Nobody on the ground has the full picture.
How AI Crowd Detection Works
Modern crowd management systems turn the CCTV cameras, drones and phone networks already at a venue into a live sensor network. Here's what the software actually watches for.
1. Crowd density
Computer vision models count heads in each video frame and convert that count into people per square metre for every zone of the venue. The result is a live heat map that turns from blue to amber to red as an area fills up. Unlike a manual headcount, it updates every few seconds and never gets tired.

2. Movement patterns
Using techniques such as optical flow, the system tracks which way people are moving and how quickly. A healthy crowd flows in several directions at a steady pace. A crowd that starts converging on a single gate, stage or vehicle is a warning sign, especially when space is already tight.
3. Sudden changes in flow
This is where predictive analytics earns its keep. Machine learning models learn what normal looks like for that event, then flag anomalies: a sudden surge, people moving against the main flow, a zone that stops moving altogether, or the stop-and-go waves that come before crowd turbulence. Some systems forecast density 10 to 15 minutes ahead, which gives organisers a window to act instead of react.
4. Early warnings that reach the right people
Detection is only useful if it triggers a response. A well-designed early warning system sends graded alerts to the control room, police and volunteers, pinpoints the exact camera and zone, and suggests the next step: open an extra exit, pause entry, make a public announcement or clear an ambulance corridor.
Could AI Crowd Detection Have Changed the Outcome in Karur?
No technology replaces sound planning, and it's impossible to say for certain how any single event would have turned out. Still, it helps to walk through the evening with real-time crowd monitoring in place.
Late morning to afternoon: Head counting shows the crowd growing hour after hour, far beyond what the road can safely hold. The system flags that the venue is approaching capacity long before the main event begins.
Early evening: Density maps show zones crossing 4–5 people per m². Organisers get an amber alert with hours still on the clock: stop new arrivals, spread people into side areas, or rethink the programme.
The convoy approaches: Movement analysis picks up a strong pull towards the vehicle. A red alert recommends holding the vehicle back or redirecting it before the pressure builds.
The sound cuts out: An anomaly model flags the sudden change in flow within seconds. Responders know exactly which zone to relieve, and the ambulance route can be cleared ahead of time.
In this scenario, every decision still sits with human beings. What changes is the quality and timing of the information they're working with.
A Stampede Prevention Checklist for Organisers and Authorities
Whether you run a political rally, a temple festival, a concert or a railway station, these steps make crowds safer. Technology makes most of them easier to enforce. For the planning side, see our guide to crowd management for large gatherings.

• Set a hard capacity for every venue based on usable area, and track it live instead of estimating it afterwards.
• Watch density by zone, not just the total. Most crushes happen in one corner while the rest of the venue looks fine.
• Plan for delays. If the main guest is late, the crowd keeps growing. Decide in advance what density will trigger a hold or a change of plan.
• Keep entries and exits separate, and keep at least one emergency corridor clear at all times.
• Protect power and sound. A dead PA system can set off a surge. Add backup power and a way to reach the crowd with announcements.
• Provide water, shade and medical points for long waits, especially for children and the elderly.
• Give the control room the full picture, with AI crowd detection feeding alerts to police, volunteers and medical teams together.
• Review the footage and data after every event so the next one is safer.
Frequently Asked Questions
AI crowd detection uses computer vision and machine learning on CCTV or drone video to count people, estimate crowd density, track how the crowd moves and flag unusual patterns as they happen. It turns ordinary cameras into an early warning system for crowd safety.
It spots the conditions that come before a crush: rising density, crowds converging on one point, and sudden surges or stoppages. Organisers get warnings minutes or even hours earlier, so they can slow entry, open exits, redirect people or hold an event back before the danger peaks.
Researchers generally treat 4–5 people per square metre as a warning level and around 6 people per square metre as critical, the point where shock waves can travel through a crowd on their own. Above that, the risk of a crowd crush rises sharply.
In most cases, yes. Many systems process feeds from cameras that are already installed, either on local edge devices or in a central control room, so venues don't always need new hardware. Drones and temporary cameras can fill the gaps at outdoor events.
On 27 September 2025, a crush at a TVK campaign meeting in Karur, Tamil Nadu, killed 41 people. Reports pointed to a very large crowd on a public road, a delay of several hours, and a surge after the sound system went off. The Supreme Court later handed the investigation to the CBI under a supervisory committee.
It doesn't have to be. Crowd analytics can work purely on counts, density and movement, without identifying anyone. Look for systems that avoid facial recognition by default, keep data for a limited time and follow local data-protection rules.
Anyone responsible for large gatherings: police and district administrations, political parties, temple and festival committees, stadiums, concert promoters, malls, airports and railway stations, and smart city control centres.
Safer Crowds Start with Seeing the Risk Early
The families in Karur deserved an evening that ended with everyone going home. Their loss is a reminder that crowd disasters are rarely sudden. They build in plain sight, and the signals are there for anyone equipped to read them.
At CODEWORK, we build AI crowd detection that monitors crowd density, movement patterns and sudden changes in flow in real time, so organisers and authorities get early warnings while there's still time to act. Early warnings. Faster action. Safer crowds.
Want to see it at your next event? Write to sales@codework.ai or book a demo.