Skip to content
Orlando712Public

About

Real-time computer-vision safety assistant for visually impaired users using YOLOv8 and OpenCV.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

SafeSight: Smart AI Safety Assistant

SafeSight is a real-time safety assistant designed to help blind and visually impaired individuals navigate environments safely. Using computer vision and text-to-speech (TTS) alerts, SafeSight identifies nearby obstacles, evaluates crowd density levels, and announces warnings dynamically to keep the user informed of their surroundings.

Problem It Solves

Navigating dynamic environments can be challenging and dangerous for visually impaired individuals. SafeSight acts as a virtual pair of eyes, constantly monitoring the surroundings using a camera and providing immediate audio feedback about potential hazards (like vehicles or animals) and the general crowdedness of the area, thus enhancing the user's spatial awareness and safety.

Features

  • Real-Time Object Detection: Utilizes YOLOv8 to detect safety-relevant objects (e.g., persons, cars, bicycles, animals, and common obstacles).
  • Crowd Density Analysis: Analyzes the number of people in the frame to categorize crowd density into Low, Medium, or High levels.
  • Dynamic Voice Alerts: Employs a text-to-speech (TTS) engine to announce prioritized warnings with smart cooldowns, preventing audio overlap and user fatigue.
  • Emergency SOS Mode: Allows the user or caregiver to trigger an SOS alert that broadcasts a continuous emergency request for help.
  • Caregiver Dashboard: A Streamlit-based user interface providing real-time pipeline controls, voice toggles, and live video feed visualization with auto-refresh capabilities.
  • Continuous Background Pipeline: Runs the inference and alert logic in a non-blocking background thread to ensure smooth UI responsiveness and continuous monitoring.

Known Limitations

  • Camera Requirement: Requires a connected and functioning local webcam or video input device.
  • Local Compute Bound: Depends on the local machine's CPU/GPU for YOLOv8 inference, meaning performance (FPS) will vary based on hardware capabilities.
  • UI Refresh Rate: Relies on Streamlit's auto-refresh mechanism (streamlit-autorefresh), which can be slower compared to native video rendering.

Project Structure

smart-safety-assistant/
├── config/                # Centralized configurations and domain-specific constants
├── core/                  # Core domain logic (Detections, Crowd Analysis, Alert Manager, Safety Pipeline)
├── infrastructure/        # Third-party integrations (TTS Voice Engine, Camera capture, State Store)
├── logs/                  # Persistent log directory
├── models/                # YOLOv8 weights storage
├── tests/                 # Unit tests for the application
├── ui/                    # Streamlit Frontend/Dashboard components
├── utils/                 # Utilities and helper libraries (Drawing, Logger)
├── README.md              # Project documentation
└── requirements.txt       # Project dependencies

Screenshots

SafeSight Dashboard Live camera feed, detection overlays, and sidebar controls in the Streamlit dashboard.

Installation

  1. Prerequisites: Python 3.8+ is recommended.
  2. Create a Virtual Environment (Optional but recommended):
    python -m venv .venv
    source .venv/bin/activate  # On Windows use: .venv\Scripts\activate
  3. Install Dependencies:
    pip install -r requirements.txt

Launching the Application

To launch the SafeSight Streamlit dashboard, run the following command from the root of the repository:

PYTHONPATH=. streamlit run ui/app.py

Running Tests

To run the unit tests, ensure you have pytest installed (pip install pytest), then run:

PYTHONPATH=. pytest tests/

About

Real-time computer-vision safety assistant for visually impaired users using YOLOv8 and OpenCV.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages