Deploy trained Sagemaker Mxnet object detection model locally?

I have trained an object detection model on AWS Sagemaker. I want to use this model locally in my machine. I downloaded this model which consist of 3 files hyperparams.json, model-symbol.json, and model-0000.params. I have seen plenty of tutorials to deploy object classification model locally but didn’t get any for object detection.

Upvotes: 0

Views: 369

Answers (2)

fm1ch4
fm1ch4

Reputation: 56

As NRauschmayr mentioned it can be convenient to use SageMaker's Python SDK local mode feature if you are also using it to train on SageMaker. One slight correction is that you would be setting the instance_type of the predictor to 'local' since you are interested in local deployment. You can read more about local mode here: https://sagemaker.readthedocs.io/en/stable/overview.html#local-mode

Upvotes: 1

NRauschmayr
NRauschmayr

Reputation: 131

There are different possibilities:

  • You can install SageMaker Python SDK locally on your machine and use SageMaker to train and deploy your model locally Therefore you need to indicate in the MXNet Estimator train_instance_type='local'. SageMaker will then pull in the data from S3 into you local machine and train the model there. mxnet_estimator.deploy will then deploy the model locally. You can find a detailed description here
  • You can use MXNet’s Model Server. You need to convert your model files into model archive (.mar) You can deploy it in the following way:mxnet-model-server --models mymodel=mymodel.mar

Upvotes: 1

Related Questions