Face Pay
Contactless Ticketing System
The problem Face Pay solves
Festivals, sporting events, concerts, and daily rush hours all create the same headache: long, slow-moving queues at entry points. Traditional smart-cards, QR codes, and paper tickets force every person to stop, tap, scan, or show something—multiplying wait times and creating crowding that’s frustrating, inefficient, and often unsafe.
Our system, Face Pay, removes that bottleneck entirely by turning a face into a secure, hands-free ticket. The moment a person walks past a gate-mounted camera, the system:
- Identifies the user in ~200 ms on a CPU (no GPU or bulky hardware).
- Logs real-time entry/exit in a central database.
- Calculates and deducts the exact fare from the user's wallet.
More Problems it solves:
- Light Hardware - no demanding GPU, pure CPU based, slashing deployment cost.
- Contactless & Hygienic — critical for health-sensitive scenarios post-pandemic.
- Scalable — add additional gates by pointing them to the same REST API.
- Tamper-proof — biometric match + wallet deduction means no tail-gating or card swapping.
Challenges we ran into
Achieving High Accuracy with Minimal Data
-
Unlike traditional systems that train on dozens or hundreds of facial images, we challenged ourselves to build a face recognition system that works reliably with just one image per user.
The hurdle? Ensuring consistent recognition across varying lighting, angles, and facial expressions. -
We solved it by using RetinaFace for precise face alignment and built a FAISS-based search system with normalized embeddings. We also implemented smart pre-processing (resizing, cropping, normalization) to maximize robustness with minimal data.
Handling Image Input Smoothly Between Apps
-
Transferring captured images from the Flutter app and station nodes to the Flask backend created initial bugs due to file encoding mismatches and buffer decoding errors.
-
We debugged using test images and carefully adjusted how the images were read (np.frombuffer, cv2.imdecode) and transmitted (multipart/form-data in Flutter). We also added logs and fallback error messages to catch malformed input early.
Real-Time Fare Deduction with Consistency
-
We had to make sure a user entering and exiting at different stations would be recognized properly, and that the fare deduction would only occur once and at the right moment (exit).
-
To Solve it we used a user log table to track entry events. On exit, the system checks if an entry already exists, computes the fare using a distance matrix, deducts the wallet, and clears the session—ensuring no double charges.
No GPU, No Problem
-
Most real-time face recognition demos rely on a GPU for speed. We had to make this work entirely on CPU, within hackathon constraints.
-
To solve it we optimized embedding search using FAISS indexing with normalized vectors and a smaller k value for fast and accurate results. Even on standard laptops, we maintained sub-200ms recognition time.
