Inspiration

The project was inspired by the critical need for early pneumonia detection in resource-limited areas. With:

  • 5 million annual pneumonia deaths worldwide (WHO)
  • Lack of radiologists in developing countries
  • 60% misdiagnosis rate in some regions

I wanted to explore how deep learning could assist medical professionals in making faster, more accurate diagnoses using accessible web technologies.

What it does

The projects primary role is to be able to carry out analysis on an uploaded or a real-time x-ray images and be able to predict pneumonia or normal and displaying the confidence of the model.

How we built it

The project followed these key stages: 1.Model Development

  • Trained CNN using Keras on NIH ChestX-ray14 dataset
  • Architecture: Sequential model with Conv2D/MaxPooling layers
  • Binary classification (Pneumonia/Normal) 2.Conversion & Deployment -tensorflowjs_converter --input_format=keras pneumonia_model.h5 model/

Challenges we ran into

1)Model Conversion Issues 2)Version conflicts between TF/Keras/TF.js -Solution: Standardized on TF 2.12 + TF.js 4.22 3)Browser Performance 4)Memory leaks from undisposed tensors -Fix: Manual tensor disposal 5)Image Preprocessing 6)Webcam vs uploaded image normalization 7)Implemented unified preprocessing pipeline 8)Medical Accuracy 9)Class imbalance in original dataset 10)Added confidence thresholds 11)Future improvement: Clinical validation

Accomplishments that we're proud of

We are proud that the project is able to perform its core task of predicting pneumonia or normal from x-ray images. And we are actually excited about such an accomplishment.

What we learned

-Machine Learning and Deployment -TensorFlow.js Integration: Learned to deploy ML models directly in browsers without backend servers -Model Conversion: Mastered converting Keras (.h5) models to TensorFlow.js format with: tensorflowjs_converter --input_format=keras model.h5 model/

What's next for Pneumonia Detector

While this is a prototype, it demonstrates: -Accessibility: Runs on any modern browser

           -Speed: Predictions in <500ms

           -Privacy: No data leaves the device

Next Steps:

          -Add Grad-CAM heatmaps for explainability

         -Implement DICOM support

         -Multi-class classification (bacterial vs viral)

         -HIPAA-compliant cloud backup

This project solidified my understanding of deploying medical AI solutions while highlighting the ethical responsibilities in healthcare technology development.

Built With

Share this project:

Updates