mediapipe_core library
What every MediaPipe task family shares, identical on Android, iOS, macOS, Linux, Windows and the web: the options base, the delegate, the value types results are made of, the exceptions, the model store and the capability types. Each family's library exports it, so apps need not import this package directly.
Classes
- BoundingBox
- A box in pixels of the input image, as Google's C API reports it, not clipped to the image.
- CategoryMask
- The winning category index per pixel, in row-major input-image coordinates, owned by the result and valid after the task is disposed.
- Classifications
- The categories one classifier head produced, best first.
- ConfidenceMask
- Per-pixel confidences in row-major input-image coordinates, from 0 to 1, owned by the result and valid after the task is disposed.
- Detection
- One detected object or face: its box, categories and, for models that report them, keypoints.
- DownloadAsset
- A reviewed download. Every location must serve the same pinned bytes.
- DownloadFailure
- One unsuccessful source.
- Embedding
- One embedding head's vector: floats, or bytes when quantized.
- Landmark
- A landmark in world space, in meters from the subject's center.
- Matrix
- A matrix in column-major order, as Google's C API lays it out.
- MediaPipeCategory
-
One classification: Google's
Category, under the package's name because Flutter's foundation library already exports aCategory. - MediaPipeWebRuntime
- The browser runtime's location, shared by the vision, text and audio packages. Exists on every platform; only browsers read it.
- ModelSource
-
Where a verified model is: a file path on native platforms, bytes in
browsers. What
ModelStorereturns and a task reads. - ModelStore
- Verified models shared by every task family: the app's bundled copies, cached in the application's persistent support directory, and downloads when asked for. The same API in browsers, where models live in Cache Storage and a ModelSource holds bytes instead of a path.
- NormalizedKeypoint
- A point normalized to the input image: 0 to 1 across its width and height.
- NormalizedLandmark
- A landmark in image space: x and y relative to the image's width and height, z scaled like x with smaller values closer to the camera.
- TaskCapabilities
- Declared package support for one task on a platform: which Delegates run there and why the others do not. This is not an inference self-test.
- TaskOptions
- Model and delegate shared by every task's options, in every family.
- TaskPlatform
- The current process platform, including its ABI (not the host CPU's ABI).
Enums
- BrowserEngine
- A browser's engine, for a task whose browser runtime fails in one of them.
- Delegate
- The processor a task runs on, chosen when the task is created and fixed until it is disposed. One enum serves vision, text and audio.
Typedefs
-
RuntimeTargets
= Map<
String, String?> -
Minimum product version for one process target, e.g.
macos/arm64: 14.0.
Exceptions / Errors
- MediaPipeException
- A failure from MediaPipe or its supporting runtime.
- ModelDownloadException
- A model could not be downloaded from any configured source.
- The platform cannot load a task runtime required by this operation.
- TaskException
- A failure Google's runtime reported while creating or running a task, on any platform and in any family.