tasks-vision package

Classes

Class Description
DrawingUtils Helper class to visualize the result of a MediaPipe Vision task.
FaceDetector Performs face detection on images.
FaceLandmarker Performs face landmarks detection on images.This API expects a pre-trained face landmarker model asset bundle.
FaceStylizer Performs face stylization on images.
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.
HolisticLandmarker Performs holistic landmarks detection on images.
ImageClassifier Performs classification on images.
ImageEmbedder Performs embedding extraction on images.
ImageSegmenter Performs image segmentation on images.
ImageSegmenterResult The output result of ImageSegmenter.
InteractiveSegmenter Performs interactive segmentation on images.Users can represent user interaction through RegionOfInterest, which gives a hint to InteractiveSegmenter to perform segmentation focusing on the given region of interest.The API expects a TFLite model with mandatory TFLite Model Metadata.Input tensor: (kTfLiteUInt8/kTfLiteFloat32) - image input of size [batch x height x width x channels]. - batch inference is not supported (batch is required to be 1). - RGB inputs is supported (channels is required to be 3). - if type is kTfLiteFloat32, NormalizationOptions are required to be attached to the metadata for input normalization. Output tensors: (kTfLiteUInt8/kTfLiteFloat32) - list of segmented masks. - if output_type is CATEGORY_MASK, uint8 Image, Image vector of size 1. - if output_type is CONFIDENCE_MASK, float32 Image list of size channels. - batch is always 1
InteractiveSegmenterResult The output result of InteractiveSegmenter.
MPImage The wrapper class for MediaPipe Image objects.Images are stored as ImageData, ImageBitmap or WebGLTexture objects. You can convert the underlying type to any other type by passing the desired type to getAs...(). As type conversions can be expensive, it is recommended to limit these conversions. You can verify what underlying types are already available by invoking has...().Images that are returned from a MediaPipe Tasks are owned by by the underlying C++ Task. If you need to extend the lifetime of these objects, you can invoke the clone() method. To free up the resources obtained during any clone or type conversion operation, it is important to invoke close() on the MPImage instance.Converting to and from ImageBitmap requires that the MediaPipe task is initialized with an OffscreenCanvas. As we require WebGL2 support, this places some limitations on Browser support as outlined here: https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas/getContext
MPMask The wrapper class for MediaPipe segmentation masks.Masks are stored as Uint8Array, Float32Array or WebGLTexture objects. You can convert the underlying type to any other type by passing the desired type to getAs...(). As type conversions can be expensive, it is recommended to limit these conversions. You can verify what underlying types are already available by invoking has...().Masks that are returned from a MediaPipe Tasks are owned by by the underlying C++ Task. If you need to extend the lifetime of these objects, you can invoke the