Skip to content
Projects

HitterLoop

A video-based baseball and softball swing-development system for youth and teenage hitters and coaches. It combines real swing video, movement analysis, coach-reviewed feedback, drills, and longitudinal progress tracking.

Status
Building
Category
AI
Started
Jun 1, 2026
Timeline
Jun 1 – now
  • TypeScript
  • Three.js
  • YOLO
  • Gemini
  • Supabase
  • Capacitor
Private repository

Overview

HitterLoop is a coach-led swing-development app for baseball and softball hitters. A coach films real games and practice sessions, uploads the video, and reviews the swings with movement analysis alongside. The coach decides what a hitter should work on next, assigns drills, compares swings over time, and tracks whether practice carries into games. The original video is always the source of truth.

The analysis supports that judgment; it does not replace it. AI draft findings are reviewed by the coach, who approves, edits, or rejects each one before it counts.

It is under active development. The Android coach app, the upload and processing pipeline, coach review, development tracking, Compare, and shareable player reports all work today in a development environment. Camera calibration, an iOS build, production infrastructure, and a public release are still ahead.

Why I Built It

Most swing analysis happens through cage sessions, isolated clips, or subjective visual review — a coach watches a phone video a few times and calls it. None of that holds up across a season: there is no consistent measurement, and a single cherry-picked rep tells you much less than a pattern across real at-bats.

I wanted swing evaluation built around actual competitive game footage, with enough structure that a coach could compare mechanics across swings instead of re-litigating the same three clips.

How It Works

Record / Upload
      ↓
Pose + Bat Tracking
      ↓
2D → 3D Reconstruction
      ↓
Measurements
      ↓
AI Draft Findings
      ↓
Coach Review (approve · edit · reject)
      ↓
Development Priority → Drills
      ↓
Later Swings, Compared

Record / Upload. A coach logs games, at-bats, and practice sessions, and uploads footage from the Android app.

Pose + bat tracking. YOLO11-pose finds the player and their joints; YOLOv8 with ByteTrack separately tracks the bat through the swing.

2D → 3D reconstruction. The tracked keypoints are smoothed, corrected against a rigid forward-kinematic bone-length model, and lifted from 2D to 3D with VideoPose3D. The pipeline automatically finds the swing window and infers the contact frame inside it.

Measurements. Body-relative measurements are computed from the tracked motion, each carrying a confidence flag where the measurement is uncertain.

AI draft findings. An analysis layer reads the measurements and writes a first draft of what it sees. It never sees raw video and never generates the measurements themselves — those come entirely from the pipeline above. The draft is a starting point for the coach, not a result.

Coach review. The coach works through a review queue, reading each draft against the original video and the 3D playback, and approves, edits, or rejects it.

Development. Confirmed findings become a development priority for the player, with drills, follow-ups, and progress tracking. Later swings, from games or practice, can be set side by side in Compare, and the coach judges whether the work is showing up in games.

3D swing reconstruction

This is not a canned animation. The interactive model — a rigged, skinned FBX humanoid rendered in Three.js/WebGL — is driven frame by frame by the player's own tracked H36M joint data through bone retargeting. What the coach sees moving is the athlete's actual swing, reconstructed from their footage.

The coach can orbit the model, scrub to any frame, and play the motion back at speed, using the reconstruction the way they would review film — except from angles the camera did not capture.

The 3D model is a review aid, not the source of truth. It is reconstructed from a single camera without calibration, so angles can distort with camera position, and the coach always has the original video to check it against.

AI-assisted, coach-decided

The AI produces draft findings, visibly marked as drafts. Nothing counts until a coach has looked at it. The coach can approve a finding, edit it, or reject it, and only what the coach confirms carries forward into a player's development plan and shared reports.

The coach is the authority. The analysis is there to point at what is worth looking at; the coach judges it against the original video.

What gets measured

  • Hip-shoulder separation at contact
  • Lead-elbow and front-knee angle at contact
  • Torso and pelvis tilt
  • Stride length
  • Bat speed and attack angle
  • A confidence level on the measurements that are uncertain

Bat speed and stride are reported in body-relative units, not miles per hour or inches, because there is no camera calibration yet. Contact is inferred from the tracked motion rather than detected from the ball. Angle metrics still shift with camera position (more on that below), so they are prompts for the coach's eye, not verdicts. Things like head movement are something the coach watches for on the video and tracks as a development priority; they are not a measurement the pipeline produces.

Real game vs. practice data

Game at-bats and practice reps are stored separately, and practice sessions never blend into game-only statistics. A coach can review either, but a swing taken in a practice tee session is not silently averaged into a player's in-game numbers. It is a small piece of data modeling, but it is the difference between a system that measures something real and one that just accumulates clips.

What I'm working on now

The pose pipeline reconstructs a usable 3D swing, but it does not yet have real camera calibration. World rotation is currently fixed, which means camera angle can distort certain world-space measurements — most visibly torso tilt, where a mechanically upright hitter can read as heavily tilted purely because of where the camera was set up. The display layer compensates today with per-clip auto-leveling, but the underlying stored angle metrics still need a proper normalization solution rather than a display-time patch.

I am also working through how to visualize a corrected swing without pretending there is one universal "perfect" swing to converge on. The direction I am pursuing is comparing the athlete's actual tracked motion against targeted, constrained corrections — not replacing their swing with a generic reference animation.

Tech stack

TypeScript/JavaScript · Three.js/WebGL · YOLO11-pose · YOLOv8 · ByteTrack · VideoPose3D · Gemini API · Supabase · Capacitor · GCS · Python · PyTorch/CUDA

Current Status

Working today

  • Android coach app built with Capacitor
  • Coach authentication with Supabase RLS scoping coaches to their own team data
  • Coach self-registration and team onboarding in the development environment
  • Video upload and automated swing-analysis pipeline
  • Interactive 3D swing reconstruction and playback
  • AI-assisted swing findings that coaches review, edit, approve, or reject
  • Coach development priorities, drills, follow-ups, and progress tracking
  • Separate game and practice workflows
  • Pitch-by-pitch at-bat logging with video evidence
  • Side-by-side swing comparison
  • Shareable player reports containing coach-confirmed development information
  • PWA offline shell

Still in progress

  • Camera calibration and stronger angle normalization
  • Corrected-swing / idealized-swing visualization
  • Production deployment of Supabase and processing infrastructure
  • Physical-device validation of camera capture, video upload, and real dual-video playback
  • iOS build and Xcode/device testing
  • Production-ready onboarding and account administration
  • Billing/subscriptions
  • Broader parent/player account experiences
  • Public release

None of that is available publicly yet — there is no App Store or Play Store listing, no public signup, and no production hosting behind this today.