How tomdoyo/open-command works
OpenCommand is a baseball-pitch command tracker: it estimates camera geometry, projects catcher-glove detections into world coordinates, infers a target, and scores each pitch by distance from its actual location to that target. The README documents the stage inputs and outputs, plus validation and comparison capabilities; sampled source confirms the geometry, pose solve, glove filtering, and hierarchical target model. The scoring and validation implementation is only partially sampled, so its documented inputs and outputs are shown without adding unsupported internal call links.
Main entry points: opencommand.py Command scoring · solve_camera_pose.py Pose solver · solve_glove_locations.py Glove projection · target_inference.py Target inference
Components 15
Camera Pose
- Pose solver
src/solve_camera_pose.py - Geometry & timing
src/poselib.py - Camera poses
Glove Projection
- Glove projection
src/solve_glove_locations.py - World glove locations
Target Inference
- Target inference
src/target_inference.py - Inferred targets
Scoring & Validation
- Command scoring
src/opencommand.py - Command scores
- Model validations
Other components
- Pipeline operator
- Ball/glove tracks
- Strikezone detections
- Pitch data
- FanGraphs pitching
Connections 22
- Pipeline operator → Pose solver: runs stage
- Pipeline operator → Glove projection: runs stage
- Pipeline operator → Target inference: runs stage
- Pipeline operator → Command scoring: runs stage
- Ball/glove tracks → Pose solver: reads tracks
- Strikezone detections → Pose solver: reads detections
- Pitch data → Pose solver: reads pitch data
- Pose solver → Geometry & timing: uses geometry
- Pose solver → Camera poses: writes poses
- Camera poses → Glove projection: reads poses
- Ball/glove tracks → Glove projection: reads detections
- Glove projection → Geometry & timing: unprojects pixels
- Glove projection → World glove locations: writes locations
- World glove locations → Target inference: reads locations
- Pitch data → Target inference: reads pitch context
- Target inference → Inferred targets: writes targets
- Inferred targets → Command scoring: reads targets
- Pitch data → Command scoring: reads pitch data
- Camera poses → Command scoring: reads poses
- FanGraphs pitching → Command scoring: reads comparison data
- Command scoring → Command scores: writes scores
- Command scoring → Model validations: writes validations