This repository was archived by the owner on Feb 11, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathtypes.ts
More file actions
37 lines (35 loc) · 1.45 KB
/
Copy pathtypes.ts
File metadata and controls
37 lines (35 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
export type Box = [number, number, number, number, number]; // [x, y, width, height, confidence]
export type Joint = string; // joint name corresponding to a point
export type Point2D = [number, number]; // [x, y]
export type Point3D = [number, number, number]; // [x, y, z]
export type Pose = Point3D[]; // complete set of points in the pose
export type Edge = [number, number]; // edge is defined by a pair of points defined in pose
export type Skeleton = { // each skeleton type defines different joints and edges
joints: Array<Joint>,
edges: Array<Edge>,
suffix: string, // joints suffix to filter by when using `all` skeleton output
}
export type Result = null | {
options: { // options used during processing
image: string,
video: string,
model: string,
augmentations: number,
average: number,
batch: number,
fov: number,
iou: number,
maxpeople: number,
minconfidence: number,
skipms: number,
suppress: number,
skeleton: string,
},
frames: number, // total number of rendered frames
resolution: [number, number], // input resolution in pixels
edges: Array<Edge>, // defined in model output as well as in `constants.ts`
joints: Array<Joint>, // defined in model output as well as in `constants.ts`
boxes: Array<Box[]>, // frame x body x [left, top, width, height, confidence]
poses: Array<Pose[]>, // frame x body x pose [pose is a array of points]
timestamps: Array<number>, // timestamp of each frame
}