This repository contains a deep learning project for detecting brain tumors using MRI images. The model is built using TensorFlow and Keras, and it classifies MRI images into two categories: 'yes' (tumor) and 'no' (no tumor).
The dataset used in this project is from Kaggle: Brain MRI Images for Brain Tumor Detection.
- Python 3.x
- TensorFlow
- Keras
- OpenCV
- NumPy
- Matplotlib
- scikit-learn
You can install the dependencies using the following command:
pip install tensorflow keras opencv-python numpy matplotlib scikit-learn
tumorrr.py
: This is the main script that:- Loads and preprocesses the data.
- Splits the data into training and testing sets.
- Defines and trains the CNN model.
- Evaluates the model and displays the results.
The Convolutional Neural Network (CNN) model consists of:
- Conv2D layers with ReLU activation
- MaxPooling2D layers
- Flatten layer
- Dense layers with ReLU activation
- Dropout layer
- Output layer with Softmax activation
- Clone the repository:
git clone https://github.com/realmir1/BrainTumor.git
cd BrainTumor
- Run the script:
python tumorrr.py
- The model is trained for 10 epochs.
- The test accuracy is displayed after training.
- Sample predictions are visualized using Matplotlib.
- Ali Emir SertbaÅŸ
Feel free to modify the README according to your specific needs.