1aurent commited on
Commit
7f224e1
1 Parent(s): fb7aff2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +56 -2
README.md CHANGED
@@ -7,6 +7,60 @@ tags:
7
  - owkin
8
  - histology
9
  library_name: timm
10
- license: apache-2.0
11
  ---
12
- # Model card for vit_base_patch16_224.owkin_pancancer
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  - owkin
8
  - histology
9
  library_name: timm
 
10
  ---
11
+ # Model card for vit_base_patch16_224.owkin_pancancer
12
+
13
+ A Vision Transformer (ViT) image classification model.
14
+ Trained on 40M pan-cancer histology tiles from TCGA by Owkin.
15
+
16
+ ## Model Details
17
+
18
+ - **Model Type:** Image classification / feature backbone
19
+ - **Model Stats:**
20
+ - Params (M): 85.8
21
+ - Image size: 224 x 224 x 3
22
+ - **Papers:**
23
+ - Scaling Self-Supervised Learning for Histopathology with Masked Image Modeling: https://www.medrxiv.org/content/10.1101/2023.07.21.23292757v2
24
+ - **Dataset:** TGCA: https://portal.gdc.cancer.gov/
25
+ - **Original:** https://github.com/owkin/HistoSSLscaling/
26
+ - **License:** https://github.com/owkin/HistoSSLscaling/blob/main/LICENSE.txt
27
+
28
+ ## Model Usage
29
+
30
+ ### Image Embeddings
31
+ ```python
32
+ from urllib.request import urlopen
33
+ from PIL import Image
34
+ import timm
35
+
36
+ img = Image.open(urlopen(
37
+ "https://github.com/owkin/HistoSSLscaling/raw/main/assets/example.tif"
38
+ ))
39
+
40
+ model = timm.create_model(
41
+ '1aurent/vit_base_patch16_224.owkin_pancancer',
42
+ pretrained=True,
43
+ )
44
+ model = model.eval()
45
+
46
+ # get model specific transforms (normalization, resize)
47
+ data_config = timm.data.resolve_model_data_config(model)
48
+ transforms = timm.data.create_transform(**data_config, is_training=False)
49
+
50
+ output = model(transforms(img).unsqueeze(0)) # output is (batch_size, num_features) shaped tensor
51
+ ```
52
+
53
+ ## Citation
54
+ ```bibtex
55
+ @article {Filiot2023.07.21.23292757,
56
+ author = {Alexandre Filiot and Ridouane Ghermi and Antoine Olivier and Paul Jacob and Lucas Fidon and Alice Mac Kain and Charlie Saillard and Jean-Baptiste Schiratti},
57
+ title = {Scaling Self-Supervised Learning for Histopathology with Masked Image Modeling},
58
+ elocation-id = {2023.07.21.23292757},
59
+ year = {2023},
60
+ doi = {10.1101/2023.07.21.23292757},
61
+ publisher = {Cold Spring Harbor Laboratory Press},
62
+ URL = {https://www.medrxiv.org/content/early/2023/09/14/2023.07.21.23292757},
63
+ eprint = {https://www.medrxiv.org/content/early/2023/09/14/2023.07.21.23292757.full.pdf},
64
+ journal = {medRxiv}
65
+ }
66
+ ```