deepinsight / deepinsight/insightface
Cannot convert alignment hourglass model to onnx
- Dominant language
- Python
- Stars
- 29.7k
- Forks
- 6.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hi! So I trained the alignment hourglass model using the [train script](https://github.com/deepinsight/insightface/tree/master/alignment/heatmap/train.py).
Then I used the [`mxnet_to_onnx.py` script](https://github.com/deepinsight/insightface/tree/master/alignment/heatmap) and I got the following error:
```plaintext
Traceback (most recent call last):
File "./mxnet_to_onnx.py", line 109, in
converted_model_path = onnx_mxnet.export_model(sym, all_args, [input_shape], np.float32, args.output)
File "/home/stf/.local/lib/python3.8/site-packages/mxnet/contrib/onnx/__init__.py", line 53, in export_model
return export_model_(*args, **kwargs)
File "/home/stf/.local/lib/python3.8/site-packages/mxnet/onnx/mx2onnx/_export_model.py", line 127, in export_model
onnx_graph = converter.create_onnx_graph_proto(sym, params, in_shapes,
File "/home/stf/.local/lib/python3.8/site-packages/mxnet/onnx/mx2onnx/_export_onnx.py", line 335, in create_onnx_graph_proto
converted, dtypes = MXNetGraph.convert_layer(
File "/home/stf/.local/lib/python3.8/site-packages/mxnet/onnx/mx2onnx/_export_onnx.py", line 96, in convert_layer
ret = convert_func(node, **kwargs)
File "/home/stf/.local/lib/python3.8/site-packages/mxnet/onnx/mx2onnx/_op_translations/_op_translations_opset12.py", line 299, in convert_deconvolution
assert len(input_nodes) == 3, 'Deconvolution takes 3 input if no_bias==False'
AssertionError: Deconvolution takes 3 input if no_bias==False
```
I tried a lot of things but I did not manage to solve this. How can I get past this error? I made no changes to the mxnet models.
I saw that @nttstar is the one who created that script. Do you have any insights? Thanks.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.