Skip to content
/ neurocam Public

Neurocam is a cutting-edge surveillance system for the Raspberry Pi 4 powered by the Akida neuromorphic processor with ChatGPT 4 frame analysis

Notifications You must be signed in to change notification settings

stdp/neurocam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neurocam

Overview

Neurocam is an advanced surveillance system designed specifically for use with the Raspberry Pi 4 Compute Model and an IO board equipped with a PCI-e Akida neuromorphic processor. It leverages real-time person detection or face detection and generates detailed security reports using OpenAI's ChatGPT-4.

Security Report Overview:
The captured frame shows a residential garage with a dimly lit environment, primarily illuminated by a single bulb overhead. Visible contents include various household tools and a car parked inside. An individual is seen standing by the car, appearing to interact with the vehicle's door.

Persons Detected:
The frame includes one male individual, appearing in his mid-30s, with short dark hair and wearing casual attire consisting of a navy blue jacket and denim jeans. His posture and hand position near the car door handle suggest an attempt to gain entry into the vehicle.

Security Level: HIGH

The system runs the Visual Wake Word model for low power monitoring of a feed. When a person is detected, it switches to Yolo for person object tracking. By default it will also estimate the age of each face that is extracted. Terminator vision is optional and enabled when detecting the location of persons in the frame. When the security level is set to high, the RGB LEDs are triggered and flash red and blue (epilepsy warning).

Terminator Vision

Features

  • Real-Time Person Detection: Utilises the Akida neuromorphic processor for efficient and rapid person detection.
  • Real-Time Face Detection: Utilises the Akida neuromorphic processor for efficient and rapid face detection. Age can be predicted for each extracted face.
  • Enhanced Security Reports: Generates detailed security reports using ChatGPT-4, providing insights and alerts based on detected activities.
  • Optimized for Raspberry Pi: Specifically designed to run on Raspberry Pi 4 with a Raspberry Pi Camera, integrating seamlessly with hardware capabilities.
  • Terminator Vision: When a person is detected in frame it will switch to Terminator vision, the sweet red hue from the Terminator movies.
  • Flashing RGB LEDs: When the security level is set to HIGH, it triggers a set of WS2812 compatible RGB LEDs to flash red and blue.

Prerequisites

  • Raspberry Pi 4 Compute Model with an IO Board
  • PCI-e Akida Neuromorphic Processor link
  • Raspberry Pi Camera Module
  • WS2812 compatible RGB LEDs link
  • Python 3.8 or higher
  • A stable internet connection for setup and API interactions with ChatGPT

Akida Neuromorphic SoC

WS2812 compatible RGB LEDs

Installation

Setup the Hardware

  1. Connect the Raspberry Pi Camera to the Raspberry Pi 4 Compute Model.
  2. Ensure the Akida Neuromorphic Processor is correctly installed in the PCI-e slot on the IO Board and the drivers are installed. ([link to instructions])(https://brainchip.com/support-akida-pcie-board)
  3. Conect the WS2812 compatible RGB LED's wiring to the 5v, GROUND and GPIO 18

Prepare the Software Environment

  1. Create a virtual environment with access to system packages (required for picamera2 module):

    python3 -m venv venv --system-site-packages
    source venv/bin/activate
  2. Clone the repository:

     git clone https://github.com/stdp/neurocam.git
     cd neurocam
  3. Install the required Python modules:

    pip install -r requirements.txt
  4. You need to set up several environment variables that the system will use during operation, configure your .env file. Copy the contents of .env.example to a new file named .env in the same directory:

    cp .env.example .env

Usage

To start the Neurocam system, ensure your virtual environment is activated and follow the steps below. Python must be run as sudo for the LEDs to function:

  1. get your virtualenv python path
which python

# example output "/home/neuro/projects/neurocam/venv/bin/python"
  1. copy the output of this and run the follow command, replacing python path with the output from the previous step:
sudo <python path> neurocam.py

# example command "sudo /home/neuro/projects/neurocam/venv/bin/python neurocam.py"

This will initiate the surveillance system, utilizing both the camera and the Akida neuromorphic processor for real-time detection and reporting.

Contributing

Contributions are welcome! Feel free to fork the repository, make improvements, and submit pull requests. Whether it's bug fixes, feature additions, or documentation improvements, all contributions are appreciated.

About

Neurocam is a cutting-edge surveillance system for the Raspberry Pi 4 powered by the Akida neuromorphic processor with ChatGPT 4 frame analysis

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages