04 - Case Study
Parky
94% parking detection accuracy - M-Pesa payments at the end
The Problem
Parking in Nairobi is a manual process - you drive until you find a space. No system surfaced real-time availability before you arrived, and payment required cash or a physical attendant. The gap between what computer vision could do and what actually existed on the ground was wide open.
What I Built
Trained a TensorFlow model to detect occupied vs empty spaces from a live camera feed. Built a Flask backend serving inference results in real time, connected to a React Native app where users see available spaces on a map and pay via M-Pesa STK push before arriving.
Trained a TensorFlow model on a labelled parking lot dataset - the hard part was inconsistent lighting and camera angle variation. Deployed the inference server in Flask on a Raspberry Pi connected to a camera feed.
Flask API stores space state history in Postgres and serves availability to the mobile app via polling. WebSockets were out of scope for the hardware budget - polling at 2s intervals was good enough for the use case.
React Native app shows a live map of available spaces. Users select a space, reserve it, and trigger an M-Pesa STK push - the payment confirmation message from Safaricom unlocks the reservation in the backend.
Separate React web dashboard for parking lot operators: live occupancy view, revenue per session, and entry/exit logs. Built to show the system could serve both sides of the market - users and operators.
What Happened
94% accuracy on live parking space detection using TensorFlow + OpenCV
M-Pesa STK push payment flow working end-to-end in the demo environment
Full ML-to-transaction pipeline: camera → inference → reservation → payment → confirmation
Graded distinction as JKUAT final year project
In the Wild
In Hindsight
Polling worked fine in the demo but would break down quickly in production with concurrent users. WebSockets or server-sent events are the right answer for real-time space state - the polling approach was a pragmatic shortcut given the hardware constraints.
