@eyepop.ai/eyepop-render-2d 3.19.1 → 3.20.1

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.
@@ -121,6 +121,27 @@ declare class RenderPose implements Render {
121
121
  draw(element: PredictedObject, xOffset: number, yOffset: number, xScale: number, yScale: number, streamTime: StreamTime): void;
122
122
  private renderPose;
123
123
  }
124
+ /**
125
+ * The key point categories that carry a skeleton.
126
+ *
127
+ * Exported with the tables below because a caller drawing key points anywhere
128
+ * this renderer cannot reach - a 3D scene, a point cloud export, another canvas
129
+ * - needs the same joints. The alternative is a second copy of the table, which
130
+ * is how two drawings of one skeleton come to disagree about where a wrist is.
131
+ */
132
+ declare const POSE_2D_CATEGORY = "2d-body-points";
133
+ declare const POSE_3D_CATEGORY = "3d-body-points";
134
+ /**
135
+ * Joints as pairs of class labels, not indices.
136
+ *
137
+ * The label is what identifies a joint: matching by position would silently
138
+ * draw the wrong skeleton for a model that emits its points in another order,
139
+ * and a point the model did not find is absent rather than null.
140
+ */
141
+ declare const POSE_2D_CONNECTIONS: string[][];
142
+ declare const POSE_3D_CONNECTIONS: string[][];
143
+ /** The skeleton for a key point category, or undefined for one that has none. */
144
+ declare const POSE_CONNECTIONS: Record<string, string[][]>;
124
145
 
125
146
  type RenderTrailOptions = {
126
147
  trailLengthSeconds: number;
@@ -276,4 +297,4 @@ declare namespace Render2d {
276
297
  function renderTrail(options?: Partial<RenderTrailOptions>): Render;
277
298
  }
278
299
 
279
- export { BoxType, type ClassificationProperties, DEFAULT_TARGET, type Render, Render2d, RenderBlur, type RenderBlurOptions, RenderBox, type RenderBoxOptions, RenderClasses, type RenderClassesOptions, RenderContour, type RenderContourOptions, RenderDepth, type RenderDepthOptions, RenderFace, type RenderFaceOptions, RenderHand, type RenderHandOptions, RenderKeyPoints, type RenderKeyPointsOptions, RenderMask, type RenderMaskOptions, RenderPose, type RenderPoseOptions, type RenderTarget, RenderText, type RenderTextOptions, RenderTrail, type RenderTrailOptions, type Renderer, Renderer2d, type Renderer2dOptions, Render2d as default };
300
+ export { BoxType, type ClassificationProperties, DEFAULT_TARGET, POSE_2D_CATEGORY, POSE_2D_CONNECTIONS, POSE_3D_CATEGORY, POSE_3D_CONNECTIONS, POSE_CONNECTIONS, type Render, Render2d, RenderBlur, type RenderBlurOptions, RenderBox, type RenderBoxOptions, RenderClasses, type RenderClassesOptions, RenderContour, type RenderContourOptions, RenderDepth, type RenderDepthOptions, RenderFace, type RenderFaceOptions, RenderHand, type RenderHandOptions, RenderKeyPoints, type RenderKeyPointsOptions, RenderMask, type RenderMaskOptions, RenderPose, type RenderPoseOptions, type RenderTarget, RenderText, type RenderTextOptions, RenderTrail, type RenderTrailOptions, type Renderer, Renderer2d, type Renderer2dOptions, Render2d as default };
@@ -121,6 +121,27 @@ declare class RenderPose implements Render {
121
121
  draw(element: PredictedObject, xOffset: number, yOffset: number, xScale: number, yScale: number, streamTime: StreamTime): void;
122
122
  private renderPose;
123
123
  }
124
+ /**
125
+ * The key point categories that carry a skeleton.
126
+ *
127
+ * Exported with the tables below because a caller drawing key points anywhere
128
+ * this renderer cannot reach - a 3D scene, a point cloud export, another canvas
129
+ * - needs the same joints. The alternative is a second copy of the table, which
130
+ * is how two drawings of one skeleton come to disagree about where a wrist is.
131
+ */
132
+ declare const POSE_2D_CATEGORY = "2d-body-points";
133
+ declare const POSE_3D_CATEGORY = "3d-body-points";
134
+ /**
135
+ * Joints as pairs of class labels, not indices.
136
+ *
137
+ * The label is what identifies a joint: matching by position would silently
138
+ * draw the wrong skeleton for a model that emits its points in another order,
139
+ * and a point the model did not find is absent rather than null.
140
+ */
141
+ declare const POSE_2D_CONNECTIONS: string[][];
142
+ declare const POSE_3D_CONNECTIONS: string[][];
143
+ /** The skeleton for a key point category, or undefined for one that has none. */
144
+ declare const POSE_CONNECTIONS: Record<string, string[][]>;
124
145
 
125
146
  type RenderTrailOptions = {
126
147
  trailLengthSeconds: number;
@@ -276,4 +297,4 @@ declare namespace Render2d {
276
297
  function renderTrail(options?: Partial<RenderTrailOptions>): Render;
277
298
  }
278
299
 
279
- export { BoxType, type ClassificationProperties, DEFAULT_TARGET, type Render, Render2d, RenderBlur, type RenderBlurOptions, RenderBox, type RenderBoxOptions, RenderClasses, type RenderClassesOptions, RenderContour, type RenderContourOptions, RenderDepth, type RenderDepthOptions, RenderFace, type RenderFaceOptions, RenderHand, type RenderHandOptions, RenderKeyPoints, type RenderKeyPointsOptions, RenderMask, type RenderMaskOptions, RenderPose, type RenderPoseOptions, type RenderTarget, RenderText, type RenderTextOptions, RenderTrail, type RenderTrailOptions, type Renderer, Renderer2d, type Renderer2dOptions, Render2d as default };
300
+ export { BoxType, type ClassificationProperties, DEFAULT_TARGET, POSE_2D_CATEGORY, POSE_2D_CONNECTIONS, POSE_3D_CATEGORY, POSE_3D_CONNECTIONS, POSE_CONNECTIONS, type Render, Render2d, RenderBlur, type RenderBlurOptions, RenderBox, type RenderBoxOptions, RenderClasses, type RenderClassesOptions, RenderContour, type RenderContourOptions, RenderDepth, type RenderDepthOptions, RenderFace, type RenderFaceOptions, RenderHand, type RenderHandOptions, RenderKeyPoints, type RenderKeyPointsOptions, RenderMask, type RenderMaskOptions, RenderPose, type RenderPoseOptions, type RenderTarget, RenderText, type RenderTextOptions, RenderTrail, type RenderTrailOptions, type Renderer, Renderer2d, type Renderer2dOptions, Render2d as default };
@@ -32,6 +32,11 @@ var index_exports = {};
32
32
  __export(index_exports, {
33
33
  BoxType: () => BoxType,
34
34
  DEFAULT_TARGET: () => DEFAULT_TARGET,
35
+ POSE_2D_CATEGORY: () => POSE_2D_CATEGORY,
36
+ POSE_2D_CONNECTIONS: () => POSE_2D_CONNECTIONS,
37
+ POSE_3D_CATEGORY: () => POSE_3D_CATEGORY,
38
+ POSE_3D_CONNECTIONS: () => POSE_3D_CONNECTIONS,
39
+ POSE_CONNECTIONS: () => POSE_CONNECTIONS,
35
40
  Render2d: () => Render2d,
36
41
  RenderBlur: () => RenderBlur,
37
42
  RenderBox: () => RenderBox,
@@ -3659,6 +3664,10 @@ var POSE_3D_CONNECTIONS = [
3659
3664
  ["left ankle", "left heel"],
3660
3665
  ["left heel", "left foot index"]
3661
3666
  ];
3667
+ var POSE_CONNECTIONS = {
3668
+ [POSE_2D_CATEGORY]: POSE_2D_CONNECTIONS,
3669
+ [POSE_3D_CATEGORY]: POSE_3D_CONNECTIONS
3670
+ };
3662
3671
 
3663
3672
  // render-trail.ts
3664
3673
  var jp2 = __toESM(require("jsonpath"));
@@ -4378,6 +4387,11 @@ var index_default = Render2d;
4378
4387
  0 && (module.exports = {
4379
4388
  BoxType,
4380
4389
  DEFAULT_TARGET,
4390
+ POSE_2D_CATEGORY,
4391
+ POSE_2D_CONNECTIONS,
4392
+ POSE_3D_CATEGORY,
4393
+ POSE_3D_CONNECTIONS,
4394
+ POSE_CONNECTIONS,
4381
4395
  Render2d,
4382
4396
  RenderBlur,
4383
4397
  RenderBox,