@mediapipe/tasks-vision 0.10.2-rc2 → 0.10.3

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,10 +1,15 @@
1
1
  {
2
2
  "name": "@mediapipe/tasks-vision",
3
- "version": "0.10.2-rc2",
3
+ "version": "0.10.3",
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
+ "exports": {
9
+ "import": "./vision_bundle.mjs",
10
+ "require": "./vision_bundle.cjs",
11
+ "default": "./vision_bundle.mjs"
12
+ },
8
13
  "author": "mediapipe@google.com",
9
14
  "license": "Apache-2.0",
10
15
  "type": "module",
package/vision.d.ts CHANGED
@@ -54,6 +54,12 @@ export declare interface BoundingBox {
54
54
  width: number;
55
55
  /** The height of the bounding box, in pixels. */
56
56
  height: number;
57
+ /**
58
+ * Angle of rotation of the original non-rotated box around the top left
59
+ * corner of the original non-rotated box, in clockwise degrees from the
60
+ * horizontal.
61
+ */
62
+ angle: number;
57
63
  }
58
64
 
59
65
  /**
@@ -1375,7 +1381,7 @@ export declare class ImageSegmenter extends VisionTaskRunner {
1375
1381
  /**
1376
1382
  * Performs image segmentation on the provided video frame and returns the
1377
1383
  * segmentation result. This method creates a copy of the resulting masks and
1378
- * should not be used in high-throughput applictions. Only use this method
1384
+ * should not be used in high-throughput applications. Only use this method
1379
1385
  * when the ImageSegmenter is created with running mode `video`.
1380
1386
  *
1381
1387
  * @param videoFrame A video frame to process.
@@ -1583,7 +1589,7 @@ export declare class InteractiveSegmenter extends VisionTaskRunner {
1583
1589
  /**
1584
1590
  * Performs interactive segmentation on the provided video frame and returns
1585
1591
  * the segmentation result. This method creates a copy of the resulting masks
1586
- * and should not be used in high-throughput applictions. The `roi` parameter
1592
+ * and should not be used in high-throughput applications. The `roi` parameter
1587
1593
  * is used to represent a user's region of interest for segmentation.
1588
1594
  *
1589
1595
  * @param image An image to process.
@@ -1595,7 +1601,7 @@ export declare class InteractiveSegmenter extends VisionTaskRunner {
1595
1601
  /**
1596
1602
  * Performs interactive segmentation on the provided video frame and returns
1597
1603
  * the segmentation result. This method creates a copy of the resulting masks
1598
- * and should not be used in high-throughput applictions. The `roi` parameter
1604
+ * and should not be used in high-throughput applications. The `roi` parameter
1599
1605
  * is used to represent a user's region of interest for segmentation.
1600
1606
  *
1601
1607
  * The 'image_processing_options' parameter can be used to specify the
@@ -2082,7 +2088,7 @@ export declare class PoseLandmarker extends VisionTaskRunner {
2082
2088
  /**
2083
2089
  * Performs pose detection on the provided single image and waits
2084
2090
  * synchronously for the response. This method creates a copy of the resulting
2085
- * masks and should not be used in high-throughput applictions. Only
2091
+ * masks and should not be used in high-throughput applications. Only
2086
2092
  * use this method when the PoseLandmarker is created with running mode
2087
2093
  * `image`.
2088
2094
  *
@@ -2095,7 +2101,7 @@ export declare class PoseLandmarker extends VisionTaskRunner {
2095
2101
  /**
2096
2102
  * Performs pose detection on the provided single image and waits
2097
2103
  * synchronously for the response. This method creates a copy of the resulting
2098
- * masks and should not be used in high-throughput applictions. Only
2104
+ * masks and should not be used in high-throughput applications. Only
2099
2105
  * use this method when the PoseLandmarker is created with running mode
2100
2106
  * `image`.
2101
2107
  *
@@ -2136,7 +2142,7 @@ export declare class PoseLandmarker extends VisionTaskRunner {
2136
2142
  /**
2137
2143
  * Performs pose detection on the provided video frame and returns the result.
2138
2144
  * This method creates a copy of the resulting masks and should not be used
2139
- * in high-throughput applictions. Only use this method when the
2145
+ * in high-throughput applications. Only use this method when the
2140
2146
  * PoseLandmarker is created with running mode `video`.
2141
2147
  *
2142
2148
  * @param videoFrame A video frame to process.
@@ -2148,7 +2154,7 @@ export declare class PoseLandmarker extends VisionTaskRunner {
2148
2154
  /**
2149
2155
  * Performs pose detection on the provided video frame and returns the result.
2150
2156
  * This method creates a copy of the resulting masks and should not be used
2151
- * in high-throughput applictions. The method returns synchronously once the
2157
+ * in high-throughput applications. The method returns synchronously once the
2152
2158
  * callback returns. Only use this method when the PoseLandmarker is created
2153
2159
  * with running mode `video`.
2154
2160
  *
@@ -2281,8 +2287,14 @@ declare interface VisionTaskOptions extends TaskRunnerOptions {
2281
2287
  /** Base class for all MediaPipe Vision Tasks. */
2282
2288
  declare abstract class VisionTaskRunner extends TaskRunner {
2283
2289
  protected constructor();
2284
- /** Configures the shared options of a vision task. */
2285
- applyOptions(options: VisionTaskOptions): Promise<void>;
2290
+ /**
2291
+ * Configures the shared options of a vision task.
2292
+ *
2293
+ * @param options The options for the task.
2294
+ * @param loadTfliteModel Whether to load the model specified in
2295
+ * `options.baseOptions`.
2296
+ */
2297
+ applyOptions(options: VisionTaskOptions, loadTfliteModel?: boolean): Promise<void>;
2286
2298
  /** Closes and cleans up the resources held by this task. */
2287
2299
  close(): void;
2288
2300
  }
@@ -2308,6 +2320,8 @@ declare interface WasmFileset {
2308
2320
  wasmLoaderPath: string;
2309
2321
  /** The path to the Wasm binary. */
2310
2322
  wasmBinaryPath: string;
2323
+ /** The optional path to the asset loader script. */
2324
+ assetLoaderPath?: string;
2311
2325
  }
2312
2326
 
2313
2327
  export { }