Skip to content

Latest commit

ย 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ‘๏ธ Virtual Eye โ€” AI-Powered Navigation Assistant for the Visually Impaired

Platform AI Model Backend React Native License

A real-time AI object detection system that speaks to visually impaired users, guiding them safely through their environment.


๐Ÿ“– Overview

Virtual Eye is a mobile application built for visually impaired individuals that uses the smartphone camera to detect surrounding objects in real-time and delivers instant voice descriptions. The system sends captured frames to a YOLOv8-powered FastAPI backend, generates natural language descriptions of detected objects, and speaks them aloud using Text-to-Speech โ€” without cutting off mid-sentence. Haptic vibration alerts are triggered when dangerous objects are detected nearby.

The app is built with React Native (Expo) and packaged as a standalone Android APK, requiring no specialized hardware โ€” just an Android smartphone and a WiFi connection to the backend server.

Note: This project was developed as part of an academic exhibition to explore the practical application of AI in accessibility technology. While currently a functional prototype, the system is designed with scalability in mind and can be expanded into a full production-grade assistive tool with proper funding, infrastructure, and investment.


โœจ Features

  • ๐Ÿ” Real-Time Object Detection โ€” Captures frames and detects objects using YOLOv8m
  • ๐Ÿ”Š Full Voice Guidance โ€” Speaks complete sentences, never cuts off mid-speech
  • โš ๏ธ Danger Warnings โ€” Highlights dangerous objects with orange UI and faster speech
  • ๐Ÿ“ณ Haptic Alerts โ€” Vibrates the phone when a hazardous object is detected
  • ๐Ÿ”ฆ Manual Flashlight Control โ€” Toggle torch ON/OFF with voice confirmation
  • ๐Ÿ’ค Smart Detection Loop โ€” Waits for speech to finish before scanning again
  • ๐ŸŸข Live Indicator โ€” Green dot shows when detection is actively running
  • ๐Ÿ“ฑ Standalone Android APK โ€” Installable directly, no Expo Go required
  • ๐ŸŽ™๏ธ Voice Assistant Launch โ€” Open app via "Hey Google, open Virtual Eye"

๐Ÿ—๏ธ Project Structure

Virtual-Eye-App/
โ”œโ”€โ”€ backend/                   # Original backend
โ”œโ”€โ”€ backend-exhibition/        # Exhibition-optimized backend
โ”‚   โ”œโ”€โ”€ main.py                # FastAPI server entry point
โ”‚   โ”œโ”€โ”€ detector.py            # YOLOv8 detection logic
โ”‚   โ””โ”€โ”€ requirements.txt       # Python dependencies
โ”œโ”€โ”€ VirtualEye/                # Original React Native app
โ””โ”€โ”€ VirtualEye-Exhibition/     # Exhibition-optimized app
    โ”œโ”€โ”€ app/
    โ”‚   โ””โ”€โ”€ (tabs)/
    โ”‚       โ””โ”€โ”€ index.tsx      # Main screen โ€” camera, detection, UI
    โ”œโ”€โ”€ app.json               # Expo config + intent filters
    โ”œโ”€โ”€ eas.json               # EAS Build config (APK)
    โ””โ”€โ”€ package.json

๐Ÿง  How It Works

๐Ÿ“ท Camera Captures Frame
        โ†“
๐Ÿ“ก Frame Sent to FastAPI Backend (HTTP POST)
        โ†“
๐Ÿง  YOLOv8m Detects Objects + Confidence Scores
        โ†“
๐Ÿ’ฌ Natural Language Description Generated
        โ†“
๐Ÿ”Š Text-to-Speech Speaks Full Sentence
        โ†“
๐Ÿ“ณ Haptic Vibration if Danger Detected
        โ†“
โณ Wait for Speech to Finish
        โ†“
๐Ÿ” Loop Repeats Automatically

๐Ÿ› ๏ธ Tech Stack

Mobile App

Technology Purpose
React Native + Expo Cross-platform mobile framework
TypeScript Type-safe development
Expo Camera Real-time camera frame capture
Expo Speech Text-to-Speech voice output
Expo Haptics Vibration feedback for warnings
EAS Build Compiles standalone Android APK

Backend

Technology Purpose
Python 3.10+ Backend language
FastAPI High-performance REST API server
Ultralytics YOLOv8m Object detection AI model
OpenCV Image preprocessing
Uvicorn ASGI server for FastAPI

โš™๏ธ Getting Started

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • Android smartphone (for app testing)
  • Both phone and laptop on the same WiFi network

1. Clone the Repository

git clone https://github.com/haroon1nonly/Virtual-Eye-App.git
cd Virtual-Eye-App

2. Setup the Backend

cd backend-exhibition
pip install -r requirements.txt

Update the backend IP in the app if needed (see Step 4), then start the server:

python main.py

The server runs on http://0.0.0.0:8000. Check your local IP using:

# Windows
ipconfig

# Linux/Mac
ifconfig

3. Setup the Mobile App

cd VirtualEye-Exhibition
npm install

4. Update Backend IP in App

Open app/(tabs)/index.tsx and update the BACKEND constant:

const BACKEND = 'http://YOUR_LAPTOP_IP:8000';

Replace YOUR_LAPTOP_IP with the IP address from Step 2 (e.g., 192.168.1.5).


5. Run in Expo Go (Development)

npx expo start

Scan the QR code with Expo Go on your Android phone.


6. Build Standalone APK (Production)

npm install -g eas-cli
eas login
eas build --platform android --profile preview

Once built, download the .apk link and install directly on your Android phone.


๐Ÿ“ฑ Usage

  1. Install the APK on your Android phone
  2. Start the backend on your laptop (python main.py)
  3. Connect both devices to the same WiFi network
  4. Open Virtual Eye on your phone (or say "Hey Google, open Virtual Eye")
  5. Tap anywhere on the screen to start detection
  6. Listen โ€” the app will speak what it sees continuously
  7. Tap again to stop detection
  8. Torch button (top right) โ€” manually toggle flashlight ON/OFF

๐Ÿ”ง Configuration

Detection Settings (backend detector.py)

MODEL = "yolov8m.pt"       # Model size: n / s / m / l / x
CONFIDENCE = 0.25          # Minimum confidence threshold (0.0 - 1.0)
IMG_SIZE = 960             # Input image resolution

Speech Settings (app index.tsx)

rate: 0.55,    // Speech speed (0.1 slow โ€” 1.0 fast)
pitch: 1.0,    // Voice pitch
volume: 1.0,   // Volume level

Loop Timing

await sleep(1500);  // Pause between detections (ms)
await sleep(4000);  // Pause after server error (ms)

๐Ÿ”ฎ Future Advancements

Virtual Eye is built as a scalable foundation. The following advancements are planned or possible with further development and investment:

๐Ÿฅฝ Smart Glasses Integration

The system can be embedded into smart glasses hardware, eliminating the need to hold a phone. The camera feed would stream directly from the glasses to the detection backend, providing a completely hands-free and natural experience for visually impaired users โ€” making it feel invisible and effortless.

๐Ÿ  Personalized Indoor Navigation

Users can feed the model photos of their home rooms and architectural floor plans to create a personalized indoor map. The AI would then recognize familiar rooms, furniture positions, and specific objects unique to that household โ€” providing highly accurate, room-aware guidance like:

"The sofa is 2 steps to your left. The kitchen door is straight ahead."

๐Ÿ“ต Fully On-Device AI (No Internet Required)

By converting the YOLOv8 model to TFLite with INT8 quantization, the entire detection pipeline can run directly on the phone's Neural Processing Unit (NPU) โ€” no WiFi, no server, no latency. Complete independence anywhere in the world.

๐Ÿ—บ๏ธ GPS + Outdoor Navigation

Integration with GPS and Google Maps API to provide outdoor turn-by-turn navigation combined with real-time object detection โ€” warning about traffic, pedestrians, stairs, and road crossings simultaneously.

๐Ÿง  Custom Model Fine-Tuning

Allow users or caregivers to fine-tune the detection model with custom object categories specific to their needs โ€” recognizing personal belongings, medicines, specific people's faces, or workplace equipment.

๐Ÿ‘ค Face Recognition

Integrate face recognition so the app can identify and announce familiar people by name โ€” helping users know who is approaching them in a room or public space.

๐ŸŒ Multi-Language Voice Support

Expand Text-to-Speech support beyond English to Urdu, Arabic, Hindi, and other languages โ€” making the app accessible to a global audience including users in Pakistan and the wider developing world.

โŒš Wearable & IoT Integration

Connect with smartwatches for silent haptic navigation cues, or integrate with IoT smart home systems to announce when doors open, appliances are running, or visitors arrive.


๐Ÿ’ก Interested in contributing or investing? This project has real-world impact potential for millions of visually impaired individuals worldwide. Reach out to collaborate or support its development.


๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Creator & Lead Developer

Muhammad Haroon Abbas

GitHub


๐Ÿ“„ License

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


๐Ÿ™ Acknowledgements


Made with โค๏ธ for the visually impaired community

About

๐Ÿ‘๏ธ AI-powered Android app for visually impaired users. Detects objects in real-time using YOLOv8, speaks full voice descriptions, and alerts for dangers with haptic feedback. Built with React Native + FastAPI.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages