chore(version): up version to 2.2.0 CRM
This commit is contained in:
15
app/node_modules/@mediapipe/tasks-vision/README.md
generated
vendored
15
app/node_modules/@mediapipe/tasks-vision/README.md
generated
vendored
@@ -39,21 +39,6 @@ const landmarks = faceLandmarker.detect(image);
|
||||
|
||||
For more information, refer to the [Face Landmarker](https://developers.google.com/mediapipe/solutions/vision/face_landmarker/web_js) documentation.
|
||||
|
||||
## Face Stylizer
|
||||
|
||||
The MediaPipe Face Stylizer lets you perform face stylization on images.
|
||||
|
||||
```
|
||||
const vision = await FilesetResolver.forVisionTasks(
|
||||
"https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision/wasm"
|
||||
);
|
||||
const faceStylizer = await FaceStylizer.createFromModelPath(vision,
|
||||
"https://storage.googleapis.com/mediapipe-models/face_stylizer/blaze_face_stylizer/float32/1/blaze_face_stylizer.task"
|
||||
);
|
||||
const image = document.getElementById("image") as HTMLImageElement;
|
||||
const stylizedImage = faceStylizer.stylize(image);
|
||||
```
|
||||
|
||||
## Gesture Recognizer
|
||||
|
||||
The MediaPipe Gesture Recognizer task lets you recognize hand gestures in real
|
||||
|
||||
18
app/node_modules/@mediapipe/tasks-vision/package.json
generated
vendored
18
app/node_modules/@mediapipe/tasks-vision/package.json
generated
vendored
@@ -1,15 +1,23 @@
|
||||
{
|
||||
"name": "@mediapipe/tasks-vision",
|
||||
"version": "0.10.17",
|
||||
"version": "0.10.34",
|
||||
"description": "MediaPipe Vision Tasks",
|
||||
"main": "vision_bundle.cjs",
|
||||
"browser": "vision_bundle.mjs",
|
||||
"module": "vision_bundle.mjs",
|
||||
"exports": {
|
||||
"import": "./vision_bundle.mjs",
|
||||
"require": "./vision_bundle.cjs",
|
||||
"default": "./vision_bundle.mjs",
|
||||
"types": "./vision.d.ts"
|
||||
".": {
|
||||
"import": "./vision_bundle.mjs",
|
||||
"require": "./vision_bundle.cjs",
|
||||
"default": "./vision_bundle.mjs",
|
||||
"types": "./vision.d.ts"
|
||||
},
|
||||
"./vision_wasm_internal.js": "./wasm/vision_wasm_internal.js",
|
||||
"./vision_wasm_internal.wasm": "./wasm/vision_wasm_internal.wasm",
|
||||
"./vision_wasm_nosimd_internal.js": "./wasm/vision_wasm_nosimd_internal.js",
|
||||
"./vision_wasm_nosimd_internal.wasm": "./wasm/vision_wasm_nosimd_internal.wasm",
|
||||
"./vision_wasm_module_internal.js": "./wasm/vision_wasm_module_internal.js",
|
||||
"./vision_wasm_module_internal.wasm": "./wasm/vision_wasm_module_internal.wasm"
|
||||
},
|
||||
"author": "mediapipe@google.com",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
159
app/node_modules/@mediapipe/tasks-vision/vision.d.ts
generated
vendored
159
app/node_modules/@mediapipe/tasks-vision/vision.d.ts
generated
vendored
@@ -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. */
|
||||
|
||||
2
app/node_modules/@mediapipe/tasks-vision/vision_bundle.cjs
generated
vendored
2
app/node_modules/@mediapipe/tasks-vision/vision_bundle.cjs
generated
vendored
File diff suppressed because one or more lines are too long
2
app/node_modules/@mediapipe/tasks-vision/vision_bundle.cjs.map
generated
vendored
2
app/node_modules/@mediapipe/tasks-vision/vision_bundle.cjs.map
generated
vendored
File diff suppressed because one or more lines are too long
2
app/node_modules/@mediapipe/tasks-vision/vision_bundle.mjs
generated
vendored
2
app/node_modules/@mediapipe/tasks-vision/vision_bundle.mjs
generated
vendored
File diff suppressed because one or more lines are too long
2
app/node_modules/@mediapipe/tasks-vision/vision_bundle.mjs.map
generated
vendored
2
app/node_modules/@mediapipe/tasks-vision/vision_bundle.mjs.map
generated
vendored
File diff suppressed because one or more lines are too long
8846
app/node_modules/@mediapipe/tasks-vision/wasm/vision_wasm_internal.js
generated
vendored
8846
app/node_modules/@mediapipe/tasks-vision/wasm/vision_wasm_internal.js
generated
vendored
File diff suppressed because one or more lines are too long
BIN
app/node_modules/@mediapipe/tasks-vision/wasm/vision_wasm_internal.wasm
generated
vendored
BIN
app/node_modules/@mediapipe/tasks-vision/wasm/vision_wasm_internal.wasm
generated
vendored
Binary file not shown.
8837
app/node_modules/@mediapipe/tasks-vision/wasm/vision_wasm_nosimd_internal.js
generated
vendored
8837
app/node_modules/@mediapipe/tasks-vision/wasm/vision_wasm_nosimd_internal.js
generated
vendored
File diff suppressed because one or more lines are too long
BIN
app/node_modules/@mediapipe/tasks-vision/wasm/vision_wasm_nosimd_internal.wasm
generated
vendored
BIN
app/node_modules/@mediapipe/tasks-vision/wasm/vision_wasm_nosimd_internal.wasm
generated
vendored
Binary file not shown.
Reference in New Issue
Block a user