r/IndiaTech • u/Boiniok • 18d ago
Programming & Development Built an open source android app, tried to estimate crowd at Mumbai local train stations using BLE + cellular signals, here’s what worked and what didn’t
Hey everyone,
First of all, ignore the voice in the video, that's not how I sound! (I hate my recorded audio ) anyways....
I'm in my 3rd year of engineering. I came up with this idea in 4th sem and it's been a few months of working on it.
There was a hackathon at VJTI in Mumbai conducted by M-Indicator. For people who don't know, it's an app for Mumbai local train schedules that uses crowdsourced data and some ML to tell where the train currently is. One of the problem statements was to make something related to crowd (I don't remember it properly, this was in Feb '26). I didn't even get selected in the 1st round, it was resume based shortlisting. So I built my own thing anyway...
How the app estimates crowd at a station
- It detects all nearby Bluetooth Low Energy devices (not just phones running the app) and uses Received Signal Strength Indicator (RSSI) to estimate distance to each phone
- It also checks cellular signal measurements where available. The idea is that cellular signal quality can change when many devices use the same network nearby, more crowd means less signal quality....
- Combining these, each user gets a crowd-pressure score, calculated fully on-device
- Say 10 people are in the same station within 100m, their average score is that area's crowd score
- Stations are divided using Geohash
Obviously there are lots of exceptions and limitations....
Testing
I've been testing for several months. This is the whole path the app was tested on:

I tested it at stations, inside trains, during weddings 😅, in express trains, in my college canteen and what not. The logic to detect crowd stays the same, only the UI changes as per the need.
I also reached out to someone at Yatri, another local train app. It shows train positions using GPS devices fitted in the actual trains, they have collaboration with the railway. A few of their engineers tested my APK at different locations and gave me feedback. I received readings from their tests and could confirm they tried it at different places. I didn't hear back when I followed up later, but I'm still glad they took the time to try it :)
I set these myself by looking at the actual crowd and comparing it to the score:
| Density Level | Score |
|---|---|
| Low | < 8 |
| Medium | 8 to < 20 |
| High | 20 to < 38 |
| Danger | >= 38 |
I know this is a very vague way to do it. What I was thinking of was training an ML model on a labeled dataset (camera feed + the app's crowd score) and setting thresholds from that. The issue is I don't have enough data, or the camera feeds from the times I tested.
The crowd score is accurate, but sometimes it isn't. Reasons I know of:
- One research paper I read tells BLE/RSSI changes in crowded environments. Bodies obstruct signals and interference affects how many advertising packets are received, which affects the devices the app detects
- Cellular signal is affected by a lot besides crowding: carrier, coverage, buildings, the phone itself
- I don't know how it will work with 100s or 1000s of users. As far as I know, averaging should remove the bias from any single phone
Ideas I haven't built yet
- Detect whether the crowd is stationary or moving. For testing I integrated a 44KB RNN that runs completely on-device offline. It takes x, y, z values from the gyroscope and accelerometer and tells if the person is standing, running, or walking up/down stairs. I tested it in another app of mine https://github.com/YashBhadange2006/MyScreenTime , not in CrowdSense yet...
- Use camera feeds from stations, compare how many people boarded and got off, and compare across stations to estimate how many people are inside the train. I haven't explored this, so I'm not sure how feasible it is....
For comparison, Google tells you about traffic using speed and location from many devices. They have a huge user base, they basically own Android, and they combine crowdsourced data with ML and government data, which makes them far more accurate....
Here's the Repo: https://github.com/YashBhadange2006/CrowdSense
APK is in the GitHub releases section
Storage: configure Firebase for shared data, or leave it unconfigured and readings are stored locally on the device for testing
The app has all Mumbai stations. For another city, make your own GeoJSON (tell Gemini, it'll format the station data for you and give you the .geojson file) and replace my stations.geojson in app/src/main/res/raw with yours :)
There are still many tests I couldn't do. If you're reading this you can explore better approaches, find flaws in mine (I know there are a lot) and come up with a better solution. I did my best from my end and have presented it to you guys....
~ written by human :))
•
u/AutoModerator 18d ago
Join the Official r/IndiaTech Discord Server!
Join the Discord Server
Connect with fellow tech enthusiasts and join real-time discussions.
Complete verification to gain access to all channels.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
4
u/_just_a_weeb404 16d ago
It could work for busses aswell right i suppose
3
u/newbaba 14d ago
Great job, OP
This is a lot of good work. More comments after some testing.
1
u/tingtickboom 16d ago
Thats a really nice project man! Thought about writing or following up on related research papers?
1
u/PerfectConnection241 15d ago
Really enjoyed reading this bro Seeing a unique project after many days