CoolFace
Apppublic

Tada-tot/BrainVision

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
App README

Brain Tumor Segmentation

Model Description

This model is a U-Net based deep learning model for the segmentation of brain tumors from 2D MRI slices. It is an end-to-end segmentation model designed to assist radiologists by automatically identifying and outlining tumorous regions. The model leverages transfer learning by using a pre-trained ResNet50 backbone as its encoder.

Intended Use & Limitations

This model is intended for research and educational purposes. It is a tool for exploring deep learning for medical image segmentation.

Limitations:

  • The model was trained on a specific dataset and may not generalize well to other datasets from different scanners, protocols, or patient populations.
  • It should not be used for clinical diagnosis without validation by a qualified medical professional.
Training Data

The model was trained on the LGG MRI Segmentation Dataset from Kaggle.

  • Volume: 3,929 MRI images from 110 patients.
  • Annotation: Expert-annotated binary masks for tumor regions.
  • Image Size: 256x256 pixels with 3 channels (converted to RGB).
Training Procedure

The model was trained using a two-stage fine-tuning approach with PyTorch.

Model Architecture:

  • Architecture: U-Net
  • Encoder: ResNet50 with imagenet pre-trained weights.
  • Decoder: A symmetric expanding path with skip connections.
  • Output: A single-channel probability map.

Hyperparameters:

  • Optimizer: AdamW
  • Loss Function: A composite loss function combining Dice Loss and Binary Cross-Entropy (BCE).

$$L{\text{combo}} = L{\text{dice}} + L_{\text{BCE}}$$

  • Epochs:
  • Stage 1 (Frozen Encoder): 5 epochs at a learning rate of 1e−4.
  • Stage 2 (Fine-tuning): 15 epochs at a learning rate of 1e−5.
  • Learning Rate Scheduler: ReduceLROnPlateau with patience=3, factor=0.1.
  • Batch Size: 16
Evaluation Results

The model was evaluated on an unseen test set composed of 10% of the patient data. | Metric | Value | | :--- | :--- | | Dice Score | 0.8898 | | IoU Score | 0.8015 | | Accuracy | 0.9963 | | Precision | 0.8820 | | Recall | 0.8978|

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference