Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use MobileNetV4 Core ML model with NCHW input #895

Merged
merged 13 commits into from
Aug 6, 2024

Conversation

anhappdev
Copy link
Collaborator

@anhappdev anhappdev commented Jul 2, 2024

@anhappdev anhappdev requested a review from a team as a code owner July 2, 2024 02:51
Copy link

github-actions bot commented Jul 2, 2024

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@anhappdev
Copy link
Collaborator Author

There are 2 issues:

  1. I cannot get a plausible accuracy. I am not sure what is wrong with the code?
  2. There is no official way to know which format the input data has or the benchmark_id to know when to trigger mlperf_backend_convert_inputs()?

@anhappdev anhappdev marked this pull request as draft July 2, 2024 03:13
@freedomtan
Copy link
Contributor

@freedomtan to check the NHWC -> NCHW conversion.

@freedomtan
Copy link
Contributor

@anhappdev this NHWC -> NCHW looks right to me. Maybe you can try to compare with the result of using a single transpose op TFLite model (Yes, it's posssible. E.g., in TFLite label_image, I constructed a TFLite model with only resize op to resize the input image to the size I needed, https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/examples/label_image/bitmap_helpers_impl.h#L30-L100)

Copy link

sonarqubecloud bot commented Aug 5, 2024

@anhappdev
Copy link
Collaborator Author

There was an issue with wrong data type, but I got it working now.

@anhappdev anhappdev marked this pull request as ready for review August 5, 2024 06:20
@anhappdev anhappdev merged commit 96d7477 into master Aug 6, 2024
22 checks passed
@anhappdev anhappdev deleted the anh/coreml-mobilenetv4-nchw branch August 6, 2024 06:00
@github-actions github-actions bot locked and limited conversation to collaborators Aug 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants