baseball-engine / docs /pitching-coach-payload.schema.json
github-actions[bot]
Automated Deploy: c6740dc30c6da8c1add9680c0c571ec78bec8366
66d2e51
Raw History Blame Contribute Delete
22.2 kB
{
"$defs": {
"ClockEvidence": {
"additionalProperties": false,
"properties": {
"kind": {
"enum": [
"unknown",
"unretimed",
"constant_slowdown",
"explicit"
],
"title": "Kind",
"type": "string"
},
"source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Source"
},
"physical_time_available": {
"title": "Physical Time Available",
"type": "boolean"
},
"median_playback_fps": {
"anyOf": [
{
"exclusiveMinimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"title": "Median Playback Fps"
},
"median_capture_fps": {
"anyOf": [
{
"exclusiveMinimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"title": "Median Capture Fps"
},
"minimum_capture_interval_ms": {
"anyOf": [
{
"exclusiveMinimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"title": "Minimum Capture Interval Ms"
},
"maximum_capture_interval_ms": {
"anyOf": [
{
"exclusiveMinimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"title": "Maximum Capture Interval Ms"
},
"reasons": {
"items": {
"type": "string"
},
"title": "Reasons",
"type": "array"
}
},
"required": [
"kind",
"source",
"physical_time_available",
"median_playback_fps",
"median_capture_fps",
"minimum_capture_interval_ms",
"maximum_capture_interval_ms",
"reasons"
],
"title": "ClockEvidence",
"type": "object"
},
"Curve": {
"additionalProperties": false,
"properties": {
"curve_id": {
"enum": [
"front_knee_flexion",
"throwing_elbow_flexion",
"torso_inclination",
"hip_shoulder_separation",
"pelvis_heading",
"shoulder_heading"
],
"title": "Curve Id",
"type": "string"
},
"unit": {
"const": "deg",
"default": "deg",
"title": "Unit",
"type": "string"
},
"samples": {
"items": {
"$ref": "#/$defs/Sample"
},
"maxItems": 240,
"title": "Samples",
"type": "array"
},
"usable_frame_count": {
"minimum": 0,
"title": "Usable Frame Count",
"type": "integer"
},
"total_frame_count": {
"exclusiveMinimum": 0,
"title": "Total Frame Count",
"type": "integer"
},
"reasons": {
"items": {
"type": "string"
},
"title": "Reasons",
"type": "array"
}
},
"required": [
"curve_id",
"samples",
"usable_frame_count",
"total_frame_count",
"reasons"
],
"title": "Curve",
"type": "object"
},
"DeliveryEvidence": {
"additionalProperties": false,
"properties": {
"version": {
"const": "pitch-evidence-1.0",
"default": "pitch-evidence-1.0",
"title": "Version",
"type": "string"
},
"source_frame_count": {
"exclusiveMinimum": 1,
"title": "Source Frame Count",
"type": "integer"
},
"start_frame": {
"minimum": 0,
"title": "Start Frame",
"type": "integer"
},
"end_frame": {
"minimum": 0,
"title": "End Frame",
"type": "integer"
},
"clock": {
"$ref": "#/$defs/ClockEvidence"
},
"curves": {
"items": {
"$ref": "#/$defs/Curve"
},
"maxItems": 6,
"title": "Curves",
"type": "array"
},
"phases": {
"items": {
"$ref": "#/$defs/Phase"
},
"maxItems": 4,
"title": "Phases",
"type": "array"
},
"sequencing": {
"$ref": "#/$defs/Sequencing"
},
"consistency": {
"const": "not_assessable_single_delivery",
"default": "not_assessable_single_delivery",
"title": "Consistency",
"type": "string"
},
"accuracy_status": {
"const": "not_validated_for_this_recording",
"default": "not_validated_for_this_recording",
"title": "Accuracy Status",
"type": "string"
}
},
"required": [
"source_frame_count",
"start_frame",
"end_frame",
"clock",
"curves",
"phases",
"sequencing"
],
"title": "DeliveryEvidence",
"type": "object"
},
"Event": {
"additionalProperties": false,
"properties": {
"status": {
"enum": [
"limited",
"unavailable"
],
"title": "Status",
"type": "string"
},
"video_time_s": {
"anyOf": [
{
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"title": "Video Time S"
},
"capture_time_s": {
"anyOf": [
{
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"title": "Capture Time S"
},
"source_frame_index": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"title": "Source Frame Index"
},
"source": {
"anyOf": [
{
"enum": [
"manual_review",
"derived_from_release"
],
"type": "string"
},
{
"type": "null"
}
],
"title": "Source"
},
"reasons": {
"items": {
"enum": [
"event_not_marked",
"event_not_applicable",
"event_timing_uncertain",
"required_event_unavailable",
"required_landmarks_unusable",
"ground_plane_unknown",
"camera_stability_unverified",
"scale_unknown",
"scale_is_model_estimated",
"capture_time_unknown",
"timing_resolution_insufficient",
"follow_through_not_recorded",
"model_accuracy_unvalidated",
"temporal_inconsistency",
"throwing_hand_unknown",
"event_angle_unstable",
"angle_sensitivity_unresolved"
],
"type": "string"
},
"minItems": 1,
"title": "Reasons",
"type": "array"
}
},
"required": [
"status",
"video_time_s",
"capture_time_s",
"source_frame_index",
"source",
"reasons"
],
"title": "Event",
"type": "object"
},
"Events": {
"additionalProperties": false,
"properties": {
"leg_lift": {
"$ref": "#/$defs/Event"
},
"foot_strike": {
"$ref": "#/$defs/Event"
},
"release": {
"$ref": "#/$defs/Event"
},
"early_follow_through": {
"$ref": "#/$defs/Event"
}
},
"required": [
"leg_lift",
"foot_strike",
"release",
"early_follow_through"
],
"title": "Events",
"type": "object"
},
"Measurement": {
"additionalProperties": false,
"properties": {
"metric_id": {
"title": "Metric Id",
"type": "string"
},
"group": {
"enum": [
"gather",
"stride_plant",
"rotation_release",
"release_finish"
],
"title": "Group",
"type": "string"
},
"unit": {
"enum": [
"deg",
"cm",
"ms"
],
"title": "Unit",
"type": "string"
},
"reference": {
"title": "Reference",
"type": "string"
},
"event_ids": {
"items": {
"enum": [
"leg_lift",
"foot_strike",
"release",
"early_follow_through"
],
"type": "string"
},
"title": "Event Ids",
"type": "array"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Value"
},
"status": {
"enum": [
"limited",
"unavailable"
],
"title": "Status",
"type": "string"
},
"confidence": {
"default": null,
"title": "Confidence",
"type": "null"
},
"reasons": {
"items": {
"enum": [
"event_not_marked",
"event_not_applicable",
"event_timing_uncertain",
"required_event_unavailable",
"required_landmarks_unusable",
"ground_plane_unknown",
"camera_stability_unverified",
"scale_unknown",
"scale_is_model_estimated",
"capture_time_unknown",
"timing_resolution_insufficient",
"follow_through_not_recorded",
"model_accuracy_unvalidated",
"temporal_inconsistency",
"throwing_hand_unknown",
"event_angle_unstable",
"angle_sensitivity_unresolved"
],
"type": "string"
},
"minItems": 1,
"title": "Reasons",
"type": "array"
},
"uses_interpolated_input": {
"title": "Uses Interpolated Input",
"type": "boolean"
},
"value_interval": {
"anyOf": [
{
"$ref": "#/$defs/ValueInterval"
},
{
"type": "null"
}
],
"default": null
},
"benchmark": {
"default": null,
"title": "Benchmark",
"type": "null"
}
},
"required": [
"metric_id",
"group",
"unit",
"reference",
"event_ids",
"value",
"status",
"reasons",
"uses_interpolated_input"
],
"title": "Measurement",
"type": "object"
},
"Phase": {
"additionalProperties": false,
"properties": {
"phase": {
"enum": [
"setup_to_lift",
"move_to_plant",
"plant_to_release",
"recorded_finish"
],
"title": "Phase",
"type": "string"
},
"start_frame": {
"minimum": 0,
"title": "Start Frame",
"type": "integer"
},
"end_frame": {
"minimum": 0,
"title": "End Frame",
"type": "integer"
},
"duration_ms": {
"anyOf": [
{
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"title": "Duration Ms"
},
"motion": {
"items": {
"$ref": "#/$defs/PhaseMotion"
},
"title": "Motion",
"type": "array"
}
},
"required": [
"phase",
"start_frame",
"end_frame",
"duration_ms",
"motion"
],
"title": "Phase",
"type": "object"
},
"PhaseMotion": {
"additionalProperties": false,
"properties": {
"curve_id": {
"enum": [
"front_knee_flexion",
"throwing_elbow_flexion",
"torso_inclination",
"hip_shoulder_separation",
"pelvis_heading",
"shoulder_heading"
],
"title": "Curve Id",
"type": "string"
},
"start_value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Start Value"
},
"end_value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "End Value"
},
"minimum": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Minimum"
},
"maximum": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Maximum"
},
"change": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Change"
},
"usable_frame_count": {
"minimum": 0,
"title": "Usable Frame Count",
"type": "integer"
},
"reasons": {
"items": {
"type": "string"
},
"title": "Reasons",
"type": "array"
}
},
"required": [
"curve_id",
"start_value",
"end_value",
"minimum",
"maximum",
"change",
"usable_frame_count",
"reasons"
],
"title": "PhaseMotion",
"type": "object"
},
"PitchAthlete": {
"additionalProperties": false,
"properties": {
"athlete_id": {
"maxLength": 180,
"minLength": 1,
"pattern": "\\S",
"title": "Athlete Id",
"type": "string"
},
"throwing_hand": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Throwing Hand"
},
"lead_foot": {
"anyOf": [
{
"enum": [
"left",
"right"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lead Foot"
},
"age_years": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Age Years"
},
"height_cm": {
"anyOf": [
{
"exclusiveMinimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Height Cm"
}
},
"required": [
"athlete_id"
],
"title": "PitchAthlete",
"type": "object"
},
"PitchContext": {
"additionalProperties": false,
"properties": {
"sport": {
"const": "baseball",
"default": "baseball",
"title": "Sport",
"type": "string"
},
"practice_type": {
"default": "unknown",
"enum": [
"bullpen",
"flat_ground",
"live_bp",
"game",
"dry_delivery",
"unknown"
],
"title": "Practice Type",
"type": "string"
},
"drill_type": {
"default": "unknown",
"enum": [
"standard",
"step_back",
"rocker",
"other",
"unknown"
],
"title": "Drill Type",
"type": "string"
},
"pitch_type": {
"default": "unknown",
"enum": [
"fastball",
"breaking_ball",
"changeup",
"other",
"unknown"
],
"title": "Pitch Type",
"type": "string"
},
"ball_type": {
"default": "unknown",
"enum": [
"baseball",
"training_ball",
"none",
"unknown"
],
"title": "Ball Type",
"type": "string"
}
},
"title": "PitchContext",
"type": "object"
},
"Sample": {
"additionalProperties": false,
"properties": {
"frame": {
"minimum": 0,
"title": "Frame",
"type": "integer"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Value"
}
},
"required": [
"frame",
"value"
],
"title": "Sample",
"type": "object"
},
"Sequencing": {
"additionalProperties": false,
"properties": {
"status": {
"enum": [
"provisional",
"unavailable"
],
"title": "Status",
"type": "string"
},
"pelvis_peak_frame_interval": {
"anyOf": [
{
"items": {
"type": "integer"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Pelvis Peak Frame Interval"
},
"shoulder_peak_frame_interval": {
"anyOf": [
{
"items": {
"type": "integer"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Shoulder Peak Frame Interval"
},
"order": {
"enum": [
"pelvis_then_shoulders",
"shoulders_then_pelvis",
"unresolved"
],
"title": "Order",
"type": "string"
},
"reasons": {
"items": {
"type": "string"
},
"title": "Reasons",
"type": "array"
}
},
"required": [
"status",
"order",
"reasons"
],
"title": "Sequencing",
"type": "object"
},
"ValueInterval": {
"additionalProperties": false,
"properties": {
"lower": {
"title": "Lower",
"type": "number"
},
"upper": {
"title": "Upper",
"type": "number"
},
"source": {
"const": "adjacent_event_frames",
"default": "adjacent_event_frames",
"title": "Source",
"type": "string"
}
},
"required": [
"lower",
"upper"
],
"title": "ValueInterval",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"schema_version": {
"const": "pitch-1.1",
"default": "pitch-1.1",
"title": "Schema Version",
"type": "string"
},
"measurement_definitions_version": {
"const": "pitch-1.1",
"default": "pitch-1.1",
"title": "Measurement Definitions Version",
"type": "string"
},
"discipline": {
"const": "pitching",
"default": "pitching",
"title": "Discipline",
"type": "string"
},
"analysis_id": {
"minLength": 1,
"title": "Analysis Id",
"type": "string"
},
"analysis_revision": {
"minimum": 1,
"title": "Analysis Revision",
"type": "integer"
},
"pitch_id": {
"minLength": 1,
"title": "Pitch Id",
"type": "string"
},
"status": {
"const": "completed",
"default": "completed",
"title": "Status",
"type": "string"
},
"athlete": {
"$ref": "#/$defs/PitchAthlete"
},
"context": {
"$ref": "#/$defs/PitchContext"
},
"events": {
"$ref": "#/$defs/Events"
},
"measurements": {
"items": {
"$ref": "#/$defs/Measurement"
},
"title": "Measurements",
"type": "array"
},
"delivery_evidence": {
"anyOf": [
{
"$ref": "#/$defs/DeliveryEvidence"
},
{
"type": "null"
}
],
"default": null
},
"visual_evidence": {
"default": null,
"title": "Visual Evidence",
"type": "null"
}
},
"required": [
"analysis_id",
"analysis_revision",
"pitch_id",
"athlete",
"context",
"events",
"measurements"
],
"title": "PitchPayload",
"type": "object"
}