metadata
license: mit
pipeline_tag: image-segmentation
tags:
- medical
- biology
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"]
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)
