This project implements a Convolutional Neural Network in PyTorch to classify brain tumor types from MRI scans.
The goal of this project is to build and train a CNN capable of classifying MRI brain images into four tumor categories. The model uses PyTorchโs deep learning framework, trained on a Kaggle brain tumor MRI dataset, and achieves strong accuracy on unseen test data.
- End-to-end PyTorch workflow
- Image preprocessing using
torchvision.transforms - Custom CNN architecture with Convolution, ReLU, MaxPooling, Flatten, and Linear layers
- Training loop with forward/backward pass + parameter optimization
- Model evaluation with accuracy calculation
- Visualization of predictions on random images
- Achieves ~96% test accuracy
- Python
- PyTorch
- Torchvision
- Matplotlib
- Jupyter Lab / Notebook
You will need:
- Python 3.x
- PyTorch + Torchvision
- Matplotlib
- Jupyter Lab / Notebook
Install everything with:
pip install torch torchvision matplotlib jupyterlabThis project is based on the concepts taught in the YouTube tutorial. All dataset credit belongs to the original Kaggle contributors.