Brain Tumor Classifier Based on MRI
de jonathanvegeta11 @jonathanvegeta11
- 126
- 0
- 0
Introducción
"Classifier for brain tumors"
Brain tumors are a significant health concern worldwide, affecting individuals of all ages. They can be either benign (non-cancerous) or malignant (cancerous) and are classified based on their origin and aggressiveness. Common types include gliomas, meningiomas, and pituitary tumors. Glioblastoma, a type of glioma, is among the most aggressive and challenging to treat.
Advancements in medicine and technology have significantly improved diagnosis and treatment. Imaging techniques like MRI and CT scans are crucial for early detection and monitoring. Treatment approaches often combine surgery, radiation therapy, and chemotherapy, tailored to the tumor type and patient condition.
In recent years, artificial intelligence (AI) has emerged as a powerful tool in medical imaging and diagnosis, enhancing accuracy in identifying brain tumors and predicting outcomes.

Materiales
TensorFlow was used to load the pre-trained Xception model.
The Kaggle repository was used to obtain the images from the dataset.
Google Colab was utilized to leverage its computational power for model processing.
Xception as a pre-trained model for transfer learning
The information used in this project was sourced from the dataset available on Kaggle: "masoudnickparvar/brain-tumor-mri-dataset." The pre-trained Xception model was utilized as a feature extractor, leveraging transfer learning to optimize the solution to the problem.
######################################## START ## #####################################################
Model Customization
Task Adaptation:
The base model was customized to handle a 4-class image classification task: glioma, meningioma, notumor, and pituitary.
Dataset Source:
The data was sourced from Kaggle: "masoudnickparvar/brain-tumor-mri-dataset".
Data Splitting:
The dataset was split into training, testing, and validation sets to ensure robust training and proper model evaluation.
Pre-trained Xception Model:
The Xception model pre-trained on ImageNet was used.
Model Base Customization:
The top layers responsible for classifying 1,000 ImageNet categories were removed (include_top=False).
Global Max Pooling was applied to summarize the most important features from each channel, creating a compact and efficient feature vector.
Additional Custom Layers:
To tailor the model to the new classification task, the following layers were added:
Flatten: Flattens the feature vector extracted by the pre-trained model.
Dropout: Reduces overfitting by randomly dropping connections during training.
Dense (128 neurons, ReLU activation): Learns specific patterns related to the classification task.
Additional Dropout: Enhances generalization by further reducing overfitting.
Output Dense Layer (4 neurons, Softmax activation): Outputs the probabilities for the 4 dataset classes.
Model Configuration
Initial Freezing:
The pre-trained model's layers were initially frozen to prevent their weights from being modified during the initial training phase.
Gradual Unfreezing:
The upper layers of the model were later unfrozen, while the first 50 layers remained frozen, as these layers capture basic features like edges and textures that are useful for any task.
The unfrozen layers were fine-tuned to adapt to the specific characteristics of the new dataset.
Model Compilation
Optimizer: The Adamax optimizer was used with a moderate learning rate (learning_rate=0.001) to effectively adjust the model's weights.
Loss Function: Categorical Crossentropy, ideal for multi-class classification problems.
Metrics: The model's performance was evaluated using accuracy (accuracy), precision (Precision), and recall (Recall), providing a comprehensive assessment of its performance.
Note:
image used for predict was extracted the book Neuroanatomía clínica Richard S. Snell









0 comentários
Faça login ou cadastre-se Gratuitamente para comentar