How haddarmelek/deepscanocr works
This is a small Flask OCR microservice. A client posts JSON containing a Base64 image to /ocr; the handler decodes it, sends the resulting image to Tesseract, and returns extracted text as JSON. The service also exposes a readiness response at /. The graph reflects the sampled runtime code; Tesseract is shown as an external dependency.
Main entry points: ocr_service.py OCR endpoint · utils.py Image decoder · __init__.py App factory
Components 7
Other components
- API client
- Flask service
app/ocr_service.py - App factory
app/__init__.py - OCR endpoint
app/ocr_service.py - Readiness endpoint
app/ocr_service.py - Image decoder
app/utils.py - Tesseract OCR
Connections 8
- Flask service → App factory: creates app
- API client → OCR endpoint: POSTs image
- OCR endpoint → Image decoder: decodes image
- Image decoder → OCR endpoint: returns image
- OCR endpoint → Tesseract OCR: extracts text
- OCR endpoint → API client: returns JSON
- API client → Readiness endpoint: requests status
- Readiness endpoint → API client: returns ready