Core Types used in Guru Schemas
import { Color, Keypoint, Position } from "guru/stdlib";
[
"nose",
"left_eye",
"right_eye",
"left_ear",
"right_ear",
"left_shoulder",
"right_shoulder",
"left_elbow",
"right_elbow",
"left_wrist",
"right_wrist",
"left_hip",
"right_hip",
"left_knee",
"right_knee",
"left_ankle",
"right_ankle",
"left_heel",
"right_heel",
"left_toe",
"right_toe",
];
/**
* Represents a detected person in a frame, providing detailed keypoints and their attributes.
*
* @typedef {Object} Person
* @property {string} _id - Unique identifier for the person instance.
* @property {string} objectType - Type of the object, in this case 'person'.
* @property {number} timestamp - Timestamp of the frame where the person was detected.
* @property {Object} boundary - The bounding box of the person (not detailed here).
* @property {Object} keypoints - Collection of keypoints representing parts of the person's body.
*/
/**
* Represents a specific keypoint on a person's body part, such as nose or wrist, along with its position and confidence or score.
*
* @typedef {Object} Keypoint
* @property {number} frame_idx - The index of the frame where this keypoint was detected.
* @property {string} part - The body part that this keypoint represents.
* @property {Position} position - The x and y coordinates of the keypoint.
* @property {number} score - The confidence score of the keypoint detection.
* @property {number} timestamp - Timestamp of the frame where the keypoint was detected.
*/
/**
* A two-dimensional box, indicating the bounds of something.
*
* @typedef {Object} Box
* @property {Position} top_left - The top-left corner of the box.
* @property {Position} bottom_right - The bottom-right corner of the box.
*/
/**
* A color, represented as an RGB value. Valid values for each are >= 0 and <= 255.
*
* @typedef {Object} Color
* @property {number} r - The amount of red in the color.
* @property {number} g - The amount of green in the color.
* @property {number} b - The amount of blue in the color.
*/
/**
* The two-dimensional coordinates indicating the location of something.
*
* @typedef {Object} Position
* @property {number} x - The x coordinate of the position.
* @property {number} y - The y coordinate of the position.
* @property {number} confidence - The confidence Guru has of the accuracy of this position. 0.0 implies no confidence, 1.0 implies complete confidence.
*/