Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-Reception — Who's There?

Originally built in 2018/2019 for the German "Jugend forscht" science competition.

Summary

A low-cost home surveillance system built on a Raspberry Pi with a camera module. Rather than flagging every motion event as a potential threat, it uses face recognition to tell known people (household members, family, friends) apart from unknown visitors, and only notifies the owner about the latter via a Telegram bot.

When the camera detects a face:

  • If the face is already known, the bot sends a message naming the person who was seen.
  • If the face is unknown, the bot sends the photo to a Telegram group and asks whether the user recognizes the person. If yes, the user provides a name, confirms it, and the face is stored as known for next time. If not, the bot just says "handle it" (e.g. call a neighbor or the police), and the photo is not stored.

Hardware

  • Raspberry Pi 3 Model B
  • Pi Camera Module
  • A smartphone running Telegram (for notifications and replies)

Software

Files

  • face_recognition_pi.py — runs on the Raspberry Pi: captures photos, detects and recognizes faces, and sends notifications
  • telegram_bot.py — the Telegram bot: handles the known/unknown-person conversation and saves newly labeled faces
  • save_known_face.py — helper script to register a photo under a given name
  • requirements.txt — Python dependencies

Setup

pip install -r requirements.txt
export TELEGRAM_BOT_TOKEN="<your bot token from @BotFather>"
python3 telegram_bot.py &
python3 face_recognition_pi.py

Both scripts expect a bilder/ directory one level above the script directory, used to store captured and known-face photos. face_recognition_pi.py also shells out to telegram-cli at a fixed path (/face_recognition/examples/tg/bin/telegram-cli) for sending photos — see the denverdino/face_recognition_pi setup for building that environment (originally run inside a Docker container).

Security note

The original 2018/2019 version had the Telegram bot token hardcoded directly in telegram_bot.py. It's been replaced here with the TELEGRAM_BOT_TOKEN environment variable — never commit a bot token directly into source code.

About

AI-powered home surveillance system: Raspberry Pi + face recognition + Telegram bot, distinguishing known from unknown visitors

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages