Views
No views yet
| Parameter | Value |
|---|---|
| Batch Size | 8 |
| Learning Rate | 7.77451918775676e-06 |
| Weight Decay | 0.00164040349077736 |
| Epochs | 100 |
| Patience | 10 |
| Dataset | GleghornLab/Semi-Automated_LN_Segmentation_10_11_2025 |
| Metric | Mean | Class 0 | Class 1 | Class 2 | Class 3 |
|---|---|---|---|---|---|
| Dice | 0.7781 | 0.7197 | 0.7614 | 0.7271 | 0.9040 |
| IoU | 0.6524 | 0.5708 | 0.6199 | 0.5929 | 0.8261 |
| F1 | 0.7781 | 0.7197 | 0.7614 | 0.7271 | 0.9040 |
| MCC | 0.7832 | 0.7308 | 0.7730 | 0.7440 | 0.8850 |
| ROC AUC | 0.9945 | 0.9945 | 0.9975 | 0.9917 | 0.9943 |
| PR AUC | 0.9076 | 0.8357 | 0.9108 | 0.9095 | 0.9743 |
1import numpy as np
2from model import MODEL_REGISTRY, SegmentationConfig
3
4# Load model
5config = SegmentationConfig.from_pretrained("aholk/LN_segmentation_sweep")
6model = MODEL_REGISTRY["unet"].from_pretrained("aholk/LN_segmentation_sweep")
7model.eval()
8
9# Run inference on a full image with sliding window
10image = np.random.rand(2048, 2048, 3).astype(np.float32) # Your image here
11probs = model.predict_full_image(
12 image,
13 dim=128,
14 batch_size=16,
15 device="cuda" # or "cpu"
16)
17# probs shape: (num_classes, H, W) with values in [0, 1]
18
19# Threshold to get binary masks
20masks = (probs > 0.5).astype(np.uint8)1@software{windowz_segmentation,
2 title={Multilabel Image Segmentation with Sliding Window U-Net},
3 author={Gleghorn Lab},
4 year={2025},
5 url={https://github.com/GleghornLab/ComputerVision2}
6}