How tejaskinge29/anemia-detection works
This Flask application accepts patient details and a blood-smear image, validates and preprocesses the image, combines model classification with CBC-based rules, and generates a downloadable PDF report. The main backend and report generator were sampled; the frontend JavaScript appears to expect JSON, while the sampled Flask route renders HTML, so that integration is shown only as a request. Reported capabilities such as image augmentation and transfer learning are not separately represented because their runtime implementation is not present in the sampled source.
Main entry points: app.py Flask routes · index.html Upload and results UI · script.js Form interactions · pdf.py PDF report generation
Components 10
Web experience
- Upload and results UI
templates/index.html - Form interactions
static/css/js/script.js
Diagnosis
- Flask routes
app.py - Image validation and preprocessing
app.py - Model and CBC classification
app.py - Trained model
M_Anemia.h5
Reports and files
- Uploaded images
uploads - PDF report generation
pdf.py - Generated reports
reports
Other components
- Medical user
Connections 10
- Medical user → Upload and results UI: uses
- Upload and results UI → Form interactions: loads
- Form interactions → Flask routes: posts form
- Flask routes → Uploaded images: saves image
- Flask routes → Image validation and preprocessing: validates and preprocesses
- Flask routes → Model and CBC classification: requests diagnosis
- Model and CBC classification → Trained model: predicts with
- Flask routes → PDF report generation: requests report
- PDF report generation → Generated reports: writes PDF
- Flask routes → Generated reports: serves download