AWS DeepLens
Developer Guide

Model Class Constructor

Creates an awscam.Model object to run inference and to parse the result.

Request Syntax

import awscam model = awscam.Model(model_topology_file, loading_config)


  • model_topology_file—Required. A path to an optimized model (.xml) file output by the mo.optimize method.

    Models supported: Classification, Segmentation and Single Shot MultiBox Detector (SSD)


    When deploying an Amazon SageMaker-trained SSD model, you must first run (available from to convert the model artifact into a deployable mode. After cloning or downloading the MXNet repository, run the git reset --hard 73d88974f8bca1e68441606fb0787a2cd17eb364 command before calling to convert the model, if the latest version does not work.

  • loading_config (dict)—Required. Specifies whether the model should be loaded into the GPU or CPU. The format of this parameter is a dictionary.

    Permitted values:

    • {"GPU":1}—Loads the model into the GPU

    • {"GPU":0}—Loads the model into the CPU