Skip to content

UtkarshMidha/TumorNet-Brain_Tumor_Detection_with_CNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Brain Tumor Detection using CNN 🧬

πŸš€ Overview

Hey there! Welcome to my project on Brain Tumor Detection using Convolutional Neural Networks (CNNs). In this notebook, I worked on classifying brain MRI images into four distinct categories:

  • Glioma Tumor
  • Meningioma Tumor
  • Pituitary Tumor
  • No Tumor

πŸ‘‰ You can explore my full implementation here: Brain Tumor Detection using CNN - Kaggle Notebook


πŸ“‚ Dataset


πŸ—‚οΈ Project Structure

β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ Training/
β”‚   β”‚   β”œβ”€β”€ glioma/
β”‚   β”‚   β”œβ”€β”€ meningioma/
β”‚   β”‚   β”œβ”€β”€ pituitary/
β”‚   β”‚   └── notumor/
β”‚   └── Testing/
β”‚       β”œβ”€β”€ glioma/
β”‚       β”œβ”€β”€ meningioma/
β”‚       β”œβ”€β”€ pituitary/
β”‚       └── notumor/
β”œβ”€β”€ brain_tumor_detection_cnn.ipynb
β”œβ”€β”€ Model1.h5
└── README.md

πŸ› οΈ Technologies Used

  • Python
  • TensorFlow / Keras
  • Pandas, NumPy
  • Matplotlib, Seaborn
  • PIL (Python Imaging Library)

🧱 Model Architecture

  • Conv2D (64 filters) + MaxPooling2D
  • Conv2D (512 filters) + MaxPooling2D
  • Conv2D (256 filters) + MaxPooling2D
  • Conv2D (128 filters) + MaxPooling2D
  • Flatten
  • Dense (256 units) + Dropout (0.3)
  • Dense (128 units) + Dropout (0.5)
  • Dense (4 units, softmax activation)

Optimizer: Adamax (learning rate = 0.001)
Loss Function: Categorical Crossentropy
Callbacks: EarlyStopping (patience=7)


πŸ“Š Results

  • Training Accuracy: 98.8%
  • Validation Accuracy: 94.5%
  • Test Accuracy: 96%
  • Weighted F1-Score: 0.96

πŸ§ͺ How to Use

  1. Clone the repository or open the Kaggle notebook.
  2. Load the dataset into the correct directory structure.
  3. Run the notebook to train the model.
  4. Evaluate using test data or predict on your own images.
  5. Trained model is saved as Model1.h5.

πŸ“œ License

This project is open for educational and research purposes only.


πŸ™‹β€β™‚οΈ Author

Utkarsh Midha
πŸ”— LinkedIn: Utkarsh Midha
πŸ“Š Kaggle: @midhautkarsh


πŸ™Œ Acknowledgements

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published