chore(version): up version to 2.2.0 CRM

This commit is contained in:
Sagnik
2026-04-18 21:48:14 +05:30
parent 954618c3ef
commit 274e17bf35
17 changed files with 17705 additions and 281 deletions

View File

@@ -299,7 +299,7 @@ export declare class DrawingUtils {
*
* @export
* @param boundingBox The bounding box to draw.
* @param style The style to visualize the boundin box.
* @param style The style to visualize the bounding box.
*/
drawBoundingBox(boundingBox: BoundingBox, style?: DrawingOptions): void;
/**
@@ -699,133 +699,6 @@ export declare interface FaceLandmarkerResult {
facialTransformationMatrixes: Matrix[];
}
/** Performs face stylization on images. */
export declare class FaceStylizer extends VisionTaskRunner {
/**
* Initializes the Wasm runtime and creates a new Face Stylizer from the
* provided options.
* @export
* @param wasmFileset A configuration object that provides the location of
* the Wasm binary and its loader.
* @param faceStylizerOptions The options for the Face Stylizer. Note
* that either a path to the model asset or a model buffer needs to be
* provided (via `baseOptions`).
*/
static createFromOptions(wasmFileset: WasmFileset, faceStylizerOptions: FaceStylizerOptions): Promise<FaceStylizer>;
/**
* Initializes the Wasm runtime and creates a new Face Stylizer based on
* the provided model asset buffer.
* @export
* @param wasmFileset A configuration object that provides the location of
* the Wasm binary and its loader.
* @param modelAssetBuffer An array or a stream containing a binary
* representation of the model.
*/
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array | ReadableStreamDefaultReader): Promise<FaceStylizer>;
/**
* Initializes the Wasm runtime and creates a new Face Stylizer based on
* the path to the model asset.
* @export
* @param wasmFileset A configuration object that provides the location of
* the Wasm binary and its loader.
* @param modelAssetPath The path to the model asset.
*/
static createFromModelPath(wasmFileset: WasmFileset, modelAssetPath: string): Promise<FaceStylizer>;
private constructor();
/**
* Sets new options for the Face Stylizer.
*
* Calling `setOptions()` with a subset of options only affects those
* options. You can reset an option back to its default value by
* explicitly setting it to `undefined`.
*
* @export
* @param options The options for the Face Stylizer.
*/
setOptions(options: FaceStylizerOptions): Promise<void>;
/**
* Performs face stylization on the provided single image and invokes the
* callback with result. The method returns synchronously once the callback
* returns. Only use this method when the FaceStylizer is created with the
* image running mode.
*
* @param image An image to process.
* @param callback The callback that is invoked with the stylized image or
* `null` if no face was detected. The lifetime of the returned data is
* only guaranteed for the duration of the callback.
*/
stylize(image: ImageSource, callback: FaceStylizerCallback): void;
/**
* Performs face stylization on the provided single image and invokes the
* callback with result. The method returns synchronously once the callback
* returns. Only use this method when the FaceStylizer is created with the
* image running mode.
*
* The 'imageProcessingOptions' parameter can be used to specify one or all
* of:
* - the rotation to apply to the image before performing stylization, by
* setting its 'rotationDegrees' property.
* - the region-of-interest on which to perform stylization, by setting its
* 'regionOfInterest' property. If not specified, the full image is used.
* If both are specified, the crop around the region-of-interest is extracted
* first, then the specified rotation is applied to the crop.
*
* @param image An image to process.
* @param imageProcessingOptions the `ImageProcessingOptions` specifying how
* to process the input image before running inference.
* @param callback The callback that is invoked with the stylized image or
* `null` if no face was detected. The lifetime of the returned data is
* only guaranteed for the duration of the callback.
*/
stylize(image: ImageSource, imageProcessingOptions: ImageProcessingOptions, callback: FaceStylizerCallback): void;
/**
* Performs face stylization on the provided single image and returns the
* result. This method creates a copy of the resulting image and should not be
* used in high-throughput applications. Only use this method when the
* FaceStylizer is created with the image running mode.
*
* @param image An image to process.
* @return A stylized face or `null` if no face was detected. The result is
* copied to avoid lifetime issues.
*/
stylize(image: ImageSource): MPImage | null;
/**
* Performs face stylization on the provided single image and returns the
* result. This method creates a copy of the resulting image and should not be
* used in high-throughput applications. Only use this method when the
* FaceStylizer is created with the image running mode.
*
* The 'imageProcessingOptions' parameter can be used to specify one or all
* of:
* - the rotation to apply to the image before performing stylization, by
* setting its 'rotationDegrees' property.
* - the region-of-interest on which to perform stylization, by setting its
* 'regionOfInterest' property. If not specified, the full image is used.
* If both are specified, the crop around the region-of-interest is extracted
* first, then the specified rotation is applied to the crop.
*
* @param image An image to process.
* @param imageProcessingOptions the `ImageProcessingOptions` specifying how
* to process the input image before running inference.
* @return A stylized face or `null` if no face was detected. The result is
* copied to avoid lifetime issues.
*/
stylize(image: ImageSource, imageProcessingOptions: ImageProcessingOptions): MPImage | null;
}
/**
* A callback that receives an `MPImage` object from the face stylizer, or
* `null` if no face was detected. The lifetime of the underlying data is
* limited to the duration of the callback. If asynchronous processing is
* needed, all data needs to be copied before the callback returns (via
* `image.clone()`).
*/
export declare type FaceStylizerCallback = (image: MPImage | null) => void;
/** Options to configure the MediaPipe Face Stylizer Task */
export declare interface FaceStylizerOptions extends VisionTaskOptions {
}
/**
* Resolves the files required for the MediaPipe Task APIs.
*
@@ -841,12 +714,13 @@ export declare class FilesetResolver {
*
* If your environment requires custom locations for the MediaPipe Wasm files,
* you can use `isSimdSupported()` to decide whether to load the SIMD-based
* assets.
* assets. Note that for ES6 Modules, SIMD is assumed to be always supported.
*
* @param useModule Whether to use ES6 Modules for the Wasm files.
* @export
* @return Whether SIMD support was detected in the current environment.
*/
static isSimdSupported(): Promise<boolean>;
static isSimdSupported(useModule?: boolean): Promise<boolean>;
/**
* Creates a fileset for the MediaPipe Audio tasks.
*
@@ -854,10 +728,11 @@ export declare class FilesetResolver {
* @param basePath An optional base path to specify the directory the Wasm
* files should be loaded from. If not specified, the Wasm files are
* loaded from the host's root directory.
* @param useModule Whether to use ES6 Modules for the Wasm files.
* @return A `WasmFileset` that can be used to initialize MediaPipe Audio
* tasks.
*/
static forAudioTasks(basePath?: string): Promise<WasmFileset>;
static forAudioTasks(basePath?: string, useModule?: boolean): Promise<WasmFileset>;
/**
* Creates a fileset for the MediaPipe GenAI tasks.
*
@@ -865,21 +740,11 @@ export declare class FilesetResolver {
* @param basePath An optional base path to specify the directory the Wasm
* files should be loaded from. If not specified, the Wasm files are
* loaded from the host's root directory.
* @param useModule Whether to use ES6 Modules for the Wasm files.
* @return A `WasmFileset` that can be used to initialize MediaPipe GenAI
* tasks.
*/
static forGenAiTasks(basePath?: string): Promise<WasmFileset>;
/**
* Creates a fileset for the MediaPipe GenAI Experimental tasks.
*
* @export
* @param basePath An optional base path to specify the directory the Wasm
* files should be loaded from. If not specified, the Wasm files are
* loaded from the host's root directory.
* @return A `WasmFileset` that can be used to initialize MediaPipe GenAI
* tasks.
*/
static forGenAiExperimentalTasks(basePath?: string): Promise<WasmFileset>;
static forGenAiTasks(basePath?: string, useModule?: boolean): Promise<WasmFileset>;
/**
* Creates a fileset for the MediaPipe Text tasks.
*
@@ -887,10 +752,11 @@ export declare class FilesetResolver {
* @param basePath An optional base path to specify the directory the Wasm
* files should be loaded from. If not specified, the Wasm files are
* loaded from the host's root directory.
* @param useModule Whether to use ES6 Modules for the Wasm files.
* @return A `WasmFileset` that can be used to initialize MediaPipe Text
* tasks.
*/
static forTextTasks(basePath?: string): Promise<WasmFileset>;
static forTextTasks(basePath?: string, useModule?: boolean): Promise<WasmFileset>;
/**
* Creates a fileset for the MediaPipe Vision tasks.
*
@@ -898,10 +764,11 @@ export declare class FilesetResolver {
* @param basePath An optional base path to specify the directory the Wasm
* files should be loaded from. If not specified, the Wasm files are
* loaded from the host's root directory.
* @param useModule Whether to use ES6 Modules for the Wasm files.
* @return A `WasmFileset` that can be used to initialize MediaPipe Vision
* tasks.
*/
static forVisionTasks(basePath?: string): Promise<WasmFileset>;
static forVisionTasks(basePath?: string, useModule?: boolean): Promise<WasmFileset>;
}
/** Performs hand gesture recognition on images. */
@@ -2080,7 +1947,7 @@ export declare class InteractiveSegmenter extends VisionTaskRunner {
export declare type InteractiveSegmenterCallback = (result: InteractiveSegmenterResult) => void;
/** Options to configure the MediaPipe Interactive Segmenter Task */
export declare interface InteractiveSegmenterOptions extends TaskRunnerOptions {
export declare interface InteractiveSegmenterOptions extends VisionTaskOptions {
/** Whether to output confidence masks. Defaults to true. */
outputConfidenceMasks?: boolean | undefined;
/** Whether to output the category masks. Defaults to false. */