Inspiration

Cancer detection through medical imaging plays an important role in diagnosis and treatment planning. This project applies deep learning to allows users to test medical images for classification.

What It Does

This system classifies medical images into 8 cancer types and 26 subclasses. Users can upload images for classification or download test images for evaluation.

The cancers detected include:

  • Brain Cancer
  • Acute Lymphoblastic Leukemia
  • Breast Cancer
  • Cervical Cancer
  • Kidney Cancer
  • Lung and Colon Cancer
  • Lymphoma
  • Oral Cancer

How We Built It

The project was developed using deep learning models based on EfficientNetB0 and deployed as an interactive web application. Key steps include:

  1. Dataset Preparation

  2. Model Training

    • Used EfficientNetB0 as the backbone for classification.
    • Implemented GlobalAveragePooling and Dropout layers to enhance performance.
    • Trained 8 models, each tailored to a different cancer type.
    • Fine-tuned models using early stopping to avoid overfitting.
  3. Deployment & User Interface

    • Initially tested and hosted on Google Colab, exposing it to the internet using Pyngrok.
    • Migrated the project to Hugging Face Spaces for public access.
    • Developed an interactive web interface using Streamlit, allowing users to:
      • Upload images for classification.
      • View real-time predictions with confidence scores.
      • Download test images for evaluation.

Challenges We Ran Into

  • Transition from Google Colab to Hugging Face: Initially, the project was accessible via Pyngrok, but migrating to Hugging Face Spaces required code adjustments. Hugging Face had version incompatibilities between TensorFlow and Protobuf, leading to deployment issues that took time to resolve.

Accomplishments That We're Proud Of

  • Trained on 104,000 images, achieving a minimum validation accuracy of 96% across all models.
  • Successfully deployed all 8 models with real-time classification.
  • Developed an interactive platform where users can upload medical images and test the model.
  • Enabled test image downloads for each cancer type to allow users to verify classification results.

What We Learned

  • Developing deep learning applications for medical image classification.
  • Deploying models on Hugging Face Spaces, making this my first project hosted on the platform.
  • Building an interactive web interface using Streamlit.

Built With

Share this project:

Updates