Skip to content

Contributing setup #61

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

Draft
wants to merge 1 commit into
base: contributing-guide
Choose a base branch
from

Conversation

charlieforward9
Copy link

Description

Working through the contribution guide, fledging out issues as I go.

Related Issues

#17

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (melos run analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

@charlieforward9 charlieforward9 marked this pull request as draft June 6, 2024 02:04
@charlieforward9 charlieforward9 changed the base branch from main to contributing-guide June 6, 2024 02:05
@charlieforward9
Copy link
Author

@craiglabenz

I'm currently working on the sync-headers part of my project to add the vision headers from MediaPipe. I've reviewed the documentation, which describes the classes in Java. For the text tasks, we include headers from the c folder, and for the genai task, we use the cc folder.

final core = 'mediapipe/tasks/c/core';
final tc = 'mediapipe/tasks/c/text/text_classifier';
final te = 'mediapipe/tasks/c/text/text_embedder';
final ld = 'mediapipe/tasks/c/text/language_detector';
final inference = 'mediapipe/tasks/cc/genai/inference/c';

I noticed that there's also a Java folder in the list, but I imagine I should use c or cc, since core is c.

To be clear, could you confirm which headers should be used specifically for the vision tasks?

Thank you!

@craiglabenz
Copy link
Collaborator

craiglabenz commented Jun 6, 2024

Good question, @charlieforward9. I don't know why the genai headers are in a different location, but I suspect it was a breakdown in convention / consistency. For vision, you want the header files located at mediapipe/tasks/c/vision/<task-name>/<task-name>.h.

@charlieforward9
Copy link
Author

@craiglabenz getting into the weeds here.

I need some more documentation on the tool/builder program. To get the text task running on my phone, I had to manually download the .tflite files and put them into the example/assets/ dir.

String getModelSource() => switch (model) {
Model.textclassification =>
'https://storage.googleapis.com/mediapipe-models/text_classifier/bert_classifier/float32/latest/bert_classifier.tflite',
Model.textembedding =>
'https://storage.googleapis.com/mediapipe-models/text_embedder/universal_sentence_encoder/float32/latest/universal_sentence_encoder.tflite',
Model.languagedetection =>
'https://storage.googleapis.com/mediapipe-models/language_detector/language_detector/float32/latest/language_detector.tflite',
};

Running dart tool/builder/bin/main model fails, as does ... sdks, the only command that works for me right now is ... header. I could poke around, but I assure someone internally could get it done 100x faster than me.

@charlieforward9
Copy link
Author

@PaulTR

At this point, my main goal with this would be migrating the subset of classes I need from tflite_flutter_helper and moving on.

Let me know how I should proceed, until I hear back I will attempt to revive the helper repo for my app and some warmup with the logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants