Skip to content

Mahendra-HM/smart-security-system-raspberry-pi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Next-Generation Smart Security System using Raspberry Pi

An intelligent AI-based surveillance system built using Raspberry Pi, TensorFlow Lite, OpenCV, Flask, and Telegram for real-time object detection and automated security monitoring.

The system detects animals or intruders using computer vision, activates a buzzer alarm, and sends instant alerts with captured images to the user via Telegram.


Project Overview

Traditional CCTV systems require constant monitoring and expensive cloud services.
This project introduces a low-cost smart security solution capable of:

  • Real-time object detection
  • Automated alarm activation
  • Instant mobile alerts
  • Cloud image storage
  • Live video monitoring

The system processes video locally on a Raspberry Pi, ensuring faster response and improved privacy.


System Architecture

System Block Diagram

The Raspberry Pi acts as the central processing unit that receives video input from the camera, processes it using TensorFlow Lite and OpenCV, and triggers alerts when an animal or intruder is detected.


Hardware Setup

Hardware Setup

Hardware Components

  • Raspberry Pi 3B+
  • Raspberry Pi NoIR Camera
  • Buzzer / Siren
  • Power Supply
  • SD Card
  • Jumper Wires

Real-Time Operation

Real Time Operation

The system continuously captures video frames and processes them using a lightweight object detection model.

When a target object is detected:

  1. The buzzer alarm is activated
  2. An image snapshot is captured
  3. The image is sent to the user via Telegram
  4. The event is stored for monitoring

Detection Example

Detection Example

The system successfully detects animals or intruders and sends alerts with timestamps.


Features

  • Real-time object detection using TensorFlow Lite
  • Motion detection using OpenCV
  • Telegram alerts with captured images
  • Flask-based live video streaming
  • Automatic buzzer activation
  • Cloud backup for detected events
  • Works in low-light conditions using NoIR camera

Technologies Used

Technology Purpose
Python Core programming language
TensorFlow Lite Object detection model
OpenCV Image processing and motion detection
Flask Live video streaming
Telegram Bot API User alerts
Raspberry Pi Edge computing device

Project Structure

smart-security-system-raspberrypi

├── code
│ └── smart_security_system.py

├── images
│ ├── detection_example.png
│ ├── hardware_setup.png
│ ├── real_time_operation.png
│ └── system_block_diagram.png

├── web
│ └── index.html

├── requirements.txt
├── model_download.txt
└── README.md


Installation

Install dependencies

pip install -r requirements.txt


Download the TensorFlow Lite model

Follow the instructions in:

model_download.txt

Place the downloaded model inside:

tflite_model/


Running the Project

Run the main program:

python code/smart_security_system.py

The system will:

  • Start camera monitoring
  • Detect objects
  • Trigger alerts if detection occurs

Applications

This system can be used for:

  • Home security
  • Farm and agricultural monitoring
  • Wildlife monitoring
  • Warehouse surveillance
  • Industrial safety monitoring

My Contribution

This project was developed as a group capstone project during my diploma in Electronics and Communication Engineering.

While the project was completed collaboratively, I was primarily responsible for the technical implementation and system development, including:

  • System architecture and workflow design
  • Raspberry Pi setup and hardware integration
  • Object detection implementation using TensorFlow Lite
  • Image processing using OpenCV
  • Telegram alert system integration
  • Buzzer automation using Raspberry Pi GPIO
  • Flask-based live video monitoring interface
  • System testing, debugging, and deployment

Author

Mahendra M

Electronics and Communication Engineering
Interested in Embedded Systems, Signal Processing, AI, and IoT systems


License

This project is shared for educational and research purposes.

About

Next-Generation Smart Security System using Raspberry Pi, OpenCV, TensorFlow Lite, and Telegram alerts for real-time animal detection and surveillance.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors