Skip to content

lukmanaj/CTMRI-Net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brain Tumor Multimodal Classifier App

This repository contains a Streamlit application and supporting code for a multimodal deep learning model that classifies brain tumor presence based on CT and/or MRI scans.

🧠 Overview

  • Multimodal classifier that supports CT, MRI, or both inputs.
  • Dual DenseNet201 architecture (feature-level fusion).
  • Trained using the PyTorch deep learning framework.

🚀 Live Demo

You can run the app locally using:

streamlit run app.py

or you can try out the app on streamlit cloud here

📁 Project Structure

brain-tumor-multimodal-app/
├── app.py                 # Streamlit interface for predictions
├── model.py               # Model architecture 
├── utils.py               # Helper functions 
├── requirements.txt       # Dependencies
├── README.md              # This documentation
├── inference_examples/    # Example CT and MRI inputs (optional)
└── notebooks/
    └── training-notebook.ipynb   # Kaggle-style notebook with training pipeline

🧾 Dataset

The model was trained using the public Kaggle dataset: 📂 Brain Tumor Multimodal Image CT and MRI Dataset

  • Format: ImageFolder (Healthy/, Tumour/)
  • CT and MRI stored in separate parent folders
  • Samples randomly paired by label category

🧠 Model Architecture

  • Two DenseNet201 encoders for CT and MRI images
  • Global average pooling and feature fusion
  • Fully connected classifier for binary prediction
  • Softmax output for confidence scoring

📦 Model Weights

The pretrained model is hosted on Hugging Face: 📍 Hugging Face Repo

from huggingface_hub import hf_hub_download
model_path = hf_hub_download(
    repo_id="lukmanaj/brain-tumor-multimodal",
    filename="multimodal_brain_tumor_model.pth"
)

📊 Training Performance

Epoch Train Loss Accuracy
1 0.1552 94.82%
5 0.0368 98.78%

⚠️ The model shows signs of overfitting — further validation or regularization is recommended.

🧑‍⚕️ Intended Use

  • For educational and research purposes only.
  • Not suitable for clinical diagnosis or real-world deployment without further validation.

📚 Citation

Aliyu, L. (2025). Brain Tumor Classification using Multimodal Deep Learning.

Feel free to contribute or open an issue for improvements or questions

About

For my brain Tumour Classifier

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published