Reads real embossed Braille from camera images and converts it to English text and speech. Uses fine-tuned YOLO object detection to identify individual Braille cells, then reconstructs readable text using a deterministic reading-order algorithm.

93.15% mAP@50 accuracy across 26 Braille letter classes (a–z), trained on 1,614 images / 90,469 bounding boxes merged from multiple datasets.

βœ… Quick Verify (for Judges) git clone https://github.com/prabh505/the-decoders-braillevision.git && cd the-decoders-braillevision pip install -r requirements.txt python inference.py --source sample_inputs/ --weights model/best.pt This detects Braille letters in all sample images, prints decoded text, and saves annotated images to sample_outputs/.

🎯 What It Handles Input Type Supported How Real embossed Braille from paper βœ… Trained on 212 printed book photos Handwritten Braille (slate & stylus) βœ… Trained on 28 handwritten student samples Braille writer output βœ… Machine-embossed detected same as printed Camera-captured images βœ… inference.py β€” any photo Live camera scanning βœ… app.py β€” real-time webcam with TTS πŸ—οΈ How It Works Camera Image β†’ YOLO Detection β†’ Bounding Boxes + Letters β†’ Reading Order β†’ Text β†’ Speech Capture β€” photograph Braille under oblique side-lighting (dots cast shadows) Detect β€” YOLOv8s identifies each Braille cell and classifies it as a letter (a–z) Decode β€” reading-order algorithm sorts detections into lines (leftβ†’right, topβ†’bottom), inserts spaces at gaps Speak β€” text-to-speech output (macOS say, gTTS for web) πŸ“Š Model Performance We trained and compared 3 models with different strategies:

Model Architecture mAP@50 Precision Recall Size Strategy A YOLOv8 + DotNeuralNet transfer 92.88% 97.14% 91.50% 50MB Braille-pretrained backbone B (Primary) YOLOv8s 93.15% 95.72% 90.85% 21MB Best overall accuracy C YOLOv11n 89.29% 89.70% 86.73% 5.2MB Smallest β€” for mobile/edge Model B is deployed as best.pt β€” best mAP@50 at a practical 21MB size.

See docs/model_journey.md for the full development story.

πŸ“¦ Dataset Engineering We merged multiple sources to create a diverse training set:

Source Images Boxes Type yapayzeka/braille-detection (Roboflow) 1,324 ~21K Mixed braille Angelina Braille Images (GitHub) 290 ~69K Real books + handwritten Total 1,614 90,469 Printed + handwritten + camera Key challenge: Angelina uses bitmask-encoded labels (integer β†’ dot pattern β†’ letter). We built a custom converter (converters/angelina_to_yolo.py) to decode these into standard YOLO format.

πŸ—‚οΈ Repository Structure the-decoders-braillevision/ β”œβ”€β”€ README.md ← this file β”œβ”€β”€ requirements.txt ← pip dependencies β”œβ”€β”€ inference.py ← offline image inference β”œβ”€β”€ app.py ← live webcam demo (OpenCV + TTS) β”œβ”€β”€ app_web.py ← web app (Gradio, works on phone) β”œβ”€β”€ evaluate.py ← validation metrics β”œβ”€β”€ merge_datasets.py ← multi-source dataset merger β”œβ”€β”€ converters/ β”‚ └── angelina_to_yolo.py ← Angelina bitmask β†’ YOLO converter β”œβ”€β”€ model/ β”‚ β”œβ”€β”€ best.pt ← primary weights (Model B, 21MB) β”‚ β”œβ”€β”€ best_A.pt ← Model A weights (50MB) β”‚ β”œβ”€β”€ best_C.pt ← Model C weights (5.2MB) β”‚ └── model_info.md ← architecture & metrics detail β”œβ”€β”€ training/ β”‚ β”œβ”€β”€ train_kaggle.py ← Kaggle notebook (Model A & B) β”‚ └── train_kaggle_v11.py ← Kaggle notebook (Model C) β”œβ”€β”€ sample_inputs/ ← test Braille images β”œβ”€β”€ sample_outputs/ ← inference results β”œβ”€β”€ docs/ β”‚ β”œβ”€β”€ model_journey.md ← full development story β”‚ β”œβ”€β”€ results_A.png ← Model A training curves β”‚ β”œβ”€β”€ results_B.png ← Model B training curves β”‚ └── results_C.png ← Model C training curves β”œβ”€β”€ dataset/ β”‚ └── dataset_info.md ← dataset details β”œβ”€β”€ flutter_app/ ← Android app (stretch goal) β”œβ”€β”€ ai_tools_disclosure.md └── LICENSE ← AGPL-3.0 πŸš€ Usage Offline inference (any image/folder) python inference.py --source sample_inputs/braille_book_page.jpg --weights model/best.pt python inference.py --source sample_inputs/ --weights model/best.pt # whole folder Live webcam demo python app.py --weights model/best.pt

Keys: q=quit s=speak space=pause

Web app (works on phone browser too) python app_web.py

Opens at http://localhost:7860 β€” point phone camera at Braille

πŸ”§ Tech Stack Detection: Ultralytics YOLOv8/v11, OpenCV Training: Kaggle T4 GPU, AdamW optimizer, mosaic augmentation Dataset: Roboflow API, custom Angelina bitmask converter, MD5 deduplication Application: Python, Gradio (web), OpenCV (desktop), gTTS/macOS TTS (speech) Transfer Learning: DotNeuralNet pretrained braille backbone (64-class β†’ 26-class) πŸ™ Acknowledgments Resource Author Usage Angelina Braille Dataset Ilya Ovodov 290 real-world Braille photos DotNeuralNet snoop2head Pretrained YOLOv8 braille backbone yapayzeka/braille-detection yapayzeka 1,324 labeled detection images Ultralytics YOLOv8 Ultralytics Detection framework πŸ“œ License AGPL-3.0 β€” See LICENSE.

Built With

Share this project:

Updates

Submission history