Attention: This MediaPipe Solutions Preview is an early release. Learn more.

tasks-vision package

Stay organized with collections Save and categorize content based on your preferences.

Classes

Class Description
FilesetResolver Resolves the files required for the MediaPipe Task APIs.This class verifies whether SIMD is supported in the current environment and loads the SIMD files only if support is detected. The returned filesets require that the Wasm files are published without renaming. If this is not possible, you can invoke the MediaPipe Tasks APIs using a manually created WasmFileset.
GestureRecognizer Performs hand gesture recognition on images.
HandLandmarker Performs hand landmarks detection on images.
ImageClassifier Performs classification on images.
ImageEmbedder Performs embedding extraction on images.
ObjectDetector Performs object detection on images.

Interfaces

Interface Description
BoundingBox An integer bounding box, axis aligned.
Category A classification category.
Classifications Classification results for a given classifier head.
Detection Represents one object detected by the ObjectDetector.
Embedding List of embeddings with an optional timestamp.One and only one of the two 'floatEmbedding' and 'quantizedEmbedding' will contain data, based on whether or not the embedder was configured to perform scalar quantization.
GestureRecognizerOptions Options to configure the MediaPipe Gesture Recognizer Task
GestureRecognizerResult Represents the gesture recognition results generated by GestureRecognizer.
HandLandmarkerOptions Options to configure the MediaPipe HandLandmarker Task
HandLandmarkerResult Represents the hand landmarks deection results generated by HandLandmarker.
ImageClassifierOptions Options to configure the MediaPipe Image Classifier Task.
ImageClassifierResult Classification results of a model.
ImageEmbedderOptions Options for configuring a MediaPipe Image Embedder task.
ImageEmbedderResult Embedding results for a given embedder model.
Landmark Landmark represents a point in 3D space with x, y, z coordinates. The landmark coordinates are in meters. z represents the landmark depth, and the smaller the value the closer the world landmark is to the camera.
NormalizedLandmark Normalized Landmark represents a point in 3D space with x, y, z coordinates. x and y are normalized to [0.0, 1.0] by the image width and height respectively. z represents the landmark depth, and the smaller the value the closer the landmark is to the camera. The magnitude of z uses roughly the same scale as x.
ObjectDetectorOptions Options to configure the MediaPipe Object Detector Task

Type Aliases

Type Alias Description
ImageSource Valid types of image sources which we can run our GraphRunner over.

ImageSource

Valid types of image sources which we can run our GraphRunner over.

Signature:

export declare type ImageSource = HTMLCanvasElement | HTMLVideoElement | HTMLImageElement | ImageData | ImageBitmap;