Enhanced Robotics (Tenniix Official)Company & role details

Unified Temporal Ball Detection & Ball-Size Regression

An extension of the three-frame ball detector with a dedicated distribution-regression branch that learns ball size alongside localization and frame identity.

Illustrated summary of three-frame tennis-ball detection and size regression, showing nine-channel input, shared YOLO features, frame identity, and ball-size outputs.
Project summary illustration

Moving size estimation into the detector

The earlier pipeline detected the ball first and then measured its radius with a separate cropped-image model. I extended the temporal detector so its shared features could support both localization and ball-size estimation in one inference pass.

Multi-task architecture

The model retains the nine-channel, three-frame input and the frame-index classes used by the original temporal detector. Alongside its box and class branches, an additional head predicts a discrete size distribution at each detection scale.

The decoder reduces that distribution to an expected value and multiplies it by the detection stride to recover a pixel-space size. Training adds size-specific Distribution Focal Loss and Smooth L1 terms to the existing detection objectives, supervising matched foreground anchors.

Keeping size separate from localization

The fixed-size localization box is not the size target. Explicit size labels travel separately through the dataset, augmentation, loss, validation, and prediction paths. A compatibility path can derive size from the original annotation box before its dimensions are replaced by the fixed training box.

The prediction and non-maximum-suppression paths retain the extra scalar with its detection instead of interpreting it as another class probability.

Radius-head naming and the later diameter model

This is the integration stage of the ball-size model family. The implementation uses names such as “radius head” and “ballr3f,” but the scalar’s meaning is determined by the training target. The subsequent diameter-prediction project establishes explicit diameter labels and matching inference conversions.

The two records describe successive stages of the same implementation family: adding the joint regression branch, then completing the diameter-specific data and deployment workflow.