Brain Tumour Classification
Recently, finished a small machine learning project to classify different types of brain cancer from MRI images.
Project Overview:
- Goal: Classify different types of brain tumours from MRI scans.
- Model: A four layer CNN with max pooling, Normalisation, ReLU activation functions, Dropout, and trained over 5 epochs.
- Tools: Python, PyTorch
Data and Features:
The dataset is loaded using torchvision.datasets.ImageFolder and torch.utils.data.DataLoader. The following transofrmation are applied
- Resize: Images are resized to 224x224 pixels.
- Random Horizontal Flip: Applied to training data for augmentation
- ToTensor: Converts image to PyTorch tensors.
- Normalisation: Uses mean [0.485, 0.456, 0.406] and standard deviation [0.229, 0.224, 0.225]
Training and Results:
- Training Setup: I trained the model with the Adam optimiser (learning rate: 0.001) and CrossEntropyLoss as the loss function.
- Weight Decay: 1e-4 (0.0001)
- Train Loss: 0.407
- Train Accuracy: 85.45%
- Test Loss: 0.7143
- Test Accuracy: 75.97%
Available here and image below.