Cases

US tennis-tech startup

Cutting amateur tennis match video down to the rallies

Computer vision that finds every rally in a recorded match and cuts the video by about 70%, on a cloud server with no GPU.

Key results
  • A coach reviews a 90-minute match in about 25 minutes, with the pauses cut out automatically
  • The clip keeps 92% of play time, and 95% of what it shows is real play
  • Runs on an ordinary cloud server with no GPU, so the cost per match stays low
Tennis player hitting a forehand, with both players and her racket marked by detection boxes
Client
US tennis-tech startup
Industry
SportsTech, coaching video
Team
5 engineers
Duration
7 months
Model
Two-week sprints, report and demo each
Platforms
Cloud server, iOS prototype

In short

The startup records amateur tennis matches so coaches and players can review them. In an amateur match the ball is in play for about a quarter of the time. A coach watching an uncut recording spends most of it scrubbing through pauses, so the product needed every match to arrive already cut down to the rallies.

Over seven months, five It-Jim engineers built the system that makes the cut. It finds the court, follows both players and returns the start and end of every rally. It was first built for an iPhone that a player sets up at any court. When the client moved to low-cost cameras installed in tennis clubs, with processing in the cloud, the same models went into a cloud service.

What it gives the business

  • ~70%less video to review per match, so a coach goes through a 90-minute match in about 25 minutes
  • 92%of play time kept in the clip, on matches the model never saw in training
  • No GPUneeded on the server, which keeps the cost per match low as more clubs join
  • 12+US tennis clubs where the system now runs, the client reports

Building a sports or fitness product that needs to see movement?

Players, balls, poses or reps: we start with a two-week technical research on your footage and tell you what can be detected reliably, on your cameras and your hardware. Shall we look at it?

Book a two-week technical research

About the client

A product company for amateur tennis

The client is a US sports startup that builds tools for tennis coaching. It records matches of amateur players and gives coaches and players video they can review. The camera stands where an amateur court allows it: at the side or behind the baseline, far below where TV cameras film from.

The startup needed computer vision of its own for that setting, and it had no in-house ML team to build it.

USA
Market
Amateur tennis
Players and coaches who review their matches on video

Main challenges the customer faced

Three problems to solve at once

Business

Ninety minutes of footage, twenty-five minutes of tennis

Between points, players walk, collect balls, towel off and change ends. In the startup's hand-annotated matches, the ball was in play for 22% to 33% of the recording.

A coach reviewing a student's match had to scrub through all of it to find the points. The product needed the video to arrive cut down to the rallies, for every match.

Technical

Amateur footage breaks the tools built for TV

Most tennis computer vision is trained on broadcasts filmed from high above the court in good light. The startup's footage looked nothing like that:

  • the camera is low, so the net hides part of the far court;
  • a ball on the far side is 2 to 4 pixels wide and vanishes against the sky;
  • worn lines and tree shadows draw false lines on the court;
  • balls and players on the next court look like part of the game.
Delivery

A research problem with a product deadline

At the start, nobody knew which approach would hold up on this footage: motion detection, ball tracking or player tracking. The client still needed builds it could test while the research went on.

The system also had to stay cheap to run: one model filling a whole GPU for one match would work in a demo, not across many clubs.

What we did

Research in two-week steps, each one checked on the client's own matches

Every two-week sprint ended with a written research report and a demo on the client's own recordings, so the client saw each decision and the evidence behind it.

The research ran in four lines: ball, court, players and trimming. Each one ended either in the product or in a written reason to drop it. From the fifth month, every release was benchmarked against the one before.

Timeline of the engagement, by month.

Solution

Know where the court is, and ignore everything outside it

Why it matters: in the first test, most of the false "play" came from a match on the next court. A system that cannot tell its own court from the neighbour's would send coaches clips of strangers.

Classic motion detection found the ball, and also arms, shadows and wind. The fix was to locate the court first and mask out everything around it: neighbouring courts, passers-by and cars.

For full automation we trained a small neural network that finds 21 court keypoints, even when the net or the edge of the frame hides part of the court. We built its training set ourselves from about 1,300 frames with low camera angles, different light and different surfaces. The court is then mapped to a top-down view, so every player position is measured in court units.

1 · Rough corners, refined 2 · All 21 keypoints 3 · Top-down court map

rough point exact intersection far half, often hidden by the net. The top-down map shows both players in court units.

Solution

First version: ball tracking on an iPhone

Why it matters: the first product put the camera in the player's hands: an iPhone on a tripod at any court, with the cut made on the phone. A model that needs a big GPU could never run there.

We tested six ball detectors on the client's footage. General detectors missed the 2-pixel ball on the far side, and the most accurate one needed a whole GPU. TRexNet, a light model that reads differences between frames, ran about 40 times faster on a CPU and found more of the real balls.

The first trimming version judged each ball path by simple physics: how long it flies, a downward parabola, the distance across the court. With ball detection and trimming together, it ran for a full hour on an iPhone 15 Pro. The iOS app built around it reached a near-final prototype.

The ball-trajectory version on a real amateur rally.
A full hour on one phone Prototype stage

Solution

Find the rally by how the players move

Why it matters: a coach notices a missing rally at once, and a clip full of pauses defeats the purpose. Ball-based rules stayed brittle when the ball was hidden or far away, so the final model looks at the players instead. Their movement during a rally is steady and visible in every frame.

The far player is too small to detect in a shrunk frame. So we stack a zoomed crop of the far half on top of the full frame and detect both players in one pass, with no second model and no extra time.

Each change, such as looking ahead in time as well as back or training on 11 recordings instead of one, was measured against the previous release.

The output is a list of rallies with start and end times, which is used to cut the video.
Tennis court during a rally with both players and the racket marked by detection boxes
Both players are detected in every frame, including the small one at the far baseline.

Solution

From the phone to cameras installed in clubs

Why it matters: the cost of each match decides whether the business grows from one club to dozens.

Later in the project the client changed the setup. Instead of players filming with their phones, low-cost cameras built on Raspberry Pi are installed at the courts, and the video is processed in the cloud. The client reports the system running in more than 12 US tennis clubs.

Because every model had been kept small, the pipeline moved to the cloud without a GPU. It runs in a container on a CPU server with 4 cores and 8 GB of RAM. The client's next aim is to make the processing light enough to run on the camera itself.

Indoor tennis court with a green surround, labelled 'Game is going', with the ball path near the far player
An indoor court, with different light and surface. Ball-trajectory version.

Key results

Less to watch, nothing important lost

A cut only helps if it is trusted. We checked how much of each match goes, whether the rallies stay, whether the system works on a court it has not seen, and what it costs to run.

  1. 1
    How much a coach has to watch

    About 70% less video per match

    Across 10 matches annotated by hand, 14.8 hours in total, the ball was in play 27.7% of the time, from 22% to 33% per match. A 90-minute match comes down to about 25 minutes of rallies.

    30 minutes of a 90-minute match
    Rallies, marked by hand
    Kept by the model
    0 min102030

    Everything dark is cut. This match was part of the training data, so the picture shows how the cut looks, while the held-out accuracy is in result 2.

    ~70% shorter video Pauses cut automatically
  2. 2
    Whether the rallies stay

    Nearly every rally makes the cut, and almost nothing else does

    On parts of matches the model never saw in training, with warm-ups and practice left out, the final model keeps 92% of play time, and 95% of what it keeps is real play.

    Play time kept in the clip92%final model
    Share of the clip that is real play95%final model
    Nearly every rally kept 19 of 20 seconds in the clip are tennis
  3. 3
    A new court, no retraining

    It works on a match it has never seen

    A new club should not need a new model. We trained the model with one match left out and tested it on that match. It scored an F1 of 0.886, close to the 0.91 of the model that had seen it.

    Ready for new courts without retraining
  4. 4
    What it costs to run

    No GPU on the server

    The whole service runs on a CPU server with 4 cores and 8 GB of RAM, so the cost per match stays low as more club cameras send video.

    No GPU needed 4 CPU cores, 8 GB of RAM

Business results

A cut the startup can sell to clubs

The startup sells coaching video. With the cut automatic, every recorded match turns into a short review clip, and the service runs on cheap hardware as more clubs join.

All code, trained models and datasets were handed over into the client's own repositories, with documentation for the pipeline, so the client's team can keep developing it.

12+US tennis clubs where the system runs, the client reports
~70%Less video per match for coaches and players to watch
92%Of play time kept, on matches the model never saw
No GPUThe whole service runs on a 4-core CPU server

Features delivered

What we shipped

  • Rally detection service: a container on a CPU server that returns rally start and end times
  • Court keypoint network (21 points) and the top-down court map
  • Far-player detection on a stacked frame
  • Play-time model with training, dataset and evaluation scripts
  • Ball detection and the first, trajectory-based trimming version
  • iOS prototype app with the court, player and trimming models running on the phone
  • Documentation, trained models and datasets in the client's repositories

The technology we used

Stack

Computer vision
OpenCVYOLOv6MobileNetV3TRexNetApple Vision
Machine learning
PythonPyTorchTransformerTensorFlowONNX
iOS
CoreMLcoremltools
Back end
FastAPIDockerGoogle Cloud Storage

Let’s Talk About Building AI That Works in the Real World

No vague promises. No pressure. Just a real conversation with our technical leadership to understand your needs and explore the best next steps.

Tell us about your project
Chat on WhatsApp
File upload (optional, up to 15 MB)

By submitting this form, you agree with our Privacy Policy

What Happens Next?
  1. Your message goes straight to our core team – not a sales department.
  2. You’ll talk directly with our CEO, CTO, or a domain expert for a consultation-style first call.
  3. We’ll ask the right technical questions to understand your challenge and scope.
  4. If we’re a fit, we’ll follow up with a proposed path forward.

More Projects Like This

Hockey tracking camera

Hockey tracking camera

Player tracking and a virtual camera that frame a live amateur hockey game with no one filming, on one desktop per rink, within a 30 ms frame budget.

Fanaty

Fanaty

A C++ stitcher that joins two sideline cameras into one full-pitch 4K panorama at 30 FPS on a CPU, after a consultation that made Fanaty’s processing eight times faster.

Vastmindz

Vastmindz

rPPG technology that reads heart rate, blood oxygen and breathing rate from a selfie camera. Vastmindz sells it as an SDK to insurers, telemedicine and corporate wellness apps.

Postround

Postround

It-Jim built a cross-platform mobile app for Postround that detects and reads golf scorecards to keep player statistics

Doug Labs

Doug Labs

The solution assists medical practitioners with neurological patient diagnostics; it automates, records, and secures neurological test results within an iPhone app

Speech Therapy Platform

Speech Therapy Platform

A custom speech recognition system for children’s therapy, built with phoneme-level modeling, fine-tuned datasets, and production-ready deployment.