NVIDIA
NVIDIA
SSD v1.2 for TensorFlow
Resource
NVIDIA
NVIDIA
SSD v1.2 for TensorFlow

With a ResNet-50 backbone and a number of architectural modifications, this version provides better accuracy and performance.

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

Training benchmark was run in various scenarios on V100 16G GPU. For each scenario, batch size was set to 32.

To benchmark training, run:

bash examples/SSD320_{PREC}_{NGPU}GPU_BENCHMARK.sh

Where the {NGPU} defines number of GPUs used in benchmark, and the {PREC} defines precision. The benchmark runs training with only 1200 steps and computes average training speed of last 300 steps.

Inference performance benchmark

Inference benchmark was run with various batch-sizes on V100 16G GPU. For inference we are using single GPU setting. Examples are taken from the validation dataset.

To benchmark inference, run:

bash examples/SSD320_FP{16,32}_inference.sh --batch_size --checkpoint_dir 

Batch size for the inference benchmark is controlled by the --batch_size argument, while the checkpoint is provided to the script with the --checkpoint_dir argument.

The benchmark script provides extra arguments for extra control over the experiment. We were using default values for the extra arguments during the experiments. For more details about them, please run:

bash examples/SSD320_FP16_inference.sh --help

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 40GB)

Our results were obtained by running the ./examples/SSD320_FP{16,32}_{1,4,8}GPU.sh script in the TensorFlow-20.06-py3 NGC container on NVIDIA DGX A100 (8x A100 40GB) GPUs.

All the results are obtained with batch size set to 32.

Number of GPUsMixed precision mAPTraining time with mixed precisionTF32 mAPTraining time with TF32
10.2794h 48min0.2806h 40min
40.2801h 20min0.2791h 53min
80.2810h 53min0.2821h 05min
Training accuracy: NVIDIA DGX-1 (8x V100 16GB)

Our results were obtained by running the ./examples/SSD320_FP{16,32}_{1,4,8}GPU.sh script in the TensorFlow-20.06-py3 NGC container on NVIDIA DGX-1 with 8x V100 16G GPUs. All the results are obtained with batch size set to 32.

Number of GPUsMixed precision mAPTraining time with mixed precisionFP32 mAPTraining time with FP32
10.2797h 36min0.27810h 38min
40.2772h 18min0.2792h 58min
80.2801h 28min0.2821h 55min

Here are example graphs of TF32, FP32 and FP16 training on 8 GPU configuration:

TrainingLoss

Training performance results

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

Our results were obtained by running:

python bash examples/SSD320_FP*GPU_BENCHMARK.sh

scripts in the TensorFlow-20.06-py3 NGC container on NVIDIA DGX A100 (8x A100 40GB) GPUs.

Number of GPUsBatch size per GPUMixed precision img/sTF32 img/sSpeed-up with mixed precisionMulti-gpu weak scaling with mixed precisionMulti-gpu weak scaling with TF32
132180.55123.481.461.001.00
432624.35449.171.393.463.64
8321008.46779.961.295.596.32

To achieve same results, follow the Quick start guide outlined above.

Those results can be improved when XLA is used in conjunction with mixed precision, delivering up to 2x speedup over FP32 on a single GPU (~179 img/s). However XLA is still considered experimental.

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

Our results were obtained by running:

python bash examples/SSD320_FP*GPU_BENCHMARK.sh

scripts in the TensorFlow-20.06-py3 NGC container on NVIDIA DGX-1 with V100 16G GPUs.

Number of GPUsBatch size per GPUMixed precision img/sFP32 img/sSpeed-up with mixed precisionMulti-gpu weak scaling with mixed precisionMulti-gpu weak scaling with FP32
132127.9684.961.511.001.00
432396.38283.301.403.103.33
832676.83501.301.355.295.90

To achieve same results, follow the Quick start guide outlined above.

Those results can be improved when XLA is used in conjunction with mixed precision, delivering up to 2x speedup over FP32 on a single GPU (~179 img/s). However XLA is still considered experimental.

Inference performance results

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

Our results were obtained by running the examples/SSD320_FP{16,32}_inference.sh script in the TensorFlow-20.06-py3 NGC container on NVIDIA DGX A100 (1x A100 40GB) GPU.

FP16

Batch sizeThroughput AvgLatency AvgLatency 90%Latency 95%Latency 99%
140.8824.4625.7626.4727.91
249.2640.6042.0942.6145.26
458.8168.0173.1276.0280.38
869.13115.73121.58123.87129.00
1678.10204.85212.40216.38225.80
3276.19420.00437.24443.21479.80
6477.92821.37840.82867.621204.64

TF32

Batch sizeThroughput AvgLatency AvgLatency 90%Latency 95%Latency 99%
136.9327.0829.1029.8932.24
244.0345.4248.6749.5651.12
454.6573.2077.5078.8985.81
862.96127.06137.04141.64152.92
1671.48223.83231.36233.35247.51
3273.11437.71450.86455.14467.11
6473.74867.88898.99912.071077.13

To achieve same results, follow the Quick start guide outlined above.

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

Our results were obtained by running the examples/SSD320_FP{16,32}_inference.sh script in the TensorFlow-20.06-py3 NGC container on NVIDIA DGX-1 with 1x V100 16G GPU.

FP16

Batch sizeThroughput AvgLatency AvgLatency 90%Latency 95%Latency 99%
128.3435.2938.0939.0641.07
241.2148.5452.7754.4557.10
455.4172.1975.4476.9984.15
861.83129.39133.37136.89145.69
1666.36241.12246.05249.47259.79
3265.01492.21510.01516.45526.83
6464.75988.471012.111026.191290.54

FP32

Batch sizeThroughput AvgLatency AvgLatency 90%Latency 95%Latency 99%
129.1534.3136.2637.6339.95
241.2048.5453.0854.4757.32
450.7278.8682.4984.0892.15
855.72143.57147.20148.92152.44
1659.41269.32278.30281.06286.54
3259.81534.99542.49551.58572.16
6458.931085.961111.201118.211253.74

To achieve same results, follow the Quick start guide outlined above.

Inference performance: NVIDIA T4

Our results were obtained by running the examples/SSD320_FP{16,32}_inference.sh script in the TensorFlow-20.06-py3 NGC container on NVIDIA T4.

FP16

Batch sizeThroughput AvgLatency AvgLatency 90%Latency 95%Latency 99%
119.2951.9053.7754.9559.21
230.3666.0470.1371.4973.97
437.71106.21111.32113.04118.03
840.95195.49201.66204.00210.32
1641.04390.05399.73402.88410.02
3240.36794.48815.81825.39841.45
6440.271590.981631.001642.221838.95

FP32

Batch sizeThroughput AvgLatency AvgLatency 90%Latency 95%Latency 99%
114.3069.9972.3073.2976.35
220.0499.87104.50106.03108.15
425.01159.99163.00164.13168.63
828.42281.58286.57289.01294.37
1632.56492.08501.98505.29509.95
3234.14939.11961.35968.26983.77
6433.471915.361971.901992.242030.54

To achieve same results, follow the Quick start guide outlined above.