1. Abstract
This paper presents a deep learning-based approach for the semantic segmentation of low-grade gliomas (LGG) in brain Magnetic Resonance Imaging (MRI) scans. The accurate delineation of tumor boundaries is critical for diagnosis, treatment planning, and monitoring disease progression. Leveraging the U-Net architecture, a convolutional neural network designed for biomedical image segmentation, I developed a model to automatically identify and segment tumor regions from FLAIR (Fluid-attenuated inversion recovery) sequences. The model was trained and evaluated on a publicly available dataset from The Cancer Imaging Archive (TCIA), which contains MRI scans from 110 LGG patients with corresponding manual segmentation masks. My methodology involved extensive data preprocessing, including image normalization and data augmentation, to enhance model robustness and generalization. The model’s performance was quantitatively assessed using the Dice Similarity Coefficient and Jaccard Index, achieving promising results that demonstrate the viability of using automated deep learning techniques to assist radiologists in clinical practice. This project underscores the potential of convolutional neural networks to improve the efficiency and accuracy of brain tumor analysis.
2. Introduction & Problem Statement
Low-grade glioma (LGG) is a type of primary brain tumor originating from glial cells. While typically slow-growing and classified as Grade I or II, these tumors can infiltrate surrounding brain tissue, leading to significant neurological deficits as they expand. The accurate segmentation of LGG from MRI scans is a fundamental task in neuro-oncology. It provides quantitative metrics such as tumor volume, shape, and location, which are essential for surgical planning, radiotherapy targeting, and evaluating the efficacy of treatments over time. However, manual segmentation by clinical experts is a time-consuming, laborious, and subjective process, prone to inter-observer variability. This variability can impact the reliability of clinical assessments and the comparability of results across different studies.
The motivation for this project stems from the need to overcome these challenges through an automated, objective, and efficient segmentation method. The core objective was to design, implement, and evaluate a deep learning model capable of performing precise semantic segmentation of LGG tumors on FLAIR MRI sequences. FLAIR imaging is particularly effective for this task as it suppresses the signal from cerebrospinal fluid (CSF), thereby enhancing the visibility of vasogenic edema and tumor tissue. By automating this process, the goal was to create a tool that could potentially reduce the workload of radiologists, improve diagnostic consistency, and provide a reliable basis for quantitative tumor analysis. This work explores the application of the U-Net architecture, a state-of-the-art model in biomedical image segmentation, to address this clinically significant problem, bridging the gap between advanced computational techniques and their practical application in medicine.
3. Metholody & Technical Approach
My approach to segmenting low-grade gliomas followed a structured methodology, encompassing data preparation, model selection, implementation, and training.
Data Sourcing and Preprocessing:
The project utilized the LGG-1p19qDeletion dataset from The Cancer Imaging Archive (TCIA), containing 110 patient cases. Each case includes multiple brain MRI slices and corresponding manual segmentation masks identifying the tumor region. My first step was to organize this data by creating a DataFrame that mapped each MRI image to its corresponding mask file. I implemented a function to determine the diagnosis for each image—positive (tumor present) or negative (no tumor)—by analyzing the pixel values of the mask. This resulted in a structured dataset ready for processing.

Model Architecture:
I selected the U-Net architecture for this segmentation task. U-Net is a convolutional neural network (CNN) specifically designed for biomedical image segmentation. Its architecture consists of a contracting path (encoder) to capture context and a symmetric expanding path (decoder) that enables precise localization. The encoder follows a typical CNN structure, progressively down-sampling the image while increasing the number of feature channels. The decoder up-samples the feature maps and concatenates them with corresponding feature maps from the contracting path via skip connections. These skip connections are a key feature, allowing the network to combine high-level semantic information with low-level fine-grained details, which is crucial for accurately delineating tumor boundaries.
Implementation Details:
The model was implemented using the PyTorch deep learning framework. The data loading pipeline was managed using PyTorch’s Dataset and DataLoader classes. To handle the variability in MRI scans and improve the model’s ability to generalize, I implemented a robust data augmentation strategy using the Albumentations library. The augmentations included:
- Rotation: Randomly rotating images to make the model invariant to the orientation of the brain.
- Horizontal and Vertical Flips: Augmenting the dataset with mirrored images.
- Elastic Transformations: Simulating tissue deformations.
# Example of Albumentations transform pipelinetrain_transform = A.Compose([ A.Rotate(limit=90, p=0.7), A.HorizontalFlip(p=0.5), A.VerticalFlip(p=0.5), A.ElasticTransform(p=0.5, alpha=120, sigma=120 * 0.05, alpha_affine=120 * 0.03), A.Normalize(mean=(0.5, 0.5, 0.5), std=(0.5, 0.5, 0.5)), ToTensorV2(),])
The dataset was split into training (70%), validation (20%), and testing (10%) sets. The loss function chosen was a combination of Binary Cross-Entropy (BCE) and Dice Loss. BCE loss is effective for pixel-wise classification, while Dice Loss directly optimizes the Dice Similarity Coefficient, a primary metric for segmentation tasks. The model was trained using the Adam optimizer with a learning rate of 0.001.

4. Results & Evaluation
The model’s performance was rigorously evaluated on the held-out test set using two standard metrics for image segmentation: the Dice Similarity Coefficient (DSC) and the Jaccard Index (Intersection over Union – IoU).
- Dice Similarity Coefficient (DSC): This metric measures the overlap between the predicted segmentation and the ground truth mask. It is calculated as
2 * |X ∩ Y| / (|X| + |Y|). A DSC of 1 indicates perfect overlap, while 0 indicates no overlap. - Jaccard Index (IoU): This metric also quantifies the similarity between the prediction and the ground truth, calculated as
|X ∩ Y| / |X ∪ Y|.
After training for 20 epochs, my model achieved a mean Dice Score of 0.89 and a mean Jaccard Index of 0.81 on the test dataset. These results are highly competitive and indicate that the model learned to generate segmentations that closely match the expert-annotated ground truth masks.
Visual inspection of the predicted masks confirmed the model’s effectiveness. The model was able to accurately delineate the boundaries of most tumors, including those with irregular shapes and diffuse edges. In some cases, the model’s predictions were almost indistinguishable from the ground truth.





These quantitative and qualitative results demonstrate the model’s strong performance and its potential as a reliable tool for automated low-grade glioma segmentation.
5. Challenges & Learnings
One of the primary challenges in this project was managing the class imbalance in the dataset. Many MRI slices within a patient’s scan do not contain any tumor tissue, leading to a dataset heavily skewed towards the ‘negative’ (no tumor) class. This required careful handling during training, which I addressed by using a combined loss function (BCE and Dice Loss) that is more robust to class imbalance than BCE alone.
Another significant challenge was the computational demand of training a deep learning model on high-resolution medical images. I had to efficiently manage memory and optimize the data loading pipeline to ensure that training could be completed within a reasonable timeframe. This experience provided valuable insights into practical deep learning implementation and the importance of resource management.
A key learning from this project was the profound impact of data augmentation. Initially, the model showed signs of overfitting to the training data. By introducing aggressive and varied augmentations using Albumentations, I was able to significantly improve the model’s generalization capabilities, which was reflected in the improved performance on the validation and test sets. This highlighted that a well-designed augmentation strategy is as crucial as the model architecture itself, especially when working with limited medical imaging datasets.
6. Limitations & Ethical Considerations
Despite the promising results, this project has several limitations. The model was trained and tested on a dataset from a single source (TCIA), which may not fully represent the diversity of MRI scans from different scanners, institutions, or patient populations. The performance could vary when applied to external datasets, a phenomenon known as domain shift. Further validation on multi-center data is required to establish its real-world robustness. Additionally, the model’s performance may be less reliable for very small tumors or those with extremely ambiguous boundaries.
From an ethical standpoint, the use of AI in medical diagnosis requires careful consideration. An automated system like this is intended to be a decision-support tool for radiologists, not a replacement. Over-reliance on the model’s output without expert verification could lead to misdiagnosis. Therefore, ensuring transparency and providing clinicians with an understanding of the model’s confidence and potential failure modes is essential. Data privacy is another critical concern. All patient data used in this project was anonymized, and any future application would need to adhere to strict data protection regulations like GDPR and HIPAA to safeguard patient information.
7. Conclusion & Future Work
In conclusion, this project successfully demonstrated the application of a U-Net based deep learning model for the automated segmentation of low-grade gliomas from brain MRI scans. The model achieved high accuracy, with a Dice Score of 0.89, validating its potential to serve as an effective tool for assisting clinicians. My work highlights the power of deep learning to automate complex medical imaging tasks, offering a path towards more efficient, objective, and consistent tumor analysis.
For future work, several avenues could be explored. The model could be extended to a multi-class segmentation task to differentiate between different tumor sub-regions, such as the enhancing tumor core, peritumoral edema, and the necrotic core. Another promising direction would be to incorporate transfer learning, using a model pre-trained on a larger, more general dataset to improve performance. Finally, deploying the model into a user-friendly interface that could be integrated into a clinical workflow would be a critical step towards translating this research into a practical tool for radiologists.
8. Technologies Stack
- Programming Language: Python
- Deep Learning Framework: PyTorch
- Libraries:
- NumPy: For numerical operations.
- Pandas: For data manipulation and creating DataFrames.
- OpenCV (cv2): For image processing.
- Matplotlib: For data visualization.
- Albumentations: For data augmentation.
- Scikit-learn: For splitting the dataset.
- Scikit-image: For image processing tasks.
- tqdm: For progress bars.
9. References
- Menze, B. H., Jakab, A., Bauer, S., Kalpathy-Cramer, J., Farahani, K., Kirby, J., Burren, Y., Porz, N., Slotboom, J., Wiest, R., Lanczi, L., Gerstner, E., Weber, M.-A., Arbel, T., Avants, B. B., Ayache, N., Buendia, P., Collins, D. L., Cordier, N., … Van Leemput, K. (2014). The Multimodal Brain Tumor Image Segmentation Benchmark (BRATS). IEEE Transactions on Medical Imaging, 34(10), 1993–2024. https://doi.org/10.1109/tmi.2014.2377694
- Zou, N., Zhang, Y., & Liu, X. (2020). U-Net Based Brain Tumor Segmentation: A Survey. 2020 International Conference on Medical Imaging and Computer-Aided Diagnosis (MICAD 2020).
- The Cancer Imaging Archive (TCIA). (n.d.). Lower-Grade Glioma TCGA-LGG. Retrieved from https://wiki.cancerimagingarchive.net/display/Public/LGG-1p19qDeletion
- Ronneberger, O., Fischer, P., & Brox, T. (2015). U-Net: Convolutional Networks for Biomedical Image Segmentation. ArXiv. /abs/1505.04597
- Nalepa, J., Marcinkiewicz, M., & Kawulok, M. (2019). Data Augmentation for Brain-Tumor Segmentation: A Review. Frontiers in Computational Neuroscience, 13. https://doi.org/10.3389/fncom.2019.00083
- T. R. E. Armstrong, P. Manimegalai, A. Abinath and D. Pamela, “Brain tumor image segmentation using Deep learning,” 2022 6th International Conference on Devices, Circuits and Systems (ICDCS), Coimbatore, India, 2022, pp. 48-52, doi: 10.1109/ICDCS54290.2022.9780707.
- Thada, V., & Jaglan, V. (2013). Comparison of Jaccard, Dice, Cosine Similarity Coefficient To Find Best Fitness Value for Web Retrieved Documents Using Genetic Algorithm.
- Buslaev, A., Iglovikov, V. I., Khvedchenya, E., Parinov, A., Druzhinin, M., & Kalinin, A. A. (2020). Albumentations: Fast and Flexible Image Augmentations. Information, 11(2), 125. https://doi.org/10.3390/info11020125