I trained a MXnet SSD resnet-50 model with SageMaker Object Detection Algorithm and want to use it on iOS devices. Therefore I need to convert it to the Apple CoreML format. I tried with mxnet-to-coreml.
Maybe there are better ways to do it? Does anyone know a convenient way to achieve this task?
My model consists of two files:
- resnet50_ssd_model-symbol.json
- resnet50_ssd_model-0000.params
Before converting the model, I set it to deploy-state by using "deploy.py" provided by MXnet.
The mxnet-to-coreml converter fails with the following error:
raise TypeError("MXNet layer of type %s is not supported." % layer) TypeError: MXNet layer of type _copy is not supported.
I invoked the converter script like this:
python mxnet_coreml_converter.py --model-prefix='ssd_resnet50_512' --
epoch=0 --input-shape='{"data":"3, 512, 512"}' --mode=classifier --pre-
processing-arguments='{"image_input_names":"data"}' --output-
file="resnet50.mlmodel"