Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,58 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
metrics:
|
| 4 |
+
- accuracy
|
| 5 |
+
pipeline_tag: image-segmentation
|
| 6 |
+
tags:
|
| 7 |
+
- medical
|
| 8 |
+
- biology
|
| 9 |
+
---
|
| 10 |
+
# CT Heart Segmentation Model
|
| 11 |
+
|
| 12 |
+
**Model Information:**
|
| 13 |
+
- **Architecture:** U-Net
|
| 14 |
+
- **Task:** Binary segmentation of heart in CT scans
|
| 15 |
+
- **Dataset:** [Heart CT Dataset](https://www.kaggle.com/datasets/nikhilroxtomar/ct-heart-segmentation)
|
| 16 |
+
- **Input Size:** 224×224 RGB images
|
| 17 |
+
|
| 18 |
+
**Performance Metrics:**
|
| 19 |
+
- **Best Dice Score:** 0.9479
|
| 20 |
+
- **Best IoU Score:** 0.9014
|
| 21 |
+
|
| 22 |
+
**Usage:**
|
| 23 |
+
```python
|
| 24 |
+
from shifaa.vision import VisionModelFactory
|
| 25 |
+
|
| 26 |
+
model = VisionModelFactory.create_model(
|
| 27 |
+
model_type="segmentation",
|
| 28 |
+
model_name="CT_Heart"
|
| 29 |
+
)
|
| 30 |
+
|
| 31 |
+
results = model.run("heart_ct.png", show_image=True)
|
| 32 |
+
image = results["image"]
|
| 33 |
+
mask = results["predicted_mask"]
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
**Sample Results:**
|
| 37 |
+

|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
**Architecture Details:**
|
| 41 |
+
- Encoder: 4 downsampling blocks (Conv → BatchNorm → ReLU → Dropout)
|
| 42 |
+
- Bottleneck: Deepest convolutional block
|
| 43 |
+
- Decoder: 4 upsampling blocks with skip connections
|
| 44 |
+
- Output: 1 channel with sigmoid activation
|
| 45 |
+
|
| 46 |
+
**Preprocessing:**
|
| 47 |
+
- Random horizontal flip
|
| 48 |
+
- Random rotation ±15°
|
| 49 |
+
- Random brightness & contrast adjustment
|
| 50 |
+
- Normalize and convert to tensor
|
| 51 |
+
|
| 52 |
+
**Training Details:**
|
| 53 |
+
- **Loss Function:** Combined Dice Loss + BCE Loss
|
| 54 |
+
- **Optimizer:** Adam (lr=0.001, weight_decay=1e-5)
|
| 55 |
+
- **Batch Size:** 8
|
| 56 |
+
- **Epochs:** 100 (with early stopping)
|
| 57 |
+
|
| 58 |
+
---
|