TT Lab
Blog

한국어 English 日本語

Get started
Blog

Blog

Digital Twin and AI Table Tennis Referee: Matching Physics with Real Bounces and Testing the Referee in an Exam Hall with Known Answers

Status: Draft (2026-10-18), Measured. The accuracy in the test hall represents relative comparison values within the simulator. All calculations were performed on a single Mac (Apple M1 Max 10-core, Python 3.9.6, numpy 2.0.2) CPU without using GPUs or clusters. No new packages, images, or data were downloaded. Tuning and the test hall were executed deterministically with fixed seeds (the same command produces the same result), and processing times are the median of 5 runs. Processing times were measured when other tasks were running on the Mac and the load average was 47–76. Actual videos used the public dataset OpenTTGames (120 fps, human-annotated ball coordinates and bounce markers) with their extended labels, both under CC BY-NC-SA 4.0. The physics values tuned with this data and the plots generated from them (restitution coefficient plot) follow the same conditions. Raw data (tuning results, 24,300 rows of test hall judgments, actual benchmark results) is located in the working directory measure/tt-twin/ .

Table of Contents

1. Intuition: The Practice Arena with Known Answers

To improve the refereeing functions of a camera scoreboard, one must collect many "incorrect judgments." Actual match videos have few ground truth labels, and rare scenes like edge balls or obstructions almost never appear. Inside a simulator, physics knows where the ball landed, so desired scenes can be created in any quantity and shown to the referee. This is the exam hall with known answers.

However, if the ball in the exam hall flies differently from a real ball, the test will find the wrong weaknesses. Therefore, the procedure was divided into three steps.

  1. Real-world tuning (real2sim): Tune the simulator's physics values using actual bounces.
  2. Exam hall: Generate scenes using the tuned physics, feed them into the operational judgment code, and find weaknesses.
  3. Improvement cycle: Fix one major weakness, and adopt the change only when it improves performance in boththe simulator and real videos.

2. Real-World Tuning: 1,777 Actual Bounce Fragments

2.1 Method

Initially, tuning was done by minimizing the error of "predicting the next bounce by looking at only 50 ms after a bounce," but due to large measurement noise, the restitution coefficient drifted to unrealistic values (e0 1.09). This approach was discarded, and the process was changed to select drag and Magnus multipliers via a grid search and then directly regress the measured restitution coefficient for each bounce. Failed methods are also documented.

2.2 Results

Item Operational Default Tuned Value
Restitution e0, e1 0.98, 0.02 0.982, 0.045
Friction μ 0.25 0.160
Drag multiplier ×1 ×0.8 (difference between 0.8–1.2 is within 0.02 px, so it is only weakly determined)
Magnus multiplier ×1 ×1.5 (turning it off doubles the fitting residual. If 1 or greater, it trades off with rotation magnitude and becomes indistinguishable)
Peak of 30 cm drop (calculated without air resistance) 26.0 cm (e 0.931) 22.9 cm (e 0.873)
실제 바운드에서 잰 반발 계수는 운영 값보다 낮았다 공개 경기 영상 120 fps 표식 바운드. 칸마다 중앙값과 사분위 범위. 0.7 0.8 0.9 1.0 1 2 3 4 5 내려오는 속도 |v_z| (m/s) 기본값 0.98 + 0.02·v_z 맞춘 값 0.982 + 0.045·v_z 실측 학습 5경기 실측 시험 7경기 30 cm 낙하 꼭대기(공기저항 없이 계산) 기본값 26.0 cm, 맞춘 값 22.9 cm ITTF 규정은 약 23 cm
Figure: Restitution coefficient measured from actual bounces vs. default and tuned values
Incoming velocity Measured e median, training 5 matches (quartiles) Measured e, test 7 matches Default value Tuned value
1.5–2.5 m/s 0.894 (0.781–0.991), n 692 0.911, n 93 0.939 0.889
2.5–3.5 m/s 0.831 (0.746–0.892), n 507 0.854, n 93 0.921 0.849
3.5–5.0 m/s 0.838 (0.753–0.880), n 176 0.830, n 30 0.902 0.807

The measured restitution coefficients were 0.04–0.07 lower than the values of the operational synthesis device. ITTF regulation (2.1.3) states that a ball dropped from 30 cm should bounce about 23 cm, and the values tuned from video shifted toward that standard (22.9 cm). This is in the same direction as MuJoCo's DeepMind table value (26.4 cm) and the operational default (26.0 cm) seen in Part 2, both of which were more elastic than regulations.

2.3 However, Prediction Hardly Improved

We predicted the remaining flight by looking at the fragment before the first bounce of a serve and 150 ms after the bounce, and compared it with the opponent's bounce (B2).

Match Physics Number of serves B2 position error median (p90) Depth direction B2 time error median (p90) Time bias
Training 5 matches Default value 207 22.7 (47.4) cm 18.8 cm 24.6 (68.3) ms +9.7 ms
Training 5 matches Tuned value 207 22.9 (45.5) cm 16.2 cm 24.1 (68.6) ms +3.1 ms
Test 7 matches Default value 23 21.3 (37.4) cm 20.3 cm 22.5 (52.8) ms +5.7 ms
Test 7 matches Tuned value 23 17.4 (31.4) cm 9.9 cm 13.1 (45.7) ms −0.6 ms

(Serves whose prediction hit the net and failed to produce B2 are excluded from error calculations. Training: 55–59, Test: 7–8.)

2.4 Most Errors Stem from Single-Camera Depth

The limits of the monocular camera were measured using re-sampled known answers. Treating 600 actual bounce fittings as ground truth, we re-rendered them with tuned physics, projected them onto the camera, added noise, and recovered them using the same method (acting as a lower bound assuming accurate physics models).

Camera Front/back frames Incoming velocity error median, longitudinal / depth direction Contact point error median, longitudinal / depth Topspin error median
Real match camera 120 fps, human markers 8 / 12 0.06 / 0.33 m/s 0.3 / 0.5 cm 51 rad/s
Scoreboard reference camera 512×288, 60 fps 6 / 6 0.09 / 0.67 m/s 1.1 / 1.7 cm 60 rad/s
Scoreboard reference camera 512×288, 30 fps 3 / 3 0.12 / 1.11 m/s 3.1 / 3.8 cm 116 rad/s

Currently, depth errors overshadow differences in physics values. Determining the Magnus multiplier and depth simultaneously requires a second camera or high-speed video where ball markings are visible.

3. The Referee Exam Hall with Known Answers: 24,300 Judgments

3.1 What Was Built

Why Projection Coordinates Were Used Instead of Rendering. The input to the judgment engine is the screen coordinates of the ball, and the objective is to find the engine's weaknesses. At the coordinate level, tens of thousands of runs can be performed on the same scene simply by changing conditions. The trade-off is that differences in appearance are omittedThat is. The issues of the ball blending into the background, clothes, or lighting, misreading the racket or hand as the ball, and the actual blur shape were only mimicked using a detector error probability model. Actually, the baseline rally (actual condition) accuracy of the testbed, which is 82%, is lower than the 93% (54/58) of clean footage from 7 actual matches measured through the same operational pipeline. Therefore, the table below should be read only as a relative comparison between scenes and conditions. Absolute values should not be read as actual accuracy.

정답을 아는 심판 시험장: 랠리 승자를 맞힌 비율(%) 시뮬레이터 안 상대 비교. 칸은 장면 × 열화 조건, 진할수록 낮음. 이상 실제 30 120 잡음 번짐 가림 놓침 폰 전체 엣지 59 54 46 54 59 51 59 63 34 53 바로 안(3 cm) 96 88 81 83 75 81 59 68 53 76 바로 밖(10 cm) 99 89 91 85 76 88 69 79 58 81 네트 맞고 넘어감 100 94 97 90 83 94 78 81 71 87 서브 렛 78 71 80 54 50 67 41 53 44 60 투 바운드 99 91 89 88 80 90 70 82 60 83 스매시 100 92 80 85 79 93 69 79 56 81 로브(들어감) 69 62 58 64 57 63 55 59 52 60 오브스트럭션 12 13 13 14 17 13 20 22 24 16 발리(넘어간 공) 99 92 97 92 81 95 69 75 69 86 기준 랠리 100 82 85 86 77 86 63 79 62 80 전체 89 80 80 77 70 80 62 70 56 74 이상 = 잡음 없음. 실제 = 실측 검출 잡음. 30·120 = fps. 폰 = 30 fps + 잡음 2배 + 번짐 + 가림. 120 fps(77%)가 60 fps 실제(80%)보다 낮았습니다. 장면마다 조건당 n 이 다릅니다.
Figure: Rally winner prediction rate by scene and degradation condition

3.2 Three Weaknesses

  1. Obstruction 16%(12–24% across all conditions). The engine does not have the concept that "the opponent's ball was hit above the playing surface before bouncing on my side," so it reads most as a double bounce and awards the point to the opposing player. The same engine gets 86% of volleys correct when the ball crosses the end line, but this is a coincidence, not because it understands the rules.
  2. Edge ball 53%, incorrect without verification 21%. A ball touching the edge does not draw a V-shaped bounce on the screen. The engine fails to see the bounce and treats it as out. With the highest rate of being incorrect yet sent without human verification, this is the most dangerous cell.
  3. Service let 60%(Occlusion 41%, phone 44%). It fails to see the speed reduction of a service grazing the net, misreads a ball deflected off the net as a bounce, or misses the bounce on the receiver's side.

Next was high lobs (in) at 60%. The ball goes off the top of the screen or flies for over 1.5 seconds, triggering "end of rally" prematurely. The number one cause of failure regardless of the scene was ball detection missing bounces in empty spaces.

120 fps performed worse than 60 fps(77% vs 80%). It might seem that more frames would be better, but this is believed to be because the engine's pixel threshold and bounce rejection rules are tuned for 60 and 30 fps. The causes were not isolated and re-measured (unmeasured). Confirming this through inference on actual 120 fps video is the next task.

4. One Loop of Improvement: Filling Trajectories

4.1 What Was Changed

We targeted the testbed's number one failure cause: "ball detection missing bounces in empty spaces for more than 4 samples (about 0.07 seconds at 60 fps)." Previous logs show that many missed bounces in actual matches also followed this path.

We fit a parabola with its curvature fixed to gravityto the trajectory segments before and after the empty space (curvature = screen scale at that position × 9.81, fitting only slope and intercept). The empty space is filled with the preceding and following curves only when all of the following conditions are met:

The filled point is assigned a confidence of half on both sides, and that bounce goes to human verification. The threshold was pre-determined by physics and was not chosen based on test results.

탄도 메우기: 공이 사라진 구간을 중력 포물선으로 원리를 보이려고 만든 합성 궤적(60 fps, 중력만, 반발은 맞춘 값). 6배 느리게. ▶ 누르면 재생 탁구대 윗면 검출이 빈 8표본 되찾은 바운드 검출된 공 직선 메우기: 바운드가 사라짐 곡률을 중력으로 고정한 앞뒤 포물선이 탁구대 위에서 만남
Figure: Principle of filling the section where the ball disappeared using a gravitational parabola

(The figure is a synthesized trajectory created to show the principle. It is not the actual decision result.)

4.2 In the Simulator

Condition Baseline → Change (/2,700) Improved / Worsened McNemar p
Above 2,392 → 2,391 +0 / −1 1
Actual 2,159 → 2,209 +57 / −7 7.6e−11
120 fps 2,075 → 2,163 +98 / −10 2.7e−19
Occlusion 1,671 → 1,826 +223 / −68 2e−20
Phone 1,512 → 1,548 +63 / −27 0.00019
Total (24,300) 17,900 → 18,483(73.7 → 76.1%) +778 / −195 5.3e−83

Incorrect judgments without verification decreased from 1,215 to 996. However, edges (53.1 → 49.9%) and obstructions (16.3 → 14.6%) decreased. This was not the goal of this change and remains a task for the next loop.

4.3 In Actual Footage (Table Determining Adoption)

Changes that improve performance only in the simulator are not adopted. Because the testbed is an approximation lacking appearance details, improvements there could worsen performance in actual footage. Therefore, we re-ran the fixed baseline table of actual footage using the exact operational real-time pipeline.

Baseline table Rally Baseline → Change Improved / Worsened
7 test matches × 12 conditions (clean, dark, 30 fps, low resolution, blur, obstacle, camera shake, occlusion, 3 phone qualities) 638 536 → 543 +8 / −1, McNemar p 0.039
For development (training match clean · 30 fps · coordinate occlusion 15%, validation match 8 conditions) 1,394 1,217 → 1,238 +36 / −15, p 0.005

Decision: Adopted. However, it will be deployed with the switch turned off initially. When turned off, calculations remain the same as before so judgments do not change. Before turning it on, we will double-check "not worse than operation" in the real-time pipeline using the camera scoreboard's E2E logs (recording and replaying 7 test matches at 30 fps with a fake camera) and review the group of "balls falling in front of the camera" together.

5. Expanding the AI Referee: Gravity Ruler and Rule-by-Rule Judgment Table

5.1 Gravity Ruler

Service tosses must rise at least 16 cm after leaving the hand (ITTF 2.6.2). However, with a single camera, the distance to the ball is unknown, so there is no scale to convert screen pixels to centimeters. Here, gravity acts as a ruler. Fitting the screen height of the ball after leaving the hand to a parabola with respect to time y = a·t² + b·t + c yields a = g·s/2, where s is how many pixels correspond to 1 m at that ball's depth. Then, height can be measured as pixel difference ÷ s, and the 3D position of the ball can also be found via depth (focal length ÷ s).

중력 자: 공의 낙하 곡률로 화면의 축척을 잰다 합성 토스 30 cm, 60 fps. 축척은 실제 토스 80개의 중앙값 330 px/m 로 그렸습니다. ▶ 누르면 재생 0 20 40 60 80 100 화소 시간(0–0.49 s) 올라간 화소 y = a·t² + b·t + c 를 맞추면 a = g·s/2 = 1619 px/s² → 축척 s = 2a/g = 330 px/m → 높이 = 99 px ÷ s = 30 cm 실제 영상: 토스 80개에서 잰 축척 중앙값 330 px/m, 카메라 기하로 구한 네트 자리 축척은 네 경기에서 303–335 px/m.
Figure: Gravity ruler measuring screen scale using ball drop curvature

5.2 Judgment Table by Rule

The principle is to assign a confidence score to each signal, and if signals conflict or confidence is low, route it to human review. "Measured" refers to actual measurements from this test, and "Unmeasured" refers to unmeasured items.

Rule (ITTF) Required Signal Measured Unmeasured Primary Judgment / Human Review
Toss 16 cm or higher (2.6.2) Ball (gravity ruler), moment of hand release 0.70–0.86 in synthesis with hand lift, 0.59–0.66 within ±4 cm boundary. 29% of serves measurable in real footage Finding release moment using hand joints, actual ground-truth height Human review. Only clearly low tosses are flagged as candidates.
Toss position: Behind end line, above playing surface height (2.6.4) Ball (including depth via gravity ruler) Synthetic 0.89–0.97, 0.97–1.00 when more than 10 cm away from the line Real footage ground truth Primary outside 10 cm, human review inside
Open palm to raise the ball (2.6.1) Hand joints None Hand joint model Human review
Do not hide the serve (2.6.4–2.6.5) Ball visibility from receiver's perspective None Principally impossible with a single side-mounted phone Human review
Serve let (2.9.1.1) Ball (speed reduction at net), net sound 60% in test environment Real phone sound Human review(Low review cost as it is a re-serve)
Edge (2.1.2) Ball (sharp deflection without V-shape), edge sound 53% in test environment, 21% incorrect without review Real edge footage, 0 generations for side edges Human review required
Double bounce Ball 83% in test environment, 87.5% after trajectory interpolation Small real sample size Primary
Obstruction (2.5.8) Ball (is the reversal point before bouncing on the table), body/racket 16% in test environment Real labels Human review. First to be measured in the test environment: the rule "direction reverses without a bounce + that spot is above the table"

6. Limitations

7. Next Iteration

  1. E2E check before turning on the trajectory interpolation switch.
  2. Edge candidate → Human review. "Sharp deflection without V-shape" within the end-line band is marked as an edge candidate. First, measure whether incorrect answers without review decrease in the test environment and general outs do not worsen.
  3. Obstruction rule. Since side views clearly show longitudinal position (Section 2.4), judge using the longitudinal coordinate of the direction-reversal point.
  4. Test environment fidelity. Remeasure actual detector errors by speed and position to tune the noise model, and verify the result where 120 fps performed worse than 60 fps using actual 120 fps inference.

A word on TT. We tested the refereeing system 24,000 times in a training facility with known ground truth. We fixed the weaknesses found there and only accepted changes when performance also improved on real match footage. A referee that only does well in the training facility is useless!

References

All links were verified as accessible as of 2026-10-18.

Sign in to like

Comments

No comments yet.

Sign in to leave a comment