Commit 9b936fa
Add GenAI inference task (#26)
* Adds mediapipe_core package (#11)
* adds mediapipe_core package
* adds makefile for all packages
* fixes typo in Makefile
* Apply suggestions from code review
* Update Makefile
* Apply suggestions from code review
* updated generated code's location and license (for 3P status)
* code review responses
including:
* comments
* licensing
* resolving testing nits
* updated README
* setup sharing of base analysis_options
* Update packages/mediapipe-core/lib/src/containers.dart
Co-authored-by: Kate Lovett <katelovett@google.com>
* Update packages/mediapipe-core/lib/src/containers.dart
Co-authored-by: Kate Lovett <katelovett@google.com>
* add free methods to core structs
* code review updates to options
* adds publish blocker
* Add GitHub actions for CI/CD (#14)
* adds CI/CD for mediapipe_core
* add newlines
* moves file into workflows dir
* uncomment flutter doctor
* testing PR config to run this now
* added master and beta CI scripts
* add executable permissions to CI scripts
* adds ffiwrapper to ci/cd
---------
Co-authored-by: Kate Lovett <katelovett@google.com>
* Add utility to collect headers from google/mediapipe (#10)
* adds cmd to pull header files from google/mediapipe
* polish and missing parts from git surgery
* More comments and touch ups
* Apply suggestions from code review
* moves build command into `tool/` directory
and renames folder `build_cmd` -> `builder`
* complete build_cmd -> builder rename
* Update readme
* Added licenses
* Adds DownloadModelCommand
---------
Co-authored-by: Kate Lovett <katelovett@google.com>
* [FFI] MediaPipe SDKs finder automation (#16)
* adds sdks_finder command to builder utility
* propagates changes to existing commands
* adds manifest files generated by new sdks_finder command
* updates in response to code review
* Adds mediapipe_text package (#12)
* adds mediapipe_text package
* Update .vscode/settings.json
added newline
* resync headers
* regenerated core bindings
* Apply suggestions from code review
* Adds example to `mediapipe-task-text` (#15)
* initial commit of example
* build file changes from `flutter pub get`
* update main.dart
* removes commented code
* updates example for isolates design
* Use `native-assets` to vendor MediaPipe SDK (#9)
* adding bare structure for native assets
* add MVP / first draft of build.dart
* build.dart updates
* update build.dart
TODO: stream file
* model memory troubleshooting
* vendoring script tweak
* remove development logging
* removes pointless build method
* Add utility to collect headers from google/mediapipe (#10)
* adds cmd to pull header files from google/mediapipe
* polish and missing parts from git surgery
* More comments and touch ups
* Apply suggestions from code review
* moves build command into `tool/` directory
and renames folder `build_cmd` -> `builder`
* complete build_cmd -> builder rename
* Update readme
* Added licenses
* Adds DownloadModelCommand
---------
Co-authored-by: Kate Lovett <katelovett@google.com>
* adds mediapipe_text package
* Update .vscode/settings.json
added newline
* resync headers
* regenerated core bindings
* native assets troubleshooting
this commit is broken
* Removes redundant count field
* update build.dart for correct bindings path
* download text classification model for CI
* better memory freeing in executor
* added SafeArea to example
* added CI to PRs into text package
* ci tooling change
* remove accidentally commited model
* more CI shenanigans
* lowers minimum Dart version for builder
* added smoke test for text example
* Added CI/CD for examples
* More CI tweaks
* entering "please work" territory
* d'oh
* trying more random stuff
* one more time
* it'd be funny if this helped
* more print statements
* enable reaching new print statements
* more logging
* see what's in build dir
* another test
* adding flutter config list
* turn off fail-fast for beta and master
* moar logs
* way moar prints
* moare things
* commit rest of rename
* moar whatevers
* adds manifest files generated by new sdks_finder command
* adds sdks_finder command to builder utility
* propagates changes to existing commands
* updates in response to code review
* updates to build.dart and tests
* add Android runtime
* sdks_finder logging improvement for when build folders change names
* refreshed symbols from google/mediapipe
* cleanup
* loosens closeness thresholds in integration tests
* separate build commands for macos architectures
* restores fail-fast setting to CI
* removed stale logging statements from CI
* removes accidentally committed lines
* add formatting of sdk_downloads.dart for CI
* fixes broken example test
* code touch ups from @Piinks code review
---------
Co-authored-by: Kate Lovett <katelovett@google.com>
* added base Dart class ClassificationResult to consolidate results logic in `mediapipe_core`
in doing so, removed meaningless TextClassifierResult.timestamp field
* Update Makefile
* Update Makefile
* Update packages/mediapipe-task-text/build.dart
Co-authored-by: Kate Lovett <katelovett@google.com>
* Update packages/mediapipe-task-text/lib/src/tasks/text_classification/text_classification_executor.dart
Co-authored-by: Kate Lovett <katelovett@google.com>
* code review responses
* formatting
* removes stale comment
* adds Dart to Native converters, with tests
* changes from code review
* updates mediapipe-core to prepare for IO/web split
* Improves memory management in core tests
* updated ffigen / bindings
* refactors text package for better memory management and eventual web/io split
* removed stale test
* cleanup on aisle COMMENTS
* Comments and documentation improvements
* Moved log statement
* Removed native memory management helpers in favor of `free` extensions on pointers
* Renamed abstract classes to have Base prefix
* sorted out class constructors
* moved `fake` constructor to default unnamed constructor
* leaning on the fact that the native constructors will be hidden by conditional exports, reducing confusion
* Improved docstrings explaining memory ownership
* Convert lists to lazy iterable / generators
* added missing licenses
* Update packages/mediapipe-task-text/example/test/widgets_test.dart
Co-authored-by: Kate Lovett <katelovett@google.com>
* Update packages/mediapipe-task-text/example/lib/main.dart
Co-authored-by: Kate Lovett <katelovett@google.com>
* completed return style change
* CI troubleshooting
* moved around debugging code
* logging tweak
* cat native-assets.yaml
* moar logs
* removed bad echo
* fixed native-assets typo
should be underscore!
* Removes CI debugging statements
---------
Co-authored-by: Kate Lovett <katelovett@google.com>
* Native Assets CI fix (#20)
* adds native assets debugging statements
* Try only downloading target arch
* Revert "adds native assets debugging statements"
This reverts commit b2bc215.
---------
Co-authored-by: Daco Harkes <dacoharkes@google.com>
* Text Embedding task (#21)
* updated and re-ran generators
* added embedding concepts to mediapipe-core
* fixed embedding header file and bindings
* adds text embedding classes to text pkg
* updates example with text embedding
* removed dead file
* added more embedding tests
* added embedding model download to CI script
* touch ups
* Update packages/mediapipe-core/lib/src/io/containers.dart
Co-authored-by: Kate Lovett <katelovett@google.com>
* Update packages/mediapipe-task-text/example/.gitignore
Co-authored-by: Kate Lovett <katelovett@google.com>
* Update packages/mediapipe-task-text/example/lib/text_embedding_demo.dart
Co-authored-by: Kate Lovett <katelovett@google.com>
* moved worker dispose method to base class
* docstring & comment improvements
* throw exceptions in impossible code paths instead of returning null
* class hierarchy improvements
* fixed outdates tests
* cleaned up dispose methods
* various tidying
* fixed deprecation warning
* moves repeated widgets into helper method
---------
Co-authored-by: Kate Lovett <katelovett@google.com>
* updated and re-ran generators
* fixed embedding header file and bindings
* adds text embedding classes to text pkg
* moved worker dispose method to base class
* class hierarchy improvements
* cleaned up dispose methods
* initial commit of language detection task
* finishes language detection impl
* adds language detection demo
* backfilling improvements to classification and embedding
* adds language detection tests
* add new model download to CI script
* fixes stale classification widget test, adds language detection widget test
* initial inference commit of flutter create -t package
* rename inference folder
* adds build tooling for inference headers and ffigen
* rename "inference" to "genai"
* adds initial inference impl
* flutter creat example for genai
* sdks crawling update
* adds genai
* adds model name to output file
* looks backwards through time until a build is good instead of betting the house that the most recent build was good
* adds android project to genai example
* adds ios project to genai example
* updates to macos project in genai example
* inference impl improvements
* inference example - nearly working
* various cleanup
* inference demo updates
* model path debugging
* inference demo improvements
* improvements to inference demo
* genai inference example improvements
* updates to inference and example
* fixed issue with chat screens sometimes not refreshing while the LLM was responding
problem came from state.transcript changes not busting the hashCode cache
* updated SDK manifests
* removed unused ffi utils copy param
---------
Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: Daco Harkes <dacoharkes@google.com>1 parent 4809ba1 commit 9b936fa
File tree
170 files changed
+10833
-90
lines changed- .github/workflows
- packages
- mediapipe-core
- lib/src
- interface
- io
- test/io
- mediapipe-task-audio
- mediapipe-task-genai
- example
- .vscode
- android
- app
- src
- debug
- main
- kotlin/com/example/example
- res
- drawable-v21
- drawable
- mipmap-hdpi
- mipmap-mdpi
- mipmap-xhdpi
- mipmap-xxhdpi
- mipmap-xxxhdpi
- values-night
- values
- profile
- gradle/wrapper
- ios
- Flutter
- Runner.xcodeproj
- project.xcworkspace
- Runner.xcworkspace
- RunnerTests
- Runner
- Assets.xcassets
- AppIcon.appiconset
- LaunchImage.imageset
- Base.lproj
- lib
- model_storage
- models
- widgets
- macos
- Flutter
- Runner.xcodeproj
- Runner.xcworkspace
- RunnerTests
- Runner
- Assets.xcassets/AppIcon.appiconset
- Base.lproj
- Configs
- test
- lib
- src
- interface
- tasks
- llm_inference
- io
- tasks
- llm_inference
- third_party/mediapipe/generated
- test
- third_party/mediapipe/tasks/cc/genai/inference/c
- mediapipe-task-text
- example
- ios
- Flutter
- Runner.xcodeproj
- Runner
- macos/Runner
- lib/src/io/tasks
- text_classification
- text_embedding
- mediapipe-task-vision
- tool/builder/lib
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
170 files changed
+10833
-90
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
20 | | - | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
95 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments