All posts

Face recognition prototype

Built on a Raspberry Pi and demonstrated at the 4th Nepal Youth Science Summit.

Prabin holding the face recognition prototype at the Nepal Youth Science Summit

Smart Door Unlock: Our Raspberry Pi Project at the 4th Nepal Youth Science Summit

What if your front door could recognise you, let you in, and email you the moment a stranger showed up? That question became our project: a smart door unlock system built on a Raspberry Pi, which we demonstrated at the 4th Nepal Youth Science Summit. We were a team of two. Using a Raspberry Pi, a Pi Camera, an ultrasonic sensor and Python, we built a system that watches the door, recognises the faces it trusts, and alerts the house owner on Gmail when someone else is there. Here is the story of how it works, what nearly broke us, and what demo day felt like.

The problem: a door that only knows keys A normal lock cannot tell the owner from an intruder. Anyone with a copied key, or the patience to force it, gets in, and the owner usually finds out too late. CCTV helps, but it mostly records what already happened. We wanted something that acts in the moment: let trusted people in automatically, keep everyone else out, and tell the owner right away, wherever they are. The idea also scales beyond intruders. The same system could serve rented rooms, offices, hostels, or any home where people come and go and the owner wants a record.

Explaning ideas and it's real world specs

The hardest part: teaching it to recognise a face Wiring the sensor and camera was the easy bit. The real challenge was the logic in the middle: the Pi Camera takes a snapshot, the program finds the face in it, and then it has to decide whether that face matches one of the admin faces we stored. Getting that decision right took many rounds of trial and error. Some runs failed to detect a face at all; others matched when they shouldn't have, or missed a face they should have known. Lighting, angle and distance from the camera all changed the result. What got us through was patience and the open-source community. We leaned on public libraries and examples, read how others had solved similar problems, and kept testing and adjusting until the camera, the face model and the lock finally worked together. The live demo spoke for itself. Visitors stepped in front of the camera: a registered face unlocked the door, and an unknown face triggered an email alert to the owner's inbox within moments. Seeing students, teachers and judges try it themselves showed us that the idea made sense to people, not just to us.

What we learned and what's next

This project taught us that the hardest part of building something is rarely the hardware. It is the logic, the testing, and the willingness to fail many times before it works. It also taught us how much a two-person team can build with a small computer and the open-source tools that others have generously shared. There is plenty we would like to improve: better accuracy in low light, liveness checks so a printed photo cannot fool the camera, an app to add or remove trusted faces, and logs of every visitor for the owner to review. Most of all, the summit reminded us that young people in Nepal can build real solutions to everyday problems. A safer home started with a Raspberry Pi, a camera, and a lot of trial and error.