Add TorchScript files for the QuPath extension
Browse filesfloat32 for the CPU and Apple's GPU, bf16 for an NVIDIA GPU; the 32 px white margin at image edges is in their macrotome.json.
Files changed (3)
- README.md+8-1
- segformer.torchscript-bf16.ptAdded+3
- segformer.torchscript.ptAdded+3
32 unmodified lines33343536373839404142434432 unmodified lines```pythonimport macrotomemodel = macrotome.load("segformer") # downloads config.json and model.safetensors from this repositoryres = model.segment("slide.svs")tissue, pen, quality = res.mask("tissue"), res.mask("pen"), res.mask("quality")res.write("out/") # label TIFF, QuPath GeoJSON, JSON summary, overlay```## Results98 held-out slides (Tissues with Issues, Conflux, pathologist-labelled breast slides). SegFormer was trained on none32 unmodified lines3334353637383940414243444546474849505132 unmodified lines```pythonimport macrotomemodel = macrotome.load("segformer") # downloads the weights from this repositoryres = model.segment("slide.svs")tissue, pen, quality = res.mask("tissue"), res.mask("pen"), res.mask("quality")res.write("out/") # label TIFF, QuPath GeoJSON, JSON summary, overlay```## QuPath`segformer.torchscript.pt` (float32, for the CPU and Apple's GPU) and `segformer.torchscript-bf16.pt` (bfloat16, for an NVIDIA GPU, as thepublished scores) are this model as TorchScript, for the macrotome QuPath extension, which downloads them itself. Theytake float RGB in 0..255 and return the three probabilities; the tile size, overlap, the 32 px white margin at imageedges and the resolution are in `macrotome.json` inside each file.## Results98 held-out slides (Tissues with Issues, Conflux, pathologist-labelled breast slides). SegFormer was trained on none
123version https://git-lfs.github.com/spec/v1oid sha256:cf4c1b820a74269a461d0193a8057f490a1afbd8979763660018dee4329849d6size 99353995123version https://git-lfs.github.com/spec/v1oid sha256:db0cf27aed32ddf8ce10c1c47375f38d10e3e334030cd81f197c2ea29cf70b4asize 99333431README.md+8-1
segformer.torchscript-bf16.ptAdded+3
segformer.torchscript.ptAdded+3