SigLIP-LoRA Osteosarcoma โ€” base_v2 (roots)

Optuna-tuned SigLIP-SO400M LoRA adapters for 3-class osteosarcoma H&E histopathology patch classification on the clean roots client (clinic_00_clean, SHA-256 deduplicated).

Canonical single-site reference checkpoint. Downstream: pkg_hpo_best (PKG private update) โ†’ base_v3 (weighted FedAvg). Historical FedAvg: fedavg-v1.

Model family

Checkpoint Role Hugging Face
base_v2 (this repo) Roots single-site HPO best siglip-lora-osteosarcoma-base-v2
pkg_hpo_best PKG client private Optuna (init from base_v2) siglip-lora-osteosarcoma-pkg-hpo-best
base_v3 Federated merge (roots + PKG) siglip-lora-osteosarcoma-base-v3
fedavg-v1 Historical FL round (superseded by base_v3) siglip-lora-osteosarcoma-fedavg-v1

Holdout results (roots clean test, 410 patches)

Metric Value
Overall accuracy 91.22%
Tumor sensitivity 0.973
Tumor โ†’ Non-Tumor misses 6
Non-Tumor โ†’ Tumor false alarms 26

Confusion matrix โ€” base_v2 roots holdout

Cross-dataset near-duplicate hygiene

Deep analysis: notebooks/base_v2_qualitative_research.ipynb.

Model description

Custom JAX/Flax LoRA adapter set on the frozen google/siglip-so400m-patch14-384 vision tower (loaded via big_vision). Not a Hugging Face transformers checkpoint. Only adapters + classification head are stored (~few KB Orbax payload).

Property Value
Framework JAX / Flax
Base model google/siglip-so400m-patch14-384
Task 3-class image classification
Input size 384ร—384 RGB
Normalization SigLIP (mean=std=0.5)
LoRA rank / alpha 8 / 16
LoRA targets Attention query + value kernels
Training Single-site Optuna HPO on client_00_clean
Roots holdout accuracy (410 patches) 91.22%

Classes

Label ID
Non-Tumor 0
Non-Viable-Tumor 1
Viable 2

Training (clean roots HPO)

  • Client: data/client_00_clean (deduplicated DS_PRIMARY / clinic_00)
  • Selected: lrโ‰ˆ4.68e-4, epochs=7, color_jitterโ‰ˆ0.017, max_shift=7, scale [0.727, 1.325], hflip=True
  • Fixed: batch=1 + grad accum 4 (eff 4), LoRA r=8/a=16, image=384
  • Seed: 2121
  • Saved test accuracy in metadata: 0.9122
# From FederatedLoRA-OsteosarcomaClassification/
make roots-info
# Or train recipe equivalent โ€” see checkpoints/base_v2/training_metadata.json

Deploy / usage

git clone https://github.com/lfniederauer/FederatedLoRA-OsteosarcomaClassification
cd FederatedLoRA-OsteosarcomaClassification
pip install -r requirements.txt
export BIG_VISION_ROOT=~/git/big_vision

# Local checkpoint
python scripts/infer.py --checkpoint checkpoints/base_v2 --image patch.jpg

# From this Hugging Face repo
python scripts/infer.py --hf-repo lfniederauer/siglip-lora-osteosarcoma-base-v2 --image patch.jpg

Publish / refresh this bundle from a checkout:

make sync-hf-assets
make publish-hf-base-v2

Files in this repo

File Description
orbax_checkpoint/ Trainable weights (LoRA + head)
config.json Model + HPO provenance
preprocessor_config.json Size + norm
training_metadata.json Hyperparams + test_accuracy
assets/ Aggregate figures (confusion, data hygiene)

Datasets

ID Reference
DS_PRIMARY (clean) tatsuyaryu/OsteosarcomaHistopathologyClassification โ€” deduplicated locally as client_00_clean

Limitations

  • Research use only โ€” not for clinical decision-making.
  • Requires JAX + a big_vision clone (BIG_VISION_ROOT).
  • Metrics are on a fixed clean roots holdout (410 patches after dedup); do not compare naively to older 460-patch figures.

Citation

@misc{siglip_lora_osteosarcoma_base_v2,
  title={SigLIP-LoRA base_v2 Osteosarcoma Histopathology Classifier (91.22% clean roots)},
  author={lfniederauer},
  year={2026},
  howpublished={\url{https://huggingface.co/lfniederauer/siglip-lora-osteosarcoma-base-v2}}
}

@misc{tatsuyaryu_osteosarcoma_hf,
  author       = {{tatsuyaryu}},
  title        = {OsteosarcomaHistopathologyClassification},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/datasets/tatsuyaryu/OsteosarcomaHistopathologyClassification}},
  note         = {Hugging Face imagefolder split (train/test) derived from TCIA Osteosarcoma-Tumor-Assessment. Cite the original TCIA dataset (DOI: 10.7937/tcia.2019.bvhjhdas).}
}

@dataset{leavey2019osteosarcoma_tcia,
  author    = {Leavey, Patrick and Sengupta, Aniruddha and Rakheja, Dinesh and Daescu, Ovidiu and Arunachalam, Harish Babu and Mishra, Rashika},
  title     = {Osteosarcoma data from {UT Southwestern}/{UT Dallas} for Viable and Necrotic Tumor Assessment ({Osteosarcoma-Tumor-Assessment})},
  year      = {2019},
  publisher = {The Cancer Imaging Archive},
  doi       = {10.7937/tcia.2019.bvhjhdas},
  url       = {https://www.cancerimagingarchive.net/collection/osteosarcoma-tumor-assessment/}
}
Downloads last month
32
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Dataset used to train lfniederauer/siglip-lora-osteosarcoma-base-v2