--- license: mit pipeline_tag: image-segmentation tags: - medical - biology --- # CT Heart Segmentation Model **Model Information:** - **Architecture:** U-Net - **Task:** Binary segmentation of heart in CT scans - **Dataset:** [Heart CT Dataset](https://www.kaggle.com/datasets/nikhilroxtomar/ct-heart-segmentation) - **Input Size:** 224×224 RGB images **Performance Metrics:** - **Best Dice Score:** 0.9479 - **Best IoU Score:** 0.9014 **Usage:** ```python from shifaa.vision import VisionModelFactory model = VisionModelFactory.create_model( model_type="segmentation", model_name="CT_Heart" ) results = model.run("heart_ct.png", show_image=True) image = results["image"] mask = results["predicted_mask"] ``` **Sample Results:** ![Sample Results](./CT_H_seg.png) **Architecture Details:** - Encoder: 4 downsampling blocks (Conv → BatchNorm → ReLU → Dropout) - Bottleneck: Deepest convolutional block - Decoder: 4 upsampling blocks with skip connections - Output: 1 channel with sigmoid activation **Preprocessing:** - Random horizontal flip - Random rotation ±15° - Random brightness & contrast adjustment - Normalize and convert to tensor **Training Details:** - **Loss Function:** Combined Dice Loss + BCE Loss - **Optimizer:** Adam (lr=0.001, weight_decay=1e-5) - **Batch Size:** 8 - **Epochs:** 100 (with early stopping) ---