This project focuses on developing a system for automatically identifying and categorizing brain cancers from MRI data using deep learning, using CNNs, or convolutional neural networks and ResNet50, a residual learning architecture.
Brain tumors represent one of the most critical medical conditions, often posing life-threatening risks and requiring early and accurate detection to enhance treatment outcomes. Traditionally, brain tumor diagnosis relies on manual analysis of Scans using magnetic resonance imaging (MRI) by radiologists, a process that is time-intensive and susceptible to human error. The complexity of distinguishing tumor types, such as glioma, meningioma, pituitary tumors, and identifying healthy brain tissues, need sophisticated computational methods for more reliable results. Recent advancements in artificial intelligence, particularly in deep learning, have revolutionized medical imaging analysis, enabling automated and highly accurate diagnostic systems. This project focuses on developing a system for automatically identifying and categorizing brain cancers from MRI data using deep learning. Two cutting-edge algorithms are used: CNNs, or convolutional neural networks and ResNet50, a residual learning architecture. The CNN model is designed and trained from scratch to classify MRI images into four categories, achieving strong accuracy through data augmentation, normalization, and optimized hyperparameters. Additionally, the ResNet50 model, pre-trained on ImageNet, is fine-tuned to enhance classification performance, leveraging transfer learningto deal with the difficulty of limited labeled medical data. The method was developed using TensorFlow and Keras for model construction, OpenCV and Pillow for image preprocessing, and Matplotlib for performance visualization. The dataset, sourced from publicly available brain MRI repositories, consists of 3,264 labeled images categorized into glioma, meningioma, pituitary, and no tumor classes. The CNN model demonstrated superior accuracy during training and validation, achieving approximately 97% overall accuracy. ResNet50, after fine-tuning, significantly improved performance compared to initial trials, overcoming the limitations of feature extraction in complex MRI images. Furthermore, a web-based interface was created with JavaScript, HTML, CSS, and Flask enabling users to upload MRI images and receive instant diagnostic predictions. This interface bridges the gap between medical professionals and AI, providing a user-friendly tool for real-time brain tumor detection..