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.
Log in or sign up for Devpost to join the conversation.