MXNET load resnet50 model Object Detection

Hi everyone,

I had trained an object detection model on AWS Sagemaker with RESNET50 algorithm.
Now I would like to load it locally with keras MXNet to perform object detection.

I had found few sites like this :
https://mxnet.incubator.apache.org/versions/master/tutorials/embedded/wine_detector.html
or
https://mxnet.incubator.apache.org/versions/master/tutorials/python/predict_image.html

But they work from image classification and I don’t find any example for object detection.
Is that possible ?

Or I need to use my endpoint from AWS Sagemaker ?

Regards,
Thanks.

Hi,

The object detection model on SageMaker is trained with SSD (link) and uses ResNet-50 as a feature extractor or backbone. Thus the model you would be loading is the SSD model with ResNet backbone and not just the ResNet model for classification.

If your model is trained with on SageMaker then the trained model should be saved into an S3 bucket you specify after the training job is complete.

To use this model afterwards, simply download the model.tar.gz from s3 and uncompress the file to get the params and json files.

For example the two files will be titled something like model-0000.params and model-symbol.json.

If you would like to specifically use keras-mxnet then you need to read the model with the mxnet module API with something like:
sym, arg, aux = mx.model.load_checkpoint("model", 0)

And see the following tutorial for what an example of what to do after loading the model in:

Note: you will have to replace model argument with the correct prefix name for your params and json file if they are named differently.

This link should answer to my question.

Thanks for your explanations !