Inspiration -
The complexity of diagnosing brain tumors through MRI scans and the potential to assist radiologists using AI inspired this project. With increasing brain tumor cases globally, we saw an opportunity to build a deep learning system that can classify tumor types quickly and accurately, potentially supporting early diagnosis and better treatment planning.
What it does -
The system classifies MRI brain scans into one of four categories - Glioma, Meningioma, Pituitary Tumor or No Tumor. It uses both a Custom Convolutional Neural Network (CNN) and MobileNetV2 Transfer Learning for classification. An interactive Streamlit web app allows users to upload MRI images and receive real-time tumor predictions with probability scores.
How I built it -
1) Dataset :- 2,443 MRI images labeled and categorized by medical experts. 2) Preprocessing :- Used ImageDataGenerator for rescaling, rotation, zoom and flipping to augment limited data. 3) Model 1 (Custom CNN) :- Built from scratch with 3 convolutional layers, dropout and softmax classification. 4) Model 2 (MobileNetV2) :- Fine-tuned transfer learning model using pretrained ImageNet weights. 5) Training :- Used callbacks like EarlyStopping and ModelCheckpoint to optimize training and avoid overfitting. 6) Evaluation :- Tracked model performance using confusion matrix, accuracy/loss plots, and classification reports. 7) Deployment :- Developed a Streamlit web app for real-time image classification and visualization.
Challenges I ran into -
1) Preventing Overfitting on a relatively small medical dataset. 2) Class Imbalance, requiring strategic augmentation. 3) Maintaining Inference Speed for a smooth web experience. 4) Memory and file handling limitations in deploying large models via Streamlit.
Accomplishments that I'm proud of -
1) Built two deep learning models from scratch and through transfer learning. 2) Developed a clean and interactive real-time web app for medical use cases. 3) Achieved strong classification metrics despite limited and imbalanced data. 4) Successfully deployed a working prototype that can assist clinical workflows.
What I learned -
1) How to apply transfer learning to medical imaging problems. 2) Building custom CNN architectures from the ground up. 3) Model evaluation and early stopping techniques. 4) End-to-end deployment using Streamlit. 5) Importance of model interpretability and user experience in healthcare AI.
What's next for Brain Tumor MRI Image Classification -
1) Add Grad-CAM visualizations to explain model decisions. 2) Package the solution using Docker for easier deployment. 3) Deploy on cloud platforms like AWS or GCP for real-time hospital usage. 4) Extend to multi-modal imaging (e.g., CT, PET). 5) Experiment with ensemble models to improve accuracy and robustness.
Log in or sign up for Devpost to join the conversation.