|
|
@@ -18,7 +18,6 @@ This repository provides a script and recipe to train the nnU-Net model to achie
|
|
|
- [Quick Start Guide](#quick-start-guide)
|
|
|
- [Advanced](#advanced)
|
|
|
* [Scripts and sample code](#scripts-and-sample-code)
|
|
|
- * [Parameters](#parameters)
|
|
|
* [Command-line options](#command-line-options)
|
|
|
* [Getting the data](#getting-the-data)
|
|
|
* [Dataset guidelines](#dataset-guidelines)
|
|
|
@@ -45,20 +44,19 @@ This repository provides a script and recipe to train the nnU-Net model to achie
|
|
|
|
|
|
## Model overview
|
|
|
|
|
|
-The nnU-Net ("no-new-Net") refers to a robust and self-adapting framework for U-Net based medical image segmentation. This repository contains a nnU-Net implementation as described in the paper: [nnU-Net: Self-adapting Framework for U-Net-Based Medical Image Segmentation](https://arxiv.org/abs/1809.10486).
|
|
|
-
|
|
|
+The nnU-Net ("no-new-Net") refers to a robust and self-adapting framework for U-Net based medical image segmentation. This repository contains a nnU-Net implementation as described in the paper: [nnU-Net: Self-adapting Framework for U-Net-Based Medical Image Segmentation](https://arxiv.org/abs/1809.10486).
|
|
|
+
|
|
|
The differences between this nnU-net and [original model](https://github.com/MIC-DKFZ/nnUNet) are:
|
|
|
+- Dynamic selection of patch size is not supported, and it has to be set in `data_preprocessing/configs.py` file.
|
|
|
+- Cascaded U-Net is not supported.
|
|
|
+- The following data augmentations are not used: rotation, simulation of low resolution, gamma augmentation.
|
|
|
|
|
|
- - Dynamic selection of patch size is not supported, and it has to be set in `data_preprocessing/configs.py` file.
|
|
|
- - Cascaded U-Net is not supported.
|
|
|
- - The following data augmentations are not used: rotation, simulation of low resolution, gamma augmentation.
|
|
|
-
|
|
|
This model is trained with mixed precision using Tensor Cores on Volta, Turing, and the NVIDIA Ampere GPU architectures. Therefore, researchers can get results 2x faster than training without Tensor Cores, while experiencing the benefits of mixed precision training. This model is tested against each NGC monthly container release to ensure consistent accuracy and performance over time.
|
|
|
|
|
|
### Model architecture
|
|
|
|
|
|
The nnU-Net allows training two types of networks: 2D U-Net and 3D U-Net to perform semantic segmentation of 3D images, with high accuracy and performance.
|
|
|
-
|
|
|
+
|
|
|
The following figure shows the architecture of the 3D U-Net model and its different components. U-Net is composed of a contractive and an expanding path, that aims at building a bottleneck in its centremost part through a combination of convolution, instance norm and leaky relu operations. After this bottleneck, the image is reconstructed through a combination of convolutions and upsampling. Skip connections are added with the goal of helping the backward flow of gradients in order to improve the training.
|
|
|
|
|
|
<img src="images/unet3d.png" width="900"/>
|
|
|
@@ -213,44 +211,40 @@ Training can be started with:
|
|
|
python scripts/train.py --gpus <gpus> --fold <fold> --dim <dim> [--amp]
|
|
|
```
|
|
|
|
|
|
-Where:
|
|
|
-```
|
|
|
---gpus number of gpus
|
|
|
---fold fold number, possible choices: `0, 1, 2, 3, 4`
|
|
|
---dim U-Net dimension, possible choices: `2, 3`
|
|
|
---amp enable automatic mixed precision
|
|
|
-```
|
|
|
-You can customize the training process. For details, see the [Training process](#training-process) section.
|
|
|
+To see descriptions of the train script arguments run `python scripts/train.py --help`. You can customize the training process. For details, see the [Training process](#training-process) section.
|
|
|
|
|
|
6. Start benchmarking.
|
|
|
|
|
|
The training and inference performance can be evaluated by using benchmarking scripts, such as:
|
|
|
|
|
|
```
|
|
|
-python scripts/benchmark.py --mode {train, predict} --gpus <ngpus> --dim {2,3} --batch_size <bsize> [--amp]
|
|
|
+python scripts/benchmark.py --mode {train,predict} --gpus <ngpus> --dim {2,3} --batch_size <bsize> [--amp]
|
|
|
```
|
|
|
|
|
|
- which will make the model run and report the performance.
|
|
|
+To see descriptions of the benchmark script arguments run `python scripts/benchmark.py --help`.
|
|
|
|
|
|
|
|
|
7. Start inference/predictions.
|
|
|
|
|
|
Inference can be started with:
|
|
|
```
|
|
|
-python scripts/inference.py --dim <dim> --fold <fold> --ckpt_path <path/to/checkpoint> [--amp] [--tta] [--save_preds]
|
|
|
+python scripts/inference.py --data <path/to/data> --dim <dim> --fold <fold> --ckpt_path <path/to/checkpoint> [--amp] [--tta] [--save_preds]
|
|
|
```
|
|
|
|
|
|
-Where:
|
|
|
+Note: You have to prepare either validation or test dataset to run this script by running `python preprocess.py --task 01 --dim {2,3} --exec_mode {val,test}`. After preprocessing inside given task directory (e.g. `/data/01_3d/` for task 01 and dim 3) it will create `val` or `test` directory with preprocessed data ready for inference. Possible workflow:
|
|
|
+
|
|
|
```
|
|
|
---dim U-Net dimension. Possible choices: `2, 3`
|
|
|
---fold fold number. Possible choices: `0, 1, 2, 3, 4`
|
|
|
---val_batch_size batch size (default: 4)
|
|
|
---ckpt_path path to checkpoint
|
|
|
---amp enable automatic mixed precision
|
|
|
---tta enable test time augmentation
|
|
|
---save_preds enable saving prediction masks
|
|
|
+python preprocess.py --task 01 --dim 3 --exec_mode val
|
|
|
+python scripts/inference.py --data /data/01_3d/val --dim 3 --fold 0 --ckpt_path <path/to/checkpoint> --amp --tta --save_preds
|
|
|
```
|
|
|
-You can customize the inference process. For details, see the [Inference process](#inference-process) section.
|
|
|
+
|
|
|
+Then if you have labels for predicted images you can evaluate it with `evaluate.py` script. For example:
|
|
|
+
|
|
|
+```
|
|
|
+python evaluate.py --preds /results/preds_task_01_dim_3_fold_0_tta --lbls /data/Task01_BrainTumour/labelsTr
|
|
|
+```
|
|
|
+
|
|
|
+To see descriptions of the inference script arguments run `python scripts/inference.py --help`. You can customize the inference process. For details, see the [Inference process](#inference-process) section.
|
|
|
|
|
|
Now that you have your model trained and evaluated, you can choose to compare your training results with our [Training accuracy results](#training-accuracy-results). You can also choose to benchmark yours performance to [Training performance benchmark](#training-performance-results), or [Inference performance benchmark](#inference-performance-results). Following the steps in these sections will ensure that you achieve the same accuracy and performance results as stated in the [Results](#results) section.
|
|
|
|
|
|
@@ -267,6 +261,7 @@ In the root directory, the most important files are:
|
|
|
* `download.py`: Downloads given dataset from [Medical Segmentation Decathlon](http://medicaldecathlon.com/).
|
|
|
* `Dockerfile`: Container with the basic set of dependencies to run nnU-Net.
|
|
|
* `requirements.txt:` Set of extra requirements for running nnU-Net.
|
|
|
+* `evaluate.py`: Compare predictions with ground truth and get final score.
|
|
|
|
|
|
The `data_preprocessing` folder contains information about the data preprocessing used by nnU-Net. Its contents are:
|
|
|
|
|
|
@@ -301,55 +296,6 @@ Other folders included in the root directory are:
|
|
|
* `images/`: Contains a model diagram.
|
|
|
* `scripts/`: Provides scripts for training, benchmarking and inference of nnU-Net.
|
|
|
|
|
|
-### Parameters
|
|
|
-
|
|
|
-The complete list of the available parameters for the `main.py` script contains:
|
|
|
-
|
|
|
- * `--exec_mode`: Select the execution mode to run the model (default: `train`). Modes available:
|
|
|
- - `train` - Trains model with validation evaluation after every epoch.
|
|
|
- - `evaluate` - Loads checkpoint and performs evaluation on validation set (requires `--fold`).
|
|
|
- - `predict` - Loads checkpoint and runs inference on the validation set. If flag `--save_preds` is also provided then stores the predictions in the `--results_dir` directory.
|
|
|
- * `--data`: Path to data directory (default: `/data`)
|
|
|
- * `--results` Path to results directory (default: `/results`)
|
|
|
- * `--logname` Name of dlloger output (default: `None`)
|
|
|
- * `--task` Task number. MSD uses numbers 01-10"
|
|
|
- * `--gpus`: Number of GPUs (default: `1`)
|
|
|
- * `--dim`: U-Net dimension (default: `3`)
|
|
|
- * `--amp`: Enable automatic mixed precision (default: `False`)
|
|
|
- * `--negative_slope` Negative slope for LeakyReLU (default: `0.01`)
|
|
|
- * `--gradient_clip_val`: Gradient clipping value (default: `0`)
|
|
|
- * `--fold`: Fold number (default: `0`)
|
|
|
- * `--nfolds`: Number of cross-validation folds (default: `5`)
|
|
|
- * `--patience`: Early stopping patience (default: `50`)
|
|
|
- * `--min_epochs`: Force training for at least these many epochs (default: `100`)
|
|
|
- * `--max_epochs`: Stop training after this number of epochs (default: `10000`)
|
|
|
- * `--batch_size`: Batch size (default: `2`)
|
|
|
- * `--val_batch_size`: Validation batch size (default: `4`)
|
|
|
- * `--tta`: Enable test time augmentation (default: `False`)
|
|
|
- * `--deep_supervision`: Enable deep supervision (default: `False`)
|
|
|
- * `--benchmark`: Run model benchmarking (default: `False`)
|
|
|
- * `--norm`: Normalization layer, one from: {`instance,batch,group`} (default: `instance`)
|
|
|
- * `--oversampling`: Probability of cropped area to have foreground pixels (default: `0.33`)
|
|
|
- * `--optimizer`: Optimizer, one from: {`sgd,adam,adamw,radam,fused_adam`} (default: `radam`)
|
|
|
- * `--learning_rate`: Learning rate (default: `0.001`)
|
|
|
- * `--momentum`: Momentum factor (default: `0.99`)
|
|
|
- * `--scheduler`: Learning rate scheduler, one from: {`none,multistep,cosine,plateau`} (default: `none`)
|
|
|
- * `--steps`: Steps for multi-step scheduler (default: `None`)
|
|
|
- * `--factor`: Factor used by `multistep` and `reduceLROnPlateau` schedulers (default: `0.1`)
|
|
|
- * `--lr_patience`: Patience for ReduceLROnPlateau scheduler (default: `75`)
|
|
|
- * `--weight_decay`: Weight decay (L2 penalty) (default: `0.0001`)
|
|
|
- * `--seed`: Random seed (default: `1`)
|
|
|
- * `--num_workers`: Number of subprocesses to use for data loading (default: `8`)
|
|
|
- * `--resume_training`: Resume training from the last checkpoint (default: `False`)
|
|
|
- * `--overlap`: Amount of overlap between scans during sliding window inference (default: `0.25`)
|
|
|
- * `--val_mode`: How to blend output of overlapping windows one from: {`gaussian,constant`} (default: `gaussian`)
|
|
|
- * `--ckpt_path`: Path to checkpoint
|
|
|
- * `--save_preds`: Enable prediction saving (default: `False`)
|
|
|
- * `--warmup`: Warmup iterations before collecting statistics for model benchmarking. (default: `5`)
|
|
|
- * `--train_batches`: Limit number of batches for training (default: 0)
|
|
|
- * `--test_batches`: Limit number of batches for evaluation/inference (default: 0)
|
|
|
- * `--affinity`: Type of CPU affinity (default: `socket_unique_interleaved`)
|
|
|
- * `--save_ckpt`: Enable saving checkpoint (default: `False`)
|
|
|
|
|
|
### Command-line options
|
|
|
|
|
|
@@ -360,7 +306,7 @@ To see the full list of available options and their descriptions, use the `-h` o
|
|
|
The following example output is printed when running the model:
|
|
|
|
|
|
```
|
|
|
-usage: main.py [-h] [--exec_mode {train,evaluate,predict}] [--data_dim {2,3}] [--data DATA] [--results RESULTS] [--logname LOGNAME] [--task TASK] [--gpus GPUS] [--learning_rate LEARNING_RATE] [--gradient_clip_val GRADIENT_CLIP_VAL] [--negative_slope NEGATIVE_SLOPE] [--tta] [--amp] [--benchmark] [--deep_supervision] [--sync_batchnorm] [--save_ckpt] [--nfolds NFOLDS] [--seed SEED] [--ckpt_path CKPT_PATH] [--fold FOLD] [--patience PATIENCE] [--lr_patience LR_PATIENCE] [--batch_size BATCH_SIZE] [--nvol NVOL] [--val_batch_size VAL_BATCH_SIZE] [--steps STEPS [STEPS ...]] [--create_idx] [--profile] [--momentum MOMENTUM] [--weight_decay WEIGHT_DECAY] [--save_preds] [--dim {2,3}] [--resume_training] [--factor FACTOR] [--num_workers NUM_WORKERS] [--min_epochs MIN_EPOCHS] [--max_epochs MAX_EPOCHS] [--warmup WARMUP] [--oversampling OVERSAMPLING] [--norm {instance,batch,group}] [--overlap OVERLAP] [--affinity {socket,single,single_unique,socket_unique_interleaved,socket_unique_continuous,disabled}] [--scheduler {none,multistep,cosine,plateau}] [--optimizer {sgd,adam,adamw,radam,fused_adam}] [--val_mode {gaussian,constant}] [--train_batches TRAIN_BATCHES] [--test_batches TEST_BATCHES]
|
|
|
+usage: main.py [-h] [--exec_mode {train,evaluate,predict}] [--data DATA] [--results RESULTS] [--logname LOGNAME] [--task TASK] [--gpus GPUS] [--learning_rate LEARNING_RATE] [--gradient_clip_val GRADIENT_CLIP_VAL] [--negative_slope NEGATIVE_SLOPE] [--tta] [--amp] [--benchmark] [--deep_supervision] [--drop_block] [--attention] [--residual] [--focal] [--sync_batchnorm] [--save_ckpt] [--nfolds NFOLDS] [--seed SEED] [--skip_first_n_eval SKIP_FIRST_N_EVAL] [--ckpt_path CKPT_PATH] [--fold FOLD] [--patience PATIENCE] [--lr_patience LR_PATIENCE] [--batch_size BATCH_SIZE] [--val_batch_size VAL_BATCH_SIZE] [--steps STEPS [STEPS ...]] [--profile] [--momentum MOMENTUM] [--weight_decay WEIGHT_DECAY] [--save_preds] [--dim {2,3}] [--resume_training] [--factor FACTOR] [--num_workers NUM_WORKERS] [--min_epochs MIN_EPOCHS] [--max_epochs MAX_EPOCHS] [--warmup WARMUP] [--norm {instance,batch,group}] [--nvol NVOL] [--data2d_dim {2,3}] [--oversampling OVERSAMPLING] [--overlap OVERLAP] [--affinity {socket,single,single_unique,socket_unique_interleaved,socket_unique_continuous,disabled}] [--scheduler {none,multistep,cosine,plateau}] [--optimizer {sgd,radam,adam}] [--blend {gaussian,constant}] [--train_batches TRAIN_BATCHES] [--test_batches TEST_BATCHES]
|
|
|
|
|
|
optional arguments:
|
|
|
-h, --help show this help message and exit
|
|
|
@@ -381,10 +327,16 @@ optional arguments:
|
|
|
--amp Enable automatic mixed precision (default: False)
|
|
|
--benchmark Run model benchmarking (default: False)
|
|
|
--deep_supervision Enable deep supervision (default: False)
|
|
|
+ --drop_block Enable drop block (default: False)
|
|
|
+ --attention Enable attention in decoder (default: False)
|
|
|
+ --residual Enable residual block in encoder (default: False)
|
|
|
+ --focal Use focal loss instead of cross entropy (default: False)
|
|
|
--sync_batchnorm Enable synchronized batchnorm (default: False)
|
|
|
--save_ckpt Enable saving checkpoint (default: False)
|
|
|
--nfolds NFOLDS Number of cross-validation folds (default: 5)
|
|
|
--seed SEED Random seed (default: 1)
|
|
|
+ --skip_first_n_eval SKIP_FIRST_N_EVAL
|
|
|
+ Skip the evaluation for the first n epochs. (default: 0)
|
|
|
--ckpt_path CKPT_PATH
|
|
|
Path to checkpoint (default: None)
|
|
|
--fold FOLD Fold number (default: 0)
|
|
|
@@ -393,12 +345,10 @@ optional arguments:
|
|
|
Patience for ReduceLROnPlateau scheduler (default: 70)
|
|
|
--batch_size BATCH_SIZE
|
|
|
Batch size (default: 2)
|
|
|
- --nvol NVOL For 2D effective batch size is batch_size*nvol (default: 1)
|
|
|
--val_batch_size VAL_BATCH_SIZE
|
|
|
Validation batch size (default: 4)
|
|
|
--steps STEPS [STEPS ...]
|
|
|
Steps for multistep scheduler (default: None)
|
|
|
- --create_idx Create index files for tfrecord (default: False)
|
|
|
--profile Run dlprof profiling (default: False)
|
|
|
--momentum MOMENTUM Momentum factor (default: 0.99)
|
|
|
--weight_decay WEIGHT_DECAY
|
|
|
@@ -414,13 +364,25 @@ optional arguments:
|
|
|
--max_epochs MAX_EPOCHS
|
|
|
Stop training after this number of epochs (default: 10000)
|
|
|
--warmup WARMUP Warmup iterations before collecting statistics (default: 5)
|
|
|
- --oversampling OVERSAMPLING
|
|
|
- Probability of crop to have some region with positive label (default: 0.33)
|
|
|
--norm {instance,batch,group}
|
|
|
Normalization layer (default: instance)
|
|
|
- --overlap OVERLAP Amount of overlap between scans during sliding window inference (default: 0.25)
|
|
|
+ --nvol NVOL Number of volumes which come into single batch size for 2D model (default: 1)
|
|
|
+ --data2d_dim {2,3} Input data dimension for 2d model (default: 3)
|
|
|
+ --oversampling OVERSAMPLING
|
|
|
+ Probability of crop to have some region with positive label (default: 0.33)
|
|
|
+ --overlap OVERLAP Amount of overlap between scans during sliding window inference (default: 0.5)
|
|
|
--affinity {socket,single,single_unique,socket_unique_interleaved,socket_unique_continuous,disabled}
|
|
|
type of CPU affinity (default: socket_unique_interleaved)
|
|
|
+ --scheduler {none,multistep,cosine,plateau}
|
|
|
+ Learning rate scheduler (default: none)
|
|
|
+ --optimizer {sgd,radam,adam}
|
|
|
+ Optimizer (default: radam)
|
|
|
+ --blend {gaussian,constant}
|
|
|
+ How to blend output of overlapping windows (default: gaussian)
|
|
|
+ --train_batches TRAIN_BATCHES
|
|
|
+ Limit number of batches for training (used for benchmarking mode only) (default: 0)
|
|
|
+ --test_batches TEST_BATCHES
|
|
|
+ Limit number of batches for inference (used for benchmarking mode only) (default: 0)
|
|
|
```
|
|
|
|
|
|
### Getting the data
|
|
|
@@ -429,21 +391,9 @@ The nnU-Net model was trained on the [Medical Segmentation Decathlon](http://med
|
|
|
|
|
|
#### Dataset guidelines
|
|
|
|
|
|
-To train nnU-Net you will need to preprocess your dataset as a first step with `preprocess.py` script.
|
|
|
+To train nnU-Net you will need to preprocess your dataset as a first step with `preprocess.py` script. Run `python scripts/preprocess.py --help` to see descriptions of the preprocess script arguments.
|
|
|
|
|
|
-The `preprocess.py` script is using the following command-line options:
|
|
|
-
|
|
|
-```
|
|
|
- --data Path to data directory (default: `/data`)
|
|
|
- --results Path to directory for saving preprocessed data (default: `/data`)
|
|
|
- --exec_mode Mode for data preprocessing
|
|
|
- --task Number of tasks to be run. MSD uses numbers 01-10
|
|
|
- --dim Data dimension to prepare (default: `3`)
|
|
|
- --n_jobs Number of parallel jobs for data preprocessing (default: `-1`)
|
|
|
- --vpf Number of volumes per tfrecord (default: `1`)
|
|
|
-```
|
|
|
-
|
|
|
-To preprocess data for 3D U-Net run: `python preprocess.py --task 01 --dim 3`
|
|
|
+For example to preprocess data for 3D U-Net run: `python preprocess.py --task 01 --dim 3`.
|
|
|
|
|
|
In `data_preprocessing/configs.py` for each [Medical Segmentation Decathlon](http://medicaldecathlon.com/) task there are defined: patch size, precomputed spacings and statistics for CT datasets.
|
|
|
|
|
|
@@ -452,31 +402,31 @@ The preprocessing pipeline consists of the following steps:
|
|
|
1. Cropping to the region of non-zero values.
|
|
|
2. Resampling to the median voxel spacing of their respective dataset (exception for anisotropic datasets where the lowest resolution axis is selected to be the 10th percentile of the spacings).
|
|
|
3. Padding volumes so that dimensions are at least as patch size.
|
|
|
-4. Normalizing
|
|
|
- * For CT modalities the voxel values are clipped to 0.5 and 99.5 percentiles of the foreground voxels and then data is normalized with mean and standard deviation from collected from foreground voxels.
|
|
|
- * For MRI modalities z-score normalization is applied.
|
|
|
+4. Normalizing:
|
|
|
+ * For CT modalities the voxel values are clipped to 0.5 and 99.5 percentiles of the foreground voxels and then data is normalized with mean and standard deviation from collected from foreground voxels.
|
|
|
+ * For MRI modalities z-score normalization is applied.
|
|
|
|
|
|
#### Multi-dataset
|
|
|
|
|
|
-Adding your dataset is possible, however, your data should correspond to [Medical Segmentation Decathlon](http://medicaldecathlon.com/) (i.e. data should be `NIfTi` format and there should be `dataset.json` file where you need to provide fields: modality, labels and at least one of training, test).
|
|
|
-
|
|
|
-To add your dataset, perform the following:
|
|
|
+It is possible to run nnUNet on custom dataset. If your dataset correspond to [Medical Segmentation Decathlon](http://medicaldecathlon.com/) (i.e. data should be `NIfTi` format and there should be `dataset.json` file where you need to provide fields: modality, labels and at least one of training, test) you need to perform the following:
|
|
|
|
|
|
1. Mount your dataset to `/data` directory.
|
|
|
|
|
|
2. In `data_preprocessing/config.py`:
|
|
|
- - Add to the `task_dir` dictionary your dataset directory name. For example, for Brain Tumour dataset, it corresponds to `"01": "Task01_BrainTumour"`.
|
|
|
- - Add the patch size that you want to use for training to the `patch_size` dictionary. For example, for Brain Tumour dataset it corresponds to `"01_3d": [128, 128, 128]` for 3D U-Net and `"01_2d": [192, 160]` for 2D U-Net. There are three types of suffixes `_3d, _2d` they correspond to 3D UNet and 2D U-Net.
|
|
|
+ - Add to the `task_dir` dictionary your dataset directory name. For example, for Brain Tumour dataset, it corresponds to `"01": "Task01_BrainTumour"`.
|
|
|
+ - Add the patch size that you want to use for training to the `patch_size` dictionary. For example, for Brain Tumour dataset it corresponds to `"01_3d": [128, 128, 128]` for 3D U-Net and `"01_2d": [192, 160]` for 2D U-Net. There are three types of suffixes `_3d, _2d` they correspond to 3D UNet and 2D U-Net.
|
|
|
|
|
|
3. Preprocess your data with `preprocess.py` scripts. For example, to preprocess Brain Tumour dataset for 2D U-Net you should run `python preprocess.py --task 01 --dim 2`.
|
|
|
|
|
|
+If you have dataset in other format or you want customize data preprocessing or data loading see `notebooks/custom_dataset.ipynb`.
|
|
|
+
|
|
|
### Training process
|
|
|
|
|
|
The model trains for at least `--min_epochs` and at most `--max_epochs` epochs. After each epoch evaluation, the validation set is done and validation loss is monitored for early stopping (see `--patience` flag). Default training settings are:
|
|
|
* RAdam optimizer with learning rate of 0.001 and weight decay 0.0001.
|
|
|
* Training batch size is set to 2 for 3D U-Net and 16 for 2D U-Net.
|
|
|
|
|
|
-This default parametrization is applied when running scripts from the `./scripts` directory and when running `main.py` without explicitly overriding these parameters. By default, the training is in full precision. To enable AMP, pass the `--amp` flag. AMP can be enabled for every mode of execution.
|
|
|
+This default parametrization is applied when running scripts from the `scripts/` directory and when running `main.py` without explicitly overriding these parameters. By default, the training is in full precision. To enable AMP, pass the `--amp` flag. AMP can be enabled for every mode of execution.
|
|
|
|
|
|
The default configuration minimizes a function `L = (1 - dice_coefficient) + cross_entropy` during training and reports achieved convergence as [dice coefficient](https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient) per class. The training, with a combination of dice and cross entropy has been proven to achieve better convergence than a training using only dice.
|
|
|
|
|
|
@@ -486,9 +436,8 @@ The training can be run directly without using the predefined scripts. The name
|
|
|
python main.py --exec_mode train --task 01 --fold 0 --gpus 1 --amp --deep_supervision
|
|
|
```
|
|
|
|
|
|
-Training artifacts will be saved to `/results` (you can override it with `--results <path/to/results/>`) in the container. Some important artifacts are:
|
|
|
+Training artifacts will be saved to `/results` in the container. Some important artifacts are:
|
|
|
* `/results/logs.json`: Collected dice scores and loss values evaluated after each epoch during training on validation set.
|
|
|
-* `/results/train_logs.json`: Selected best dice scores achieved during training.
|
|
|
* `/results/checkpoints`: Saved checkpoints. By default, two checkpoints are saved - one after each epoch ('last.ckpt') and one with the highest validation dice (e.g 'epoch=5.ckpt' for if highest dice was at 5th epoch).
|
|
|
|
|
|
To load the pretrained model provide `--ckpt_path <path/to/checkpoint>`.
|
|
|
@@ -516,37 +465,37 @@ The following section shows how to run benchmarks to measure the model performan
|
|
|
|
|
|
#### Training performance benchmark
|
|
|
|
|
|
-To benchmark training, run one of the scripts in `./scripts`:
|
|
|
+To benchmark training, run `scripts/benchmark.py` script with `--mode train`:
|
|
|
|
|
|
```
|
|
|
python scripts/benchmark.py --mode train --gpus <ngpus> --dim {2,3} --batch_size <bsize> [--amp]
|
|
|
```
|
|
|
|
|
|
-For example, to benchmark 3D U-Net training using mixed-precision on 8 GPUs with batch size of 2 for 80 batches, run:
|
|
|
+For example, to benchmark 3D U-Net training using mixed-precision on 8 GPUs with batch size of 2, run:
|
|
|
|
|
|
```
|
|
|
-python scripts/benchmark.py --mode train --gpus 8 --dim 3 --batch_size 2 --train_batches 80 --amp
|
|
|
+python scripts/benchmark.py --mode train --gpus 8 --dim 3 --batch_size 2 --amp
|
|
|
```
|
|
|
|
|
|
-Each of these scripts will by default run 10 warm-up iterations and benchmark the performance during the next 70 iterations. To modify these values provide: `--warmup <warmup> --train_batches <number/of/train/batches>`.
|
|
|
+Each of these scripts will by default run 1 warm-up epoch and start performance benchmarking during the second epoch.
|
|
|
|
|
|
At the end of the script, a line reporting the best train throughput and latency will be printed.
|
|
|
|
|
|
#### Inference performance benchmark
|
|
|
|
|
|
-To benchmark inference, run one of the scripts in `./scripts`:
|
|
|
+To benchmark inference, run `scripts/benchmark.py` script with `--mode predict`:
|
|
|
|
|
|
```
|
|
|
-python scripts/benchmark.py --mode predict --dim {2,3} --batch_size <bsize> --test_batches <number/of/test/batches> [--amp]
|
|
|
+python scripts/benchmark.py --mode predict --dim {2,3} --batch_size <bsize> [--amp]
|
|
|
```
|
|
|
|
|
|
-For example, to benchmark inference using mixed-precision for 3D U-Net, with batch size of 4 for 80 batches, run:
|
|
|
+For example, to benchmark inference using mixed-precision for 3D U-Net, with batch size of 4, run:
|
|
|
|
|
|
```
|
|
|
-python scripts/benchmark.py --mode predict --dim 3 --amp --batch_size 4 --test_batches 80
|
|
|
+python scripts/benchmark.py --mode predict --dim 3 --amp --batch_size 4
|
|
|
```
|
|
|
|
|
|
-Each of these scripts will by default run 10 warm-up iterations and benchmark the performance during the next 70 iterations. To modify these values provide: `--warmup <warmup> --test_batches <number/of/test/batches>`.
|
|
|
+Each of these scripts will by default run warm-up for 1 data pass and start inference benchmarking during the second pass.
|
|
|
|
|
|
At the end of the script, a line reporting the inference throughput and latency will be printed.
|
|
|
|
|
|
@@ -558,25 +507,26 @@ The following sections provide details on how to achieve the same performance an
|
|
|
|
|
|
##### Training accuracy: NVIDIA DGX A100 (8x A100 80G)
|
|
|
|
|
|
-Our results were obtained by running the `python scripts/train.py --gpus {1,8} --fold {0,1,2,3,4} --dim {2,3} --batch_size <bsize> [--amp]` training scripts and averaging results in the PyTorch 20.12 NGC container on NVIDIA DGX A100 with (8x A100 80G) GPUs.
|
|
|
+Our results were obtained by running the `python scripts/train.py --gpus {1,8} --fold {0,1,2,3,4} --dim {2,3} --batch_size <bsize> [--amp]` training scripts and averaging results in the PyTorch 21.02 NGC container on NVIDIA DGX with (8x A100 80G) GPUs.
|
|
|
|
|
|
| Dimension | GPUs | Batch size / GPU | Accuracy - mixed precision | Accuracy - FP32 | Time to train - mixed precision | Time to train - TF32| Time to train speedup (TF32 to mixed precision)
|
|
|
|:-:|:-:|:--:|:-----:|:-----:|:-----:|:-----:|:----:|
|
|
|
-| 2 | 1 | 16 |0.7021 |0.7051 |89min | 104min| 1.17 |
|
|
|
-| 2 | 8 | 16 |0.7316 |0.7316 |13 min | 17 min| 1.31 |
|
|
|
-| 3 | 1 | 2 |0.7436 |0.7433 |241 min|342 min| 1.42 |
|
|
|
-| 3 | 8 | 2 |0.7443 |0.7443 |36 min | 44 min| 1.22 |
|
|
|
+| 2 | 1 | 64 | 73.002 | 73.390 | 98 min | 150 min | 1.536 |
|
|
|
+| 2 | 8 | 64 | 72.916 | 73.054 | 17 min | 23 min | 1.295 |
|
|
|
+| 3 | 1 | 2 | 74.408 | 74.402 | 118 min | 221 min | 1.869 |
|
|
|
+| 3 | 8 | 2 | 74.350 | 74.292 | 27 min | 46 min | 1.775 |
|
|
|
+
|
|
|
|
|
|
##### Training accuracy: NVIDIA DGX-1 (8x V100 16G)
|
|
|
|
|
|
-Our results were obtained by running the `python scripts/train.py --gpus {1,8} --fold {0,1,2,3,4} --dim {2,3} --batch_size <bsize> [--amp]` training scripts and averaging results in the PyTorch 20.12 NGC container on NVIDIA DGX-1 with (8x V100 16G) GPUs.
|
|
|
+Our results were obtained by running the `python scripts/train.py --gpus {1,8} --fold {0,1,2,3,4} --dim {2,3} --batch_size <bsize> [--amp]` training scripts and averaging results in the PyTorch 21.02 NGC container on NVIDIA DGX-1 with (8x V100 16G) GPUs.
|
|
|
|
|
|
| Dimension | GPUs | Batch size / GPU | Accuracy - mixed precision | Accuracy - FP32 | Time to train - mixed precision | Time to train - FP32 | Time to train speedup (FP32 to mixed precision)
|
|
|
|:-:|:-:|:--:|:-----:|:-----:|:-----:|:-----:|:----:|
|
|
|
-| 2 | 1 | 16 |0.7034 |0.7033 |144 min|180 min| 1.25 |
|
|
|
-| 2 | 8 | 16 |0.7319 |0.7315 |37 min |44 min | 1.19 |
|
|
|
-| 3 | 1 | 2 |0.7439 |0.7436 |317 min|738 min| 2.32 |
|
|
|
-| 3 | 8 | 2 |0.7440 |0.7441 |58 min |121 min| 2.09 |
|
|
|
+| 2 | 1 | 64 | 73.316 | 73.200 | 175 min | 342 min | 1.952 |
|
|
|
+| 2 | 8 | 64 | 72.886 | 72.954 | 43 min | 52 min | 1.230 |
|
|
|
+| 3 | 1 | 2 | 74.378 | 74.324 | 228 min | 667 min | 2.935 |
|
|
|
+| 3 | 8 | 2 | 74.29 | 74.378 | 62 min | 141 min | 2.301 |
|
|
|
|
|
|
#### Training performance results
|
|
|
|
|
|
@@ -586,41 +536,38 @@ Our results were obtained by running the `python scripts/benchmark.py --mode tra
|
|
|
|
|
|
| Dimension | GPUs | Batch size / GPU | Throughput - mixed precision [img/s] | Throughput - TF32 [img/s] | Throughput speedup (TF32 - mixed precision) | Weak scaling - mixed precision | Weak scaling - TF32 |
|
|
|
|:-:|:-:|:--:|:------:|:------:|:-----:|:-----:|:-----:|
|
|
|
-| 2 | 1 | 32 | 674.34 | 489.3 | 1.38 | N/A | N/A |
|
|
|
-| 2 | 1 | 64 | 856.34 | 565.62 | 1.51 | N/A | N/A |
|
|
|
-| 2 | 1 | 128| 926.64 | 600.34 | 1.54 | N/A | N/A |
|
|
|
-| 2 | 8 | 32 | 3957.33 | 3275.88 | 1.21| 5.868 | 6.695 |
|
|
|
-| 2 | 8 | 64 | 5667.14 | 4037.82 | 1.40 | 6.618 | 7.139 |
|
|
|
-| 2 | 8 | 128| 6310.97 | 4568.13 | 1.38 | 6.811 | 7.609 |
|
|
|
-| 3 | 1 | 1 | 4.24 | 3.57 | 1.19 | N/A | N/A |
|
|
|
-| 3 | 1 | 2 | 6.74 | 5.21 | 1.29 | N/A | N/A |
|
|
|
-| 3 | 1 | 4 | 9.52 | 4.16 | 2.29 | N/A | N/A |
|
|
|
-| 3 | 8 | 1 | 32.48 | 27.79 | 1.17 | 7.66 | 7.78 |
|
|
|
-| 3 | 8 | 2 | 51.50 | 40.67 | 1.27 | 7.64 | 7.81 |
|
|
|
-| 3 | 8 | 4 | 74.29 | 31.50 | 2.36 | 7.80 | 7.57 |
|
|
|
+| 2 | 1 | 64 | 1064.46 | 678.86 | 1.568 | N/A | N/A |
|
|
|
+| 2 | 1 | 128 | 1129.09 | 710.09 | 1.59 | N/A | N/A |
|
|
|
+| 2 | 8 | 64 | 6477.99 | 4780.3 | 1.355 | 6.086 | 7.042 |
|
|
|
+| 2 | 8 | 128 | 8163.67 | 5342.49 | 1.528 | 7.23 | 7.524 |
|
|
|
+| 3 | 1 | 1 | 13.39 | 8.46 | 1.583 | N/A | N/A |
|
|
|
+| 3 | 1 | 2 | 15.97 | 9.52 | 1.678 | N/A | N/A |
|
|
|
+| 3 | 1 | 4 | 17.84 | 5.16 | 3.457 | N/A | N/A |
|
|
|
+| 3 | 8 | 1 | 92.93 | 61.68 | 1.507 | 6.94 | 7.291 |
|
|
|
+| 3 | 8 | 2 | 113.51 | 72.23 | 1.572 | 7.108 | 7.587 |
|
|
|
+| 3 | 8 | 4 | 129.91 | 38.26 | 3.395 | 7.282 | 7.415 |
|
|
|
+
|
|
|
|
|
|
To achieve these same results, follow the steps in the [Quick Start Guide](#quick-start-guide).
|
|
|
|
|
|
|
|
|
##### Training performance: NVIDIA DGX-1 (8x V100 16G)
|
|
|
|
|
|
-Our results were obtained by running the `python scripts/benchmark.py --mode train --gpus {1,8} --dim {2,3} --batch_size <bsize> [--amp]` training script in the PyTorch 20.12 NGC container on NVIDIA DGX-1 with (8x V100 16G) GPUs. Performance numbers (in volumes per second) were averaged over an entire training epoch.
|
|
|
+Our results were obtained by running the `python scripts/benchmark.py --mode train --gpus {1,8} --dim {2,3} --batch_size <bsize> [--amp]` training script in the PyTorch 21.02 NGC container on NVIDIA DGX-1 with (8x V100 16G) GPUs. Performance numbers (in volumes per second) were averaged over an entire training epoch.
|
|
|
|
|
|
| Dimension | GPUs | Batch size / GPU | Throughput - mixed precision [img/s] | Throughput - FP32 [img/s] | Throughput speedup (FP32 - mixed precision) | Weak scaling - mixed precision | Weak scaling - FP32 |
|
|
|
|:-:|:-:|:---:|:---------:|:-----------:|:--------:|:---------:|:-------------:|
|
|
|
-| 2 | 1 | 32 | 416.68 | 275.99 | 1.51 | N/A | N/A |
|
|
|
-| 2 | 1 | 64 | 524.13 | 281.84 | 1.86 | N/A | N/A |
|
|
|
-| 2 | 1 | 128| 557.48 | 272.68 | 2.04 | N/A | N/A |
|
|
|
-| 2 | 8 | 32 | 2731.22 | 2005.49 | 1.36 | 6.56 | 7.27 |
|
|
|
-| 2 | 8 | 64 | 3604.83 | 2088.58 | 1.73 | 6.88 | 7.41 |
|
|
|
-| 2 | 8 | 128| 4202.35 | 2094.63 | 2.01 | 7.54 | 7.68 |
|
|
|
-| 3 | 1 | 1 | 3.97 | 1.77 | 2.24 | N/A | N/A |
|
|
|
-| 3 | 1 | 2 | 5.49 | 2.32 | 2.37 | N/A | N/A |
|
|
|
-| 3 | 1 | 4 | 6.78 | OOM | N/A | N/A | N/A |
|
|
|
-| 3 | 8 | 1 | 29.98 | 13.78 | 2.18 | 7.55 | 7.79 |
|
|
|
-| 3 | 8 | 2 | 41.31 | 18.11 | 2.28 | 7.53 | 7.81 |
|
|
|
-| 3 | 8 | 4 | 50.26 | OOM | N/A | 7.41 | N/A |
|
|
|
-
|
|
|
+| 2 | 1 | 64 | 575.11 | 277.93 | 2.069 | N/A | N/A |
|
|
|
+| 2 | 1 | 128 | 612.32 | 268.28 | 2.282 | N/A | N/A |
|
|
|
+| 2 | 8 | 64 | 4178.94 | 2149.46 | 1.944 | 7.266 | 7.734 |
|
|
|
+| 2 | 8 | 128 | 4629.01 | 2087.25 | 2.218 | 7.56 | 7.78 |
|
|
|
+| 3 | 1 | 1 | 7.68 | 2.11 | 3.64 | N/A | N/A |
|
|
|
+| 3 | 1 | 2 | 8.27 | 2.49 | 3.321 | N/A | N/A |
|
|
|
+| 3 | 1 | 4 | 8.5 | OOM | N/A | N/A | N/A |
|
|
|
+| 3 | 8 | 1 | 56.4 | 16.42 | 3.435 | 7.344 | 7.782 |
|
|
|
+| 3 | 8 | 2 | 62.46 | 19.46 | 3.21 | 7.553 | 7.815 |
|
|
|
+| 3 | 8 | 4 | 64.46 | OOM | N/A | 7.584 | N/A |
|
|
|
+
|
|
|
|
|
|
To achieve these same results, follow the steps in the [Quick Start Guide](#quick-start-guide).
|
|
|
|
|
|
@@ -628,31 +575,30 @@ To achieve these same results, follow the steps in the [Quick Start Guide](#quic
|
|
|
|
|
|
##### Inference performance: NVIDIA DGX A100 (1x A100 80G)
|
|
|
|
|
|
-Our results were obtained by running the `python scripts/benchmark.py --mode predict --dim {2,3} --batch_size <bsize> [--amp]` inferencing benchmarking script in the PyTorch 20.12 NGC container on NVIDIA DGX A100 (1x A100 80G) GPU.
|
|
|
+Our results were obtained by running the `python scripts/benchmark.py --mode predict --dim {2,3} --batch_size <bsize> [--amp]` inferencing benchmarking script in the PyTorch 21.02 NGC container on NVIDIA DGX A100 (1x A100 80G) GPU.
|
|
|
|
|
|
|
|
|
FP16
|
|
|
|
|
|
| Dimension | Batch size | Resolution | Throughput Avg [img/s] | Latency Avg [ms] | Latency 90% [ms] | Latency 95% [ms] | Latency 99% [ms] |
|
|
|
|:----------:|:---------:|:-------------:|:----------------------:|:----------------:|:----------------:|:----------------:|:----------------:|
|
|
|
-| 2 | 32 | 4x192x160 | 3281.91 | 9.75 | 9.88 | 10.14 | 10.17 |
|
|
|
-| 2 | 64 | 4x192x160 | 3625.3 | 17.65 | 18.13 | 18.16 | 18.24 |
|
|
|
-| 2 |128 | 4x192x160 | 3867.24 | 33.10 | 33.29 | 33.29 | 33.35 |
|
|
|
-| 3 | 1 | 4x128x128x128 | 10.93| 91.52 | 91.30 | 92,68 | 111.87|
|
|
|
-| 3 | 2 | 4x128x128x128 | 18.85| 106.08| 105.12| 106.05| 127.95|
|
|
|
-| 3 | 4 | 4x128x128x128 | 27.4 | 145.98| 164.05| 165.58| 183.43|
|
|
|
+| 2 | 64 | 4x192x160 | 3198.8 | 20.01 | 24.1 | 30.5 | 33.75 |
|
|
|
+| 2 | 128 | 4x192x160 | 3587.89 | 35.68 | 36.0 | 36.08 | 36.16 |
|
|
|
+| 3 | 1 | 4x128x128x128 | 47.16 | 21.21 | 21.56 | 21.7 | 22.5 |
|
|
|
+| 3 | 2 | 4x128x128x128 | 47.59 | 42.02 | 53.9 | 56.97 | 77.3 |
|
|
|
+| 3 | 4 | 4x128x128x128 | 53.98 | 74.1 | 91.18 | 106.13 | 143.18 |
|
|
|
|
|
|
|
|
|
TF32
|
|
|
|
|
|
| Dimension | Batch size | Resolution | Throughput Avg [img/s] | Latency Avg [ms] | Latency 90% [ms] | Latency 95% [ms] | Latency 99% [ms] |
|
|
|
|:----------:|:---------:|:-------------:|:----------------------:|:----------------:|:----------------:|:----------------:|:----------------:|
|
|
|
-| 2 | 32 | 4x192x160 | 2002.66 | 15.98 | 16.14 | 16.24 | 16.37|
|
|
|
-| 2 | 64 | 4x192x160 | 2180.54 | 29.35 | 29.50 | 29.51 | 29.59|
|
|
|
-| 2 |128 | 4x192x160 | 2289.12 | 55.92 | 56.08 | 56.13 | 56.36|
|
|
|
-| 3 | 1 | 4x128x128x128 | 10.05| 99.55 | 99.17 | 99.82 |120.39|
|
|
|
-| 3 | 2 | 4x128x128x128 | 16.29|122.78 |123.06 |124.02 |143.47|
|
|
|
-| 3 | 4 | 4x128x128x128 | 15.99|250.16 |273.67 |274.85 |297.06|
|
|
|
+| 2 | 64 | 4x192x160 | 2353.27 | 27.2 | 27.43 | 27.53 | 27.7 |
|
|
|
+| 2 | 128 | 4x192x160 | 2492.78 | 51.35 | 51.54 | 51.59 | 51.73 |
|
|
|
+| 3 | 1 | 4x128x128x128 | 34.33 | 29.13 | 29.41 | 29.52 | 29.67 |
|
|
|
+| 3 | 2 | 4x128x128x128 | 37.29 | 53.63 | 52.41 | 60.12 | 84.92 |
|
|
|
+| 3 | 4 | 4x128x128x128 | 22.98 | 174.09 | 173.02 | 196.04 | 231.03 |
|
|
|
+
|
|
|
|
|
|
Throughput is reported in images per second. Latency is reported in milliseconds per batch.
|
|
|
To achieve these same results, follow the steps in the [Quick Start Guide](#quick-start-guide).
|
|
|
@@ -660,29 +606,28 @@ To achieve these same results, follow the steps in the [Quick Start Guide](#quic
|
|
|
|
|
|
##### Inference performance: NVIDIA DGX-1 (1x V100 16G)
|
|
|
|
|
|
-Our results were obtained by running the `python scripts/benchmark.py --mode predict --dim {2,3} --batch_size <bsize> [--amp]` inferencing benchmarking script in the PyTorch 20.12 NGC container on NVIDIA DGX-1 with (1x V100 16G) GPU.
|
|
|
+Our results were obtained by running the `python scripts/benchmark.py --mode predict --dim {2,3} --batch_size <bsize> [--amp]` inferencing benchmarking script in the PyTorch 21.02 NGC container on NVIDIA DGX-1 with (1x V100 16G) GPU.
|
|
|
|
|
|
FP16
|
|
|
|
|
|
| Dimension | Batch size | Resolution | Throughput Avg [img/s] | Latency Avg [ms] | Latency 90% [ms] | Latency 95% [ms] | Latency 99% [ms] |
|
|
|
|:----------:|:---------:|:-------------:|:----------------------:|:----------------:|:----------------:|:----------------:|:----------------:|
|
|
|
-| 2 | 32 | 4x192x160 | 1697.16 | 18.86 | 18.89 | 18.95 | 18.99 |
|
|
|
-| 2 | 64 | 4x192x160 | 2008.81 | 31.86 | 31.95 | 32.01 | 32.08 |
|
|
|
-| 2 |128 | 4x192x160 | 2221.44 | 57.62 | 57.83 | 57.88 | 57.96 |
|
|
|
-| 3 | 1 | 4x128x128x128 | 11.01 | 90.76 | 89.96 | 90.53 | 116.67 |
|
|
|
-| 3 | 2 | 4x128x128x128 | 16.60 | 120.49 | 119.69 | 120.72 | 146.42 |
|
|
|
-| 3 | 4 | 4x128x128x128 | 21.18 | 188.85 | 211.92 | 214.17 | 238.19 |
|
|
|
+| 2 | 64 | 4x192x160 | 1866.52 | 34.29 | 34.7 | 48.87 | 52.44 |
|
|
|
+| 2 | 128 | 4x192x160 | 2032.74 | 62.97 | 63.21 | 63.25 | 63.32 |
|
|
|
+| 3 | 1 | 4x128x128x128 | 27.52 | 36.33 | 37.03 | 37.25 | 37.71 |
|
|
|
+| 3 | 2 | 4x128x128x128 | 29.04 | 68.87 | 68.09 | 76.48 | 112.4 |
|
|
|
+| 3 | 4 | 4x128x128x128 | 30.23 | 132.33 | 131.59 | 165.57 | 191.64 |
|
|
|
|
|
|
FP32
|
|
|
|
|
|
| Dimension | Batch size | Resolution | Throughput Avg [img/s] | Latency Avg [ms] | Latency 90% [ms] | Latency 95% [ms] | Latency 99% [ms] |
|
|
|
|:----------:|:---------:|:-------------:|:----------------------:|:----------------:|:----------------:|:----------------:|:----------------:|
|
|
|
-| 2 | 32 | 4x192x160 | 1106.22 | 28.93 | 29.06 | 29.10 | 29.15 |
|
|
|
-| 2 | 64 | 4x192x160 | 1157.24 | 55.30 | 55.39 | 55.44 | 55.50 |
|
|
|
-| 2 |128 | 4x192x160 | 1171.24 | 109.29 | 109.83 | 109.98 | 110.58 |
|
|
|
-| 3 | 1 | 4x128x128x128 | 6.8 | 147.10 | 147.51 | 148.15 | 170.46 |
|
|
|
-| 3 | 2 | 4x128x128x128 | 8.53| 234.46 | 237.00 | 238.43 | 258.92 |
|
|
|
-| 3 | 4 | 4x128x128x128 | 9.6 | 416.83 | 439.97 | 442.12 | 454.69 |
|
|
|
+| 2 | 64 | 4x192x160 | 1051.46 | 60.87 | 61.21 | 61.48 | 62.87 |
|
|
|
+| 2 | 128 | 4x192x160 | 1051.68 | 121.71 | 122.29 | 122.44 | 122.6 |
|
|
|
+| 3 | 1 | 4x128x128x128 | 9.87 | 101.34 | 102.33 | 102.52 | 102.86 |
|
|
|
+| 3 | 2 | 4x128x128x128 | 9.91 | 201.91 | 202.36 | 202.77 | 240.45 |
|
|
|
+| 3 | 4 | 4x128x128x128 | 10.0 | 399.91 | 400.94 | 430.72 | 466.62 |
|
|
|
+
|
|
|
|
|
|
Throughput is reported in images per second. Latency is reported in milliseconds per batch.
|
|
|
To achieve these same results, follow the steps in the [Quick Start Guide](#quick-start-guide).
|
|
|
@@ -694,6 +639,8 @@ To achieve these same results, follow the steps in the [Quick Start Guide](#quic
|
|
|
January 2021
|
|
|
- Initial release
|
|
|
- Add notebook with custom dataset loading
|
|
|
+February 2021
|
|
|
+- Change data format from tfrecord to npy and data loading for 2D
|
|
|
|
|
|
### Known issues
|
|
|
|