Skip to content

h9zdev/NeuroTumorNet

Repository files navigation

NeuroTumorNet

A deep learning model for brain tumor classification using MRI images. NeuroTumorNet Logo

TensorFlow - NeuroTumorNet CC BY-NC 4.0 License Model Download Live Demo Datasets GitHub Issues GitHub Stars Profile Views Website Model Download - Kaggle Paper

Description

🧠 Classify brain tumors with NeuroTumorNet! 🩻 Powered by a CNN built with TensorFlow πŸ€–, this tool analyzes MRI scans to detect Glioma, Meningioma, Pituitary, or No Tumor. πŸš€ Upload an image via the Streamlit UI 🌐 and get instant predictions with confidence scores! ✨ Download the model or explore the live demo and datasets below. πŸ–₯️

Overview

NeuroTumorNet is a CNN-based tool that classifies brain MRI images into four categories:

  • Glioma tumor
  • Meningioma tumor
  • No tumor
  • Pituitary tumor

The model uses a convolutional neural network architecture built with TensorFlow and Keras to provide accurate tumor classification.

πŸ” Features

  • Automatic detection and classification of brain tumors
  • Support for multiple tumor types (glioma, meningioma, pituitary)
  • User-friendly web interface for image upload and analysis
  • High accuracy brain tumor classification using convolutional neural networks

πŸ“‹ Table of Contents

πŸ”§ Installation

Prerequisites

  • Python 3.7+
  • pip (Python package installer)

Steps

  1. Clone the repository:
git clone https://github.com/haybnzz/NeuroTumorNet/
cd NeuroTumorNet
  1. Install required dependencies:
pip install -r requirements.txt
  1. Download the pre-trained model:
    • Option 1: Download directly from Hugging Face:
      wget "https://huggingface.co/haydenbanz/NeuroTumorNet/resolve/main/brain_tumor_model.h5?download=true" -O brain_tumor_model.h5
    • Option 2: Use the provided script to download and prepare the model:
      python data_to_model.py
  • Option 3: Download directly from Kaggle:

Dataset (Optional)

  Donload from above Badge section 
  ```
If you want to train the model yourself or test it with the original dataset, you can download the brain tumor MRI dataset from the provided data link in the repository.

## Usage

### Running the Web Application

1. After installation, start the web application:
```bash
python app.py
  1. Open your browser and navigate to:
http://localhost:5000
  1. Upload an MRI image through the web interface to get the tumor classification result.
NeuroTumorNet/
β”œβ”€β”€ app.py               # Web application for tumor classification
β”œβ”€β”€ data_to_model.py     # Script to download and prepare the model
β”œβ”€β”€ requirements.txt     # Dependencies list
β”œβ”€β”€ brain_tumor_model.h5 # Pre-trained model file
β”œ
└── README.md            # This file

🧠 Model

NeuroTumorNet uses a deep convolutional neural network architecture designed specifically for medical image classification. The model architecture consists of:

  • Multiple convolutional layers with ReLU activation
  • Max pooling layers for feature extraction
  • Dropout layers to prevent overfitting
  • Dense layers for classification

The pre-trained model achieves high accuracy in classifying the four categories of brain MRI images.

πŸ“Š Dataset

The model was trained on a dataset containing brain MRI images categorized into four classes:

  • Glioma tumor
  • Meningioma tumor
  • Pituitary tumor
  • No tumor (normal brain MRI)

To download the dataset for training or testing purposes, visit one of these sources:

After downloading, place the dataset in a folder named dataset with the following structure:

dataset/
β”œβ”€β”€ Training/
β”‚   β”œβ”€β”€ glioma_tumor/
β”‚   β”œβ”€β”€ meningioma_tumor/
β”‚   β”œβ”€β”€ no_tumor/
β”‚   └── pituitary_tumor/
└── Testing/
    β”œβ”€β”€ glioma_tumor/
    β”œβ”€β”€ meningioma_tumor/
    β”œβ”€β”€ no_tumor/
    └── pituitary_tumor/

Image Display

Here are the images from the repository:

  1. Preview Image 1
  2. Preview Image
  3. Accuracy Image

πŸ“œ License

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) License. See the LICENSE file for more details.

Unauthorized use is strictly prohibited.

πŸ“§ Contact: singularat@protn.me

β˜• Support

Donate via Monero: 45PU6txuLxtFFcVP95qT2xXdg7eZzPsqFfbtZp5HTjLbPquDAugBKNSh1bJ76qmAWNGMBCKk4R1UCYqXxYwYfP2wTggZNhq

πŸ‘₯ Contributors and Developers

haybnzz

Glitchesminds

πŸ“ Citation

If you use NeuroTumorNet in your research, please cite:

@software{NeuroTumorNet2025,
  author = {Haybnzz and Glitchesminds},
  title = {NeuroTumorNet: Deep Learning for Brain Tumor Classification},
  url = {https://github.com/haybnzz/NeuroTumorNet},
  year = {2025},
}
@misc {hay.bnz_2025,
	author       = { {Hay.Bnz} },
	title        = { NeuroTumorNet (Revision 7f9585f) },
	year         = 2025,
	url          = { https://huggingface.co/haydenbanz/NeuroTumorNet },
	doi          = { 10.57967/hf/4899 },
	publisher    = { Hugging Face }
}

Acknowledgments

  • Thanks to all contributors to the brain tumor MRI datasets used in training this model
  • Built with TensorFlow and Keras

About

A deep learning model for brain tumor classification using MRI images.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •