SAM2 Video Tracking

KickTrimmer Lab · Ball-Speed Video Twin

This Space acts as a desktop twin of the KickTrimmer mobile app: load a football clip, detect the kick, and estimate the ball speed frame-by-frame. It previews future ball rings color-coded by hypothetical impact velocity as the ball travels toward the goal, letting you experiment with FX settings before shipping them to the phone build.

⚠️ Work in progress: we are still closing the gap with the mobile feature set (automatic horizon & goal finding, diagonal speed correction, etc.), so the numbers you see here are prototypes—not final certified speeds.

Quick start

  • Load a video: Upload your own or pick an example below.
  • Checkpoint: Tiny / Small / Base+ / Large (trade speed vs. accuracy).
  • Points mode: Select an Object ID and point label (positive/negative), then click the frame to add guidance. You can add multiple points per object and define multiple objects across frames.
  • Boxes mode: Click two opposite corners to draw a box. Old inputs for that object are cleared automatically.

Working with results

  • Preview: Use the slider to navigate frames and see the current masks.
  • Track: Click “Track ball (SAM2)” to track all defined objects across the selected window. The preview follows progress periodically to keep things responsive.
  • Export: Render an MP4 for smooth playback using the original video FPS.
  • Note: More info on the Hugging Face 🤗 Transformers implementation of SAM2 can be found here.
SAM2.1 checkpoint

Preview

0 0

Manual

Goal crossbar inactive.

YOLO13

SAM2

0 120
1 60
Point label
Prompt type
Examples

If checked, shows only tracked objects on black background. If unchecked, overlays colored masks on original video.

Overlay post-kick SAM2 ball masks in magenta to visualize trajectory.

Replace the ghost trail fill with magenta rings at future ball positions.

If unchecked, hides the '+' markers from clicks in preview and renders.

These options apply when rendering with background removal.

0 12
0 5
0 45
0 1
0 1
0 25
0 1
0 35

Ring FX Settings

0.1 2
0.1 3
0 5
0.1 2
0 120
10 200