LuGot16/seminiferous-tubules-dataset
Viewer β’ Updated β’ 699 β’ 744
A coarse-to-fine dual-branch architecture for 3-class semantic segmentation of mouse seminiferous tubules in H&E-stained histology images.
Classes: Background (0) | Seminiferous Epithelium (1) | Lumen (2)
| Branch | Encoder | Input | Purpose |
|---|---|---|---|
| Coarse | ResNet34 | Full image 512Γ512 | Identifies the main tubule region |
| Fine | EfficientNet-B4 | Native patch 256Γ256 + coarse mask | Precise border delineation |
The coarse branch provides a soft probability mask that guides the fine branch, ensuring predictions stay within the tubule region. A border detection auxiliary head improves boundary precision.
Total parameters: 47.3M
import torch
from model import CoarseToFineModel
model = CoarseToFineModel()
ckpt = torch.load('best_model_v20b.pt', map_location='cpu')
model.load_state_dict(ckpt['model_state_dict'])
model.eval()
# See inference.py for full sliding-window inference pipeline
The model uses a sliding window approach:
Scale: 0.32 ΞΌm/pixel β areas reported in ΞΌmΒ²
| Metric | Value |
|---|---|
| Validation mIoU | TBD (training in progress) |
| Epithelium IoU | TBD |
| Lumen IoU | TBD |
| Test images OK | TBD/51 |
Trained on NVIDIA GTX 1660 Ti (6GB VRAM), AMD Ryzen 5 5600X, 16GB RAM.
βββ best_model_v20b.pt # Model checkpoint
βββ src/
β βββ model.py # Model architecture
β βββ dataset.py # Data loading + patch extraction
β βββ losses.py # Dice + CE loss functions
β βββ augmentation.py # Kornia GPU augmentation
β βββ utils.py # Mask extraction utilities
βββ train.py # Training script
βββ inference.py # Sliding window inference
βββ evaluate.py # Test set evaluation
@software{seminiferous_segmentation_2025,
title={Coarse-to-Fine Segmentation of Seminiferous Tubules},
author={Lucila Gotfryd},
year={2025},
url={https://huggingface.co/LuGot16/seminiferous-tubule-segmentation}
}
Apache-2.0
This model repository was generated by ML Intern, an agent for machine learning research and development on the Hugging Face Hub.