2D Object Detection using SSD ResNet50
MLPerf Reference Implementation in Python
Tip
- MLCommons reference implementations are only meant to provide a rules compliant reference implementation for the submitters and in most cases are not best performing. If you want to benchmark any system, it is advisable to use the vendor MLPerf implementation for that system like Nvidia, Intel etc.
SSD
Edge category
In the edge category, ssd has SingleStream scenarios and all the scenarios are mandatory for a closed division submission.
Onnxruntime framework
CPU device
Please click here to see the minimum system requirements for running the benchmark
-
Device Memory: 20GB
-
Disk Space: 750GB
Docker Environment
Please refer to the installation page to install MLCFlow for running the automated benchmark commands.
# Docker Container Build and Performance Estimation for Offline Scenario
Tip
-
Compliance runs can be enabled by adding
--compliance=yes
. -
The maximum duration for a performance run can be disabled by using
--env.MLC_MLPERF_USE_MAX_DURATION=no
. -
In valid execution mode, the query count for performance mode can be adjusted using
--env.MLC_MLPERF_LOADGEN_QUERY_COUNT=<query_count>
. -
Add
--adr.mlperf-implementation.tags=_branch.master,_repo.<CUSTOM_INFERENCE_REPO_LINK>
if you are modifying the official MLPerf Inference implementation in a custom fork. -
Add
--adr.inference-src.tags=_repo.<CUSTOM_INFERENCE_REPO_LINK>
if you are modifying the model config accuracy script in the submission checker within a custom fork. -
Add
--adr.inference-src.version=custom
if you are using the modified MLPerf Inference code or accuracy script on submission checker within a custom fork.
mlcr run-abtf-inference,reference,_find-performance,_full,_v0.5 \
--model=ssd \
--implementation=reference \
--framework=onnxruntime \
--category=edge \
--scenario=SingleStream \
--execution_mode=test \
--device=cpu \
--docker --quiet \
--test_query_count=10
Please click here to see more options for the docker launch
-
--docker_mlc_repo=<Custom MLC GitHub repo URL in username@repo format>
: to use a custom fork of cm4mlops repository inside the docker image -
--docker_mlc_repo_branch=<Custom MLC GitHub repo Branch>
: to checkout a custom branch of the cloned cm4mlops repository inside the docker image -
--docker_cache=no
: to not use docker cache during the image build --docker_os=ubuntu
: ubuntu and rhel are supported.--docker_os_version=20.04
: [20.04, 22.04] are supported for Ubuntu and [8, 9] for RHEL
SingleStream
mlcr run-abtf-inference,reference,_full,_v0.5 \
--model=ssd \
--implementation=reference \
--framework=onnxruntime \
--category=edge \
--scenario=SingleStream \
--execution_mode=valid \
--device=cpu \
--quiet
Please click here to see more options for the RUN command
-
Use
--division=closed
to do a closed division submission which includes compliance runs -
Use
--rerun
to do a rerun even when a valid run exists - Use
--compliance
to do the compliance runs (only applicable for closed division) once the valid runs are successful
Native Environment
Please refer to the installation page to install MLCFlow for running the automated benchmark commands.
# Setup a virtual environment for Python
mlcr install,python-venv --name=mlperf
export MLC_SCRIPT_EXTRA_CMD="--adr.python.name=mlperf"
# Performance Estimation for Offline Scenario
Tip
-
Compliance runs can be enabled by adding
--compliance=yes
. -
The maximum duration for a performance run can be disabled by using
--env.MLC_MLPERF_USE_MAX_DURATION=no
. -
In valid execution mode, the query count for performance mode can be adjusted using
--env.MLC_MLPERF_LOADGEN_QUERY_COUNT=<query_count>
. -
Add
--adr.mlperf-implementation.tags=_branch.master,_repo.<CUSTOM_INFERENCE_REPO_LINK>
if you are modifying the official MLPerf Inference implementation in a custom fork. -
Add
--adr.inference-src.tags=_repo.<CUSTOM_INFERENCE_REPO_LINK>
if you are modifying the model config accuracy script in the submission checker within a custom fork. -
Add
--adr.inference-src.version=custom
if you are using the modified MLPerf Inference code or accuracy script on submission checker within a custom fork.
mlcr run-abtf-inference,reference,_find-performance,_full,_v0.5 \
--model=ssd \
--implementation=reference \
--framework=onnxruntime \
--category=edge \
--scenario=SingleStream \
--execution_mode=test \
--device=cpu \
--quiet \
--test_query_count=10
SingleStream
mlcr run-abtf-inference,reference,_full,_v0.5 \
--model=ssd \
--implementation=reference \
--framework=onnxruntime \
--category=edge \
--scenario=SingleStream \
--execution_mode=valid \
--device=cpu \
--quiet
Please click here to see more options for the RUN command
-
Use
--division=closed
to do a closed division submission which includes compliance runs -
Use
--rerun
to do a rerun even when a valid run exists - Use
--compliance
to do the compliance runs (only applicable for closed division) once the valid runs are successful
Pytorch framework
CPU device
Please click here to see the minimum system requirements for running the benchmark
-
Device Memory: 20GB
-
Disk Space: 750GB
Docker Environment
Please refer to the installation page to install MLCFlow for running the automated benchmark commands.
# Docker Container Build and Performance Estimation for Offline Scenario
Tip
-
Compliance runs can be enabled by adding
--compliance=yes
. -
The maximum duration for a performance run can be disabled by using
--env.MLC_MLPERF_USE_MAX_DURATION=no
. -
In valid execution mode, the query count for performance mode can be adjusted using
--env.MLC_MLPERF_LOADGEN_QUERY_COUNT=<query_count>
. -
Add
--adr.mlperf-implementation.tags=_branch.master,_repo.<CUSTOM_INFERENCE_REPO_LINK>
if you are modifying the official MLPerf Inference implementation in a custom fork. -
Add
--adr.inference-src.tags=_repo.<CUSTOM_INFERENCE_REPO_LINK>
if you are modifying the model config accuracy script in the submission checker within a custom fork. -
Add
--adr.inference-src.version=custom
if you are using the modified MLPerf Inference code or accuracy script on submission checker within a custom fork.
mlcr run-abtf-inference,reference,_find-performance,_full,_v0.5 \
--model=ssd \
--implementation=reference \
--framework=pytorch \
--category=edge \
--scenario=SingleStream \
--execution_mode=test \
--device=cpu \
--docker --quiet \
--test_query_count=10
Please click here to see more options for the docker launch
-
--docker_mlc_repo=<Custom MLC GitHub repo URL in username@repo format>
: to use a custom fork of cm4mlops repository inside the docker image -
--docker_mlc_repo_branch=<Custom MLC GitHub repo Branch>
: to checkout a custom branch of the cloned cm4mlops repository inside the docker image -
--docker_cache=no
: to not use docker cache during the image build --docker_os=ubuntu
: ubuntu and rhel are supported.--docker_os_version=20.04
: [20.04, 22.04] are supported for Ubuntu and [8, 9] for RHEL
SingleStream
mlcr run-abtf-inference,reference,_full,_v0.5 \
--model=ssd \
--implementation=reference \
--framework=pytorch \
--category=edge \
--scenario=SingleStream \
--execution_mode=valid \
--device=cpu \
--quiet
Please click here to see more options for the RUN command
-
Use
--division=closed
to do a closed division submission which includes compliance runs -
Use
--rerun
to do a rerun even when a valid run exists - Use
--compliance
to do the compliance runs (only applicable for closed division) once the valid runs are successful
Native Environment
Please refer to the installation page to install MLCFlow for running the automated benchmark commands.
# Setup a virtual environment for Python
mlcr install,python-venv --name=mlperf
export MLC_SCRIPT_EXTRA_CMD="--adr.python.name=mlperf"
# Performance Estimation for Offline Scenario
Tip
-
Compliance runs can be enabled by adding
--compliance=yes
. -
The maximum duration for a performance run can be disabled by using
--env.MLC_MLPERF_USE_MAX_DURATION=no
. -
In valid execution mode, the query count for performance mode can be adjusted using
--env.MLC_MLPERF_LOADGEN_QUERY_COUNT=<query_count>
. -
Add
--adr.mlperf-implementation.tags=_branch.master,_repo.<CUSTOM_INFERENCE_REPO_LINK>
if you are modifying the official MLPerf Inference implementation in a custom fork. -
Add
--adr.inference-src.tags=_repo.<CUSTOM_INFERENCE_REPO_LINK>
if you are modifying the model config accuracy script in the submission checker within a custom fork. -
Add
--adr.inference-src.version=custom
if you are using the modified MLPerf Inference code or accuracy script on submission checker within a custom fork.
mlcr run-abtf-inference,reference,_find-performance,_full,_v0.5 \
--model=ssd \
--implementation=reference \
--framework=pytorch \
--category=edge \
--scenario=SingleStream \
--execution_mode=test \
--device=cpu \
--quiet \
--test_query_count=10
SingleStream
mlcr run-abtf-inference,reference,_full,_v0.5 \
--model=ssd \
--implementation=reference \
--framework=pytorch \
--category=edge \
--scenario=SingleStream \
--execution_mode=valid \
--device=cpu \
--quiet
Please click here to see more options for the RUN command
-
Use
--division=closed
to do a closed division submission which includes compliance runs -
Use
--rerun
to do a rerun even when a valid run exists - Use
--compliance
to do the compliance runs (only applicable for closed division) once the valid runs are successful
CUDA device
Please click here to see the minimum system requirements for running the benchmark
-
Device Memory: 20GB
-
Disk Space: 750GB
Docker Environment
Please refer to the installation page to install MLCFlow for running the automated benchmark commands.
# Docker Container Build and Performance Estimation for Offline Scenario
Tip
-
Compliance runs can be enabled by adding
--compliance=yes
. -
The maximum duration for a performance run can be disabled by using
--env.MLC_MLPERF_USE_MAX_DURATION=no
. -
In valid execution mode, the query count for performance mode can be adjusted using
--env.MLC_MLPERF_LOADGEN_QUERY_COUNT=<query_count>
. -
Add
--adr.mlperf-implementation.tags=_branch.master,_repo.<CUSTOM_INFERENCE_REPO_LINK>
if you are modifying the official MLPerf Inference implementation in a custom fork. -
Add
--adr.inference-src.tags=_repo.<CUSTOM_INFERENCE_REPO_LINK>
if you are modifying the model config accuracy script in the submission checker within a custom fork. -
Add
--adr.inference-src.version=custom
if you are using the modified MLPerf Inference code or accuracy script on submission checker within a custom fork.
mlcr run-abtf-inference,reference,_find-performance,_full,_v0.5 \
--model=ssd \
--implementation=reference \
--framework=pytorch \
--category=edge \
--scenario=SingleStream \
--execution_mode=test \
--device=cuda \
--docker --quiet \
--test_query_count=50
Please click here to see more options for the docker launch
-
--docker_mlc_repo=<Custom MLC GitHub repo URL in username@repo format>
: to use a custom fork of cm4mlops repository inside the docker image -
--docker_mlc_repo_branch=<Custom MLC GitHub repo Branch>
: to checkout a custom branch of the cloned cm4mlops repository inside the docker image -
--docker_cache=no
: to not use docker cache during the image build
SingleStream
mlcr run-abtf-inference,reference,_full,_v0.5 \
--model=ssd \
--implementation=reference \
--framework=pytorch \
--category=edge \
--scenario=SingleStream \
--execution_mode=valid \
--device=cuda \
--quiet
Please click here to see more options for the RUN command
-
Use
--division=closed
to do a closed division submission which includes compliance runs -
Use
--rerun
to do a rerun even when a valid run exists - Use
--compliance
to do the compliance runs (only applicable for closed division) once the valid runs are successful
Native Environment
Please refer to the installation page to install MLCFlow for running the automated benchmark commands.
Tip
- It is advisable to use the commands in the Docker tab for CUDA. Run the below native command only if you are already on a CUDA setup with cuDNN and TensorRT installed.
# Setup a virtual environment for Python
mlcr install,python-venv --name=mlperf
export MLC_SCRIPT_EXTRA_CMD="--adr.python.name=mlperf"
# Performance Estimation for Offline Scenario
Tip
-
Compliance runs can be enabled by adding
--compliance=yes
. -
The maximum duration for a performance run can be disabled by using
--env.MLC_MLPERF_USE_MAX_DURATION=no
. -
In valid execution mode, the query count for performance mode can be adjusted using
--env.MLC_MLPERF_LOADGEN_QUERY_COUNT=<query_count>
. -
Add
--adr.mlperf-implementation.tags=_branch.master,_repo.<CUSTOM_INFERENCE_REPO_LINK>
if you are modifying the official MLPerf Inference implementation in a custom fork. -
Add
--adr.inference-src.tags=_repo.<CUSTOM_INFERENCE_REPO_LINK>
if you are modifying the model config accuracy script in the submission checker within a custom fork. -
Add
--adr.inference-src.version=custom
if you are using the modified MLPerf Inference code or accuracy script on submission checker within a custom fork.
mlcr run-abtf-inference,reference,_find-performance,_full,_v0.5 \
--model=ssd \
--implementation=reference \
--framework=pytorch \
--category=edge \
--scenario=SingleStream \
--execution_mode=test \
--device=cuda \
--quiet \
--test_query_count=50
SingleStream
mlcr run-abtf-inference,reference,_full,_v0.5 \
--model=ssd \
--implementation=reference \
--framework=pytorch \
--category=edge \
--scenario=SingleStream \
--execution_mode=valid \
--device=cuda \
--quiet
Please click here to see more options for the RUN command
-
Use
--division=closed
to do a closed division submission which includes compliance runs -
Use
--rerun
to do a rerun even when a valid run exists - Use
--compliance
to do the compliance runs (only applicable for closed division) once the valid runs are successful
- If you want to download the official MLPerf model and dataset for ssd you can follow this README.