Work
Undergraduate thesisPUCE Ibarra
TAXIBOCARCHI: counting passengers with TinyML
A microcontroller counts how many people are waiting for a taxi at a rural stop and alerts the drivers. It only sends a number, never an image.
88.3% model F1 score
- Role
- Thesis author
- Status
- validated prototype, 18 of 18 tests passed
- Stack
- C++/Arduino, Edge Impulse, ESP32-S3, Python/Flask, NestJS, React, Firestore, Telegram Bot API
The problem
On the rural route between Bolívar and El Ángel, in Ecuador’s Carchi province, each shared taxi only leaves once it is full. Nobody knows how many people are waiting at the stop.
What I did
I built a prototype that counts the people at the stop and alerts the drivers. It was my undergraduate thesis.
- Computer vision inside the microcontroller. An int8 FOMO model (MobileNetV2), trained with Edge Impulse, runs on a XIAO ESP32-S3.
- Privacy by design. The device only sends the number of people. The image never leaves the stop.
- Dashboard and alerts. A Flask and NestJS backend on Firestore, a real-time React dashboard and a Telegram bot for the drivers.
-
01 Perception
At the stop
- OV2640 camera 96 × 96 px, grayscale
- XIAO ESP32-S3 Sense FOMO int8 model · 314 ms · 69 KB of RAM
- People count The image is discarded. It is never stored or sent.
- The only thing sent
{ "personas": 4 } -
02 Network and data
In the cloud
- Flask backend Receives the count and decides whether to alert
- Firebase Firestore History, users and settings
- NestJS API Statistics and driver accounts
- Live data and alerts
-
03 Application
With people
- React web dashboard Live status of the stop
- Telegram bot Early alert at 3 people, urgent at 4 or more
- The driver Replies “On my way!” from the chat
-
Inside: battery, board and antenna.
-
XIAO ESP32-S3 Sense with its camera.
-
Normal: 2 people.
-
Urgent: 4 people.
Outcome
The model beat the 85% F1 target and the prototype passed all 18 tests. The code is public on GitHub.
- 88.3% model F1 score target: above 85%
- 314 ms per inference inside the ESP32-S3
- 69 KB of RAM used by the model
- 4.2 s from capture to dashboard end to end
- 18/18 tests passed