maxmo2009 commited on
Commit
04bea4b
·
verified ·
1 Parent(s): 81bfc19

Add folds 0, 2, 3 and 4 of the HCM model

Browse files

Adds the other four folds of the five-fold cross-validation (hcm/fold_{0,2,3,4}/checkpoint_final.pth). They use the same plans.json and dataset.json as fold 1. The model card now describes all five folds, and its examples use the five-fold ensemble.

README.md CHANGED
@@ -19,7 +19,7 @@ the `Segment` step of [OpenHeart](https://github.com/ImperialCollegeLondon/OpenH
19
  | | |
20
  |---|---|
21
  | Framework | nnU-Net v2, `nnUNetTrainer`, `2d` configuration |
22
- | Folds | fold 1 of a five-fold split (`hcm/fold_1/checkpoint_final.pth`): trained on 1,039 volumes, validated on 260 |
23
  | Input | one short-axis cine volume (NIfTI), one channel |
24
  | Training data | 1,299 labelled short-axis cine volumes (end-diastole and end-systole) from patients with hypertrophic cardiomyopathy at 5 centres |
25
 
@@ -30,16 +30,20 @@ from huggingface_hub import snapshot_download
30
  import openheart as oh
31
 
32
  model = snapshot_download("ImperialCollegeLondon/OpenHeart") + "/hcm"
33
- case = oh.Segment(model, folds=[1])(oh.Case.load("cases/subject1", layout="legacy"))
34
  ```
35
 
36
  ```bash
37
  MODEL=$(python -c 'from huggingface_hub import snapshot_download as d; print(d("ImperialCollegeLondon/OpenHeart"))')/hcm
38
- openheart run cases/ -o out/ --model "$MODEL" --folds 1
39
  ```
40
 
 
 
 
 
41
  `hcm/` is a standard nnU-Net results folder, so it also loads directly with
42
- `nnUNetPredictor.initialize_from_trained_model_folder(model, use_folds=(1,))`.
43
 
44
  ## Limitations
45
 
 
19
  | | |
20
  |---|---|
21
  | Framework | nnU-Net v2, `nnUNetTrainer`, `2d` configuration |
22
+ | Folds | all five folds of a five-fold cross-validation (`hcm/fold_0` … `hcm/fold_4`), each trained on 1,039–1,040 volumes and validated on the other 259–260 |
23
  | Input | one short-axis cine volume (NIfTI), one channel |
24
  | Training data | 1,299 labelled short-axis cine volumes (end-diastole and end-systole) from patients with hypertrophic cardiomyopathy at 5 centres |
25
 
 
30
  import openheart as oh
31
 
32
  model = snapshot_download("ImperialCollegeLondon/OpenHeart") + "/hcm"
33
+ case = oh.Segment(model)(oh.Case.load("cases/subject1", layout="legacy"))
34
  ```
35
 
36
  ```bash
37
  MODEL=$(python -c 'from huggingface_hub import snapshot_download as d; print(d("ImperialCollegeLondon/OpenHeart"))')/hcm
38
+ openheart run cases/ -o out/ --model "$MODEL"
39
  ```
40
 
41
+ Without `folds`, all five folds are used and their predictions averaged. `folds=[1]`
42
+ (`--folds 1`) runs a single fold, which is about five times faster. To download one fold
43
+ only, pass `allow_patterns=["hcm/*.json", "hcm/fold_1/*"]` to `snapshot_download`.
44
+
45
  `hcm/` is a standard nnU-Net results folder, so it also loads directly with
46
+ `nnUNetPredictor.initialize_from_trained_model_folder(model, use_folds=(0, 1, 2, 3, 4))`.
47
 
48
  ## Limitations
49
 
hcm/fold_0/checkpoint_final.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:968f8a30b3e9f3c2453470d2ccefb90322f9cb548971f52f59156061d780ec4c
3
+ size 165573758
hcm/fold_2/checkpoint_final.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8dadfff5ae28d3639512e783486225de0c3fa661a7567bcd37cf61c622c6f136
3
+ size 165574014
hcm/fold_3/checkpoint_final.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e6508dcf86af9cfe8ebc2f0a011af6f774f3a3d3dfe34910db45db801ad767fc
3
+ size 165572798
hcm/fold_4/checkpoint_final.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8cf62b825e43340dcc3f82cb2f61c0057951054fc77610468e448f4614fcb23b
3
+ size 165573822