Skip to content

Project-Cortex is an open-source assistive platform built on the Raspberry Pi 5. It utilizes a 3-Layer AI Architecture: Layer 1 (Local YOLO) for instant reflex safety, Layer 2 (Gemini Cloud) for deep context, and Layer 3 (GPS/3D Audio) for navigation. Designed to disrupt the expensive assistive tech market with accessible engineering.

Notifications You must be signed in to change notification settings

IRSPlays/ProjectCortexV2

Repository files navigation

Project-Cortex v2.0

AI-Powered Assistive Wearable for the Visually Impaired

License: MIT Python 3.11+ Raspberry Pi 5


🎯 Project Mission

Project-Cortex is a low-cost (<$150), high-impact AI wearable designed to assist visually impaired individuals by providing real-time scene understanding, object detection, and audio navigation. Built for the Young Innovators Awards (YIA) 2026 competition.

We aim to democratize assistive technology by disrupting the $4,000+ premium device market (OrCam, eSight) using commodity hardware and a novel "Hybrid AI" architecture.


πŸ—οΈ Architecture Overview

Hardware Platform

  • Compute: Raspberry Pi 5 (4GB/8GB RAM)
  • Vision: IMX415 8MP Low-Light Camera (MIPI CSI-2)
  • Power: 30,000mAh USB-C PD Power Bank
  • Cooling: Official RPi 5 Active Cooler
  • Audio: USB Audio Interface + Bone Conduction Headphones
  • Connectivity: Mobile Hotspot (no dedicated SIM module)

The "3-Layer AI" Brain

Layer 1: The Reflex (Local Inference)

  • Purpose: Instant safety-critical object detection
  • Model: YOLOv8n / TensorFlow Lite
  • Latency: <100ms
  • Power: 8-12W during inference
  • Location: src/layer1_reflex/

Layer 2: The Thinker (Cloud Intelligence)

  • Purpose: Complex scene analysis, OCR, natural language descriptions
  • Model: Google Gemini 1.5 Flash (via API)
  • Fallback: OpenAI GPT-4 Vision
  • Latency: ~1-3s (network dependent)
  • Location: src/layer2_thinker/

Layer 3: The Guide (Integration & UX)

  • Features: GPS navigation, 3D spatial audio, caregiver dashboard
  • Tech Stack: FastAPI (backend), React (dashboard), PyOpenAL (audio)
  • Location: src/layer3_guide/

πŸ“ Repository Structure

ProjectCortex/
β”œβ”€β”€ Version_1/                      # Archived ESP32-CAM implementation
β”‚   β”œβ”€β”€ Docs/                      # v1.0 technical retrospective
β”‚   └── Code/                      # v1.0 Python/Arduino code
β”œβ”€β”€ models/                         # Shared AI models (YOLO variants)
β”œβ”€β”€ TTS Model/                      # Piper TTS model files
β”œβ”€β”€ src/                           # Version 2.0 source code
β”‚   β”œβ”€β”€ layer1_reflex/             # Local object detection module
β”‚   β”œβ”€β”€ layer2_thinker/            # Cloud AI integration module
β”‚   β”œβ”€β”€ layer3_guide/              # Navigation & UI module
β”‚   └── main.py                    # Application entry point
β”œβ”€β”€ config/                         # Configuration files (.yaml, .json)
β”œβ”€β”€ tests/                          # Unit and integration tests
β”œβ”€β”€ docs/                           # Technical documentation
β”œβ”€β”€ utils/                          # Helper scripts and tools
β”œβ”€β”€ .env.example                    # Environment variables template
β”œβ”€β”€ requirements.txt                # Python dependencies
└── README.md                       # This file

πŸš€ Quick Start

Prerequisites

  • Raspberry Pi 5 (4GB+ RAM) with Raspberry Pi OS (64-bit)
  • IMX415 Camera Module (connected via CSI port)
  • Python 3.11+
  • Active internet connection (for Layer 2)

Installation

  1. Clone the repository:

    git clone https://github.com/IRSPlays/ProjectCortex.git
    cd ProjectCortex
  2. Set up Python environment:

    python3.11 -m venv venv
    source venv/bin/activate
    pip install --upgrade pip
    pip install -r requirements.txt
  3. Configure environment variables:

    cp .env.example .env
    nano .env  # Add your API keys (Gemini, Murf AI, etc.)
  4. Test camera module:

    libcamera-hello --camera 0  # Should display camera preview
  5. Run the application:

    python src/main.py

πŸ”§ Configuration

Power Management

Add to /boot/firmware/config.txt:

usb_max_current_enable=1
dtoverlay=imx415

Camera Settings

Configure in config/camera.yaml:

resolution: [1920, 1080]
framerate: 30
format: RGB888

AI Model Selection

Edit config/models.yaml:

layer1:
  model: "models/yolo11s.pt"
  device: "cpu"  # Change to "cuda" if using Coral TPU
  confidence: 0.5

πŸ”Š 3D Spatial Audio Navigation System

Project-Cortex features a binaural 3D spatial audio system that helps visually impaired users navigate their environment using audio cues. This system converts YOLO object detections into positioned audio sources, creating an "audio map" of the surroundings.

Features

Feature Description
Audio Beacons Continuous directional sounds that guide users to targets (e.g., "lead me to the door")
Proximity Alerts Distance-based warnings that intensify as obstacles approach
Object Tracking Real-time 3D audio sources for each detected object
Distance Estimation Calculate real-world distance using known object sizes
Object-Specific Sounds Distinct audio signatures for different object classes (car vs person vs chair)
HRTF Support Head-Related Transfer Function for realistic binaural audio on headphones

How It Works

YOLO Detection β†’ Position Calculator β†’ OpenAL 3D Audio β†’ Headphones
     β”‚                   β”‚                    β”‚
     β–Ό                   β–Ό                    β–Ό
  [bbox]    β†’    [x, y, z coords]    β†’   [Binaural audio]

Position Mapping Algorithm:

  • X-axis (Left/Right): Bbox horizontal center β†’ audio pan
  • Y-axis (Up/Down): Bbox vertical center β†’ audio elevation
  • Z-axis (Distance): Bbox size β†’ audio volume/distance

Quick Start

from src.layer3_guide.spatial_audio import SpatialAudioManager, Detection

# Initialize spatial audio
audio = SpatialAudioManager()
audio.start()

# Update with YOLO detections
detections = [
    Detection("chair_1", "chair", 0.92, (100, 200, 300, 600)),
    Detection("person_1", "person", 0.87, (1400, 100, 1800, 900)),
]
audio.update_detections(detections)

# Start navigation beacon to guide user
audio.start_beacon("chair")  # "Follow the sound to the chair"

# Stop when done
audio.stop()

Configuration

Edit config/spatial_audio.yaml to customize:

  • Distance thresholds for proximity alerts
  • Object-specific sound mappings
  • Ping rates and volumes for beacons
  • Known object sizes for distance estimation

Components

Module File Purpose
SpatialAudioManager manager.py Central orchestrator for all spatial audio
PositionCalculator position_calculator.py YOLO bbox β†’ 3D coordinates
AudioBeacon audio_beacon.py Navigation guidance pings
ProximityAlertSystem proximity_alert.py Distance-based warnings
ObjectSoundMapper object_sounds.py Object class β†’ sound mapping
ObjectTracker object_tracker.py Multi-object audio management

Requirements

pip install PyOpenAL numpy PyYAML

Linux/Raspberry Pi:

sudo apt-get install libopenal-dev libopenal1

πŸ“– Full documentation: docs/SPATIAL_AUDIO_IMPLEMENTATION.md


πŸ§ͺ Testing

Run unit tests:

pytest tests/ -v

Run integration tests (requires hardware):

pytest tests/integration/ --hardware

πŸ“Š Performance Benchmarks

Metric Target Current Status
Layer 1 Latency <100ms TBD
Layer 2 Latency <3s TBD
Power Consumption <20W avg TBD
Battery Life 6-8 hours TBD
Object Detection Accuracy >85% mAP TBD

πŸ› οΈ Development Roadmap

Phase 1: Core Infrastructure (Current)

  • Repository restructure
  • Camera integration with libcamera
  • Layer 1 YOLO inference pipeline
  • Layer 2 Gemini API integration
  • Audio subsystem (TTS + STT)

Phase 2: Feature Development

  • GPS navigation module
  • 3D spatial audio engine βœ… IMPLEMENTED
  • Caregiver web dashboard
  • Power optimization

Phase 3: YIA Preparation

  • User testing & feedback
  • Documentation for judges
  • Prototype enclosure design
  • Demonstration video

πŸ“š Documentation


🀝 Contributing

This is a competition prototype developed by Haziq (@IRSPlays). For questions or collaboration inquiries, please open an issue.


πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ† Acknowledgments

  • YIA 2026 Organizers - For the opportunity to innovate
  • Raspberry Pi Foundation - For affordable, powerful compute
  • Ultralytics - For accessible YOLO implementations
  • Google Gemini Team - For multimodal AI API access

πŸ“ž Contact

Project Lead: Haziq
GitHub: @IRSPlays
Repository: ProjectCortex


Built with πŸ’™ for accessibility. Engineered with πŸ”₯ for excellence.

About

Project-Cortex is an open-source assistive platform built on the Raspberry Pi 5. It utilizes a 3-Layer AI Architecture: Layer 1 (Local YOLO) for instant reflex safety, Layer 2 (Gemini Cloud) for deep context, and Layer 3 (GPS/3D Audio) for navigation. Designed to disrupt the expensive assistive tech market with accessible engineering.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published