Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
datasets:
|
4 |
+
- masoudnickparvar/brain-tumor-mri-dataset
|
5 |
+
metrics:
|
6 |
+
- accuracy
|
7 |
+
pipeline_tag: image-classification
|
8 |
+
library_name: keras
|
9 |
+
tags:
|
10 |
+
- cnn
|
11 |
+
- keras
|
12 |
+
- brain-tumor
|
13 |
+
- medical-imaging
|
14 |
+
- tensor-flow
|
15 |
+
- image-classification
|
16 |
+
language:
|
17 |
+
- en
|
18 |
+
---
|
19 |
+
|
20 |
+
Brain Tumor Detection CNN Model
|
21 |
+
|
22 |
+
This model was trained using a Convolutional Neural Network (CNN) to classify brain MRI images as either having a tumor or not. It uses Keras with TensorFlow backend and was trained on the publicly available [Brain Tumor MRI Dataset](https://www.kaggle.com/datasets/masoudnickparvar/brain-tumor-mri-dataset) from Kaggle.
|
23 |
+
Dataset
|
24 |
+
|
25 |
+
The dataset contains 3,762 T1-weighted contrast-enhanced MRI images, labeled as:
|
26 |
+
|
27 |
+
- **Yes** – Images with a brain tumor
|
28 |
+
- **No** – Images without a brain tumor
|
29 |
+
|
30 |
+
The data is balanced and preprocessed into two folders: `yes/` and `no/`.
|
31 |
+
|
32 |
+
Train Accuracy: ~98%
|
33 |
+
Validation Accuracy: ~96%
|
34 |
+
|
35 |
+
## 🧠 Model Architecture
|
36 |
+
|
37 |
+
- Type: CNN
|
38 |
+
- Framework: Keras (TensorFlow backend)
|
39 |
+
- Input shape: `(150, 150, 3)`
|
40 |
+
- Final Activation: `sigmoid`
|
41 |
+
- Loss: `binary_crossentropy`
|
42 |
+
- Optimizer: `Adam`
|
43 |
+
|
44 |
+
Example (simplified):
|
45 |
+
|
46 |
+
```python
|
47 |
+
model = Sequential([
|
48 |
+
Conv2D(32, (3,3), activation='relu', input_shape=(150, 150, 3)),
|
49 |
+
MaxPooling2D(2,2),
|
50 |
+
Conv2D(64, (3,3), activation='relu'),
|
51 |
+
MaxPooling2D(2,2),
|
52 |
+
Flatten(),
|
53 |
+
Dense(128, activation='relu'),
|
54 |
+
Dense(1, activation='sigmoid')
|
55 |
+
])
|