onnx / onnxmltools

ONNXMLTools enables conversion of models to ONNX
https://onnx.ai
Apache License 2.0
1k stars 181 forks source link

Unsupported shape calculation for operator visionFeaturePrint - Converting CoreML to ONNX #354

Open MarcusSjolin opened 4 years ago

MarcusSjolin commented 4 years ago

Seems to be unsupported

Traceback (most recent call last):
  File "convert.py", line 9, in <module>
    onnx_model = onnxmltools.convert_coreml(coreml_model, 'Example Model')
  File "/Library/Python/3.7/site-packages/onnxmltools/convert/main.py", line 18, in convert_coreml
    custom_conversion_functions, custom_shape_calculators)
  File "/Library/Python/3.7/site-packages/onnxmltools/convert/coreml/convert.py", line 60, in convert
    topology = parse_coreml(spec, initial_types, target_opset, custom_conversion_functions, custom_shape_calculators)
  File "/Library/Python/3.7/site-packages/onnxmltools/convert/coreml/_parse.py", line 467, in parse_coreml
    topology.compile()
  File "/Library/Python/3.7/site-packages/onnxconverter_common/topology.py", line 632, in compile
    self._infer_all_types()
  File "/Library/Python/3.7/site-packages/onnxconverter_common/topology.py", line 508, in _infer_all_types
    operator.infer_types()
  File "/Library/Python/3.7/site-packages/onnxconverter_common/topology.py", line 110, in infer_types
    registration.get_shape_calculator(self.type)(self)
  File "/Library/Python/3.7/site-packages/onnxconverter_common/registration.py", line 68, in get_shape_calculator
    raise ValueError('Unsupported shape calculation for operator %s' % operator_name)
ValueError: Unsupported shape calculation for operator visionFeaturePrint
me-Stoffel commented 4 years ago

Ran into the same issue, just trying to convert a very simple image classification model. Is this not yet supported in general for CoreML to ONNX?

poolplayer32285 commented 4 years ago

Im running into this issue still also.

jbrown15 commented 4 years ago

I too, am running into this issue.

codabrink commented 3 years ago

Just ran into this issue today as well.

brown2021 commented 2 years ago

same. Anyone found the fix?

rextremotabaresDtt commented 2 years ago

Hi guys, any update on this? Are these models not suported? If so, how can you export coreml to another format?

thomassantosh commented 2 years ago

Same here, just got the same error converting a basic image classification into ONNX, using onnxmltools.

brown2021 commented 2 years ago

I have been having this issue for over a year now lol. I am looking for a clean way to convert a coreml model to a pytorch

On Wed, Dec 22, 2021 at 1:42 AM Santosh @.***> wrote:

Same here, just got the same error converting a basic image classification into ONNX, using onnxmltools.

— Reply to this email directly, view it on GitHub https://github.com/onnx/onnxmltools/issues/354#issuecomment-999325935, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASY4UEDHNUAQ5BOJD3AK7HLUSFXMLANCNFSM4JQ6FVUQ . You are receiving this because you commented.Message ID: @.***>

fuomag9 commented 2 years ago

Still not working in 6.0 :(

abhishekwynum commented 1 year ago

Did this receive any fix on the current version ?

brown2021 commented 1 year ago

To my understanding it will never be fixed. I think Apple intentionally stopped supporting their model to be converted. But it has supported the other direction, converting from other libraries to coreML.

On Fri, Jan 13, 2023 at 12:46 AM abhishekwynum @.***> wrote:

Did this receive any fix on the current version ?

— Reply to this email directly, view it on GitHub https://github.com/onnx/onnxmltools/issues/354#issuecomment-1381343576, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASY4UEE4AVHCXCS4VI5KEL3WSDT3RANCNFSM4JQ6FVUQ . You are receiving this because you commented.Message ID: @.***>

StainlessStlRat commented 4 months ago

To my eyes it looks like we have full access to the model via coremltools so it shouldn't be impossible to write a shape calculator.