Da-Mi Kim Rat Tubule Staging (PAS)
Segments visible seminiferous-tubule instances in PAS-stained rat testis and assigns each instance one of the 14 stage or atrophy labels released by Kim et al. (2026). Returns tubule objects, stage counts, and cross-sectional measurements.
Research use only; not for clinical diagnosis.
Using the module
Run the module on selected regions of PAS-stained rat-testis slides in QuPath. Use brightfield RGB images with calibrated pixel size. Review the tubule overlays and stage assignments before exporting measurements. The module returns one polygonal object and one stage or atrophy class per emitted tubule; background is not returned as an object.
| Output class | What it marks |
|---|---|
| Atrophy | Tubules labelled atrophic in the released dataset. |
| Stage01 | Seminiferous tubules labelled stage I. |
| Stage02-03 | Seminiferous tubules labelled stages II–III as one released class. |
| Stage04 | Seminiferous tubules labelled stage IV. |
| Stage05 | Seminiferous tubules labelled stage V. |
| Stage06 | Seminiferous tubules labelled stage VI. |
| Stage07 | Seminiferous tubules labelled stage VII. |
| Stage08 | Seminiferous tubules labelled stage VIII. |
| Stage09 | Seminiferous tubules labelled stage IX. |
| Stage10 | Seminiferous tubules labelled stage X. |
| Stage11 | Seminiferous tubules labelled stage XI. |
| Stage12 | Seminiferous tubules labelled stage XII. |
| Stage13 | Seminiferous tubules labelled stage XIII. |
| Stage14 | Seminiferous tubules labelled stage XIV. |
Measurements
Measurements are calculated within each selected analysis region. Counts cover all emitted tubules with an exact class above. Shape measurements use only tubules strictly contained inside the analysis boundary so a boundary-cut object is not reported as a complete cross-section.
| Measurement | Meaning | Unit |
|---|---|---|
| Tubule Count | Number of emitted, classified tubule instances. | tubules |
| Atrophy Tubule Count | Number classified Atrophy. | tubules |
| Stage 01 Tubule Count | Number classified Stage01. | tubules |
| Stage 02-03 Tubule Count | Number classified Stage02-03. | tubules |
| Stage 04 Tubule Count | Number classified Stage04. | tubules |
| Stage 05 Tubule Count | Number classified Stage05. | tubules |
| Stage 06 Tubule Count | Number classified Stage06. | tubules |
| Stage 07 Tubule Count | Number classified Stage07. | tubules |
| Stage 08 Tubule Count | Number classified Stage08. | tubules |
| Stage 09 Tubule Count | Number classified Stage09. | tubules |
| Stage 10 Tubule Count | Number classified Stage10. | tubules |
| Stage 11 Tubule Count | Number classified Stage11. | tubules |
| Stage 12 Tubule Count | Number classified Stage12. | tubules |
| Stage 13 Tubule Count | Number classified Stage13. | tubules |
| Stage 14 Tubule Count | Number classified Stage14. | tubules |
| Analyzed Area | Area of the selected analysis region. | mm² |
| Tubule Area | Area of each fully contained emitted tubule. Its pooled mean is average tubule area. | µm² |
| Tubule Minor Axis | Central-moment ellipse-equivalent short axis of each fully contained tubule. | µm |
| Tubule Major Axis | Central-moment ellipse-equivalent long axis of each fully contained tubule. | µm |
| Tubule Circularity | 4πA/P² on the largest component's exterior outline, with the perimeter measured after smoothing out the model's pixel steps; 1 is an ideal circle. | unitless |
Across regions, counts and analyzed area are summed; size and shape summaries pool individual tubules and report their mean, standard deviation, and count. Empty regions add no tubules to these summaries. Physical measurements require valid, square-pixel slide calibration. See measurement definitions for details.
Tubule density, atrophy fraction, and stage proportions can be calculated from the summed counts and analyzed area.
Examples
Each image shows original RGB | released annotation | prediction for the same validation field, using filled overlays and a shared colour-safe legend. Predictions come from the selected full-field step-8,600 model. These fields were used for checkpoint selection; they are not independent test examples.
Random example — selected without using model scores (seed 42).

High-quality example — selected for the highest per-image micro-F1.

Failure example — selected for the lowest per-image micro-F1.

Images and annotations: Kim et al., Figshare 28448267, CC BY 4.0. HistoForge added the overlays and panel labels. See example credits.
Performance
The selected full-field model was evaluated on all 137 released validation fields containing 1,343 post-QA annotated tubules. Both F1 measures are per tubule, not per pixel. Exact and ±1-stage F1 score the stage only where a predicted mask matches an annotation at IoU ≥ 0.5; absent and unmatched objects do not enter those conditional scores. End-to-end object F1 also penalizes missed tubules, extra objects, and wrong stages.
| HistoForge validation metric | Result |
|---|---|
| Exact-stage macro / micro F1, 1,339 matched instances | 0.8314 / 0.8656 |
| Cyclic ±1-stage macro / micro F1, matched instances (Atrophy exact) | 0.9955 / 0.9970 |
| End-to-end object macro / micro F1, all GT and emitted objects | 0.6813 / 0.6953 |
| GT instances with an IoU-matched output | 1,339 / 1,343 (99.70%) |
| Panoptic quality / mean Dice over matched masks | 0.7938 / 0.9939 |
| Mask mSA / AP50 / AP75 | 0.6724 / 0.6755 / 0.6725 |
| Class-aware COCO bbox AP@[.50:.95] / mAR@100 | 0.7080 / 0.8199 |
The ±1 score treats adjacent normal stages as equivalent; Atrophy remains outside the cycle. It is descriptive, not exact-stage accuracy. The model emitted 1,991 validation objects: 1,339 matched annotations, 652 unmatched outputs, and four unmatched annotations. Some released boundary annotations are incomplete; unmatched outputs have not been independently adjudicated.
Per-class F1
Scores are pooled over the same 137 validation fields. Exact-stage F1 uses only matched tubules; end-to-end F1 also counts missed and extra objects.
| Class | Matched / annotated tubules | Exact-stage F1 (matched only) | End-to-end object F1 |
|---|---|---|---|
| Atrophy | 60 / 60 | 0.9744 | 0.8571 |
| Stage01 | 197 / 198 | 0.9189 | 0.6788 |
| Stage02-03 | 121 / 121 | 0.8167 | 0.7396 |
| Stage04 | 73 / 73 | 0.6912 | 0.5767 |
| Stage05 | 77 / 77 | 0.7532 | 0.6784 |
| Stage06 | 61 / 61 | 0.7937 | 0.7042 |
| Stage07 | 272 / 274 | 0.9723 | 0.7472 |
| Stage08 | 84 / 84 | 0.9419 | 0.8020 |
| Stage09 | 45 / 45 | 0.8478 | 0.6783 |
| Stage10 | 33 / 33 | 0.7714 | 0.6585 |
| Stage11 | 51 / 51 | 0.7368 | 0.5385 |
| Stage12 | 114 / 114 | 0.8430 | 0.6538 |
| Stage13 | 99 / 100 | 0.8308 | 0.6722 |
| Stage14 | 52 / 52 | 0.7473 | 0.5528 |
| Macro average | 1,339 / 1,343 total | 0.8314 | 0.6813 |
Comparison with the authors
| Model | Evaluation set | Bbox mAP | Bbox mAR |
|---|---|---|---|
| This model | 137 validation fields; 1,343 annotated tubules after QA | 0.7080 | 0.8199 |
| Kim et al. (2026), Cascade R-CNN ResNet-50 | 68 TEST fields; 685 annotated tubules | 0.869 | 0.977 |
Both report class-aware bounding-box metrics over IoU 0.50–0.95. The authors' row is quoted from the paper, not our rerun. The evaluation sets differ, so this is a reference comparison, not a controlled model ranking. Our reported results use validation, which also selected the checkpoint; this module has no reported official TEST result. The paper did not report mask or per-tubule stage F1.
Limitations
- Evidence is limited to PAS-stained Sprague Dawley rat testis from the released source. Scanner, laboratory, fixation, disease, stain, and species generalization have not been established.
- The 0.52 µm/px model scale is estimated, not authoritative scanner metadata.
- Slide and animal independence between training and validation cannot be established from the released data.
- Released polygons describe visible field-local pieces, including boundary-cut pieces. They do not provide unseen contours or an expert intact/stageable cross-section label.
- Validation selected the checkpoint; only one seed was trained. Official TEST remains sealed, and there is no external cohort or pathologist-adjudicated output review.
- Adjacent normal stages are morphologically similar. The ±1 result is not exact staging performance and does not make adjacent errors biologically harmless.
- HistoForge serving can omit a decoded tubule if its background class wins the instance vote. Validation scoring used a foreground-only vote, so the serving-path frequency and accuracy effect have not been measured.
- Shape measurements inherit segmentation, section-angle, vectorization, tissue-processing, analysis-boundary, and slide-calibration errors.
- Outputs are for exploratory research, not diagnosis, fertility assessment, or treatment decisions.
Models and training
One network performs HoVer-style instance segmentation and per-tubule classification. It uses an official DINOv3 ViT-L/16 backbone with an H&E-pretrained multiscale adapter; the Da-Mi segmentation and classification heads were trained for this dataset. HistoForge resamples calibrated input to an estimated 0.52 µm/px working scale and stitches overlapping 1,024-pixel tiles before decoding. The dataset lacks scanner microns-per-pixel metadata, so this working scale is an estimate, not physical calibration. Measurements use the user's slide calibration.
| Stage / component | Method and initialization | Input → output | Module artifact |
|---|---|---|---|
| Tubule model | DINOv3 backbone, H&E-pretrained adapter, fresh HoVer and class heads | PAS RGB → tubule polygons and stage/atrophy classes | Weights |
| Module recipe | Input scale, tiling, decoding, and class mapping | Inference configuration | recipe.json |
| Measurement script | Counts and contained-tubule morphometry | Tubule objects and analysis region → 20 measurements | metrics.groovy |
Training used 1,434 released TRAIN fields and 13,587 post-QA instances, one random native 1,024-pixel crop per optimizer step, PAS-safe augmentation, seed 42, 500 head-only steps, and 9,500 full-model steps. Validation ran every 100 steps. The step-8,600 checkpoint was selected by matched-instance foreground macro-F1 on all 137 released validation fields.
See data preparation and reproducibility and measurement definitions.
Licences and citations
Training data notice: these weights start from a pretrained model whose training data includes CC BY-NC-SA 4.0 datasets and datasets with no stated licence, listed in TRAINING-SOURCES.md. They are released for non-commercial research. This release grants no rights in that data. Commercial users should make their own assessment or obtain permission from the dataset authors.
- Weights: the DINOv3 License applies; see training sources for the stated terms of the datasets used in the model's lineage.
- Measurement script and configuration: Apache-2.0.
- Example images and released annotations: CC BY 4.0; see example credits.
- Training data: training sources and licences.
Kim et al. (2026). Automated spermatogenic staging in periodic acid-Schiff-stained testes of Sprague–Dawley rats using a deep learning model for normal and atrophied tissues. PLOS ONE 21(6): e0337245. doi:10.1371/journal.pone.0337245.
Foundation model: DINOv3 (2025).