This project involves detecting brain tumors using machine learning models applied to medical imaging data. The project uses image classification techniques to distinguish between different types of brain tumors, including glioma, meningioma, and pituitary tumors, as well as no tumor.
Brain tumor detection through medical imaging is crucial in early diagnosis and treatment. This project focuses on applying deep learning methods to classify MRI scans into four categories: glioma, meningioma, pituitary tumor, and no tumor. By training models on labeled MRI data, this project aims to achieve high accuracy in tumor detection.
The dataset consists of MRI brain scans, which are categorized into four classes:
- Glioma Tumor
- Meningioma Tumor
- Pituitary Tumor
- No Tumor
The dataset is divided into training and testing sets, each containing images from the aforementioned categories.
The following Python libraries and technologies are used in the project:
- OpenCV: For image processing and displaying images.
- TensorFlow/Keras: For building and training the deep learning model.
- scikit-learn: For model evaluation metrics and data splitting.
- Google Colab: For accessing datasets from Google Drive and running the model.
-
Clone the repository:
git clone https://github.com/your-username/brain-tumor-detection.git
-
Install the required Python packages:
pip install -r requirements.txt
-
Make sure the dataset is stored in the correct path (
/content/drive/MyDrive/Brain_Tumor/
) or update the path in the notebook accordingly.
-
Load the notebook in Google Colab or any Jupyter environment:
jupyter notebook Brain_Tumor_Detection.ipynb
-
Make sure the dataset is properly linked from Google Drive. Mount the drive:
from google.colab import drive drive.mount('/content/drive')
-
Run the notebook cells to:
- Load and display brain tumor images.
- Train a classification model using deep learning techniques.
- Evaluate the model's accuracy.
The following images show examples from each tumor type as displayed in the notebook:
After training the model on the MRI dataset, the accuracy is evaluated using metrics like precision, recall, and F1-score. The model’s performance is assessed on a separate test set to ensure generalization.
Contributions are welcome! Please open an issue or submit a pull request for improvements, bug fixes, or new features.
This project is licensed under the MIT License. See the LICENSE file for more details.