Skip to content

Commit 0021a57

Browse files
committed
[DLMED] add hybrid placeholders
Signed-off-by: Nic Ma <[email protected]>
1 parent b66354a commit 0021a57

File tree

4 files changed

+74
-0
lines changed

4 files changed

+74
-0
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Description
2+
A pre-trained model for volumetric (3D) segmentation of the spleen from CT image.
3+
4+
# Model Overview
5+
This model is trained using the runner-up [1] awarded pipeline of the "Medical Segmentation Decathlon Challenge 2018" using the UNet architecture [2] with 32 training images and 9 validation images.
6+
7+
## Data
8+
The training dataset is Task09_Spleen.tar from http://medicaldecathlon.com/.
9+
10+
## Training configuration
11+
The training was performed with at least 12GB-memory GPUs.
12+
13+
Actual Model Input: 96 x 96 x 96
14+
15+
## Input and output formats
16+
Input: 1 channel CT image
17+
18+
Output: 2 channels: Label 1: spleen; Label 0: everything else
19+
20+
## Scores
21+
This model achieves the following Dice score on the validation data (our own split from the training dataset):
22+
23+
Mean Dice = 0.96
24+
25+
## commands example
26+
Execute training:
27+
28+
```
29+
python -m monai.bundle run training --meta_file configs/metadata.json --config_file configs/train.json --logging_file configs/logging.conf
30+
```
31+
32+
Override the `train` config to execute multi-GPU training:
33+
34+
```
35+
torchrun --standalone --nnodes=1 --nproc_per_node=2 -m monai.bundle run training --meta_file configs/metadata.json --config_file "['configs/train.json','configs/multi_gpu_train.json']" --logging_file configs/logging.conf
36+
```
37+
38+
Override the `train` config to execute evaluation with the trained model:
39+
40+
```
41+
python -m monai.bundle run evaluating --meta_file configs/metadata.json --config_file "['configs/train.json','configs/evaluate.json']" --logging_file configs/logging.conf
42+
```
43+
44+
Execute inference:
45+
46+
```
47+
python -m monai.bundle run evaluating --meta_file configs/metadata.json --config_file configs/inference.json --logging_file configs/logging.conf
48+
```
49+
50+
Verify the metadata format:
51+
52+
```
53+
python -m monai.bundle verify_metadata --meta_file configs/metadata.json --filepath eval/schema.json
54+
```
55+
56+
Verify the data shape of network:
57+
58+
```
59+
python -m monai.bundle verify_net_in_out network_def --meta_file configs/metadata.json --config_file configs/inference.json
60+
```
61+
62+
Export checkpoint to TorchScript file:
63+
64+
```
65+
python -m monai.bundle ckpt_export network_def --filepath models/model.ts --ckpt_file models/model.pt --meta_file configs/metadata.json --config_file configs/inference.json
66+
```
67+
68+
# Disclaimer
69+
This is an example, not to be used for diagnostic purposes.
70+
71+
# References
72+
[1] Xia, Yingda, et al. "3D Semi-Supervised Learning with Uncertainty-Aware Multi-View Co-Training." arXiv preprint arXiv:1811.12506 (2018). https://arxiv.org/abs/1811.12506.
73+
74+
[2] Kerfoot E., Clough J., Oksuz I., Lee J., King A.P., Schnabel J.A. (2019) Left-Ventricle Quantification Using Residual U-Net. In: Pop M. et al. (eds) Statistical Atlases and Computational Models of the Heart. Atrial Segmentation and LV Quantification Challenges. STACOM 2018. Lecture Notes in Computer Science, vol 11395. Springer, Cham. https://doi.org/10.1007/978-3-030-12029-0_40

modules/bundles/hybrid_programming/configs/custom_train.json

Whitespace-only changes.

modules/bundles/hybrid_programming/scripts/custom_transforms.py

Whitespace-only changes.

modules/bundles/hybrid_programming/scripts/inference.py

Whitespace-only changes.

0 commit comments

Comments
 (0)