RallyTrace · Bachelor's thesis in computer vision

Adaptive ball tracking.
Frame-linked match review.

RallyTrace tests how one camera can localize a small, fast tennis ball without processing every frame at full-image cost. This overview covers the Search/Tight method and measured model comparison; the match-review workspace links precomputed outputs back to the recorded match.

Research question · controlled comparison · integrated prototype

Search/Tight method, TrackNetV2 comparison,
and complete pipeline.

RallyTrace is the thesis project. Its match-review workspace presents one precomputed match. This overview covers the research question, adaptive crop method, checkpoint comparison, and downstream pipeline; Methods & results documents architecture, metrics, and limitations.

Core contribution · Measured studySearch → Tight

Player-guided Search followed by local Tight tracking.

Search acquires the ball in a player-centred portrait crop; Tight continues locally at near-native pixel detail. Four task-specific checkpoints test whether the lighter MobileNetV4 design retains the reference model's detection quality.

Search · W × H: 288 × 512 4.45×

0.895 MobileNetV4 F1 vs 0.893 TrackNetV2 F1

Tight crop · W × H: 144 × 256 3.45×

0.947 MobileNetV4 F1 vs 0.950 TrackNetV2 F1

Search accuracy uses a frozen TrackNetV2 snapshot after 54/200 epochs. The throughput ratios are separate raw TensorRT FP16 model-call benchmarks, not end-to-end video FPS; the full comparison documents training and initialization differences. Read the full model study
01 · Research questionContinue below

Why not process the full image at maximum detail?

The ball is tiny, blurred, and frequently occluded. The thesis tests whether player-guided Search and position-guided Tight crops retain detection quality without high-resolution full-frame inference.

Small target · blur · occlusion · pixel detail
02 · Complete pipelineFollow the data

Trace every output through one source-frame timeline.

Ball coordinates join player boxes, pose context, event probabilities, and optional court geometry without losing the frame that produced them.

  1. Video
  2. Players
  3. Ball
  4. Pose
  5. Events
  6. Court · optional

Controlled question for the ball model

Can a lightweight TrackNet retain ball-detection quality in Search and Tight?

A tennis ball occupies very few pixels, crosses large image regions, and is frequently blurred or occluded. Downscaling the full frame loses localization detail; processing the full image at high resolution spends computation where the ball is not.

This thesis tests an adaptive alternative: Search acquires or reacquires the ball in a player-centred portrait crop, Tight preserves local pixel detail, and the wider pipeline aligns ball, player, pose, event, and court observations by source frame.

Review the Search-and-Tight method

Ball recovery · source-frame alignment · event inference

Recover the ball. Align every signal.
Infer temporal events.

Ball coordinates, player boxes, and pose records are aligned by original video frame before temporal event inference. Court registration is shown separately because it is an optional geometric branch—not a required step between recovery and event detection.

ARecover

Find the players, then recover the ball

Player detections position the portrait Search region. TrackNet processes three frames at a time; once a reliable ball peak is found, Tight mode follows a smaller local crop. Every observation keeps its original frame, image position, confidence, crop, and recovery state.

  • Search when uncertain
  • Follow locally when found
  • Position + confidence
See adaptive ball recovery
BAlign

Align every signal to the original frame

Ball observations, player boxes, and poses are assigned to the video frame they describe. This shared index keeps sparse measurements and reconstructed values synchronized—and lets every result jump back to the recording.

  • Original frame index
  • Measured vs reconstructed
  • Stored provenance
See the shared player timeline
CInterpret

Interpret movement across time

A 25-frame model combines ball motion, up to two player boxes, and body pose. For each window centre it returns three independent scores: bounce, a hit by the player at the top of the image, and a hit by the player at the bottom. Per output channel, temporal peak selection retains the strongest local candidate and its source-frame index.

  • Ball path + player movement
  • Bounce / top hit / bottom hit
  • Jump to the selected frame
See temporal event reasoning

From event list back to source video

Each stroke candidate links to
its source frame.

Filter model-linked stroke candidates by player, projected in/out result, or minimum speed proxy; sort them by estimated pace or planar span; then jump from a contact-to-bounce path to its source frame. Video, minimap, and event ledger remain synchronized.

Top player Bottom player Next bounce
Open match demo

Selected from the precomputed hit-to-bounce ledger

Three event candidates
linked to source footage.

These examples were selected from the full-match hit-to-bounce candidate ledger to demonstrate the review workflow. Each shown landing is classified in; this illustrative selection is not an evaluation sample.

02 / 03 Top player
Stroke 600 · 1:20:14

Highest proxy in this selection

In
03 / 03 Bottom player
Stroke 052 · 08:14

Longest span in this selection

In

Flight speed is a straight-line proxy with an assumed 1.5 m contact height; span is measured on the court plane. These are derived analysis values—not radar, 3D reconstruction, or officiating measurements.

Controlled model study · frame-linked match demo

Review the comparison.
Then inspect the match.

Methods & results documents the checkpoints, metrics, architecture, and limits. The precomputed match demo shows those frame-linked outputs beside the source video.