Skip to content

aishasalim/btc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Brain Tumor Classification App

Check out the live application 🔗LINK

A Streamlit application for classifying brain MRI scans to detect tumors using multiple deep learning models. The app generates saliency maps to highlight important regions and provides expert explanations using advanced language models.

Live Demo

Untitled.mov

Features

  • Image Classification: Classify MRI scans into Glioma, Meningioma, Pituitary, or No Tumor.
  • Multiple Models: Compare predictions and saliency maps from Xception, ResNet, and Custom CNN models.
  • Saliency Maps: Visualize model focus areas on MRI scans.
  • Explanations: Generate expert-level explanations using Gemini, Llama, or ChatGPT language models.
  • Probability Distribution: View probability distributions across different classes and models.

Technologies

  • Framework: Streamlit
  • Deep Learning: TensorFlow, Keras
  • Visualization: OpenCV, Plotly
  • Language Models: OpenAI, Google Generative AI, Llama

Installation

  1. Clone the Repository

    git clone https://github.com/aishasalim/btc.git
    cd btc
  2. Create a Virtual Environment

    python@3.11 -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install Dependencies

    pip install -r requirements.txt
  4. Set Up Environment Variables

    Create a .env file in the project root with the following keys:

    GROQ_API_KEY=your_groq_api_key
    OPEN_AI_KEY=your_openai_api_key
    GOOGLE_API_KEY=your_google_api_key
    

Usage

  1. Run the Streamlit App

    streamlit run app.py
  2. Interact with the App

    • Upload a brain MRI image (.jpg, .jpeg, .png).
    • Select one or more models to compare.
    • View classification results, saliency maps, and probability distributions.
    • Generate expert explanations using the selected language model.

Models

  • Transfer Learning - Xception

    • Input Size: 299x299
    • Weights: Pre-trained on ImageNet
  • ResNet

    • Input Size: 224x224
    • Custom architecture with ResNet50 base
  • Custom CNN

    • Input Size: 224x224
    • Custom convolutional neural network

Requirements

  • Python 3.10+
  • Streamlit
  • TensorFlow
  • Keras
  • OpenCV
  • Plotly
  • Google Generative AI SDK
  • OpenAI SDK
  • Other dependencies listed in requirements.txt

About

I trained 3 models (Xception, CNN and ResNet) based on dataset from Kaggle to identify brain tumor on MRI scans

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages