upload torchscript model and config json
Browse filesThis adds the TCGA LUAD lung adenocarcinoma classification model as a torchscript model.
```python
import torch
import wsinfer
w = wsinfer.get_model_weights('resnet34', 'TCGA-LUAD-v1')
model = w.load_model()
c = torch.jit.script(model, example_inputs=[(torch.ones(1, 3, w.transform.resize_size, w.transform.resize_size),)])
torch.jit.save(c, root / w.url_file_name)
```
- config.json +26 -0
- torchscript_model.pt +3 -0
config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"num_classes": 6,
|
3 |
+
"transform": {
|
4 |
+
"resize_size": 224,
|
5 |
+
"mean": [
|
6 |
+
0.8301,
|
7 |
+
0.66,
|
8 |
+
0.8054
|
9 |
+
],
|
10 |
+
"std": [
|
11 |
+
0.0864,
|
12 |
+
0.1602,
|
13 |
+
0.0647
|
14 |
+
]
|
15 |
+
},
|
16 |
+
"patch_size_pixels": 350,
|
17 |
+
"spacing_um_px": 0.5,
|
18 |
+
"class_names": [
|
19 |
+
"lepidic",
|
20 |
+
"benign",
|
21 |
+
"acinar",
|
22 |
+
"micropapillary",
|
23 |
+
"mucinous",
|
24 |
+
"solid"
|
25 |
+
],
|
26 |
+
}
|
torchscript_model.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d2cafd815a4bfc970c1b423a6c8e1f817f7dc18fc8261774d18aac4d2ed29360
|
3 |
+
size 85352028
|