Healthcare Technology Track β’ HackUMBC 2026
Navigating unfamiliar indoor environments remains one of the greatest mobility challenges for visually impaired individuals. Traditional white canes only detect obstacles at ground level within immediate physical reach (~1 meter), while specialized electronic travel aids (LIDAR, ultrasonic vests) are prohibitively expensive ($1,000+), cumbersome, and battery-intensive.
GuideSense reimagines assistive navigation by transforming an accessible, low-cost commodity deviceβa standard Logitech USB webcamβinto an intelligent spatial awareness companion:
- Instant Edge Safety (Sub-100ms): Runs localized monocular computer vision (OpenCV MobileNet SSD) and pinhole geometric depth estimation entirely on-device, functioning with zero internet connection.
- Spatial Directional Guidance: Dynamically categorizes obstacles across the user's field of view into Left, Center, and Right corridors with three safety zones (Near Hazard < 0.5m, Mid Navigation 0.5mβ3.0m, and Far Awareness > 3.0m).
- Intelligent Arbitration: A zero-flicker temporal state machine filters sensor noise, prioritizes human obstacles, and prevents repetitive announcement fatigue.
- Multimodal Cloud Intelligence: When internet is available, GuideSense enriches local guidance with Google Gemini 2.5 Flash for natural scene narration, ElevenLabs for human-like speech synthesis, and Backboard for persistent episodic memory.
- Interactive Local Dashboard: Zero-dependency browser HUD delivering real-time telemetry, spatial cards, and a built-in simulated demo mode for instant evaluation.
You can evaluate the complete GuideSense pipeline with or without a physical webcam connected.
Experience the complete spatial awareness pipeline, HUD, and state machine using the built-in interactive demo:
# 1. Clone & create virtual environment
git clone https://github.com/Bless-04/hackUMBC2026.git
cd hackUMBC2026
python -m venv .venv
# 2. Activate & install (Windows PowerShell)
.\.venv\Scripts\python.exe -m pip install -e .
.\.venv\Scripts\python.exe -m ui(On macOS / Linux: .venv/bin/python -m pip install -e . then .venv/bin/python -m ui)
- Open http://127.0.0.1:8765 in your browser.
- Click Start session.
- What to observe: The simulated demo approaches and retreats every 18 seconds. Watch the Awareness State shift seamlessly between Silent, Informative (with directional callouts like "Person, 1.8m center"), and Urgent Hazard (< 0.5m).
Connect any standard USB webcam (tested with Logitech C270):
# Launch interactive dashboard with live camera
python -m ui- In the dashboard, choose Configure β Live camera (select index
0or1), enable Voice & urgent alerts, click Save, and click Start session. - CLI Mode: Run directly in the terminal with OpenCV HUD preview:
python main.py --camera-distance --camera 0 --preview --forever
GuideSense adheres to strict production engineering standards:
# Run all 129 automated unit, scenario, and hardware mock tests
python -m pytest
# Run strict code quality & linting checks
python -m ruff check .Result: 129 passed in ~3.5 seconds with 0 linting errors.
GuideSense combines an edge-first critical safety loop with an asynchronous cloud intelligence tier:
+---------------------------------------+
| Logitech USB Webcam (C270) |
+---------------------------------------+
|
v
+---------------------------+
| vision/vision.py |
| (OpenCV + MobileNet SSD) |
+---------------------------+
|
v
+---------------------------+
| vision/distance_estimator |
| (Pinhole Height Geometry) |
+---------------------------+
|
v
+---------------------------+
| core/fusion.py |
| (Spatial Zone & Priority)|
+---------------------------+
|
v
+---------------------------+
| core/state_machine.py |
| (Hysteresis & Arbitration)|
+---------------------------+
|
+---------------------------------------+---------------------------------------+
| | |
v v v
+---------------------------+ +---------------------------+ +---------------------------+
| hardware/audio.py | | ui/server.py | | services/ (Optional) |
| - ElevenLabs Cloud Voice | | - Localhost Web Dashboard | | - Gemini 2.5 Flash Scene |
| - Offline Text-to-Speech | | - Real-Time HUD Overlay | | - Backboard Memory |
| - Haptic Urgency Tone | | - CSV Session Telemetry | | |
+---------------------------+ +---------------------------+ +---------------------------+
- Rather than requiring heavy time-of-flight or LIDAR sensors, GuideSense uses pinhole camera geometry:
$$\text{Distance (m)} = \frac{f \times H_{\text{real}}}{h_{\text{pixels}}}$$ - Employs calibrated focal length constants (
$f \approx 820$ px for Logitech C270 at 720p) and standardized real-world physical heights (e.g., person$\approx 165$ cm, chair$\approx 85$ cm, bottle$\approx 25$ cm) to estimate proximity instantaneously on modest hardware.
-
Horizontal Directional Zoning: Divides the camera's field of view into three distinct directional vectors:
-
Left: Obstacle center
$x < 35%$ frame width. -
Center:
$35% \le x \le 65%$ frame width (direct path of travel). -
Right:
$x > 65%$ frame width.
-
Left: Obstacle center
-
Three-Tier Safety Thresholds:
- π¨ Near Hazard (
$< 0.50$ m): Triggers immediateURGENTalert with auditory warning tone. Zero persistence delay ensures instant reflex protection. - βΉοΈ Mid Corridor (
$0.50$ m β$3.00$ m): Generates actionable directional guidance (e.g., "Chair, 1.5 metres left"). Requires temporal persistence (2 consecutive detections) to eliminate flickering false alarms. - ποΈ Far Awareness (
$> 3.00$ m): Tracked silently in memory to prevent cognitive clutter.
- π¨ Near Hazard (
- Hysteresis Alert Smoothing: 1.5-second alert hysteresis ensures safety buzzer signals do not rapidly chatter on boundary distance thresholds.
- Google Gemini 2.5 Flash Scene Narrator: Periodically captures keyframes and asynchronously streams natural contextual scene explanations ("There is a person standing by a desk to your left and a clear corridor ahead"), throttled to avoid cognitive overload.
- Backboard Persistent Memory: Logs spatial discoveries into an episodic memory graph to recall previously navigated spaces and landmark locations.
- ElevenLabs High-Definition Voice: Synthesizes lifelike, calming voice announcements, gracefully falling back to native platform TTS (
pyttsx3) if offline.
- Built with pure native HTML5, responsive CSS, and Vanilla JavaScriptβno Node.js, Webpack, or external CDN dependencies needed.
- Live video stream with OpenCV HUD overlays, directional radar badges, active tracking tables, and one-click session telemetry CSV export.
- CSRF-hardened with loopback session tokens and explicit local private file isolation.
The project is structured into clear, domain-specific Python packages:
hackUMBC2026/
βββ core/ # Decision core & safety arbitration
β βββ fusion.py # Spatial fusion, persistence, & zone categorization
β βββ state_machine.py # System states (SILENT, INFORMATIVE, URGENT)
β
βββ vision/ # Computer vision & spatial heuristics
β βββ vision.py # Camera capture & OpenCV MobileNet SSD inference
β βββ distance_estimator.py # Bounding-box distance calculation
β βββ distance.py # Geometric optics formulas & object height registry
β βββ calibrate.py # Focal length calibration CLI
β βββ models/ # Bundled MobileNet SSD model weights & prototxt
β
βββ hardware/ # Audio & alert actuators
β βββ audio.py # Cross-platform TTS voice dispatch
β βββ audio_playback.py # Low-latency native OS WAV player (Win/Mac/Linux)
β βββ eleven_audio.py # ElevenLabs cloud speech streaming
β βββ haptics.py # Urgent hazard tone generator
β
βββ services/ # Cloud multimodal AI integrations
β βββ gemini_narrator.py # Google Gemini 2.5 Flash scene description
β βββ backboard_memory.py # Backboard persistent session memory
β
βββ telemetry/ # Logging and analytics
β βββ logger.py # Structured CSV event & frame recorder
β
βββ ui/ # User interface & dashboard
β βββ server.py # Loopback HTTP server & REST API
β βββ runtime.py # Background sensing thread & controller
β βββ hud.py # Real-time OpenCV HUD targeting overlay
β βββ static/ # Dashboard assets (CSS, JS, SVG vector icons)
β
βββ tests/ # Automated test suite (129 tests)
β βββ test_scenarios.py # 27 healthcare assistive scenario specs
β βββ test_fusion.py # Spatial fusion & directional awareness tests
β βββ test_state_machine.py # State transitions & hysteresis tests
β βββ test_ui.py # Web server, security, & session tests
β βββ test_*.py # Cloud, audio, and distance unit tests
β
βββ media/ # Brand assets & documentation media
β βββ logo.jpg # Official GuideSense logo
β
βββ main.py # CLI entry point for standalone sensing
βββ pyproject.toml # Build specification & ruff/pytest config
βββ requirements.txt # Dependency manifest
For embedded or headless operation, GuideSense can run entirely from the command line:
# 1. Run simulated demo (10 seconds)
python main.py
# 2. Run with live webcam and OpenCV visual preview
python main.py --camera-distance --camera 0 --preview --duration 30
# 3. Continuous operational mode with live camera and audio guidance
python main.py --real --camera 0 --forever
# 4. Enable optional cloud integrations via CLI
python main.py --real --camera 0 --gemini --backboard --forever| Flag | Description |
|---|---|
--camera-distance / --real-vision |
Enables live camera capture and real-time distance estimation |
--camera <int> |
Selects camera device index (0 for default/built-in, 1 for external USB) |
--preview / --gui |
Opens a local OpenCV window with real-time HUD bounding boxes |
--audio |
Enables spoken voice guidance and urgent safety buzzer tones |
--real |
Shorthand for --camera-distance --audio |
--gemini |
Enables asynchronous Google Gemini multimodal scene description |
--backboard |
Enables Backboard episodic memory logging |
--forever |
Runs indefinitely until Ctrl+C is pressed |
GuideSense functions completely offline. To enable optional cloud AI capabilities, create a .env file in the repository root:
# Optional: Google Gemini 2.5 Flash scene narration
GEMINI_API_KEY=your_gemini_api_key_here
# Optional: ElevenLabs ultra-realistic voice guidance
ELEVEN_LABS_API_KEY=your_elevenlabs_api_key_here
# Optional: Backboard persistent memory
BACKBOARD_API_KEY=your_backboard_api_key_here- Camera: Logitech C270 HD Webcam (or any USB Video Class camera / integrated laptop camera).
- Windows: Native audio playback via Windows multimedia APIs.
- macOS: Built-in system audio playback via
afplay. - Linux: Audio support via
paplayoraplay.
Developed for HackUMBC 2026 β’ Healthcare Technology Track
Empowering greater independence and mobility through accessible, intelligent edge technology.
