The AI-powered camera vision system for the BEACON assistive wearable.
BEACON is a smart cap designed to help visually impaired individuals navigate the world safely. This repository contains the Python-based AI and camera logic β one part of the larger BEACON ecosystem. Other repositories handle the backend API and the mobile app frontend.
The BEACON cap with an ESP32-CAM module and battery pack
This is the AI brain of BEACON. It captures a live video stream from the ESP32-CAM mounted on the cap, runs real-time inference using trained YOLO models, and communicates with the backend API to deliver audio alerts through the companion mobile app.
Identifies common objects (people, vehicles, obstacles) using YOLOv11 and estimates their distance. When something is dangerously close, the system triggers an immediate alert so the user can react.
A custom-trained model (crosswalk.pt) recognizes crosswalks in the camera feed, helping the user know when it's safe to cross the road.
Multiple iterations of a trained currency model (currency_new.pt) identify Indian currency notes (e.g. βΉ100) and announce the denomination to the user β making everyday transactions more independent.
An optical-flow-based fall detector (fall_detector.py) monitors the camera feed for sudden violent motion followed by stillness β the signature pattern of a fall. If a fall is confirmed, an emergency alert is pushed to the backend and spoken aloud.
All detections are sent to the BEACON backend API (/message-queues/public), which routes them to the mobile app as spoken alerts. The system also uses local TTS as a fallback.
ββββββββββββββββ MJPEG stream ββββββββββββββββββββββββ
β ESP32-CAM β βββββββββββββββββββββββββΆ β This Repo (Python) β
β (on the cap)β β β
ββββββββββββββββ β β’ YOLO inference β
β β’ Distance est. β
β β’ Fall detection β
β β’ Currency ID β
β β’ Crosswalk ID β
ββββββββββββ¬ββββββββββββ
β
POST /message-queues
β
βΌ
ββββββββββββββββββββββββ
β BEACON Backend API β
β (separate repo) β
ββββββββββββ¬ββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β BEACON Mobile App β
β (speaks alerts) β
ββββββββββββββββββββββββ
| Model | File | Purpose |
|---|---|---|
| YOLOv11 Nano | yolo11n.pt |
General object detection |
| YOLOv11 Nano Pose | yolo11n-pose.pt |
Pose estimation for fall detection |
| Crosswalk Detector | crosswalk.pt |
Custom-trained crosswalk recognition |
| Currency Detector | currency_new.pt |
Indian currency note identification |
ONNX-exported versions (
yolo11n.onnx,crosswalk.onnx) are also available for edge deployment.
| Layer | Technology |
|---|---|
| Language | Python |
| Inference | Ultralytics (YOLOv11), PyTorch |
| Vision | OpenCV |
| Communication | Requests (REST API to BEACON backend) |
| TTS (local) | Windows Speech Synthesis (PowerShell) |
| Hardware | ESP32-CAM streaming over Wi-Fi (MJPEG) |
- Python 3.10+
- An ESP32-CAM on the same network, streaming MJPEG
- The BEACON Backend running locally or on a server
# Clone the repository
git clone https://github.com/your-org/BEACON-camera.git
cd BEACON-camera
# Create and activate a virtual environment
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # macOS / Linux
# Install dependencies
pip install -r requirements.txtUpdate the ESP32-CAM stream URL and backend API URL in the script you want to run:
STREAM_URL = "http://<ESP32_IP>:81/stream"
API_URL = "http://127.0.0.1:8080/message-queues/public"# Latest version with all features (object + crosswalk + currency + fall detection)
python v12.pyPress Q or Ctrl+C to stop.
BEACON-camera/
βββ v12.py # Latest: full detection pipeline + fall detection
βββ latest.py # Stable: object + currency detection
βββ fall_detector.py # Optical-flow fall detection module
βββ v1.py β v11.py # Earlier iterations and experiments
βββ requirements.txt # Python dependencies
βββ public/
β βββ cap.png # Product image of the BEACON cap
βββ yolo11n.pt # Pre-trained YOLOv11 model
βββ crosswalk.pt # Custom crosswalk detection model
βββ currency_new.pt # Custom currency recognition model
βββ yolo11n-pose.pt # Pose estimation model
βββ *.onnx # ONNX exports for edge deployment
βββ experiments/ # R&D and prototyping scripts
This repository is one component of the full BEACON product. The complete system consists of:
| Repository | Role |
|---|---|
| beacon-camera (this repo) | AI vision & camera processing (Python) |
| beacon-backend | REST API, message queues, user management |
| beacon-mobile | React Native mobile app (audio alerts, UI) |
Together, they form an end-to-end assistive system: the cap sees the world, the AI understands it, the backend routes the information, and the mobile app speaks it to the user.
MIT