Skip to content

CNN model to detect and classify brain tumors in MRI scans

License

Notifications You must be signed in to change notification settings

Caramel-Labs/tumorscan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TumorScan 🧠

Identifying and Classifying Brain Tumors Using Deep Learning

TumorScan is a web app for medical students and professionals to easily and quickly check brain MRI scans for the presence of tumors, and classifies the type of tumor found in the scans.

Deployed app: https://tumorscan.streamlit.app/

The Data

TumorScan uses a deep learning model trained on a dataset of 3000 images of brain MRI scans from 4 different categories:

  1. Gliomas
  2. Meningiomas
  3. Pituitary Tumors
  4. No Tumor (Healthy)

This dataset was created by Rootcode Labs.

The Model

TumorScan uses a Convolutional Neural Network (CNN) comprised of 50+ layers and over 4 million parameters for inference. The architecture of this model has been inspired by pre-trained models such as ResNet-52, which are often used in transfer learning.



The deep architecture of this model ensures that it has captured patterns well during training, which is reflected in its performance:

  1. Training Accuracy = 87.48%
  2. Testing Accuracy = 89.98%

Setup

Prerequisites

Python (at least 3.9.0) must be installed on your system.

After Python has been set up, install the virtualenv package to create and manage a virtual environment for this project. This helps you maintain the project's dependencies in a hassle-free manner, without installing any unnecessary packages globally throughout your system.

pip install virtualenv

1. Clone the Project

Clone this project to create a local copy of it on your system:

git clone "https://github.com/Caramel-Labs/tumorscan.git"

Then, move into the project folder:

cd tumorscan

2. Create a Virtual Environment

Create a virtual environment inside the project folder to isolate its dependencies:

python -m venv env

# or

python3 -m venv env

Next, activate the virtual environment:

# on Windows:
.\env\Scripts\activate

# on MacOS or Linux
source env/bin/activate

You can deactivate this environment when you are done working with the project:

# on Windows, MacOS or Linux
deactivate

3. Install Dependencies

Set up your project with the necessary packages and libraries. After activating the virtual environment, enter the following command:

pip install -r requirements.txt

4. Start Streamlit

After you have completed the above steps, you can start the Streamlit app.

streamlit run app.py

Streamlit will start up in localhost:8501.


This project is licensed under the Apache License.

About

CNN model to detect and classify brain tumors in MRI scans

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published