VisionAid is an AI-powered accessibility assistant designed to help visually impaired users navigate their environment safely and independently. The application uses real-time computer vision, voice commands, and conversational AI to provide guidance, scene description, obstacle prediction, and educational content.
- Real-time obstacle detection using YOLOv8
- Audio alerts for objects in your path
- Directional guidance (move left/right/continue straight)
- Visual overlay with bounding boxes and labels
- Vibration feedback for proximity warnings
- Scene description with natural language narration
- Powered by Google Gemini for accurate visual analysis
- Detailed descriptions including objects, colors, positions, and text
- Object identification and counting
- Color and lighting analysis
- Auto-describe mode for continuous narration
- Spatial awareness (left/right/near/far positioning)
- Fallback to YOLO when Gemini is unavailable
- Anticipatory obstacle detection
- Time-to-impact calculations
- Severity-based warnings (low/medium/high)
- Proactive recommendations
- Motion-based predictions
- Object identification and education
- Detailed descriptions of identified objects
- Interesting facts about common items
- Category classification
- Learning progress tracking
- Hands-free operation with voice commands
- Command recognition for mode switching
- Emergency activation via voice
- Customizable speech speed and volume
- Emergency overlay with location sharing
- Settings panel for customization
- Onboarding tutorial for first-time users
- Session summaries with usage analytics
- Responsive design for mobile and desktop
- Accessibility-first design principles
- Python 3.8+ (for backend)
- Node.js 18+ (for frontend)
- pnpm (package manager)
- Webcam or camera (for vision features)
- Microphone (for voice commands)
-
Navigate to the backend directory:
cd backend -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure Gemini API (for enhanced Explain mode):
cp .env.example .env # Edit .env and add your GEMINI_API_KEY # Get your key from: https://makersuite.google.com/app/apikey
See GEMINI-SETUP.md for detailed instructions.
-
Download YOLO models (if not present): The
yolov8n.ptandyolov8n-cls.ptfiles should be in the backend directory. If missing, they will be automatically downloaded on first run. -
Start the backend server:
uvicorn main:app --host 0.0.0.0 --port 8000 --reload
The backend API will be available at
http://localhost:8000
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
pnpm install
-
Start the development server:
pnpm dev
The application will be available at
http://localhost:3000
iOS Safari requires HTTPS (or localhost) for camera/mic access. For testing on a phone over your LAN, use a trusted HTTPS tunnel:
- Recommended: Cloudflare Tunnel ephemeral URLs
- Alternative: ngrok
See QUICK-START-HTTPS.md for step-by-step instructions, or run the helper script:
chmod +x tools/https-dev.sh
./tools/https-dev.shThen set frontend/.env.local:
NEXT_PUBLIC_API_URL=<your-backend-https-url>Open the frontend HTTPS URL on your phone and tap the viewport to start the camera.
-
Start the backend in one terminal:
cd backend source venv/bin/activate uvicorn main:app --host 0.0.0.0 --port 8000
-
Start the frontend in another terminal:
cd frontend pnpm dev -
Open your browser to
http://localhost:3000 -
Grant permissions for camera and microphone when prompted
- Welcome Screen: Read about the four modes available
- Grant Permissions: Allow camera and microphone access
- Tutorial: Learn voice commands and touch controls
- Start: Begin using VisionAid!
"Navigate"- Switch to Navigate mode"Explain"- Switch to Explain mode"Predict"- Switch to Predict mode"Learn"- Switch to Learn mode"Emergency"- Activate emergency mode"Settings"- Open settings panel"Next"- Go to next mode"Previous"or"Back"- Go to previous mode
- Tap anywhere: Hear current mode announcement
- Swipe up/down: Switch between modes
- Scroll wheel up/down: Change modes
- Long press (2 seconds): Activate voice recognition
- Settings button: Bottom right corner
- Emergency button: Red button, bottom right
- Start/Pause button: Toggle navigation
- Automatically detects obstacles in real-time
- Audio alerts for objects in your path
- Visual overlay shows detected objects
- Describe Scene button: Get scene description
- Auto-Describe toggle: Continuous narration every 10 seconds
- Detailed breakdown of objects, colors, and lighting
- Start/Pause button: Toggle prediction
- Receives warnings about upcoming obstacles
- Time-to-impact shown in seconds
- Recommendations for safe navigation
- Identify & Learn button: Identify and learn about objects
- Educational facts about detected objects
- Category classification
- Progress tracking
Backend API (http://localhost:8000)
GET /health
Returns the status of loaded models
POST /detect
Upload an image and receive detected objects with bounding boxes
POST /classify
Upload an image and receive the top classification result
POST /describe
Upload an image and receive a natural language description
POST /chat
Send a message and receive an AI response
POST /feedback
Submit user feedback about detection accuracy
POST /session/start
POST /session/end
POST /session/log
Manage user sessions and log activities
GET /settings
POST /settings
Get or update application settings
Access via the settings button (bottom right). Customize:
- Speech Speed: Slow, Normal, or Fast
- Volume: 0-100%
- Vibration Feedback: On/Off
- Audio Tones: On/Off
- Emergency Contact: Phone number for emergencies
Settings are saved to browser localStorage and persist across sessions.
VisionAid works best on modern browsers that support:
- WebRTC (camera access)
- Web Speech API (voice recognition and synthesis)
- Vibration API (haptic feedback)
Recommended Browsers:
- Chrome 90+
- Edge 90+
- Safari 14+ (limited voice recognition)
- Firefox 88+
- Camera/Microphone: Only accessed when granted permission
- Image Processing: Images are processed locally or sent to backend API only
- No Data Collection: Session data stored temporarily, not shared with third parties
- Location Sharing: Only in emergency mode with user consent
- Local Storage: Settings saved in browser localStorage
cd backend
pytest tests/cd frontend
pnpm testvisionaid-2/
โโโ backend/
โ โโโ main.py # FastAPI application
โ โโโ requirements.txt # Python dependencies
โ โโโ yolov8n.pt # Object detection model
โ โโโ yolov8n-cls.pt # Classification model
โ โโโ tests/ # Backend tests
โโโ frontend/
โ โโโ app/ # Next.js app directory
โ โ โโโ page.tsx # Main application page
โ โ โโโ layout.tsx # Root layout
โ โ โโโ globals.css # Global styles
โ โโโ components/ # React components
โ โ โโโ modes/ # Mode-specific components
โ โ โ โโโ navigate-mode.tsx
โ โ โ โโโ explain-mode.tsx
โ โ โ โโโ predict-mode.tsx
โ โ โ โโโ learn-mode.tsx
โ โ โโโ mode-view.tsx # Mode container
โ โ โโโ onboarding-flow.tsx
โ โ โโโ settings-panel.tsx
โ โ โโโ emergency-overlay.tsx
โ โ โโโ session-summary.tsx
โ โโโ lib/ # Utility libraries
โ โ โโโ types.ts # TypeScript types
โ โ โโโ utils.ts # Helper functions
โ โ โโโ voice-system.ts # Voice control system
โ โโโ package.json # Node.js dependencies
โโโ README.md # This file
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
- YOLOv8 by Ultralytics for object detection
- Next.js and React for the frontend framework
- FastAPI for the backend API
- Tailwind CSS for styling
- shadcn/ui for UI components
For issues, questions, or suggestions:
- Open an issue on GitHub
- Contact the development team
Future enhancements planned:
- Multi-language support
- Offline mode with local processing
- GPS-based outdoor navigation
- Integration with smart home devices
- Cloud-based AI models for better accuracy
- Mobile app (iOS/Android)
- Text recognition (OCR) for reading signs
- Facial recognition for identifying people
- Custom voice profiles
- Advanced analytics dashboard
VisionAid - Empowering independence through AI-powered vision assistance.