How rohan-r07/handwritten-digit-analyzer works
This is a handwritten-digit recognition product with a Streamlit exploration interface and a React client for a FastAPI service. The principal workflow is image selection/upload, preprocessing and normalization, then hybrid template-and-feature classification; results include confidence/candidates and processing-stage visualizations. The graph also preserves the documented rule-based and template subsystems. Several implementation files, especially the API and React service, were not excerpted, so links based only on the README are identified as documented or left unverified.
Main entry points: App.tsx React workspace · digit_recognizer.py Hybrid recognition · app.py Streamlit interface · api.py FastAPI service
Components 16
User interfaces
- React workspace
frontend/src/App.tsx - Upload and result views
frontend/src/components - Image preview
frontend/src/components/ImagePreview.tsx - Processing gallery
frontend/src/components/ProcessingGallery.tsx - Recognition state
frontend/src/hooks/useDigitRecognition.ts - Recognition API client
frontend/src/services/recognitionApi.ts - Streamlit interface
app.py
Image processing
- Preprocess and normalize
src/preprocessing.py - Geometric features
src/feature_extraction.py
Recognition engine
- Hybrid recognition
src/digit_recognizer.py - Rule classifier
src/rule_classifier.py - Template matching
src/template_matcher.py
Templates and API
- FastAPI service
src/api.py - Template loading
src/template_manager.py - Reference digits
templates
Other components
- Image submitter
Connections 18
- Image submitter → React workspace: uploads image
README.md - React workspace → Upload and result views: renders
frontend/src/App.tsx - React workspace → Image preview: renders
frontend/src/App.tsx - React workspace → Processing gallery: renders
frontend/src/App.tsx - React workspace → Recognition state: requests recognition
frontend/src/App.tsx - Recognition state → Recognition API client: calls
frontend/src/hooks/useDigitRecognition.ts - Recognition API client → FastAPI service: sends upload
README.md - Image submitter → Streamlit interface: uploads image
README.md - Streamlit interface → Preprocess and normalize: preprocesses image
app.py - Streamlit interface → Geometric features: extracts features
app.py - Streamlit interface → Hybrid recognition: requests prediction
app.py - FastAPI service → Preprocess and normalize: processes upload
- FastAPI service → Hybrid recognition: requests prediction
- Hybrid recognition → Template matching: matches templates
src/digit_recognizer.py - Hybrid recognition → Geometric features: extracts features
src/digit_recognizer.py - Hybrid recognition → Rule classifier: scores features
src/digit_recognizer.py - Template matching → Reference digits: compares against
README.md - Template loading → Reference digits: loads templates