add torchscript model and config json
Browse filesAdds a torchscript version of the prostate adenocarcinoma model.
```python
import torch
import wsinfer
w = wsinfer.get_model_weights('resnet34', 'TCGA-PRAD-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 +23 -0
- torchscript_model.pt +3 -0
config.json
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"num_classes": 3,
|
3 |
+
"transform": {
|
4 |
+
"resize_size": 224,
|
5 |
+
"mean": [
|
6 |
+
0.6462,
|
7 |
+
0.507,
|
8 |
+
0.8055
|
9 |
+
],
|
10 |
+
"std": [
|
11 |
+
0.1381,
|
12 |
+
0.1674,
|
13 |
+
0.1358
|
14 |
+
]
|
15 |
+
},
|
16 |
+
"patch_size_pixels": 175,
|
17 |
+
"spacing_um_px": 0.5,
|
18 |
+
"class_names": [
|
19 |
+
"grade3",
|
20 |
+
"grade4+5",
|
21 |
+
"benign"
|
22 |
+
]
|
23 |
+
}
|
torchscript_model.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ea5475460f06461b8d0059d1a848f4e975d0fa25b2b7dd64c514d05365451e35
|
3 |
+
size 85345884
|