Welcome to the Brain Tumor Detection project using Vision Transformer (ViT)! This project aims to detect brain tumors using ViT, a transformer-based architecture originally designed for image classification tasks.
Follow these steps to get started with the project:
Clone the repository to your local machine using the following command:
git clone https://github.com/your_username/brain_tumor_detection.git
Open the vit3.ipynb notebook in your preferred Python environment. This notebook contains the code which runs for brain tumor detection using ViT.
Before running any code blocks, make sure to install the required dependencies. Run the following command in a code cell:
!pip install tensorflow scikit-learn
Add the data folder,vit.py and utils.py to your Google Drive.
To mount your Google Drive on Google Colab, follow these steps:
-
Run the following code block in Google Colab:
from google.colab import drive drive.mount('/content/drive')
-
Follow the link provided and authenticate with your Google account.
-
Copy the authentication code and paste it into the designated area only if you have 2 factor authentication.
Navigate to the content directory in Google Colab:
%cd /content
Upload the vit.py and utils.py in Google Drive first.
Upload vit.py and utils.py files to Google Colab. Then, move them to the content directory using the file manager or the following command:
!mv /content/drive/your_path/vit.py /content
!mv /content/drive/your_path/utils.py /content
Replace your_path with the actual path to the files in your Google Drive.
or
directly drag and move the files from local storage to the content folder
Now, you are all set to run the code blocks in vit3.ipynb one by one. Follow the instructions within the notebook for each code block.