deepinsight / deepinsight/insightface
Cannot convert alignment(heatmapReg) trained model to onnx.
- Dominant language
- Python
- Stars
- 29.7k
- Forks
- 6.1k
- PR merge metrics
- No merged PRs in 30d
Description
**I trained the alignment model, heatmapReg, and I try to convert the model to onnx model.
But following errors occurred,**
Traceback (most recent call last):
File "model_onnx.py", line 12, in
converted_model_path = onnx_mxnet.export_model(sym, params, [input_shape], np.float32, onnx_file)
File "/mnt/data2/anaconda3/envs/feathernet/lib/python3.7/site-packages/mxnet/contrib/onnx/mx2onnx/export_model.py", line 79, in export_model
verbose=verbose)
File "/mnt/data2/anaconda3/envs/feathernet/lib/python3.7/site-packages/mxnet/contrib/onnx/mx2onnx/export_onnx.py", line 249, in create_onnx_graph_proto
idx=idx
File "/mnt/data2/anaconda3/envs/feathernet/lib/python3.7/site-packages/mxnet/contrib/onnx/mx2onnx/export_onnx.py", line 86, in convert_layer
raise AttributeError("No conversion function registered for op type %s yet." % op)
AttributeError: No conversion function registered for op type UpSampling yet.
**python code is,**
import mxnet as mx
import numpy as np
from mxnet.contrib import onnx as onnx_mxnet
import logging
sym = './A-hourglass-symbol.json'
params = './A-hourglass-0150.params'
input_shape = (1, 3, 128, 128)
onnx_file = './A-hourglass.onnx'
converted_model_path = onnx_mxnet.export_model(sym, params, [input_shape], np.float32, onnx_file)
**mxnet version is,**
>>> import mxnet as mx
>>> mx.__version__
'1.7.0'
My trained model is,
[A-hourglass-0150.zip](https://github.com/deepinsight/insightface/files/6088093/A-hourglass-0150.zip)
**I have two questions,**
1) How could I solve the above problem,
2) After solving this problem, what do I need to do to make inferences in ncnn?
Sincerely yours.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.