How kajamaqbool/dyslexia-ml-service-master works
This repository provides a FastAPI dyslexia-risk analysis service. A backend sends reading-session data to /analyze; the service accepts feature values or eye-tracking frames, derives metrics where needed, and returns a risk score, classification, confidence, and score breakdown. The README describes the result as a 70/30 blend of rule-based and Random Forest scoring. The sampled main.py shows frame processing and model loading, but omits the endpoint’s scoring body; the relationship to the standalone rules module is therefore documented at the service level, not verified as a direct call. The tree contains duplicate root and dyslexia-ml-service-master/ copies; this map uses the root files.
Main entry points: main.py FastAPI endpoints · generator.py Synthetic training data · schema.py Risk result · rules.py Rule-based scoring
Components 9
API and workflow
- FastAPI endpoints
main.py - Frame metrics
main.py - Request and response schemas
schema.py - Risk result
schema.py
Risk analysis
- Rule-based scoring
rules.py - Random Forest scoring
main.py - Synthetic training data
generator.py
Model data
- Serialized model
dyslexia_model.pkl
Other components
- Backend service
Connections 7
- Backend service → FastAPI endpoints: calls analyze
README.md - FastAPI endpoints → Frame metrics: derives metrics
main.py - FastAPI endpoints → Rule-based scoring: uses rule score
README.md - FastAPI endpoints → Random Forest scoring: uses ML score
README.md - Random Forest scoring → Serialized model: loads model
main.py - FastAPI endpoints → Risk result: returns analysis
README.md - Synthetic training data → Random Forest scoring: generates training data