Authors: Luka Marković and Elena Anđelković
Mentors: Novak Stijepić and Vladan Bašić
Institution: PFE
This project focuses on the detection and segmentation of brain tumors in MRI scans using computer vision and deep learning techniques. We worked on developing a pipeline that preprocesses MRI images and applies a fine-tuned U-Net model for accurate tumor identification. We used the Figshare Brain Tumor dataset as the foundation for training and testing.
One of the first steps we took was processing the images to make it easier to analyse. We tested various ways to do so, the most significant of which were the Canny edge detector algorithm, and Otsu's method. We ended up proceeding with Otsu's method, along with applying dilation and erosion filters on the image. This processing, along with a crude algorithim, resulted in 10.2% accuracy in identifying the brain tumors.
The next step was to look into choosing a type of Machine Learning suitable for this, as well as the model. After thorough consideration we chose to take a pre-trained U-Net model, resnet34, which is trained on the ImageNet database, and fine-tuned it using the Figshare Brain tumor dataset previously mentioned. With this approach we were able to reach an accuracy as high as 93.15%, and a loss of 0.39 before hitting a soft-cap.
The latest version of the model (./weights/manual/improved.pkl) achieved the following metrics:
Precision: 0.8763
Recall: 0.9997
F1 Score: 0.9339
Below is an example of the model processing an MRI scan with a brain tumor.
Below are training statistics for the model.



