Skip to content

Commit f97d7ca

Browse files
Merge pull request #403 from brainhack-school2025/main
Add Amir Zamanidoost's brain tumor detection project
2 parents b85103f + 0cfaa93 commit f97d7ca

File tree

4 files changed

+137
-0
lines changed

4 files changed

+137
-0
lines changed
125 KB
Loading
25.5 KB
Loading
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
---
2+
type: "project" # DON'T TOUCH THIS ! :)
3+
date: "2025-06-18" # Date you first upload your project.
4+
# Title of your project (we like creative title)
5+
title: "Brian Tumor Detection in MRI Using Faster R-CNN"
6+
7+
# List the names of the collaborators within the [ ]. If alone, simple put your name within []
8+
names: [Yadollah (Amir) Zamanidoost]
9+
10+
# Your project GitHub repository URL
11+
github_repo: https://github.com/brainhack-school2025/Zamanidoost_project
12+
13+
# If you are working on a project that has website, indicate the full url including "https://" below or leave it empty.
14+
website:
15+
16+
# List +- 4 keywords that best describe your project within []. Note that the project summary also involves a number of key words. Those are listed on top of the [github repository](https://github.com/AlexPeng517/BHS2023_Project_SAM_MRI), click `manage topics`.
17+
# Please only lowercase letters
18+
tags: [MRI,Brain Tumor Detection,Faster R-CNN]
19+
20+
# Summarize your project in < ~75 words. This description will appear at the top of your page and on the list page with other projects..
21+
22+
summary: "This project presents a deep learning-based pipeline for detecting brain tumors in MRI scans using a customized Faster R-CNN architecture."
23+
24+
# If you want to add a cover image (listpage and image in the right), add it to your directory and indicate the name
25+
# below with the extension.
26+
image: "brain_Tumor_image.jpg"
27+
---
28+
<!-- This is an html comment and this won't appear in the rendered page. You are now editing the "content" area, the core of your description. Everything that you can do in markdown is allowed below. We added a couple of comments to guide your through documenting your progress. -->
29+
---
30+
31+
32+
## Project definition
33+
34+
35+
### Background
36+
Brain tumors are among the most challenging medical conditions to detect and treat. Accurate identification of tumor regions in MRI scans is crucial for diagnosis, surgical planning, and treatment monitoring. Traditional methods rely heavily on expert interpretation, which can be time-consuming and prone to inter-observer variability. Deep learning approaches, especially object detection frameworks like Faster R-CNN, offer a promising alternative by automating tumor localization and classification. In this project, we enhance the classical Faster R-CNN pipeline with a false positive reduction (FPR) stage to improve robustness and reliability.
37+
![Framework Overview](overall_framework.png)
38+
39+
40+
### Tools
41+
42+
- **Programming Language**: Python 3.x
43+
- **Deep Learning Framework**: PyTorch
44+
- **Computer Vision Libraries**: OpenCV, torchvision
45+
- **Annotation Tool**: LabelImg, Nibabel
46+
- **Visualization**: Matplotlib, Seaborn
47+
- **Notebook Environment**: Jupyter Notebook
48+
- **Hardware**:
49+
- **Training RPN**: Tesla V100 GPU (via terminal-based access)
50+
- **Inference and Evaluation**: CPU
51+
- **CUDA**: Used during RPN training for GPU acceleration
52+
53+
### Data
54+
55+
This project uses publicly available datasets containing 2D T1-weighted contrast-enhanced MRI images of brain tumors along with their ground-truth labels. The data is sufficient in both quantity and quality to allow for effective training and fine-tuning of object detection models such as Faster R-CNN.
56+
57+
1. [Brain Tumor Segmentation @ Kaggle](https://www.kaggle.com/datasets/nikhilroxtomar/brain-tumor-segmentation)
58+
- **Original Source & Credit**: [Figshare](https://figshare.com/articles/dataset/brain_tumor_dataset/1512427)
59+
- **Description**: This dataset contains 3064 T1-weighted contrast-enhanced brain MRI images in `.png` format, with manually labeled tumor regions provided via ground-truth masks.
60+
- **Use Case**: Used for training and fine-tuning the Faster R-CNN model.
61+
62+
All images were preprocessed and annotated for object detection tasks by converting segmentation masks into bounding box labels.
63+
64+
### Project Deliverables
65+
66+
At the end of this project, the following materials will be available:
67+
68+
- A completed and well-documented `README.md`.
69+
- Several Jupyter Notebooks.
70+
- For training the RPN and FPR models using GPU acceleration (Tesla V100).
71+
- For inference, post-processing, and evaluation (executed on CPU).
72+
- Performance metrics including precision, recall, F1-score, and FROC curves.
73+
- The slide presentation introducing the problem, dataset, model architecture, and key findings.
74+
75+
## Results
76+
77+
### Progress Overview
78+
79+
The Faster R-CNN model demonstrates strong localization capability in detecting brain tumors from MRI scans, even with limited annotated data for training. Our custom RPN training and false positive reduction significantly improved precision without sacrificing recall.
80+
![Results1](Result1.png)
81+
82+
### Tools I Learned During This Project
83+
84+
Throughout this project, I gained hands-on experience with several essential tools and libraries in deep learning and medical image analysis, including:
85+
86+
- **PyTorch** – for building and training the Faster R-CNN and custom RPN models
87+
88+
- **Torchvision** – for using pretrained VGG16 and manipulating datasets
89+
90+
- **OpenCV** – for image processing and visualization tasks
91+
92+
- **Matplotlib & Seaborn** – for plotting training metrics and visual results
93+
94+
- **scikit-learn** – for computing classification metrics like precision, recall, and F1-score
95+
96+
- **Git & GitHub** – for version control and project collaboration
97+
98+
- **Markdown** – for documenting the project and creating a structured README
99+
100+
- **Jupyter Notebooks** – for training, evaluation, and presenting visual results step-by-step
101+
102+
103+
### Deliverables
104+
- Developed a two-stage Faster R-CNN + FPR framework for brain tumor detection.
105+
106+
- Trained and evaluated models using publicly available MRI data.
107+
108+
- Provided Jupyter notebooks for data prep, model training, inference, and evaluation.
109+
110+
- Shared trained models and test dataset via Google Drive for reproducibility.
111+
112+
- Created a slide presentation summarizing the project and results.
113+
114+
### Future work
115+
116+
Optimizing the anchor shape using metaheuristic algorithms
117+
118+
119+
## Conclusion and acknowledgement
120+
121+
This project presents a two-stage deep learning pipeline for accurate brain tumor detection in MRI images, combining the Faster R-CNN architecture with a False Positive Reduction (FPR) model. Through fine-tuning and evaluation on open-access datasets, the system achieves promising detection performance, with enhanced precision and reduced false positives.
122+
123+
Many thanks to the BrainHack School Professor ([Dr. Eva Alonso Ortiz](https://neuro.polymtl.ca/team/faculty/eva-alonso-ortiz.html)), TA (Sebastian Rios), instructors, and fellow participants for their support, feedback, and inspiration throughout this project.
124+
125+
## References
126+
[1] Brain Tumor Segmentation Dataset (Kaggle version). https://www.kaggle.com/datasets/navoneel/brain-mri-images-for-brain-tumor-detection
127+
128+
[2] Cheng, J. (2017). Brain Tumor Dataset. Figshare. https://figshare.com/articles/dataset/brain_tumor_dataset/1512427
129+
130+
[3] Bhanothu Y, Kamalakannan A, Rajamanickam G. Detection and classification of brain tumor in MRI images using deep convolutional network. In2020 6th international conference on advanced computing and communication systems (ICACCS) 2020 Mar 6 (pp. 248-252). IEEE.
131+
132+
[4] Ezhilarasi R, Varalakshmi P. Tumor detection in the brain using faster R-CNN. In2018 2nd International Conference on, 2018 2nd International Conference on 2018 Aug 30 (pp. 388-392). IEEE.
133+
134+
[5] Zamanidoost Y, Alami-Chentoufi N, Ould-Bachir T, Martel S. Efficient Region Proposal Extraction of Small Lung Nodules Using Enhanced VGG16 Network Model. In2023 IEEE 36th International Symposium on Computer-Based Medical Systems (CBMS) 2023 Jun 22 (pp. 483-488). IEEE.
135+
136+
137+
195 KB
Loading

0 commit comments

Comments
 (0)