Inspiration
Why is this place always full? We've always had an issue with going to a library, or a certain cafeteria, only for it to be too crowded. It's a simple problem with a simple solution yet one that didn't yet exist. So, we thought let's make everyone's lives easier by building an app that tells you what places are free so next time you want to find a table with your friends, you can find a free spot with one click.
What it does
CrowdSense is a machine learning powered solution to finding less crowded spots. Using the Ultralytics YOLO model, CrowdSense uses pre-existing CCTV infrastructure to track occupation of frequented spots on campus. We have also built an app to serve as the front-end for this, which displays each location and its occupation in realtime. The types of trackable locations currently implemented are tables, couches, benches and queues for cafeterias.
How we built it
CrowdSense comes together through three tightly connected services: 1) Model Pipeline (Model/)
- Wraps Ultralytics YOLO in a threaded worker system.
- Each camera stream is cropped into preconfigured Regions of Interest (ROIs).
- Detections are tallied per zone to determine occupancy levels.
- A resilient WebSocket client pushes lightweight occupancy summaries every few seconds.
2) FastAPI Server (Server/)
- Handles inbound payloads from the model and manages real-time connections.
- A connection manager and data handler translate raw camera IDs into friendly location names.
- Occupancy percentages are smoothed and broadcast over /client/ws/connect.
- SQLAlchemy models are in place for future data persistence and historical tracking.
3) Expo Mobile App (App/)
- Built with React Native + Expo for a fast, cross-platform student experience.
- Context providers manage WebSocket connections, favorites, and theming.
- The WebSocketProvider handles reconnection logic to ensure reliability.
- The Home Screen displays animated cards and dynamic campus map markers that update instantly as new occupancy counts arrive.
Challenges we ran into
We ran into a lot of challenges while working on this project: 1) Model detection limitations
- The YOLO model initially struggled to detect people located far from the camera.
- We suspected a combination of object count limits and image compression in the lightweight model affected detection accuracy.
- To solve this, we segmented each camera feed into multiple Regions of Interest (ROIs) and ran detections separately on those zones.
- This approach significantly improved accuracy, especially in wide-angle or crowded scenes.
2) Real-time communication and data flow
- Connecting the Model, FastAPI Server, and Expo App seamlessly using WebSockets was a major challenge.
- We had to ensure the server only extracted, transformed, and rebroadcasted the essential data while keeping latency low.
- Managing multiple concurrent WebSocket connections and maintaining stable synchronization across all three services required careful design and debugging.
Accomplishments that we're proud of
We started this project knowing we may not have the time to integrate everything and develop a fully working app in 24 hours, but we are proud to have finished a functioning proof of concept before the deadline. We are also quite proud of the progress we made in our understandings of three very different aspects of our field: machine learning, networking and app development.
What we learned
There are more cogs in this machine than we initially thought of, and running a server needed us to learn how FastAPI works, as well as get a decent grip on how to send information between a front-end application and the back-end. We also had to think about privacy, as a model that tracks thousands of people is usually a cause for concern, however we have designed CrowdSense in such a way that individuals are never linked to their appearance on the feed, and the server never stores the frames from the feed directly.
What's next for CrowdSense
One immediate next step for us would be extending the detection to include parking spaces, which would be quite helpful to students looking to find spots to park. Another thing we are considering is expanding this beyond campus spaces, so that any business that sees a lot of footfall can use CrowdSense to not only allow their customers to find freer times, but also allow the businesses to develop a temporal map of what aspects of their business draws more customers and at what times.
Built With
- expo.io
- fastapi
- github
- javascript
- json
- postgresql
- python
- pytorch
- react-native
- sqlalchemy
- ultralytics-yolo
- uvicorn
- websockets

Log in or sign up for Devpost to join the conversation.