You need to agree to share your Hugging Face information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Access is approved automatically. By requesting access, you share your Hugging Face username and email with HistoForge. We may get in touch to ask for your feedback.

Log in or Sign Up to review the conditions and access this model content.

DeepLIIF Ki-67 Nuclei (IHC)

Segments nuclei in human Ki-67 immunohistochemistry (IHC) images and classifies each nucleus as positive or negative. Returns nucleus objects, counts, and the Ki-67 positive index: the percentage of classified nuclei that are positive.

Experimental research model; not clinically validated.

Using the module

Run the module on selected regions of Ki-67-stained tissue in QuPath. Use brightfield RGB images with DAB staining and calibrated pixel size. Review the nucleus overlays before exporting measurements.

Output class What it marks
Ki-67 Positive Nucleus One detected nucleus classified as Ki-67 positive.
Ki-67 Negative Nucleus One detected nucleus classified as Ki-67 negative.

Nucleus objects do not overlap. Background is not returned as an object.

Measurements

Measurements use the current classified nuclei in each selected region of interest (ROI), including manual additions, deletions, and class corrections.

Measurement Meaning Unit
Ki-67 Positive Nuclei Number of positive nuclei. nuclei
Ki-67 Negative Nuclei Number of negative nuclei. nuclei
Ki-67 Total Nuclei Positive + negative nuclei. nuclei
Ki-67 Positive Index 100 × Positive / Total. %

Use non-overlapping ROIs to avoid counting nuclei twice. Across ROIs, counts are summed and Positive Index is calculated from the combined counts, not averaged percentages. If no classified nuclei are present, counts are zero and Positive Index is blank. Failed regions are not treated as zero-cell regions.

See Measurement definitions for calculation and export details.

Examples

Each image shows original | annotation | prediction for the same field. These held-out test fields were selected by deterministic pseudorandom sampling, without scores or visual screening, and were not used for training or checkpoint selection. All three happen to be Lung fields. Predictions use the benchmark evaluation procedure, not current HistoForge inference.

Lung, test example 1

Lung test example 1: original image, released annotation, and frozen benchmark prediction

Lung, test example 2

Lung test example 2: original image, released annotation, and frozen benchmark prediction

Lung, test example 3

Lung test example 3: original image, released annotation, and frozen benchmark prediction

See Example credits for sources and selection details.

Performance

Evaluated on 598 DeepLIIF test images: 473 Lung and 125 Bladder fields.

Metric Result 95% interval Interpretation
Mean segmentation accuracy (mSA) 0.1491 0.1322–0.1659 Cellpose instance score TP / (TP + FP + FN), averaged across IoU thresholds 0.50–0.95 and then equally across images.
Object macro-F1 0.4944 0.4632–0.5248 Macro-average of positive- and negative-nucleus F1 after IoU-0.5 instance matching.
Aggregated Jaccard Index (AJI) 0.5467 not calculated Instance-segmentation overlap over the complete test population.
Positive Index mean absolute error 6.21 percentage points 5.40–7.10 percentage points Mean absolute image-level difference.

Intervals use 2,000 bootstrap resamples over 47 coordinate-based image groups, not patients.

Per-class object F1

Counts are pooled across the same 598 images. A correct detection must match an annotated nucleus at mask IoU ≥ 0.5 and have the correct class. Missed, extra, and misclassified nuclei count as errors; these are not matched-only scores.

Nucleus class Annotated nuclei Object F1
Ki-67 Positive 7,063 0.4604
Ki-67 Negative 36,513 0.5283

By tissue:

Tissue Images mSA Object macro-F1 Positive Index MAE
Lung 473 0.1697 0.5256 6.31 percentage points
Bladder 125 0.0711 0.3961 5.81 percentage points

The DeepLIIF authors reported AJI 0.5348 and Ki-67 quantification error 6.07 percentage points on 164 Breast fields. Different cohorts and scoring methods prevent a direct comparison. Their centroid-distance F1 also differs from the IoU-matched object macro-F1 reported here.

Limitations

  • Independent testing covers Lung and Bladder, not Breast. Performance across other laboratories, scanners, and image scales is not established.
  • Test scores use the benchmark evaluation procedure; accuracy with HistoForge inference has not been independently measured.
  • Patient and slide identities are unavailable, so independence between training and test images cannot be verified at those levels.
  • Small and border-touching nuclei are important failure cases; results are weaker in Bladder tissue.
  • Reference masks were derived from fluorescence images. Individual pathologist review of the contours was not documented.
  • Missed, extra, merged, split, or misclassified nuclei can bias counts and Positive Index. The model provides no calibrated confidence or abstention score.
  • The module does not select hotspots, measure staining intensity or H-score, predict prognosis, or support clinical decisions.

Models and training

One network performs segmentation and classification: DINOv3 ViT-L/16 with a multiscale adapter, Cellpose flow decoder, and background/positive/negative classification head. It was pretrained on 12 nucleus datasets, predominantly H&E and including LyNSeC IHC, then fully fine-tuned on DeepLIIF with a new classification head.

The working resolution is 0.224 µm/px. This is estimated from nominal 40× source images, not measured scanner calibration. HistoForge resamples calibrated inputs to this scale.

Fine-tuning used 1,117 images representing 291 source fields, with equal total sampling weight per field. Training used 512 × 512 inputs with blur, noise, and RGB augmentation, without H&E stain decomposition. The final model was trained for 2,435 optimizer steps at seed 42, chosen before test evaluation.

Stage / component Method and initialization Input -> output Module artifact
Nucleus model Pretrained DINOv3 with Cellpose-flow and classification heads Ki-67/DAB images -> positive and negative nucleus instances Weights
Module recipe Image scale, tiling, and output classes Inference configuration recipe.json
Measurement script Counts and Positive Index Classified nuclei -> four measurements metrics.groovy

Training and evaluation code is not publicly available.

Licences and citations

  • Weights: the DINOv3 License applies; the training-data sources and their stated terms are listed below.
  • Measurement script and configuration: Apache-2.0.
  • Example images and released annotations: CC BY 4.0; see Example credits.
  • Training data: the source datasets and their stated terms are listed in Training datasets and licences. Training data are not included in this module.

Dataset and task: Ghahremani et al. (2022), Deep learning-inferred multiplex immunofluorescence for immunohistochemical image quantification, Nature Machine Intelligence 4, 401–412. doi:10.1038/s42256-022-00471-x.

Foundation model: Siméoni et al. (2025), DINOv3. arXiv:2508.10104.

Instance-decoding method: Stringer et al. (2021), Cellpose: a generalist algorithm for cellular segmentation. doi:10.1038/s41592-020-01018-x.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for histoforge/deepliif-ki67-nuclei

Finetuned
(13)
this model

Paper for histoforge/deepliif-ki67-nuclei