# CVAT Ball Auto-Labelling

> A custom CVAT adapter combining full-frame and tiled inference for small footballs, producing editable ball and person annotations.

Find the small ball. Keep annotations editable.

- URL: https://weaveward.com/work/ball-auto-labelling-cvat
- Stage: Prototype
- Year: 2026
- Industry: Sports
- Context: Internal product
- Capabilities: Computer vision, AI solutions
- Technologies: Python, Ultralytics YOLO, PyTorch, Torchvision, OpenCV, NumPy, CVAT Community, Nuclio, Docker, GPU runtime

## The challenge

Small objects can be difficult to detect in wide camera views. When a football occupies only a small part of the original frame, resizing the whole image for inference can remove useful detail.

This prototype explores a more focused pre-labelling workflow. The goal is to supply editable suggestions in an annotator's existing tool, while leaving the final labels to a person.

## What we built

The original work is a custom detector adapter and its integration tooling:

- **Full-frame detection.** A pretrained Ultralytics YOLO model supplies person and sports-ball detections
- **A ball-focused tiled pass.** Overlapping crops let the detector inspect smaller regions before mapping the resulting boxes back to full-frame coordinates
- **Duplicate suppression.** Class-aware non-maximum suppression merges detections from both passes. An optional configuration can limit the number of retained ball suggestions
- **CVAT-compatible output.** The adapter returns rectangles, labels, and confidence scores in the format expected by CVAT's serverless detector integration
- **Deployment configuration.** A Nuclio function definition and PowerShell helpers describe the GPU container and local CVAT serverless setup
- **Comparison tooling.** A bake-off script can compare input sizes and tiling configurations on sampled frames, recording timings and detection overlays for review

The detector proposes annotations. A human annotator can accept, adjust, or delete those boxes.

## How it works

### CVAT and a Nuclio handler

CVAT Community supplies the third-party annotation and review platform. The custom Nuclio handler decodes an image request and passes it to the detector with the chosen threshold.

### Full-frame and crop passes

The full-frame pass and ball-only crop passes share the same model handler. Crop detections are translated into the original image coordinate system, combined with the full-frame detections, and reduced to a merged set of boxes before the response is returned.

### A pretrained model

The implementation uses a pretrained model; it does not demonstrate a newly trained football model, player identification, long-term tracking, or ball-action understanding.

## Current stage

This is an implemented integration prototype. The Python adapter, function configuration, deployment helpers, and comparison script are present in the source. The source review did not execute the GPU workload, start the CVAT deployment, inspect private video, or verify benchmark results.

No accuracy, recall, speed improvement, or annotation-time reduction is claimed. A next evaluation would use permission-safe footage and review both missed objects and incorrect suggestions before making a deployment decision.

## Platform attribution

[CVAT Community](https://github.com/cvat-ai/cvat) is an upstream open-source product by the CVAT project. Weaveward's work described here is the custom detection adapter, tiling and merge workflow, and integration tooling. CVAT and the pretrained model are third-party components.

## Where this fits

A useful annotation pipeline meets the people and tools already doing the work. We build [computer vision](/services/computer-vision) workflows around your images, camera conditions, and review process. [Talk to our team](/contact) about a pilot for your own data.
