Shortcuts

Model Complexity Analysis

We provide a tools/analysis_tools/get_flops.py script to help with the complexity analysis for models of MMYOLO. Currently, it provides the interfaces to compute parameter, activation and flops of the given model, and supports printing the related information layer-by-layer in terms of network structure or table.

The commands as follows:

python tools/analysis_tools/get_flops.py
    ${CONFIG_FILE} \                           # config file path
    [--shape ${IMAGE_SIZE}] \                  # input image size (int), default 640*640
    [--show-arch ${ARCH_DISPLAY}] \            # print related information by network layers
    [--not-show-table ${TABLE_DISPLAY}] \      # print related information by table
    [--cfg-options ${CFG_OPTIONS}]             # config file option
# [] stands for optional parameter, do not type [] when actually entering the command line

Let’s take the rtmdet_s_syncbn_fast_8xb32-300e_coco.py config file in RTMDet as an example to show how this script can be used:

Read the Docs v: latest
Versions
latest
stable
dev
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.