apple / coremltools

Core ML tools contain supporting tools for Core ML model conversion, editing, and validation.
https://coremltools.readme.io
BSD 3-Clause "New" or "Revised" License
4.36k stars 630 forks source link

Ultralytics YOLOv8 exports require `protobuf>3.20.x` #1961

Open glenn-jocher opened 1 year ago

glenn-jocher commented 1 year ago

Hi! Thank you to the maintainers for your great work on coremltools.

I'm the author of YOLOv5 and YOLOv8. We strive to create the world's best AI models and make them available to everyone in nearly all possible export formats in a single environment. This task is made very difficult/impossible due to the coremltools protobuf<3.20.x pin currently in place. I see this has been covered in other issues but I feel the issue is not resolved and is getting worse.

protobuf is now at version 4.24.2 and is used by many packages, some of which have requirements for more recent versions which directly conflict with Apple's outdated pin that is currently in place, making a common environment that supports YOLOv8 export to i.e. ONNX, OpenVINO, TensorRT, TFLite, CoreML, Paddle and NCNN not possible to create or maintain.

coremltools is one of the only format generating version conflicts for protobuf due to this restrictive pin in place.

https://github.com/glenn-jocher/ultralytics/actions/runs/6064473145/job/16452960161?pr=5

Screenshot 2023-09-03 at 15 47 22

It would be very useful to Ultralytics and any other company that is exporting to not just CoreML but other formats for the restrictions in place to be lifted. Thank you.

kubaraczkowski commented 9 months ago

Hi, is there a plan to upgrade the supported protobuf version to > 4.22 ? The world seems to be split in half at the moment, there are those "sitting" on the old protobuf 3 and the ones who already moved to protobuf 4. Since more and more projects depend now on the latter - coremltools becomes hard to use in new projects...

Thanks in advance!

ALMerrill commented 8 months ago

Also really looking forward to this. I have several libraries I need to use that require >4, so I have to use outdated libraries to get coremltools to work

tetterl commented 3 months ago

We are running into similar issues in our Python environment when trying to upgrade from Python 3.8 (Security support ending on 31 Oct 2024). Any update on this?

jakesabathia2 commented 1 month ago

This issue should be fixed in the 8.0b2 release. Please give it a try.