Yolov5: Starting CoreML export with coremltools 4.0b2...

Created on 20 Aug 2020  路  4Comments  路  Source: ultralytics/yolov5

鉂擰uestion

After running this command, there are two problems, the first one I know will be solved when onnx==1.8.0, or it can be solved by lowering the version, but the second problem I did not find, I hope I can get help

 python models\export.py --weight .\runs\exp1\weights\last.pt --img 640 --batch 1
Starting ONNX export with onnx 1.7.0...
Fusing layers...
Model Summary: 140 layers, 7.45958e+06 parameters, 6.61683e+06 gradients
ONNX export failure: Exporting the operator hardswish to ONNX opset version 12 is not supported.


Starting CoreML export with coremltools 4.0b2...
CoreML export failure: module 'torch._C' has no attribute '_jit_pass_canonicalize_ops'

Additional context

question

Most helpful comment

maybe the version of torch 1.6.0 that caused the problem.
https://github.com/apple/coremltools/issues/827
they said PyTorch 1.5.1 works fine with coremltoolsv4.0b2
Now both onnx and coremltools can not work fine with yolov5 v3.0

All 4 comments

Hello @Single430, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook Open In Colab, Docker Image, and Google Cloud Quickstart Guide for example environments.

If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom model or data training question, please note Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:

  • Cloud-based AI systems operating on hundreds of HD video streams in realtime.
  • Edge AI integrated into custom iOS and Android apps for realtime 30 FPS video inference.
  • Custom data training, hyperparameter evolution, and model exportation to any destination.

For more information please visit https://www.ultralytics.com.

maybe the version of torch 1.6.0 that caused the problem.
https://github.com/apple/coremltools/issues/827
they said PyTorch 1.5.1 works fine with coremltoolsv4.0b2
Now both onnx and coremltools can not work fine with yolov5 v3.0

maybe the version of torch 1.6.0 that caused the problem.
apple/coremltools#827
they said PyTorch 1.5.1 works fine with coremltoolsv4.0b2
Now both onnx and coremltools can not work fine with yolov5 v3.0

I went to read this issue, it helped me a lot, thank you very much!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

milind-soni picture milind-soni  路  3Comments

we1pingyu picture we1pingyu  路  3Comments

cswwp picture cswwp  路  4Comments

maykulkarni picture maykulkarni  路  3Comments

xinxin342 picture xinxin342  路  3Comments