-
-
single patient processing pipeline
-
About NeuroScan AI
-
ML model information
-
Patient Brain MRI uploaded
-
Scan ready for analysis
-
Analysis complete with gradcam, mask and tumor overlay shown
-
Analysis results and information
-
Patient's PDF report based on model analysis
-
Batch processing pipeline
-
Ready for batch processing
-
Batch processing initiated
-
Batch processing complete, each patient's analysis result is ready and a zip file containing the pdfs for all three patient for download
-
PDF output of batch processing
-
3D volumetric analysis initiated
About NeuroScan
Inspiration
Brain tumours are serious medical conditions, and analysing brain MRI scans requires careful attention to detail and medical expertise. We were interested in exploring how artificial intelligence could contribute to this process, particularly by helping to identify potential tumour patterns and making image analysis more informative.
This inspired us to build NeuroScan, an AI-powered brain MRI analysis platform that combines tumour classification, image segmentation, explainable AI, and 3D visualization in one application.
We wanted to go beyond simply building a model that predicts whether an MRI scan contains a tumour. We wanted to create a system that could also show the regions influencing its predictions and highlight the areas identified as potential tumour regions.
What We Built
GitHub repo: https://github.com/Ayoola-in/NeuroScanAI Hugging Face Repo: https://huggingface.co/Ayoola-In/NeuroScan_AI
NeuroScan combines two deep learning models to perform different aspects of brain MRI analysis.
- MRI Classification: We implemented an EfficientNet-B0 model using transfer learning to classify MRI scans into four categories: Glioma, Meningioma, Pituitary Tumour, and No Tumour.
- Tumour Segmentation: We developed a U-Net model to identify and highlight potential tumour regions at the pixel level.
- Explainable AI: We integrated Grad-CAM to generate heatmaps showing the regions of an MRI image that influenced the classification model's prediction.
- 3D Visualization: We developed a feature that combines multiple MRI slices into an interactive 3D representation of the predicted tumour region.
- Batch Processing: Users can upload multiple MRI scans for analysis in one session.
- PDF Reporting: The application generates downloadable reports containing patient information, classification results, confidence scores, and visual analysis outputs.
We built the application using Python, PyTorch, Torchvision, Streamlit, OpenCV, Scikit-learn, Plotly, and ReportLab.
For the classification component, we used transfer learning with an ImageNet-pretrained EfficientNet-B0 model and adapted its classification head to recognize the four brain MRI categories. The U-Net segmentation model was trained separately to generate tumour masks.
The application brings these components together through a Streamlit interface, allowing users to upload MRI images and access the different analysis features without interacting directly with the underlying models.
Our classification model currently achieves 92.45% accuracy and a weighted F1-score of 0.924 on a test set of 1,311 images.
Challenges We Faced
Building NeuroScan came with several challenges, particularly because we were working with multiple machine learning components that had to function together.
One of our biggest challenges was understanding and implementing image segmentation. Classification and segmentation are fundamentally different tasks. While classification predicts what an image contains, segmentation requires the model to identify the specific pixels belonging to a particular region. Getting the U-Net architecture, image-mask pairing, preprocessing, and output visualization to work together required considerable experimentation.
Another challenge was integrating Grad-CAM into the classification pipeline. We wanted the application to provide more than just a prediction, so we had to understand how gradients from the model could be used to generate meaningful visual explanations.
The 3D visualization feature also presented its own challenges. We had to process individual MRI slices, combine their segmentation masks, and reconstruct them into an interactive 3D representation.
We also encountered challenges around model performance, dataset preparation, and ensuring that the different components produced consistent outputs.
What We Learned
This project taught us that building an AI-powered application involves much more than training a model and achieving a good accuracy score.
We gained practical experience with transfer learning, convolutional neural networks, image segmentation, model evaluation, Grad-CAM, image preprocessing, and integrating multiple deep learning models into a functional application.
We also learned the importance of evaluating models properly. A high accuracy score does not automatically mean a model is reliable, especially in a sensitive area like medical imaging. We identified areas where our evaluation process could be improved, including the need for independent validation and testing datasets.
Most importantly, we learned how to take individual machine learning components and bring them together into a working application that people can interact with.
What's Next?
NeuroScan is still a work in progress, and we have several improvements planned.
Some of these include supporting medical imaging formats such as DICOM and NIfTI, improving segmentation performance, introducing more reliable 3D volumetric reconstruction using actual MRI spatial information, and conducting more rigorous model evaluation.
Our long-term goal is to develop NeuroScan into a more robust AI-assisted brain MRI analysis platform that can support research and medical imaging workflows.
NeuroScan is currently an academic research prototype, not a clinically validated diagnostic tool. Its outputs require review and interpretation by qualified medical professionals.
Built with curiosity, experimentation, and a shared interest in applying AI to real-world problems.
Developed by Team Aescanus
- Ayoola Ini-Oluwa Marvelous
- Adetunji Victor Adewale
Built With
- opencv
- plotly
- python
- pytorch
- reportlab.
- scikit-learn
- streamlit
- torchvision