BrainVision / README.md
Tada-tot's picture
Update README.md
8dd4c7d verified

A newer version of the Gradio SDK is available: 5.45.0

Upgrade
metadata
title: BrainVision
emoji: 🐧
colorFrom: gray
colorTo: green
sdk: gradio
sdk_version: 5.44.1
app_file: app.py
pinned: true
license: mit
short_description: A Project under Samsung Innovation Campus AI Program
model-index:
  - name: BrainVision
    results:
      - task:
          type: image-segmentation
          name: Image Segmentation
        dataset:
          type: lgg-mri-segmentation-dataset
          name: LGG MRI Segmentation Dataset
          split: test
        metrics:
          - type: dice_score
            value: 0.8898
            name: Dice Score
          - type: iou_score
            value: 0.8015
            name: IoU Score
          - type: accuracy
            value: 0.9963
            name: Accuracy
          - type: precision
            value: 0.882
            name: Precision
          - type: recall
            value: 0.8978
            name: Recall

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).

Lcombo=Ldice+LBCEL_{\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