ShabGaming commited on
Commit
3d33198
·
1 Parent(s): 388d0f1

Updated Readme

Browse files
Files changed (1) hide show
  1. README.md +61 -20
README.md CHANGED
@@ -1,23 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
  This is a deep learning model that can classify MRI images of the brain into four categories: glioma tumor, meningioma tumor, no tumor, and pituitary tumor. The model was trained on the Images Dataset "Brain Tumor Classification (MRI)" From Kaggle by SARTAJ under the CC0: Public Domain License.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  The model was trained using TensorFlow and achieved an accuracy of over 95% on the validation set.
3
 
4
- MIT License
5
- Copyright (c) 2023 Shab (Muhammad Shahab Hasan)
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the "Software"), to deal
9
- in the Software without restriction, including without limitation the rights
10
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- copies of the Software, and to permit persons to whom the Software is
12
- furnished to do so, subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be included in all
15
- copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- SOFTWARE.
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ library_name: tensorflowtts
6
+ tags:
7
+ - biology
8
+ - medical
9
+ ---
10
+
11
+ # Brain Tumor Classification (MRI) | AI Model
12
+
13
  This is a deep learning model that can classify MRI images of the brain into four categories: glioma tumor, meningioma tumor, no tumor, and pituitary tumor. The model was trained on the Images Dataset "Brain Tumor Classification (MRI)" From Kaggle by SARTAJ under the CC0: Public Domain License.
14
+
15
+ Source Files: https://github.com/ShabGaming/Brain-Tumor-Classification-AI-Model
16
+
17
+ ## Model
18
+ The model is a convolutional neural network (CNN) with the following architecture:
19
+ ```
20
+ Layer (type) Output Shape Param #
21
+ =================================================================
22
+ conv2d (Conv2D) (None, 1248, 1248, 32) 896
23
+ _________________________________________________________________
24
+ max_pooling2d (MaxPooling2D) (None, 624, 624, 32) 0
25
+ _________________________________________________________________
26
+ conv2d_1 (Conv2D) (None, 622, 622, 64) 18496
27
+ _________________________________________________________________
28
+ max_pooling2d_1 (MaxPooling2 (None, 311, 311, 64) 0
29
+ _________________________________________________________________
30
+ conv2d_2 (Conv2D) (None, 309, 309, 128) 73856
31
+ _________________________________________________________________
32
+ max_pooling2d_2 (MaxPooling2 (None, 154, 154, 128) 0
33
+ _________________________________________________________________
34
+ flatten (Flatten) (None, 307328) 0
35
+ _________________________________________________________________
36
+ dense (Dense) (None, 128) 39338112
37
+ _________________________________________________________________
38
+ dropout (Dropout) (None, 128) 0
39
+ _________________________________________________________________
40
+ dense_1 (Dense) (None, 4) 516
41
+ =================================================================
42
+ Total params: 39,436,876
43
+ Trainable params: 39,436,876
44
+ Non-trainable params: 0
45
+ ```
46
  The model was trained using TensorFlow and achieved an accuracy of over 95% on the validation set.
47
 
48
+ ## GUI
49
+ In addition to the model, we have also provided a graphical user interface (GUI) that allows users to upload an MRI image and get a prediction from the model. The GUI was built using the Tkinter library in Python.
50
+
51
+ To use the GUI, simply run the gui.py file and a window will appear. Click the "Choose File" button to select an MRI image from your computer, and then click the "Predict" button to get the model's prediction. The GUI will display the selected image as well as the predicted class.
52
+
53
+ ## Usage
54
+ To use the model and GUI, follow these steps:
55
+ - Clone or download the GitHub repository containing the model and GUI files.
56
+ - Install the necessary Python libraries.
57
+ - Train the model by running 'BrainTumorMRIDetection.ipynb'. This will save the trained model as a .h5 file in the repository directory (You can also just download the model, more information down below).
58
+ - Run the GUI by running gui.py. This will open a window where you can upload an MRI image and get a prediction from the model.
59
+
60
+ ## Credits
61
+ Muhammad Shahab Hasan (Shab)
62
+ - https://www.fiverr.com/best_output
63
+ - https://www.youtube.com/Shabpassiongamer
64
+ - https://medium.com/@ShahabH