FISHPrism four-channel ViT-B/16 encoder

This repository contains the trained checkpoint used by FISHPrism, a four-channel fluorescence in situ hybridization (FISH) feature-extraction pipeline. The checkpoint is a frozen DINOv3 ViT-B/16 student encoder adapted to four input channels.

Checkpoint

Field Value
File fishprism_dinov3_vitb16_4ch_student_epoch99.pt
Architecture DINOv3 ViT-B/16
Backbone Student
Input channels, in order DAPI, ERBB2, TOP2A, CEN17
Input size 224 x 224 pixels after preprocessing
Output Mean normalized patch-token embedding (768 dimensions)
Training state Epoch index 99; 100 completed epochs; global step 16100
File size 343,639,055 bytes

Install FISHPrism

git clone https://github.com/MedCAI/FISHPrism-public.git
cd FISHPrism-public
python -m pip install -e vendor/lightly-train
python -m pip install -e ".[imaging]"
python -m pip install huggingface_hub

Download the checkpoint

Download the checkpoint directly from Hugging Face:

hf download Ceilinghans/FISHPrism fishprism_dinov3_vitb16_4ch_student_epoch99.pt --local-dir weights

Or download it from Python:

from huggingface_hub import hf_hub_download

checkpoint = hf_hub_download(
    repo_id="Ceilinghans/FISHPrism",
    filename="fishprism_dinov3_vitb16_4ch_student_epoch99.pt",
)
print(checkpoint)

Extract embeddings from TIFF images

FISHPrism expects four-channel TIFF images with the channel order DAPI, ERBB2, TOP2A, CEN17. Images are converted to C x H x W, normalized to [0, 1], and resized to 224 x 224 by the package.

fishprism extract --checkpoint weights/fishprism_dinov3_vitb16_4ch_student_epoch99.pt --images /path/to/tiff_directory --output outputs/embeddings.csv --model vitb16 --backbone student --device cuda --batch-size 8

Use --device cpu if CUDA is not available. The output CSV contains one row per image and 768 feature columns.

Python API:

from pathlib import Path
from fishprism.embeddings import extract_csv, load_encoder

checkpoint = Path("weights/fishprism_dinov3_vitb16_4ch_student_epoch99.pt")
model = load_encoder(
    checkpoint,
    model_name="vitb16",
    backbone="student",
    device="cuda",
)

extract_csv(
    model,
    image_paths=sorted(Path("/path/to/tiff_directory").glob("*.tif*")),
    output=Path("outputs/embeddings.csv"),
    batch_size=8,
)

Intended use and limitations

  • This checkpoint is a frozen feature encoder, not a diagnostic classifier.
  • It does not contain patient images, patient identifiers, clinical labels, or decision thresholds.
  • Performance depends on acquisition settings, channel mapping, normalization, and other preprocessing choices.
  • Validate the full pipeline on data from the intended site and instrument before research use.
  • It is not a medical device and is not intended for clinical diagnosis or treatment decisions.

Licensing

First-party FISHPrism source code is released under the MIT License. Bundled or upstream components, including Lightly Train and DINOv3, retain their own licenses and terms. The repository metadata does not replace those third-party terms; review the notices in the FISHPrism repository before redistribution or deployment.

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