Skip to content

How to reproduce the mlmodels downloadable in v6.0 (preview not available with export.py) #6486

@AtomScott

Description

@AtomScott

Search before asking

Question

Recently, @glenn-jocher added support for mlmodel inference.
#6195 (comment)

This is great and demonstrated an easy way to check mlmodels. The same mlmodel can be opened in xcode with the preview option available. However, I can't reproduce the same mlmodel using export.py.

The torchhub mlmodel and the mlmodel downloadable from https://github.com/ultralytics/yolov5/releases/tag/v6.0 seem to be the same, but the mlmodel generate from

!python export.py --weights yolov5s.pt --include coreml  # CoreML export

is different.
Are there any other extra options necessary to reproduce the exact same thing?

It would be extremely helpful to be able to view yolov5 in xcode with the preview tab available.

Additional

Different description and output in when viewed in xcode
image

  • (LEFT) mlmodel downloaded from v6 release page.
  • (RIGHT) ml model exported with the following command
docker run ultralytics/yolov5 python export.py --weights yolov5n.pt --include coreml

I have also noticed that the output in preview tab is sometimes completely wrong depending on the scale and aspect ratio of the image. Should I open an extra issue for this? or is this behaviour expected?

Screen_Recording_2022-02-01_at_0.20.54.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleStale and schedule for closing soonquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions