Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

63 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“± GuideLensApp: AI-Powered Visual Navigation for Android

GuideLensApp is an accessibility-focused on-device navigation system that helps visually impaired users navigate indoor environments independently.
Built entirely in Kotlin with Jetpack Compose, it combines real-time object detection, semantic floor segmentation, and intelligent pathfinding to deliver turn-by-turn audio guidance through an intuitive AR interface β€” all processed locally on the device.


🌟 Why GuideLensApp?

βœ… 100 % On-Device β€” No internet required, full privacy
βœ… Audio-First Design β€” Text-to-Speech announcements for all navigation events
βœ… Production-Ready β€” Device-adaptive configuration, robust error handling
βœ… Optimized Performance β€” INT8 quantization, NNAPI acceleration, 15–20 FPS
βœ… Open Source β€” GPL-3.0 license, fully documented and community-driven


πŸš€ Core Features

🧠 Computer Vision & Navigation

  • Real-Time Object Detection – YOLO World v2 (INT8) detects 80 object classes at 640Γ—640 resolution with 150–250 ms latency.
    Supports 16 navigable targets: chair, door, table, bed, couch, toilet, sink, refrigerator, stairs, person, bottle, cup, laptop, phone, keyboard, mouse.

  • Semantic Floor Segmentation – Custom-trained PP-LiteSeg (INT8) identifies walkable surfaces.
    NEW: Enhanced with bilinear filtering to robustly handle multi-colored and textured floors.

  • Intelligent Pathfinding – A* search on a down-sampled grid + VFH (Vector Field Histogram).
    NEW: Implements Hysteresis and Low-Pass Filtering to prevent direction jitter and provide smooth, stable guidance.

  • Pure Pursuit Control – Robotics-grade trajectory tracking with 100 px look-ahead; generates natural commands:
    β€œGo straight”, β€œBear right”, β€œVeer left”.

πŸ’Š Medicine Identifier (NEW)

  • AI-Powered Analysis – Combines on-device ML Kit Text Recognition with Gemini Pro API.
  • Instant Summaries – Reads complex medicine labels and provides concise, spoken summaries (e.g., "Paracetamol, used for pain relief").
  • Privacy-First – Images are processed securel, with text-only data sent to the API.

β™Ώ Accessibility Features

  • Text-to-Speech Integration

    • β€œNavigating to [object]” on start
    • β€œ[Object] found” on first detection
    • Natural, slower speech rate (0.7x) for clarity
    • Turn commands every 2.5 s (max)
    • β€œArrived at destination” on goal
    • β€œNavigation stopped” on exit
  • Voice Command Control (Fully Implemented)

    • "Navigate to [object]" – Starts navigation hands-free.
    • "Stop" – Ends current session.
    • "Describe Scene" – Provides a summary of visible objects.
    • Hold-to-Speak – Intuitive long-press gesture on the bottom bar.
  • App Polish & Battery Saver

    • Smart Lifecycle – Pauses heavy ML/Camera tasks when app is backgrounded to save battery.
    • Robust Permissions – Smart handling of denied permissions with direct settings access.
  • Neon High-Contrast UI

    • Vibrating colors (Neon Green/Yellow on Black) for maximum visibility.
    • Pulsing animations for active states (Scanning, Target Acquired).

πŸ› οΈ Technology Stack

Component Technology Details
Platform Android API 24+ Nougat 7.0 and later
Language Kotlin 100 % Modern coroutines-based
UI Jetpack Compose Material Design 3 UI
Architecture MVVM ViewModel, StateFlow separation
ML Runtime ONNX Runtime 1.16.0 Cross-platform INT8 optimized
OCR ML Kit Text Recognition On-device fast extraction
AI API Google Gemini Pro Intelligent summarization
Sensors Fusion (Accel/Mag/Gyro) Stable heading calculation

Model Pipeline

  • YOLO World v2 β†’ PyTorch β†’ ONNX β†’ INT8 Quantization
  • PP-LiteSeg β†’ Custom PyTorch Training β†’ ONNX β†’ INT8 Quantization

Why ONNX Runtime?
15–20 % faster INT8 inference than TFLite, superior NNAPI integration, cross-platform portability.


🧭 Algorithms & Implementation

πŸ—ΊοΈ A* Pathfinding & VFH

  • Manhattan-distance heuristic.
  • VFH (Vector Field Histogram) for local obstacle avoidance.
  • Smoothing: Low-pass filter on output angle ($\alpha = 0.3$).
  • Hysteresis: Cost bonus to previous sector to prevent decision flipping.

πŸ”„ Pure Pursuit Controller

  • Curvature $\kappa = 2 \cdot \sin(\alpha) / L$
  • Generates natural language commands ("Bear left", "Turn sharp right").

βš™οΈ Device-Adaptive Configuration

Tier FPS Resolution ML Threads Acceleration
High-End (β‰₯ 8 GB RAM, β‰₯ 8 cores) 20 1280Γ—720 4 NNAPI + FP16
Mid-Range (4–6 GB RAM) 15 960Γ—540 2 CPU only INT8

Dynamic profiling adjusts thresholds, frame rates, and resolution at runtime.


πŸ“¦ Installation

Prerequisites

  • Android Studio Hedgehog (2023.1.1+)
  • Android SDK API 24+
  • Physical device with camera (β‰₯ 4 GB RAM recommended 8 GB)
  • Gemini API Key: Required for Medicine ID feature.

Setup

git clone https://github.com/N-SriKrishna/GuideLensApp.git 
cd GuideLensApp

Add ML models to app/src/main/assets/

  • yolov8s-worldv2_int8.onnx (~10 MB)
  • floor_segmentation_int8.onnx (~3 MB)

Build & Run

  1. File β†’ Sync Project with Gradle
  2. Build β†’ Make Project
  3. Run β†’ Run 'app' (grant camera & microphone permissions)

▢️ Usage

Basic Navigation

  1. Tap βš™οΈ to select target object (e.g. Chair) or say "Navigate to Chair".
  2. Hear β€œNavigating to chair”.
  3. Follow audio commands: β€œBear right”, β€œMove forward”.
  4. Arrival β†’ β€œArrived at destination”.

Mectine ID

  1. Select "Medicine Identifier" from Start Screen.
  2. Point camera at medicine box.
  3. Tap "SCAN".
  4. Listen to the AI summary.

βš™οΈ Performance & Optimization

Benchmarks (Samsung Galaxy S23, Snapdragon 8 Gen 2)

Component Latency Notes
Object Detection 150–250 ms YOLO World INT8 + NNAPI
Floor Segmentation 80–120 ms PP-LiteSeg INT8
Medicine Analysis 1–2 sec OCR (On-device) + API
End-to-End Nav 2.5–4 FPS Full pipeline

Memory β‰ˆ 250 MB (active) Β· Battery β‰ˆ 15–20 % per hour

Key Optimizations

  • INT8 Quantization β†’ 4Γ— smaller models, 2–3Γ— faster inference
  • NNAPI Acceleration β†’ 2Γ— speedup on Snapdragon NPUs
  • Lifecycle Management β†’ Auto-pause when backgrounded
  • Memory Pooling β†’ Bitmap reuse + explicit GC

πŸ—οΈ Project Architecture

app/src/main/java/com/example/guidelensapp/
β”œβ”€β”€ MainActivity.kt 
β”œβ”€β”€ GuideLensApplication.kt 
β”œβ”€β”€ Config.kt 
β”œβ”€β”€ viewmodel/
β”‚   β”œβ”€β”€ NavigationViewModel.kt 
β”‚   └── NavigationUiState.kt
β”œβ”€β”€ ml/
β”‚   β”œβ”€β”€ ObjectDetector.kt 
β”‚   β”œβ”€β”€ ONNXFloorSegmenter.kt 
β”‚   └── TextRecognitionManager.kt
β”œβ”€β”€ network/
β”‚   └── GeminiService.kt
β”œβ”€β”€ sensors/
β”‚   └── SpatialTracker.kt 
β”œβ”€β”€ navigation/
β”‚   └── PathPlanner.kt 
β”œβ”€β”€ accessibility/
β”‚   β”œβ”€β”€ TextToSpeechManager.kt 
β”‚   └── VoiceCommandManager.kt
└── ui/composables/
    β”œβ”€β”€ SimpleNavigationComposables.kt
    β”œβ”€β”€ StartScreen.kt
    β”œβ”€β”€ MedicineIdScreen.kt
    └── ...

Data Flow:
Camera Frame β†’ ViewModel β†’ [SensorTracker + ObjectDetector β†’ FloorSegmenter β†’ PathPlanner state] β†’ TTS β†’ StateFlow β†’ Compose UI


🎯 Future Enhancements

  • Dynamic Obstacle Avoidance with real-time re-planning (Partially Implemented via VFH)
  • Haptic Turn Cues for tactile feedback
  • Multi-Object Waypoints & Navigation History
  • Sensor Fusion for improved heading stability (Implemented)
  • Model Distillation for total model size under 5 MB

πŸ’‘ Accessibility & Impact

GuideLensApp empowers users with visual impairments to navigate independently using only a smartphone camera β€” no beacons, maps, or internet required.
It demonstrates that real-time, privacy-preserving AI can be practical on-device, enhancing inclusion and mobility for millions worldwide.


πŸ“š References & Resources


πŸ§‘β€πŸ’» Author & Repository

Developer: Sri Krishna Nurandu
Repository: github.com/N-SriKrishna/GuideLensApp
License: GPL-3.0


🏁 Conclusion

GuideLensApp showcases the future of on-device AI navigation β€” merging deep learning, classical algorithms, and accessibility design into one cohesive Android application.
With optimized models, adaptive runtime, and robust engineering, it stands as a reference implementation for real-time computer-vision navigation on mobile devices.

About

GuideLensApp is a Android application that provides AI-powered visual navigation. Using on-device machine learning models (YOLO World, pp-liteSeg), it performs real-time object detection and floor segmentation. The app then uses A* pathfinding to calculate a safe route to a target object, guiding the user with AR overlays on the live camera feed.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages