mediapipe_core 0.3.0
mediapipe_core: ^0.3.0 copied to clipboard
Shared layer for the MediaPipe task packages: Google's engine on each platform, verified downloads, an on-demand model store and the browser runtime.
0.3.0 #
- Upgrade every mediapipe package to 0.3.0 together. MediaPipe 1.2.3
changes the layout of the native option structs (
MpBaseOptionsgrows from 72 to 80 bytes), so every family package now requiresmediapipe_core^0.3.0. The build now stops with a clear message when a family package older than 0.3.0 is used with this release. - Runs Google's MediaPipe 1.2.3 instead of 1.2.2, with new SHA-256 pins for its native libraries.
- With 1.2.3 every task's usage uploads carry the app's ID and version, not
only the eight that 1.2.2's did;
doc/privacy_and_licenses.mddescribes them. - Adds
MpBaseOptions.npuDispatchLibraryDir, null by default, for the field MediaPipe 1.2.3 adds to its base options. - Accepts Flutter 3.44 and newer, down from 3.47. The package accepts the
dependency versions Flutter 3.44 resolves, from
hooks2.0.0 andcode_assets1.1.0. iOS and macOS builds with Xcode 27 need Flutter 3.47 or later. - CI tests the package on Flutter 3.50.0, the latest stable release, instead of 3.47.9.
- The README's badge names Flutter 3.50.0.
0.2.1 #
- The README links to two new vision guides: video and live stream samples
for every camera task, and the options and extra outputs. Its link to the
object detection sample app points to
samples/apps/object_detection, where the app moved; the old folder keeps a README that links there. - The core guide
names MediaPipe 1.2.2 as the native runtime and has a sample for
ModelStore.findandModelStore.clear. - Every complete Dart sample in the docs is also a file under
samples/in the repository, named in a comment above its block, andtool/check_docs.pyfails when a block and its file differ by a byte.samples/README.md, written bytool/samples_index.py, lists them by package, task and mode.
0.2.0 #
- Google's MediaPipe 1.2.2 native release (build of November 2, 2026)
replaces 1.2.0 on Android, iOS, macOS, Linux and Windows, and
@mediapipe/tasks-*1.2.2 replaces 1.2.0-rc.20261018 in browsers. - Sends Google's renumbered
MpDelegatevalues (0 is now the default, 1 the CPU, 2 the GPU), which 1.2.1 changed in the C API. pin_nightly.py --release X.Y.Zpins Google's release builds as well as nightlies.fillBaseOptionsgives Google's libraries the app's ID and version on Android and iOS, as Google's native SDKs do: the package name andversionCodeon Android, the bundle ID andCFBundleShortVersionStringon iOS. Every task accepts them, but with 1.2.2 only eight tasks' usage uploads carry them;doc/privacy_and_licenses.mdnames them. Core now depends onjniandjni_flutter, whichpath_provider_androidalready brings into Android apps.- On Android each family runs its Google library's
JNI_OnLoadonce, before its first task, so usage uploads leave Android apps with 1.2.2 as on other platforms; Flutter'sdlopenof the library does not run it. - Removes
familyRuntimeBaseUrland the native libraries' unused mirror URL: Google's archive is now their only source.
0.1.4 #
- The README is now the repository's README, word for word, with absolute links so it works on GitHub and on pub.dev. Its reference sections (shared types, verified downloads and offline builds, bundled and on-demand models, the web runtime) moved to the core guide.
- The README and code comments no longer refer to removed notes.
0.1.3 #
- Downloads of models and native libraries wait out short network failures. At the last URL, a failed DNS lookup or a lost connection is retried for 75 seconds from the first failure, rather than giving up after three attempts within seconds. Earlier URLs keep three attempts, so a blocked primary still reaches its mirror quickly, and a digest mismatch still moves to the next URL at once. With no network at all, the error now appears after about 75 seconds.
- The README says this package comes with every family, and to add it from
pub.dev only if your own code imports
package:mediapipe_core.
0.1.2 #
Release 0.1.2.
0.1.1 #
Adds Google's NOTICE at the package root.
0.1.0 #
The first release of this rewrite, replacing Google's
mediapipe_core 0.0.1 (May 2024), which held only the shared containers of
Google's text package; MIGRATION.md maps that API.
- The shared layer of every task family.
mediapipe_core.dartis the one library apps see, through each family's library, which re-exports it;platform_interface.dartis for family packages and plugins. - 32-bit Android (armeabi-v7a), whose libraries Google builds for API 28 too:
tasksRuntimeTargetsincludes it, for the vision, classic text and audio tasks on the CPU;largeModelRuntimeTargetsleaves it out for the tasks whose models a 32-bit process cannot hold, which refuse it withlargeModelNeeds64Bit. - Downloads, verifies and prepares Google's MediaPipe 1.2.0 C library for
each family (
bundleFamilyRuntime), which the vision, text, audio, retrieval and decision hooks bundle on Android 9+, iOS, macOS arm64, Linux x64 and Windows x64, so an app ships only the families it uses. Each library is read from Google's nightly archive with HTTP range requests, then from a mirror. downloadVerifiedreads a member of a zip archive (a.zipURL with the member as its fragment), retries a request three times on a connection error, a timeout or HTTP 408, 429, 500, 502, 503 or 504, honoringRetry-After, and resumes a dropped download.- Shared types:
TaskOptions(the base of every options class, withmodel,modelPath,modelBytesanddelegate), oneDelegate,TaskCapabilities, and the value typesMediaPipeCategory,Classifications,Embedding,Detection,BoundingBox,NormalizedKeypoint,NormalizedLandmark,Landmark,Matrix,ConfidenceMaskandCategoryMask. TaskPlatform.browserEngine(BrowserEngine.webkit,blinkorgecko, read from the user agent in browsers), for a family whose browser runtime fails in one engine.- Shared errors:
MediaPipeException, withRuntimeUnavailableException(whosefixsays what to change),ModelDownloadExceptionandTaskException.checkClassifierSettingsandrequireDelegategive every family the same option checks and delegate refusal. Every classifier's options implementClassifierSettings, whichclassifierSettingsJsonnames as Google's JavaScript API does, anddecodeClassifications,decodeEmbeddinganddecodeCategoryread the results the browser adapters deliver. - Models are bundled with the app at build time.
dart run mediapipe_core:bundle_modelsdownloads the models an app lists underhooks.user_defines.<family>.models, verifies each against its pin, writes them intoassets/mediapipe/and removes unlisted ones;--checkverifies that folder in CI. A task'smodel:uses the store's cache, then the app's bundled copy, and downloads only whenModelStore.allowDownloadsis true; otherwise task creation throws aRuntimeUnavailableExceptionwhosefixnames the pubspec entry to add. ModelStore: verified models cached and shared across isolates and processes, in Cache Storage in browsers.getandfindreturn aModelSource(pathon native platforms,bytesin browsers), andfindnever uses the network.- Verified runtime downloads with mirror fallback and offline or internal
sources (
hooks.user_defines.mediapipe_core.asset_source). MediaPipeWebRuntime: one setting for where browsers load Google's runtimes, every file checked against its pinned SHA-384, anddart run mediapipe_core:web_runtimeto self-host them.