How dinesh31r/old-kannada-glyph-recognition works
ShilaaLipi is a local-first OCR and translation application for old Kannada inscriptions. A user uploads an inscription through the React workspace; the API coordinates preprocessing, glyph segmentation and recognition, then returns old Kannada text with modern Kannada and English translations. The UI also supports manual box editing, glyph review, class exploration and performance reports. The README documents the recognition stages and optional retrieval-augmented correction; sampled pipeline code queries RAG but does not apply its results to the returned text, so that link is shown as retrieval only.
Main entry points: App.jsx Workspace App · pipeline.py Epigraphy Pipeline · api_server.py FastAPI Routes · runtime_service.py Runtime Services
Components 21
User Workspace
- Workspace App
frontend/src/App.jsx - Canvas Editor
frontend/src/components/InteractiveCanvasEditor.jsx - Glyph Review
frontend/src/components/SingleGlyphReview.jsx - Text Renderer
frontend/src/components/TextEditorRenderer.jsx - Report Dashboard
frontend/src/components/SystemReportDashboard.jsx - Workspace Bootstrap
frontend/src/hooks/useBootstrap.js - API Client
frontend/src/api.js
API Services
- FastAPI Routes
backend/api_server.py - Inference Service
backend/src/inference_service.py - Runtime Services
backend/src/runtime_service.py
Recognition Pipeline
- Epigraphy Pipeline
backend/src/pipeline.py - Image Preprocessing
backend/src/preprocessing.py - Glyph Segmentation
backend/src/segment.py - Consensus Recognition
backend/src/infer.py - Shape Matching
backend/src/inference.py
Translation and Insights
- Translation
backend/src/translation.py - Inscription Retrieval
backend/src/rag_engine.py - Inscription Corpus
data/rag_corpus.jsonl - Metrics Reporting
backend/src/report_service.py - Class Index
data/kannada.csv
Other components
- Inscription User
Connections 22
- Inscription User → Workspace App: uses
- Workspace App → Canvas Editor: edits regions
- Workspace App → Glyph Review: reviews glyphs
- Workspace App → Text Renderer: edits text
- Workspace App → Report Dashboard: views reports
- Workspace App → Workspace Bootstrap: loads workspace
- Workspace App → API Client: requests data
- API Client → FastAPI Routes: REST requests
- FastAPI Routes → Inference Service: dispatches inference
- FastAPI Routes → Runtime Services: loads runtime
- Inference Service → Epigraphy Pipeline: runs pipeline
- Epigraphy Pipeline → Image Preprocessing: preprocesses image
- Epigraphy Pipeline → Glyph Segmentation: detects glyphs
- Epigraphy Pipeline → Consensus Recognition: classifies glyphs
- Consensus Recognition → Shape Matching: reranks candidates
- Epigraphy Pipeline → Inscription Retrieval: queries matches
- Inscription Retrieval → Inscription Corpus: indexes corpus
- Epigraphy Pipeline → Translation: translates text
- FastAPI Routes → Metrics Reporting: serves metrics
- FastAPI Routes → Runtime Services: serves class data
- Runtime Services → Class Index: loads index
- Metrics Reporting → Report Dashboard: provides metrics