Skip to content

Codebase for the Real time threat detection feature of Bagsik (Security Robot) https://t.ly/2l5Tx

Notifications You must be signed in to change notification settings

alexisvalentino/Iot-Security-Robot

Repository files navigation

Iot Security Robot with Real time Threat Detection and Alerts, Night Vision and Mobile Integration.

Traditional security systems, such as CCTV cameras, often have limitations in coverage, real-time threat detection, and responsiveness. These limitations can create a false sense of security, making it challenging to prevent crimes and protect people and property effectively.

To address these limitations, researchers have proposed a new type of security system: an IoT-powered smart security robot with an Android app, night vision, and enhanced threat detection capabilities. This prototype robot features an array of cameras for multifaceted surveillance, seamless mobile integration for remote monitoring and control, sophisticated microprocessors driving the robot's operating system, and employs state-of-the-art computer vision and machine learning algorithms for real-time threat identification, encompassing guns and knives, and loud noises. Additionally, the prototype robot can send real-time alerts to users through sound alarms and emails, complete with attached screenshots of detected threats (e.g., guns and knives), audio recordings of loud sounds, precise date and time stamps, and geolocation data indicating where the detection occurred.

Features

  • Gun and Knife Detection: The system uses a cascade classifier to detect the presence of guns or knives in the camera feed. If a gun or knife is detected, an alert is triggered.
  • Loud Sound Detection: The code captures audio samples and calculates the root mean square (RMS) value to determine if a loud sound is detected. An alert is triggered if a loud sound surpasses a predefined threshold.
  • Face Recognition: The system uses the face_recognition library to recognize known faces. If an unknown face is detected, an alert is triggered. (still in development)
  • Real time Alerts: When any threat is detected, a sound alarm is triggered and an email containing a screenshot, date and timestamps, audio recording, and geolocation information is sent. Additionally, a Telegram message (in development) is sent to a specified chat group.
  • Mobile app: For Remote Monitoring and Control
  • Night Vision Capabilities: For low-light conditions
  • Prerequisites

  • Python 3.6 or later
  • Required libraries: pygame, mapbox, folium, sounddevice, soundfile, threading, face_recognition, cv2, numpy, imutils, socket, geocoder, telegram
  • Setup

    1. Clone or download the repository containing the code.
    2. Install the required Python libraries by running the following command: `pip install opencage ublox pygame sounddevice soundfile face_recognition imutils geocoder python-telegram-bot`
    3. Replace the placeholders in the code with your actual email credentials:
    4. Ensure you have the required XML cascade classifier files:
    5. Run the code using a Python interpreter:
    6. The security system will start monitoring the camera feed and detecting threats based on the implemented mechanisms.

    Usage

  • Press the 'q' key to exit the security system.
  • Press the 's' key to stop the alarm sound.
  • Important Notes

  • Carefully configure the detection thresholds and parameters in the code to match your environment and preferences.
  • Test the system thoroughly to ensure proper detection and alert functionality.
  • Be cautious about privacy and legal considerations when implementing face recognition and audio recording features.
  • About

    Codebase for the Real time threat detection feature of Bagsik (Security Robot) https://t.ly/2l5Tx

    Topics

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published

    Languages