Skip to content

Repository files navigation



Anemia Detection & Prevention using Machine Learning and Web Application



According to estimates by the World Health Organization, around 25% of the global population suffers from anemia—that is, roughly one in four people. The prevalence, however, is not uniform across all groups and regions. For instance:

  • Pregnant Women: The prevalence can be higher, often ranging between 29% to 38% depending on the region.

  • Children (especially preschool-aged): Some regions report rates as high as 42%.

These variations depend on factors like nutritional status, healthcare access, and socioeconomic conditions. so I created an unique model using Random Forest Classifier providing us an accuracy of 98.50%

RandomForest Classifier is often preferred for health monitoring for several key reasons:

  1. Robustness Through Ensemble Learning
  2. Handling Complex and High-Dimensional Data
  3. Feature Importance Insights
  4. Robustness Against Missing Data
  5. Ease of Use and Versatility

Random Forest Classifier generally requires less parameter tuning & is user-friendly, making it a practical choice for various health monitoring applications—from disease prediction to patient risk assessment. While no single model is universally the best, RandomForest’s balance of accuracy, interpretability, and robustness makes it a strong candidate for many health monitoring tasks.



Model Accuracy & Graphs



Screenshot (195) Confusion_Matrix_RF (1) Screenshot (225)



Model Deployment



Further I created a Web Application by using Streamlit which provides me with URL, Streamlit makes work easier than ever.

Screenshot (243) Screenshot (882)



Web App Preview



To improve authenticity, I refered Hb levels from WHO site:

WHO Hemoglobin (Hb) ranges for Normal, Mild, Moderate, and Severe Anemia :

Normal Hb Ranges (Clinical Laboratory Reference Ranges)- Men: 13.0 – 17.0 g/dL, Women (Non-Pregnant): 12.0 – 15.0 g/dL, Children (6 months – 5 years): 11.0 – 14.0 g/dL, Children (5–12 years): 11.5 – 15.0 g/dL, Adolescents (12–15 years): 12.0 – 16.0 g/dL, Pregnant Women: 11.0 – 14.0 g/dL.

Anemia Classification (WHO Criteria)

For Men - Mild Anemia: 11.0 – 12.9 g/dL, Moderate Anemia: 8.0 – 10.9 g/dL, Severe Anemia: < 8.0 g/dL.

For Women (Non-Pregnant) - Mild Anemia: 11.0 – 11.9 g/dL, Moderate Anemia: 8.0 – 10.9 g/dL, Severe Anemia: < 8.0 g/dL.

For Pregnant Women - Mild Anemia: 10.0 – 10.9 g/dL, Moderate Anemia: 7.0 – 9.9 g/dL, Severe Anemia: < 7.0 g/dL.

For Children (6 months – 5 years) - Mild Anemia: 10.0 – 10.9 g/dL, Moderate Anemia: 7.0 – 9.9 g/dL, Severe Anemia: < 7.0 g/dL.

For Children (5–12 years) - Mild Anemia: 11.0 – 11.4 g/dL, Moderate Anemia: 8.0 – 10.9 g/dL, Severe Anemia: < 8.0 g/dL.

Demo Video - https://drive.google.com/file/d/1z6Tyw-5J7xIU6VFkMB6orfZhassVo4-L/view?usp=sharing



User Authentication & Home Page



Screenshot (325) Screenshot (329)



Diagnosis Page - Patient 01 & Patient 02



Screenshot (332) Screenshot (333) Screenshot (339) Screenshot (340)



Patient Record



Screenshot (341)



Pie Distribution



Screenshot (342)

WebApp URL - https://detectanemia.streamlit.app/

Login Credentials as an Admin -

Username - megha, Password - megha2110

Author & Creator - Rutuja/Megha Saharkar

This project is licensed under the MIT License.

Releases

Packages

Used by

Contributors

Languages