MalariaDetect AI
Inspiration
Malaria remains one of the world's deadliest infectious diseases, especially in low-resource regions where access to trained microscopists is limited. Although microscopic blood smear examination is the gold standard for diagnosis, it is time-consuming and relies heavily on expert interpretation. I wanted to build an AI-powered solution that could assist healthcare professionals by providing fast, accurate, and explainable malaria detection from microscopic blood smear images.
What it does
MalariaDetect AI is an explainable deep learning web application that detects malaria parasites from microscopic blood smear cell images.
Users simply upload a blood smear image, and the application:
- Classifies the cell as Parasitized or Uninfected
- Displays prediction confidence
- Indicates the associated risk level
- Generates a Grad-CAM heatmap highlighting the image regions responsible for the prediction
- Creates a downloadable PDF report summarizing the prediction
The application provides a responsive and user-friendly interface suitable for educational, research, and AI-assisted diagnostic purposes.
How I built it
I developed the project using Python, PyTorch, Flask, HTML, CSS, and JavaScript.
The complete development workflow included:
- Training an EfficientNet-B3 deep learning model using transfer learning
- Applying extensive data augmentation to improve model generalization
- Implementing a two-stage training strategy with frozen backbone training followed by full fine-tuning
- Using AdamW optimizer, ReduceLROnPlateau scheduler, early stopping, checkpoint saving, and resume training
- Integrating Grad-CAM for explainable AI visualization
- Building a responsive Flask web application with REST APIs
- Implementing PDF report generation for prediction results
- Designing a modular project architecture separating training, inference, explainability, reporting, and deployment
Challenges I ran into
Building the project involved several technical challenges:
- Preventing overfitting while maintaining strong model performance
- Fine-tuning EfficientNet-B3 for microscopic medical images
- Integrating Grad-CAM into the prediction pipeline
- Designing an intuitive and responsive web interface
- Structuring the project into a scalable and maintainable software architecture
- Handling model checkpoints, logging, validation, and error management effectively
Accomplishments that I'm proud of
I'm proud that this project is much more than a machine learning model—it is a complete end-to-end AI healthcare application.
Some of the key accomplishments include:
- Built an explainable AI system using Grad-CAM
- Developed a production-ready Flask web application
- Implemented REST APIs for prediction
- Added automated PDF report generation
- Built a complete training and evaluation pipeline
- Created a modular and maintainable codebase
- Designed a responsive interface with light and dark theme support
What I learned
This project helped me strengthen my understanding of:
- Medical image classification
- Deep learning model optimization
- Explainable Artificial Intelligence (XAI)
- Flask backend development
- Frontend integration using HTML, CSS, and JavaScript
- REST API development
- Software engineering best practices
- Building and deploying complete AI applications from training to inference
What's next for MalariaDetect AI
I plan to continue improving the project by adding:
- Support for whole-slide microscopy images
- Multi-class malaria species classification
- Mobile-friendly deployment for healthcare workers
- Cloud deployment for scalable inference
- Integration with digital pathology workflows
- Additional explainability techniques such as SHAP and Integrated Gradients
- Validation on larger and more diverse clinical datasets
MalariaDetect AI demonstrates how explainable artificial intelligence can support healthcare professionals by providing faster, transparent, and more accessible malaria screening while complementing clinical expertise rather than replacing it.
Log in or sign up for Devpost to join the conversation.