Image Classification
timm
Safetensors
1aurent commited on
Commit
97c97f9
1 Parent(s): cf33e74

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +70 -2
README.md CHANGED
@@ -3,6 +3,74 @@ tags:
3
  - image-classification
4
  - timm
5
  library_name: timm
6
- license: apache-2.0
 
 
 
 
 
 
 
7
  ---
8
- # Model card for resnet50.lunit_BT
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  - image-classification
4
  - timm
5
  library_name: timm
6
+ license: other
7
+ license_name: lunit-non-commercial
8
+ license_link: https://github.com/lunit-io/benchmark-ssl-pathology/blob/main/LICENSE
9
+ datasets:
10
+ - 1aurent/BACH
11
+ - 1aurent/NCT-CRC-HE
12
+ - 1aurent/PatchCamelyon
13
+ pipeline_tag: image-classification
14
  ---
15
+
16
+ # Model card for resnet50.lunit_bt
17
+
18
+ A ResNet50 image classification model. \
19
+ Trained on 33M histology patches from various pathology datasets.
20
+
21
+ ## Model Details
22
+
23
+ - **Model Type:** Feature backbone
24
+ - **Model Stats:**
25
+ - Params (M): 23.6
26
+ - Image size: ? x ? x 3
27
+ - **Papers:**
28
+ - Benchmarking Self-Supervised Learning on Diverse Pathology Datasets: https://arxiv.org/abs/2212.04690
29
+ - **Datasets:**
30
+ - BACH
31
+ - CRC
32
+ - MHIST
33
+ - PatchCamelyon
34
+ - CoNSeP
35
+ - **Original:** https://github.com/lunit-io/benchmark-ssl-pathology
36
+ - **License:** [lunit-non-commercial](https://github.com/lunit-io/benchmark-ssl-pathology/blob/main/LICENSE)
37
+
38
+ ## Model Usage
39
+
40
+ ### Image Embeddings
41
+ ```python
42
+ from urllib.request import urlopen
43
+ from PIL import Image
44
+ import timm
45
+
46
+ # get example histology image
47
+ img = Image.open(
48
+ urlopen(
49
+ "https://github.com/owkin/HistoSSLscaling/raw/main/assets/example.tif"
50
+ )
51
+ )
52
+
53
+ # load model from the hub
54
+ model = timm.create_model(
55
+ model_name="hf-hub:1aurent/resnet50.lunit_bt",
56
+ pretrained=True,
57
+ ).eval()
58
+
59
+ # get model specific transforms (normalization, resize)
60
+ data_config = timm.data.resolve_model_data_config(model)
61
+ transforms = timm.data.create_transform(**data_config, is_training=False)
62
+
63
+ output = model(transforms(img).unsqueeze(0)) # output is (batch_size, num_features) shaped tensor
64
+ ```
65
+
66
+ ## Citation
67
+ ```bibtex
68
+ @inproceedings{kang2022benchmarking,
69
+ author = {Kang, Mingu and Song, Heon and Park, Seonwook and Yoo, Donggeun and Pereira, Sérgio},
70
+ title = {Benchmarking Self-Supervised Learning on Diverse Pathology Datasets},
71
+ booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
72
+ month = {June},
73
+ year = {2023},
74
+ pages = {3344-3354}
75
+ }
76
+ ```