Skin Cancer Segmentation Model

Model Information:

  • Architecture: U-Net
  • Task: Binary segmentation of skin lesions in dermoscopy images
  • Dataset: Skin Lesion Mask Dataset
  • Input Size: 128Γ—128 grayscale images

Performance Metrics:

  • Best Dice Score: 0.9175

Classes:

  • Background (0)
  • Lesion (1)

Usage:

from shifaa.vision import VisionModelFactory

model = VisionModelFactory.create_model(
    model_type="segmentation",
    model_name="Skin_Cancer"
)

results = model.run("skin_lesion.jpg", show_image=True)
image = results["image"]
mask = results["predicted_mask"]

Sample Results: Sample Results

Architecture Details:

  • Encoder: 4 blocks (1β†’16β†’32β†’64β†’128 channels)
  • Bottleneck: 256 filters
  • Decoder: 4 blocks with skip connections
  • Final layer: 1 output channel with sigmoid activation

Preprocessing:

  • Images normalized to [0, 1]
  • Binary masks (0=background, 1=lesion)
  • Convert to tensors: shape (B, 1, H, W)

Training Details:

  • Loss Function: Binary Cross-Entropy Loss
  • Optimizer: Adam (lr=0.001)
  • Batch Size: 16
  • Epochs: 80 (with early stopping after 20 epochs)

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Collection including Ahmed-Selem/Shifaa-Skin-Cancer-UNet-Segmentation