Adding a CoreML Export Script to Enhance Community Resources#1782
Open
malfihasan wants to merge 1 commit intoMegvii-BaseDetection:mainfrom
Open
Adding a CoreML Export Script to Enhance Community Resources#1782malfihasan wants to merge 1 commit intoMegvii-BaseDetection:mainfrom
malfihasan wants to merge 1 commit intoMegvii-BaseDetection:mainfrom
Conversation
mbotsu
reviewed
Jun 13, 2024
| nms_spec = ct.proto.Model_pb2.Model() | ||
| nms_spec.specificationVersion = 5 | ||
| for i in range(2): | ||
| decoder_output = _model._spec.description.output[i].SerializeToString() |
There was a problem hiding this comment.
_model._spec.description change spec.description.output
mbotsu
reviewed
Jun 13, 2024
| import os | ||
| from loguru import logger | ||
| import sys | ||
| import torch |
mbotsu
reviewed
Jun 13, 2024
| import torch | ||
| from yolox.exp import get_exp | ||
| from yolox.models.network_blocks import SiLU | ||
| from yolox.utils import replace_modules |
mbotsu
reviewed
Jun 13, 2024
| parser.add_argument("opts", nargs=argparse.REMAINDER, help="Modify config options using the command-line") | ||
| parser.add_argument("--decode_in_inference", action="store_true", help="Decode in inference or not") | ||
| parser.add_argument("--class_name", type=str, default=None, help="Class name for the object") | ||
|
|
There was a problem hiding this comment.
There are unused arguments
- dynamic
- no-onnxsim
- decode_in_inference
|
Hi. Thanks to PR I was able to convert to CoreML. As an additional request, I think it would be even better if the device defaults to CPU and optionally GPU. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have been working on a CoreML project as a personal endeavor. I believe it could be beneficial to the community, so I am adding a coreml_export.py script for everyone's use. The script is added to tools/coreml_export.py.