NVIDIA Deep Learning Examples
NVIDIA Deep Learning Examples
Mask R-CNN for TensorFlow2
Resource
NVIDIA Deep Learning Examples
NVIDIA Deep Learning Examples
Mask R-CNN for TensorFlow2

Mask R-CNN is a convolution based network for object instance segmentation. This implementation provides 1.3x faster training while maintaining target accuracy.

The performance measurements in this document were conducted at the time of publication and may not reflect the performance achieved from NVIDIA's latest software release. For the most up-to-date performance measurements, go to NVIDIA Data Center Deep Learning Product Performance.

Benchmarking

The following section shows how to run benchmarks measuring the model performance in training and inference modes.

Training performance benchmark

To run training benchmarking on a selected number of GPUs with either AMP or TF32/FP32 precision, run the following script:

python scripts/benchmark_training.py --gpus {1,8} --batch_size {2,4} [--amp]

Inference performance benchmark

To run inference benchmarking on a single GPU with either AMP or TF32/FP32 precision, run the following script:

python scripts/benchmark_inference.py --batch_size {2,4,8} [--amp]

Results

The following sections provide details on how we achieved our performance and accuracy in training and inference.

Training accuracy results

Training accuracy: NVIDIA DGX A100 (8x A100 80GB)

Our results were obtained by running the python scripts/train.py --gpus 8 --batch_size 4 [--amp] training script in the TensorFlow 2.x 21.02-py3 NGC container on NVIDIA DGX A100 (8x A100 80GB) GPUs.

GPUsBatch size / GPUPrecisionFinal AP BBoxFinal AP SegmTime to train [h]Time to train speedup
82TF320.37960.34444.81-
82AMP0.37950.34433.771.27
Training accuracy: NVIDIA DGX-1 (8x V100 16GB)

Our results were obtained by running the python scripts/train.py --gpus 8 --batch_size 2 [--amp] training script in the TensorFlow 2.x 21.02-py3 NGC container on NVIDIA DGX-1 with (8x V100 16GB) GPUs.

GPUsBatch size / GPUPrecisionFinal AP BBoxFinal AP SegmTime to train [h]Time to train speedup
82FP320.37930.344211.37-
82AMP0.37920.34449.011.26

Learning curves

The following image shows the training loss as a function of iteration for training using DGX A100 (TF32 and TF-AMP) and DGX-1 V100 (FP32 and TF-AMP).

LearningCurves

Training performance results

Training performance: NVIDIA DGX A100 (8x A100 80GB)

Our results were obtained by running the python scripts/benchmark_training.py --gpus {1,8} --batch_size {4,8,16} [--amp] training script in the TensorFlow 2.x 21.02-py3 NGC container on NVIDIA DGX A100 (8x A100 80GB) GPUs. Performance numbers (in images per second) were averaged over 200 steps omitting the first 100 warm-up steps.

GPUsBatch size / GPUThroughput - TF32 [img/s]Throughput - mixed precision [img/s]Throughput speedup (TF32 - mixed precision)Weak scaling - TF32Weak scaling - mixed precision
1213.4418.261.35--
1418.4128.581.55--
8284.2987.311.036.274.78
84103.80114.451.105.634.04

To achieve these same results, follow the steps in the Quick Start Guide.

Training performance: NVIDIA DGX-1 (8x V100 16GB)

Our results were obtained by running the python scripts/benchmark_training.py --gpus {1,8} --batch_size {2,4} [--amp] training script in the TensorFlow 2.x 21.02-py3 NGC container on NVIDIA DGX-1 with (8x V100 16GB) GPUs. Performance numbers (in images per second) were averaged over 200 steps omitting the first 100 warm-up steps.

GPUsBatch size / GPUThroughput - FP32 [img/s]Throughput - mixed precision [img/s]Throughput speedup (FP32 - mixed precision)Weak scaling - FP32Weak scaling - mixed precision
127.5714.471.91--
148.5119.352.27--
8244.5553.401.375.263.69
8450.5658.331.156.674.03

To achieve these same results, follow the steps in the Quick Start Guide.

Inference performance results

Inference performance: NVIDIA DGX A100 (1x A100 80GB)

Our results were obtained by running the python scripts/benchmark_inference.py --batch_size {8,16,24} [--amp] benchmarking script in the TensorFlow 2.x 21.02-py3 NGC container on NVIDIA DGX A100 (1x A100 80GB) GPU.

TF32

Batch sizeThroughput Avg [img/s]Latency AvgLatency 90%Latency 95%Latency 99%
639.230.15300.15400.15420.1546
1242.550.26540.28400.28750.2945
2447.920.50070.52480.52940.5384

FP16

Batch sizeThroughput Avg [img/s]Latency AvgLatency 90%Latency 95%Latency 99%
660.790.09870.09880.10000.1005
1276.230.15740.16140.16210.1636
2480.670.29750.30250.30350.3054

To achieve these same results, follow the steps in the Quick Start Guide.

Inference performance: NVIDIA DGX-1 (1x V100 16GB)

Our results were obtained by running the python scripts/benchmark_inference.py --batch_size {6,12,24} [--amp] benchmarking script in the TensorFlow 2.x 21.02-py3 NGC container on NVIDIA DGX-1 with (1x V100 16GB) GPU.

FP32

Batch sizeThroughput Avg [img/s]Latency AvgLatency 90%Latency 95%Latency 99%
618.560.32340.32630.32690.3280
1220.500.58540.59200.59330.5958
24OOM----

FP16

Batch sizeThroughput Avg [img/s]Latency AvgLatency 90%Latency 95%Latency 99%
635.460.16920.17050.17070.1712
1241.440.28960.29370.29450.2960
2442.530.56430.57180.57330.5761

To achieve these same results, follow the steps in the Quick Start Guide.

NVIDIA uses cookies to improve your experience on our web site. We and our third-party partners also use cookies and other tools to collect and record information you provide as well as information about your interactions with our websites for performance improvement, analytics, and to assist in marketing efforts. By clicking "Accept All", you consent to our use of cookies and other tools as described in our Cookie Policy. You can manage your cookie settings by clicking on "Manage Settings." By continuing to use this site or by clicking one of the buttons below, you agree to our Terms of Service (which contains important waivers). Please see our Privacy Policy for more information on our privacy practices.