Inspiration

What it does

DoorAuth is a real-time access guard:

  • A sensor detects a possible “open” event (we used a light-based trigger for the demo).
  • A laptop webcam captures a live image and compares it to an authorized reference photo using Gemini vision.
  • The system returns a strict true/false decision:
    • AUTH_SUCCESS → no alarm
    • AUTH_FAIL (unknown / not logged in / unsure) → buzzer alarm
  • It’s designed to fail safe: when in doubt, it alerts.

How we built it## Inspiration

We wanted a simple, fail-safe way to deter unauthorized access to a box/door (ex: dorm room storage, lab cabinet, shared workspace). If the system can’t confidently verify the authorized person, it should default to “deny” and alert.

What it does

DoorAuth is a real-time access guard:

  • A sensor detects a possible “open” event (we used a light-based trigger for the demo).
  • A laptop webcam captures a live image and compares it to an authorized reference photo using Gemini vision.
  • The system returns a strict true/false decision:
    • AUTH_SUCCESS → no alarm
    • AUTH_FAIL (unknown / not logged in / unsure) → buzzer alarm
  • It’s designed to fail safe: when in doubt, it alerts.

How we built it

  • Python + OpenCV to capture images from the webcam and encode frames.
  • Gemini (google-genai) to compare the authorized reference image vs the live login image and return JSON.
  • Socket networking (TCP) so a device (e.g., Raspberry Pi) can request authentication from the laptop server.
  • A real-time loop on the device triggers the buzzer based on the auth response.

Challenges

  • Rate limits and reliability: we added retry/backoff for API limits and made the decision stricter (only accept a match when confidence is high).
  • Networking: making sure the device and server can communicate reliably on the same network.
  • Fail-safe behavior: ensuring the alarm triggers by default if auth can’t be confirmed.

What we learned

  • How to wire a real-time sensor trigger into a secure “verify then act” pipeline.
  • How to structure a system with clear separation: camera/auth server vs device alarm loop.
  • Practical debugging of networking + real-time loops under hackathon time pressure.

Built With

  • gemini-api-(google-genai)
  • opencv
  • python
  • python-dotenv
  • raspberry-pi-gpio-(or-rpi-gpio)
  • tcp-sockets
Share this project:

Updates