Skip to content

Commit

Permalink
Update 'Packaging models' section (#137)
Browse files Browse the repository at this point in the history
* Update 'Packaging models' section

- add nnUNet folder structure example
- add note that `dataset.json` file should contain the `image_orientation` entry

Co-authored-by: Joshua Newton <[email protected]>
  • Loading branch information
valosekj and joshuacwnewton authored Nov 14, 2024
1 parent a3baa87 commit 70ceb49
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions data/deeplearning-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,29 @@ model_seg_sc-gm_t1-t2_unet3d
## Packaging models

Models to be used by 3rd party software (e.g. [SCT](https://spinalcordtoolbox.com/)) should be uploaded as 'assets' to a release of the repository. The steps are:
- Create a release of the repository. The tag and title of the release should be `rYYYYMMDD`, example: `r20211223`.
- Put the model and JSON file inside a folder that has the name of the model.
- Zip the folder and upload it as an asset in the release
- Publish the release.
1. Create a release of the repository. The tag and title of the release should be `rYYYYMMDD`, example: `r20240915`.
2. Prepare a folder with the model in the following format. Keep the nnUNet folder structure intact. To save space,
include only `checkpoint_final.pth`. Example:

```bash
$ tree model-spinal-rootlets-mp2rage-r20240915.zip
└── nnUNetTrainer_2000epochs__nnUNetPlans__3d_fullres
├── dataset.json
├── dataset_fingerprint.json
├── fold_0
│ ├── checkpoint_final.pth
│ ├── debug.json
│ ├── progress.png
│ ├── training_log_2024_9_3_14_06_03.png
│ └── training_log_2024_9_3_14_06_03.txt
└── plans.json
```

```{important}
The `dataset.json` file should contain the `image_orientation` entry, for example: `"image_orientation": "RPI"`. This
entry is used by SCT to determine the image orientation. But, it is also a good idea to document which orientation was
used during training (for the sake of reproducibility).
```

3. Zip the folder and upload it as an asset in the release
4. Publish the release.

0 comments on commit 70ceb49

Please sign in to comment.