liamchalcroft commited on
Commit
cd3b71b
·
verified ·
1 Parent(s): 2c7ebf9

Upload SynthStroke baseline model

Browse files
Files changed (2) hide show
  1. README.md +85 -0
  2. model.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ library_name: pytorch
4
+ tags:
5
+ - medical
6
+ - segmentation
7
+ - stroke
8
+ - neurology
9
+ - mri
10
+ pipeline_tag: image-segmentation
11
+ ---
12
+
13
+ # Baseline
14
+
15
+ Baseline model trained on real ATLAS T1w images.
16
+
17
+ ## Model Details
18
+
19
+ - **Name**: Baseline
20
+ - **Classes**: 0 (Background), 1 (Stroke)
21
+ - **Patch Size**: 192³
22
+ - **Voxel Spacing**: 1mm³
23
+ - **Input Channels**: 1 (T1w MRI)
24
+
25
+ ## Usage
26
+
27
+ ### Loading from Hugging Face Hub
28
+
29
+ ```python
30
+ import torch
31
+ from synthstroke_model import SynthStrokeModel
32
+
33
+ # Load the model from Hugging Face Hub
34
+ model = SynthStrokeModel.from_pretrained("liamchalcroft/synthstroke-baseline")
35
+
36
+ # Prepare your input (example shape: batch_size=1, channels=1, H, W, D)
37
+ input_tensor = torch.randn(1, 1, 192, 192, 192)
38
+
39
+ # Get predictions (with optional TTA for improved accuracy)
40
+ predictions = model.predict_segmentation(input_tensor, use_tta=True)
41
+
42
+ # Get lesion probability map (channel 1)
43
+ lesion_probs = predictions[:, 1] # Shape: (batch_size, H, W, D)
44
+
45
+ # Alternative: Get logits without TTA
46
+ logits = model.predict_segmentation(input_tensor, apply_softmax=False)
47
+ ```
48
+
49
+ ## Citation
50
+
51
+ ```bibtex
52
+ @article{chalcroft2025synthetic,
53
+ title={Synthetic Data for Robust Stroke Segmentation},
54
+ author={Chalcroft, Liam and Pappas, Ioannis and Price, Cathy J. and Ashburner, John},
55
+ journal={Machine Learning for Biomedical Imaging},
56
+ volume={3},
57
+ pages={317--346},
58
+ year={2025},
59
+ publisher={Machine Learning for Biomedical Imaging},
60
+ doi={10.59275/j.melba.2025-f3g6},
61
+ url={https://www.melba-journal.org/papers/2025:014.html}
62
+ }
63
+ ```
64
+
65
+ For the original arXiv preprint:
66
+
67
+ ```bibtex
68
+ @article{Chalcroft_2025,
69
+ title={Synthetic Data for Robust Stroke Segmentation},
70
+ volume={3},
71
+ ISSN={2766-905X},
72
+ url={http://dx.doi.org/10.59275/j.melba.2025-f3g6},
73
+ DOI={10.59275/j.melba.2025-f3g6},
74
+ number={August 2025},
75
+ journal={Machine Learning for Biomedical Imaging},
76
+ publisher={Machine Learning for Biomedical Imaging},
77
+ author={Chalcroft, Liam and Pappas, Ioannis and Price, Cathy J. and Ashburner, John},
78
+ year={2025},
79
+ month=aug, pages={317–346}
80
+ }
81
+ ```
82
+
83
+ ## License
84
+
85
+ MIT License - see the [LICENSE](https://github.com/liamchalcroft/synthstroke/blob/main/LICENSE) file for details.
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d56c089e8c4bcc0ad2281f1e80b7c0e265f3b7138dee17fb2d160487604eee66
3
+ size 74468100