{"architecture":{"backbone":"ViT-L/16","context":"single tile; slide-level tasks use multiple-instance learning over tile embeddings","family":"Vision Transformer (ViT)","input":"224\u00d7224 H&E tile at 20\u00d7 magnification (RGB, ImageNet normalisation)","notes_en":"Loaded through timm as hf-hub:MahmoodLab/UNI (ViT-L/16, patch 16, no classifier head). The DINOv2 recipe is unchanged; the novelty is the scale and diversity of the in-house pathology data.","notes_pl":"\u0141adowany przez timm jako hf-hub:MahmoodLab/UNI (ViT-L/16, patch 16, bez g\u0142owy klasyfikacyjnej). Przepis DINOv2 bez zmian; nowo\u015bci\u0105 jest skala i r\u00f3\u017cnorodno\u015b\u0107 w\u0142asnych danych patomorfologicznych.","output":"1,024-dimensional tile embedding (CLS token)","params":"~303M","pretraining":"DINOv2 self-supervised learning (no labels)"},"article":null,"cancer_slugs":["pan-cancer"],"category":"pathology","confidence":"high","datasets":[{"name":"CAMELYON16 / CAMELYON17","note":"slide-level metastasis detection benchmark","role":"evaluation","slug":"camelyon16"},{"name":"PANDA \u2014 Prostate cANcer graDe Assessment","note":"prostate Gleason grading benchmark","role":"evaluation","slug":"panda"},{"name":"TCGA \u2014 The Cancer Genome Atlas (via NCI Genomic Data Commons)","note":"subtyping and biomarker tasks drawn from TCGA cohorts","role":"evaluation","slug":"tcga"}],"developer":"Mahmood Lab, Brigham and Women's Hospital / Harvard Medical School","evaluation":[{"benchmark":"CAMELYON16 (breast lymph-node metastasis, slide-level)","dataset_slug":"camelyon16","external":true,"metric":"AUROC","source":"https://www.nature.com/articles/s41591-024-02857-3","value":"reported in paper (weakly supervised ABMIL)"},{"benchmark":"PANDA (prostate Gleason grading)","dataset_slug":"panda","external":true,"metric":"quadratic-weighted \u03ba / balanced accuracy","source":"https://www.nature.com/articles/s41591-024-02857-3","value":"reported in paper"},{"benchmark":"34-task suite (subtyping, grading, biomarkers; 20 tissue types)","external":true,"metric":"average performance vs. CTransPath / REMEDIS","source":"https://www.nature.com/articles/s41591-024-02857-3","value":"best or tied-best on the majority of tasks"}],"hf":{"downloads":40388,"fetched_at":"2026-09-09T21:33:08Z","gated":"auto","last_modified":"2025-03-06","library":"timm","license":"cc-by-nc-nd-4.0","likes":372,"pipeline_tag":"image-feature-extraction"},"kind":"foundation","license":"cc-by-nc-nd-4.0","limitations":"- Trained on H&E only; immunohistochemistry, frozen sections and non-standard stains are out of distribution.\n- Scanner and lab colour variation still matters; the paper does not report per-ancestry performance.\n- Non-commercial licence blocks product use without a separate agreement.\n- Slide-level tasks need a second, task-specific aggregation model that you must train and validate yourself.","links":{"demo":null,"docs":null,"doi":"10.1038/s41591-024-02857-3","github":"https://github.com/mahmoodlab/UNI","huggingface":"https://huggingface.co/MahmoodLab/UNI","paper":"https://www.nature.com/articles/s41591-024-02857-3","pmid":null},"modalities":["histopathology"],"name":"UNI","notable_uses":"Benchmarked on 34 clinical tasks of varying difficulty across 20 major tissue types, including subtyping, grading, metastasis detection and biomarker prediction; widely used as the tile encoder in academic pathology pipelines.","openness":"gated-weights","regulatory":{"intended_use_en":"Research feature extractor; not a medical device and not validated for clinical decision-making.","intended_use_pl":"Badawczy ekstraktor cech; nie jest wyrobem medycznym i nie by\u0142 walidowany do decyzji klinicznych.","source_url":"https://huggingface.co/MahmoodLab/UNI","status":"research-only"},"regulatory_status":"research-only","release_date":"2024-03-19","run_snippet":"# generic timm loader \u2014 check the model card for the exact init args and image normalisation\nimport timm, torch\nfrom huggingface_hub import login\nlogin()  # gated repos: accept the licence on huggingface.co first\nmodel = timm.create_model('hf-hub:MahmoodLab/UNI', pretrained=True)\nmodel.eval()\ncfg = timm.data.resolve_data_config({}, model=model)\ntransform = timm.data.create_transform(**cfg)\n# emb = model(transform(tile).unsqueeze(0))  # 1 x D tile embedding\n","settings":["basic-research","diagnosis","prognosis"],"slug":"uni","sources":[{"label":"Chen RJ et al. Towards a general-purpose foundation model for computational pathology. Nat Med 2024","url":"https://www.nature.com/articles/s41591-024-02857-3"},{"label":"Hugging Face model card \u2014 MahmoodLab/UNI","url":"https://huggingface.co/MahmoodLab/UNI"},{"label":"GitHub \u2014 mahmoodlab/UNI","url":"https://github.com/mahmoodlab/UNI"}],"summary":"General-purpose self-supervised vision encoder for H&E histopathology tiles, pretrained on more than 100 million tiles from over 100,000 whole-slide images; the reference foundation model for pathology feature extraction.","tasks":["feature-extraction","classification","detection","prognosis"],"training":{"consent_notes":"Institutional slides under IRB approval; the pretraining set itself is not released.","institutions":"MGH, BWH (Boston, USA); GTEx","populations":"US academic hospital population; not stratified in the paper by ancestry","size":">100M tiles from >100,000 WSIs (Mass-100K)","summary_en":"Mass-100K: over 100 million tiles sampled from more than 100,000 diagnostic H&E whole-slide images across 20 major tissue types, collected at Massachusetts General Hospital and Brigham and Women's Hospital and complemented with GTEx slides. No public test data was included in pretraining, which is what makes the public benchmarks meaningful.","summary_pl":"Mass-100K: ponad 100 milion\u00f3w kafelk\u00f3w z ponad 100 000 diagnostycznych preparat\u00f3w H&E z 20 g\u0142\u00f3wnych typ\u00f3w tkanek, zebranych w Massachusetts General Hospital i Brigham and Women's Hospital, uzupe\u0142nionych preparatami GTEx. Publiczne dane testowe nie wesz\u0142y do pretreningu \u2014 dlatego publiczne benchmarki co\u015b m\u00f3wi\u0105."},"updated_at":"2026-09-09T21:33:09.703710","url":"/ai-oncology/models/uni","usage":{"hardware":"Single GPU is enough for inference; a 20\u00d7-magnified slide yields thousands of tiles, so batch tiles and cache embeddings.","library":"timm","notes_en":"Weights are gated: request access on Hugging Face and accept the CC-BY-NC-ND licence (research only, no derivatives distribution). Use the exact 224\u00d7224 / 20\u00d7 regime the card specifies \u2014 off-magnification tiles degrade features silently.","notes_pl":"Wagi s\u0105 gated: popro\u015b o dost\u0119p na Hugging Face i zaakceptuj licencj\u0119 CC-BY-NC-ND (tylko badania, bez rozpowszechniania pochodnych). Trzymaj si\u0119 re\u017cimu 224\u00d7224 / 20\u00d7 z karty \u2014 kafelki spoza tego powi\u0119kszenia psuj\u0105 cechy po cichu."},"verified_at":"2026-09-05T22:26:01.084174","verified_by":"editorial","version":"UNI (v1)","what_it_does":"UNI turns a histopathology image tile into a fixed-length embedding without any task-specific training. Downstream, those embeddings are pooled per slide (e.g. with a lightweight attention model) to classify cancer subtype, grade, detect metastases or predict molecular status."}
