@mediapipe/tasks-vision 0.10.32 → 0.10.34

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/package.json CHANGED
@@ -1,15 +1,23 @@
1
1
  {
2
2
  "name": "@mediapipe/tasks-vision",
3
- "version": "0.10.32",
3
+ "version": "0.10.34",
4
4
  "description": "MediaPipe Vision Tasks",
5
5
  "main": "vision_bundle.cjs",
6
6
  "browser": "vision_bundle.mjs",
7
7
  "module": "vision_bundle.mjs",
8
8
  "exports": {
9
- "import": "./vision_bundle.mjs",
10
- "require": "./vision_bundle.cjs",
11
- "default": "./vision_bundle.mjs",
12
- "types": "./vision.d.ts"
9
+ ".": {
10
+ "import": "./vision_bundle.mjs",
11
+ "require": "./vision_bundle.cjs",
12
+ "default": "./vision_bundle.mjs",
13
+ "types": "./vision.d.ts"
14
+ },
15
+ "./vision_wasm_internal.js": "./wasm/vision_wasm_internal.js",
16
+ "./vision_wasm_internal.wasm": "./wasm/vision_wasm_internal.wasm",
17
+ "./vision_wasm_nosimd_internal.js": "./wasm/vision_wasm_nosimd_internal.js",
18
+ "./vision_wasm_nosimd_internal.wasm": "./wasm/vision_wasm_nosimd_internal.wasm",
19
+ "./vision_wasm_module_internal.js": "./wasm/vision_wasm_module_internal.js",
20
+ "./vision_wasm_module_internal.wasm": "./wasm/vision_wasm_module_internal.wasm"
13
21
  },
14
22
  "author": "mediapipe@google.com",
15
23
  "license": "Apache-2.0",
package/vision.d.ts CHANGED
@@ -714,12 +714,13 @@ export declare class FilesetResolver {
714
714
  *
715
715
  * If your environment requires custom locations for the MediaPipe Wasm files,
716
716
  * you can use `isSimdSupported()` to decide whether to load the SIMD-based
717
- * assets.
717
+ * assets. Note that for ES6 Modules, SIMD is assumed to be always supported.
718
718
  *
719
+ * @param useModule Whether to use ES6 Modules for the Wasm files.
719
720
  * @export
720
721
  * @return Whether SIMD support was detected in the current environment.
721
722
  */
722
- static isSimdSupported(): Promise<boolean>;
723
+ static isSimdSupported(useModule?: boolean): Promise<boolean>;
723
724
  /**
724
725
  * Creates a fileset for the MediaPipe Audio tasks.
725
726
  *
@@ -727,10 +728,11 @@ export declare class FilesetResolver {
727
728
  * @param basePath An optional base path to specify the directory the Wasm
728
729
  * files should be loaded from. If not specified, the Wasm files are
729
730
  * loaded from the host's root directory.
731
+ * @param useModule Whether to use ES6 Modules for the Wasm files.
730
732
  * @return A `WasmFileset` that can be used to initialize MediaPipe Audio
731
733
  * tasks.
732
734
  */
733
- static forAudioTasks(basePath?: string): Promise<WasmFileset>;
735
+ static forAudioTasks(basePath?: string, useModule?: boolean): Promise<WasmFileset>;
734
736
  /**
735
737
  * Creates a fileset for the MediaPipe GenAI tasks.
736
738
  *
@@ -738,21 +740,11 @@ export declare class FilesetResolver {
738
740
  * @param basePath An optional base path to specify the directory the Wasm
739
741
  * files should be loaded from. If not specified, the Wasm files are
740
742
  * loaded from the host's root directory.
743
+ * @param useModule Whether to use ES6 Modules for the Wasm files.
741
744
  * @return A `WasmFileset` that can be used to initialize MediaPipe GenAI
742
745
  * tasks.
743
746
  */
744
- static forGenAiTasks(basePath?: string): Promise<WasmFileset>;
745
- /**
746
- * Creates a fileset for the MediaPipe GenAI Experimental tasks.
747
- *
748
- * @export
749
- * @param basePath An optional base path to specify the directory the Wasm
750
- * files should be loaded from. If not specified, the Wasm files are
751
- * loaded from the host's root directory.
752
- * @return A `WasmFileset` that can be used to initialize MediaPipe GenAI
753
- * tasks.
754
- */
755
- static forGenAiExperimentalTasks(basePath?: string): Promise<WasmFileset>;
747
+ static forGenAiTasks(basePath?: string, useModule?: boolean): Promise<WasmFileset>;
756
748
  /**
757
749
  * Creates a fileset for the MediaPipe Text tasks.
758
750
  *
@@ -760,10 +752,11 @@ export declare class FilesetResolver {
760
752
  * @param basePath An optional base path to specify the directory the Wasm
761
753
  * files should be loaded from. If not specified, the Wasm files are
762
754
  * loaded from the host's root directory.
755
+ * @param useModule Whether to use ES6 Modules for the Wasm files.
763
756
  * @return A `WasmFileset` that can be used to initialize MediaPipe Text
764
757
  * tasks.
765
758
  */
766
- static forTextTasks(basePath?: string): Promise<WasmFileset>;
759
+ static forTextTasks(basePath?: string, useModule?: boolean): Promise<WasmFileset>;
767
760
  /**
768
761
  * Creates a fileset for the MediaPipe Vision tasks.
769
762
  *
@@ -771,10 +764,11 @@ export declare class FilesetResolver {
771
764
  * @param basePath An optional base path to specify the directory the Wasm
772
765
  * files should be loaded from. If not specified, the Wasm files are
773
766
  * loaded from the host's root directory.
767
+ * @param useModule Whether to use ES6 Modules for the Wasm files.
774
768
  * @return A `WasmFileset` that can be used to initialize MediaPipe Vision
775
769
  * tasks.
776
770
  */
777
- static forVisionTasks(basePath?: string): Promise<WasmFileset>;
771
+ static forVisionTasks(basePath?: string, useModule?: boolean): Promise<WasmFileset>;
778
772
  }
779
773
 
780
774
  /** Performs hand gesture recognition on images. */