Skip to content

get-ml-model-mobilenet

Automatically generated README for this automation recipe: get-ml-model-mobilenet

Category: AI/ML models

License: Apache 2.0

  • Notes from the authors, contributors and users: README-extra

  • CM meta description for this script: _cm.json

  • Output cached? True

Reuse this script in your project

Install MLCommons CM automation meta-framework

Pull CM repository with this automation recipe (CM script)

cm pull repo mlcommons@cm4mlops

cmr "get ml-model mobilenet raw ml-model-mobilenet image-classification" --help

Run this script

Run this script via CLI
cm run script --tags=get,ml-model,mobilenet,raw,ml-model-mobilenet,image-classification[,variations] 
Run this script via CLI (alternative)
cmr "get ml-model mobilenet raw ml-model-mobilenet image-classification [variations]" 
Run this script from Python
import cmind

r = cmind.access({'action':'run'
              'automation':'script',
              'tags':'get,ml-model,mobilenet,raw,ml-model-mobilenet,image-classification'
              'out':'con',
              ...
              (other input keys for this script)
              ...
             })

if r['return']>0:
    print (r['error'])
Run this script via Docker (beta)
cm docker script "get ml-model mobilenet raw ml-model-mobilenet image-classification[variations]" 

Variations

  • No group (any combination of variations can be selected)

    Click here to expand this section.

    • _tflite
  • Group "framework"

    Click here to expand this section.

    • _onnx
      • ENV variables:
        • CM_ML_MODEL_DATA_LAYOUT: NCHW
        • CM_ML_MODEL_FRAMEWORK: onnx
    • _tf (default)
      • ENV variables:
        • CM_ML_MODEL_DATA_LAYOUT: NHWC
        • CM_ML_MODEL_NORMALIZE_DATA: yes
        • CM_ML_MODEL_SUBTRACT_MEANS: no
        • CM_ML_MODEL_INPUT_LAYER_NAME: input
  • Group "kind"

    Click here to expand this section.

    • _large
      • ENV variables:
        • CM_ML_MODEL_MOBILENET_KIND: large
    • _large-minimalistic
      • ENV variables:
        • CM_ML_MODEL_MOBILENET_KIND: large-minimalistic
    • _small
      • ENV variables:
        • CM_ML_MODEL_MOBILENET_KIND: small
    • _small-minimalistic
      • ENV variables:
        • CM_ML_MODEL_MOBILENET_KIND: small-minimalistic
  • Group "multiplier"

    Click here to expand this section.

    • _multiplier-0.25
      • ENV variables:
        • CM_ML_MODEL_MOBILENET_MULTIPLIER: 0.25
        • CM_ML_MODEL_MOBILENET_MULTIPLIER_PERCENTAGE: 25
    • _multiplier-0.35
      • ENV variables:
        • CM_ML_MODEL_MOBILENET_MULTIPLIER: 0.35
        • CM_ML_MODEL_MOBILENET_MULTIPLIER_PERCENTAGE: 35
    • _multiplier-0.5
      • ENV variables:
        • CM_ML_MODEL_MOBILENET_MULTIPLIER: 0.5
        • CM_ML_MODEL_MOBILENET_MULTIPLIER_PERCENTAGE: 50
    • _multiplier-0.75
      • ENV variables:
        • CM_ML_MODEL_MOBILENET_MULTIPLIER: 0.75
        • CM_ML_MODEL_MOBILENET_MULTIPLIER_PERCENTAGE: 75
    • _multiplier-1.0
      • ENV variables:
        • CM_ML_MODEL_MOBILENET_MULTIPLIER: 1.0
        • CM_ML_MODEL_MOBILENET_MULTIPLIER_PERCENTAGE: 100
  • Group "opset-version"

    Click here to expand this section.

    • _opset-11
      • ENV variables:
        • CM_ML_MODEL_ONNX_OPSET: 11
    • _opset-8
      • ENV variables:
        • CM_ML_MODEL_ONNX_OPSET: 8
  • Group "precision"

    Click here to expand this section.

    • _fp32 (default)
      • ENV variables:
        • CM_ML_MODEL_INPUTS_DATA_TYPE: fp32
        • CM_ML_MODEL_PRECISION: fp32
        • CM_ML_MODEL_WEIGHTS_DATA_TYPE: fp32
        • CM_ML_MODEL_MOBILENET_PRECISION: float
    • _int8
      • ENV variables:
        • CM_ML_MODEL_INPUTS_DATA_TYPE: int8
        • CM_ML_MODEL_PRECISION: int8
        • CM_ML_MODEL_WEIGHTS_DATA_TYPE: int8
        • CM_ML_MODEL_MOBILENET_PRECISION: int8
    • _uint8
      • ENV variables:
        • CM_ML_MODEL_INPUTS_DATA_TYPE: uint8
        • CM_ML_MODEL_PRECISION: uint8
        • CM_ML_MODEL_WEIGHTS_DATA_TYPE: uint8
        • CM_ML_MODEL_MOBILENET_PRECISION: uint8
  • Group "resolution"

    Click here to expand this section.

    • _resolution-128
      • ENV variables:
        • CM_ML_MODEL_MOBILENET_RESOLUTION: 128
        • CM_ML_MODEL_IMAGE_HEIGHT: 128
        • CM_ML_MODEL_IMAGE_WIDTH: 128
        • CM_DATASET_PREPROCESSED_IMAGENET_DEP_TAGS: _resolution.128
    • _resolution-160
      • ENV variables:
        • CM_ML_MODEL_MOBILENET_RESOLUTION: 160
        • CM_ML_MODEL_IMAGE_HEIGHT: 160
        • CM_ML_MODEL_IMAGE_WIDTH: 160
        • CM_DATASET_PREPROCESSED_IMAGENET_DEP_TAGS: _resolution.160
    • _resolution-192
      • ENV variables:
        • CM_ML_MODEL_MOBILENET_RESOLUTION: 192
        • CM_ML_MODEL_IMAGE_HEIGHT: 192
        • CM_ML_MODEL_IMAGE_WIDTH: 192
        • CM_DATASET_PREPROCESSED_IMAGENET_DEP_TAGS: _resolution.192
    • _resolution-224
      • ENV variables:
        • CM_ML_MODEL_MOBILENET_RESOLUTION: 224
        • CM_ML_MODEL_IMAGE_HEIGHT: 224
        • CM_ML_MODEL_IMAGE_WIDTH: 224
        • CM_DATASET_PREPROCESSED_IMAGENET_DEP_TAGS: _resolution.224
  • Group "source"

    Click here to expand this section.

    • _from.google
      • ENV variables:
        • CM_DOWNLOAD_SOURCE: google
    • _from.zenodo
      • ENV variables:
        • CM_DOWNLOAD_SOURCE: zenodo
  • Group "version"

    Click here to expand this section.

    • _v1
      • ENV variables:
        • CM_ML_MODEL_MOBILENET_VERSION: 1
        • CM_ML_MODEL_FULL_NAME: mobilenet-v1-precision_<<<CM_ML_MODEL_MOBILENET_PRECISION>>>-<<<CM_ML_MODEL_MOBILENET_MULTIPLIER>>>-<<<CM_ML_MODEL_MOBILENET_RESOLUTION>>>
    • _v2
      • ENV variables:
        • CM_ML_MODEL_MOBILENET_VERSION: 2
        • CM_ML_MODEL_VER: 2
        • CM_ML_MODEL_FULL_NAME: mobilenet-v2-precision_<<<CM_ML_MODEL_MOBILENET_PRECISION>>>-<<<CM_ML_MODEL_MOBILENET_MULTIPLIER>>>-<<<CM_ML_MODEL_MOBILENET_RESOLUTION>>>
    • _v3 (default)
      • ENV variables:
        • CM_ML_MODEL_MOBILENET_VERSION: 3
        • CM_ML_MODEL_VER: 3
        • CM_ML_MODEL_FULL_NAME: mobilenet-v3-precision_<<<CM_ML_MODEL_MOBILENET_PRECISION>>>-<<<CM_ML_MODEL_MOBILENET_KIND>>>-<<<CM_ML_MODEL_MOBILENET_RESOLUTION>>>
Default variations

_fp32,_tf,_v3

Default environment

These keys can be updated via --env.KEY=VALUE or env dictionary in @input.json or using script flags.

  • CM_ML_MODEL: mobilenet
  • CM_ML_MODEL_DATASET: imagenet2012-val
  • CM_ML_MODEL_RETRAINING: no
  • CM_ML_MODEL_WEIGHT_TRANSFORMATIONS: no
  • CM_ML_MODEL_INPUTS_DATA_TYPE: fp32
  • CM_ML_MODEL_WEIGHTS_DATA_TYPE: fp32
  • CM_ML_MODEL_MOBILENET_NAME_SUFFIX: ``

Script output

cmr "get ml-model mobilenet raw ml-model-mobilenet image-classification [variations]"  -j