@mediapipe/tasks-vision 0.10.13 → 0.10.14-rc.20240508
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -0
- package/package.json +1 -1
- package/vision.d.ts +40 -28
- package/vision_bundle.cjs +1 -1
- package/vision_bundle.cjs.map +1 -1
- package/vision_bundle.mjs +1 -1
- package/vision_bundle.mjs.map +1 -1
- package/wasm/vision_wasm_internal.js +2 -2
- package/wasm/vision_wasm_internal.wasm +0 -0
- package/wasm/vision_wasm_nosimd_internal.js +2 -2
- package/wasm/vision_wasm_nosimd_internal.wasm +0 -0
package/README.md
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/vision.d.ts
CHANGED
|
@@ -21,10 +21,10 @@ declare interface BaseOptions_2 {
|
|
|
21
21
|
*/
|
|
22
22
|
modelAssetPath?: string | undefined;
|
|
23
23
|
/**
|
|
24
|
-
* A buffer containing the model
|
|
25
|
-
* `modelAssetBuffer` can be set.
|
|
24
|
+
* A buffer or stream reader containing the model asset. Only one of
|
|
25
|
+
* `modelAssetPath` or `modelAssetBuffer` can be set.
|
|
26
26
|
*/
|
|
27
|
-
modelAssetBuffer?: Uint8Array | undefined;
|
|
27
|
+
modelAssetBuffer?: Uint8Array | ReadableStreamDefaultReader | undefined;
|
|
28
28
|
/** Overrides the default backend to use for the provided model. */
|
|
29
29
|
delegate?: "CPU" | "GPU" | undefined;
|
|
30
30
|
}
|
|
@@ -448,9 +448,10 @@ export declare class FaceDetector extends VisionTaskRunner {
|
|
|
448
448
|
* @export
|
|
449
449
|
* @param wasmFileset A configuration object that provides the location of the
|
|
450
450
|
* Wasm binary and its loader.
|
|
451
|
-
* @param modelAssetBuffer
|
|
451
|
+
* @param modelAssetBuffer An array or a stream containing a binary
|
|
452
|
+
* representation of the model.
|
|
452
453
|
*/
|
|
453
|
-
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array): Promise<FaceDetector>;
|
|
454
|
+
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array | ReadableStreamDefaultReader): Promise<FaceDetector>;
|
|
454
455
|
/**
|
|
455
456
|
* Initializes the Wasm runtime and creates a new face detector based on the
|
|
456
457
|
* path to the model asset.
|
|
@@ -537,9 +538,10 @@ export declare class FaceLandmarker extends VisionTaskRunner {
|
|
|
537
538
|
* @export
|
|
538
539
|
* @param wasmFileset A configuration object that provides the location of the
|
|
539
540
|
* Wasm binary and its loader.
|
|
540
|
-
* @param modelAssetBuffer
|
|
541
|
+
* @param modelAssetBuffer An array or a stream containing a binary
|
|
542
|
+
* representation of the model.
|
|
541
543
|
*/
|
|
542
|
-
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array): Promise<FaceLandmarker>;
|
|
544
|
+
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array | ReadableStreamDefaultReader): Promise<FaceLandmarker>;
|
|
543
545
|
/**
|
|
544
546
|
* Initializes the Wasm runtime and creates a new `FaceLandmarker` based on
|
|
545
547
|
* the path to the model asset.
|
|
@@ -716,9 +718,10 @@ export declare class FaceStylizer extends VisionTaskRunner {
|
|
|
716
718
|
* @export
|
|
717
719
|
* @param wasmFileset A configuration object that provides the location of
|
|
718
720
|
* the Wasm binary and its loader.
|
|
719
|
-
* @param modelAssetBuffer
|
|
721
|
+
* @param modelAssetBuffer An array or a stream containing a binary
|
|
722
|
+
* representation of the model.
|
|
720
723
|
*/
|
|
721
|
-
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array): Promise<FaceStylizer>;
|
|
724
|
+
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array | ReadableStreamDefaultReader): Promise<FaceStylizer>;
|
|
722
725
|
/**
|
|
723
726
|
* Initializes the Wasm runtime and creates a new Face Stylizer based on
|
|
724
727
|
* the path to the model asset.
|
|
@@ -927,9 +930,10 @@ export declare class GestureRecognizer extends VisionTaskRunner {
|
|
|
927
930
|
* @export
|
|
928
931
|
* @param wasmFileset A configuration object that provides the location of the
|
|
929
932
|
* Wasm binary and its loader.
|
|
930
|
-
* @param modelAssetBuffer
|
|
933
|
+
* @param modelAssetBuffer An array or a stream containing a binary
|
|
934
|
+
* representation of the model.
|
|
931
935
|
*/
|
|
932
|
-
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array): Promise<GestureRecognizer>;
|
|
936
|
+
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array | ReadableStreamDefaultReader): Promise<GestureRecognizer>;
|
|
933
937
|
/**
|
|
934
938
|
* Initializes the Wasm runtime and creates a new gesture recognizer based on
|
|
935
939
|
* the path to the model asset.
|
|
@@ -1064,9 +1068,10 @@ export declare class HandLandmarker extends VisionTaskRunner {
|
|
|
1064
1068
|
* @export
|
|
1065
1069
|
* @param wasmFileset A configuration object that provides the location of the
|
|
1066
1070
|
* Wasm binary and its loader.
|
|
1067
|
-
* @param modelAssetBuffer
|
|
1071
|
+
* @param modelAssetBuffer An array or a stream containing a binary
|
|
1072
|
+
* representation of the model.
|
|
1068
1073
|
*/
|
|
1069
|
-
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array): Promise<HandLandmarker>;
|
|
1074
|
+
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array | ReadableStreamDefaultReader): Promise<HandLandmarker>;
|
|
1070
1075
|
/**
|
|
1071
1076
|
* Initializes the Wasm runtime and creates a new `HandLandmarker` based on
|
|
1072
1077
|
* the path to the model asset.
|
|
@@ -1250,9 +1255,10 @@ export declare class HolisticLandmarker extends VisionTaskRunner {
|
|
|
1250
1255
|
* @export
|
|
1251
1256
|
* @param wasmFileset A configuration object that provides the location of the
|
|
1252
1257
|
* Wasm binary and its loader.
|
|
1253
|
-
* @param modelAssetBuffer
|
|
1258
|
+
* @param modelAssetBuffer An array or a stream containing a binary
|
|
1259
|
+
* representation of the model.
|
|
1254
1260
|
*/
|
|
1255
|
-
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array): Promise<HolisticLandmarker>;
|
|
1261
|
+
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array | ReadableStreamDefaultReader): Promise<HolisticLandmarker>;
|
|
1256
1262
|
/**
|
|
1257
1263
|
* Initializes the Wasm runtime and creates a new `HolisticLandmarker` based
|
|
1258
1264
|
* on the path to the model asset.
|
|
@@ -1486,9 +1492,10 @@ export declare class ImageClassifier extends VisionTaskRunner {
|
|
|
1486
1492
|
* @export
|
|
1487
1493
|
* @param wasmFileset A configuration object that provides the location of the
|
|
1488
1494
|
* Wasm binary and its loader.
|
|
1489
|
-
* @param modelAssetBuffer
|
|
1495
|
+
* @param modelAssetBuffer An array or a stream containing a binary
|
|
1496
|
+
* representation of the model.
|
|
1490
1497
|
*/
|
|
1491
|
-
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array): Promise<ImageClassifier>;
|
|
1498
|
+
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array | ReadableStreamDefaultReader): Promise<ImageClassifier>;
|
|
1492
1499
|
/**
|
|
1493
1500
|
* Initializes the Wasm runtime and creates a new image classifier based on
|
|
1494
1501
|
* the path to the model asset.
|
|
@@ -1576,9 +1583,10 @@ export declare class ImageEmbedder extends VisionTaskRunner {
|
|
|
1576
1583
|
* @export
|
|
1577
1584
|
* @param wasmFileset A configuration object that provides the location of the
|
|
1578
1585
|
* Wasm binary and its loader.
|
|
1579
|
-
* @param modelAssetBuffer
|
|
1586
|
+
* @param modelAssetBuffer An array or a stream containing a binary
|
|
1587
|
+
* representation of the model.
|
|
1580
1588
|
*/
|
|
1581
|
-
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array): Promise<ImageEmbedder>;
|
|
1589
|
+
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array | ReadableStreamDefaultReader): Promise<ImageEmbedder>;
|
|
1582
1590
|
/**
|
|
1583
1591
|
* Initializes the Wasm runtime and creates a new image embedder based on the
|
|
1584
1592
|
* path to the model asset.
|
|
@@ -1703,9 +1711,10 @@ export declare class ImageSegmenter extends VisionTaskRunner {
|
|
|
1703
1711
|
* @export
|
|
1704
1712
|
* @param wasmFileset A configuration object that provides the location of
|
|
1705
1713
|
* the Wasm binary and its loader.
|
|
1706
|
-
* @param modelAssetBuffer
|
|
1714
|
+
* @param modelAssetBuffer An array or a stream containing a binary
|
|
1715
|
+
* representation of the model.
|
|
1707
1716
|
*/
|
|
1708
|
-
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array): Promise<ImageSegmenter>;
|
|
1717
|
+
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array | ReadableStreamDefaultReader): Promise<ImageSegmenter>;
|
|
1709
1718
|
/**
|
|
1710
1719
|
* Initializes the Wasm runtime and creates a new image segmenter based on
|
|
1711
1720
|
* the path to the model asset.
|
|
@@ -1968,10 +1977,11 @@ export declare class InteractiveSegmenter extends VisionTaskRunner {
|
|
|
1968
1977
|
* @export
|
|
1969
1978
|
* @param wasmFileset A configuration object that provides the location of
|
|
1970
1979
|
* the Wasm binary and its loader.
|
|
1971
|
-
* @param modelAssetBuffer
|
|
1980
|
+
* @param modelAssetBuffer An array or a stream containing a binary
|
|
1981
|
+
* representation of the model.
|
|
1972
1982
|
* @return A new `InteractiveSegmenter`.
|
|
1973
1983
|
*/
|
|
1974
|
-
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array): Promise<InteractiveSegmenter>;
|
|
1984
|
+
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array | ReadableStreamDefaultReader): Promise<InteractiveSegmenter>;
|
|
1975
1985
|
/**
|
|
1976
1986
|
* Initializes the Wasm runtime and creates a new interactive segmenter based
|
|
1977
1987
|
* on the path to the model asset.
|
|
@@ -2168,7 +2178,7 @@ export declare interface LandmarkData {
|
|
|
2168
2178
|
* limitations under the License.
|
|
2169
2179
|
*/
|
|
2170
2180
|
/** A two-dimensional matrix. */
|
|
2171
|
-
declare interface Matrix {
|
|
2181
|
+
export declare interface Matrix {
|
|
2172
2182
|
/** The number of rows. */
|
|
2173
2183
|
rows: number;
|
|
2174
2184
|
/** The number of columns. */
|
|
@@ -2450,9 +2460,10 @@ export declare class ObjectDetector extends VisionTaskRunner {
|
|
|
2450
2460
|
* @export
|
|
2451
2461
|
* @param wasmFileset A configuration object that provides the location of the
|
|
2452
2462
|
* Wasm binary and its loader.
|
|
2453
|
-
* @param modelAssetBuffer
|
|
2463
|
+
* @param modelAssetBuffer An array or a stream containing a binary
|
|
2464
|
+
* representation of the model.
|
|
2454
2465
|
*/
|
|
2455
|
-
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array): Promise<ObjectDetector>;
|
|
2466
|
+
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array | ReadableStreamDefaultReader): Promise<ObjectDetector>;
|
|
2456
2467
|
/**
|
|
2457
2468
|
* Initializes the Wasm runtime and creates a new object detector based on the
|
|
2458
2469
|
* path to the model asset.
|
|
@@ -2531,9 +2542,10 @@ export declare class PoseLandmarker extends VisionTaskRunner {
|
|
|
2531
2542
|
* @export
|
|
2532
2543
|
* @param wasmFileset A configuration object that provides the location of the
|
|
2533
2544
|
* Wasm binary and its loader.
|
|
2534
|
-
* @param modelAssetBuffer
|
|
2545
|
+
* @param modelAssetBuffer An array or a stream containing a binary
|
|
2546
|
+
* representation of the model.
|
|
2535
2547
|
*/
|
|
2536
|
-
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array): Promise<PoseLandmarker>;
|
|
2548
|
+
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array | ReadableStreamDefaultReader): Promise<PoseLandmarker>;
|
|
2537
2549
|
/**
|
|
2538
2550
|
* Initializes the Wasm runtime and creates a new `PoseLandmarker` based on
|
|
2539
2551
|
* the path to the model asset.
|