Skip to content

See what the detector actually found, drawn on the footage - #23

Merged
ralyodio merged 1 commit into
masterfrom
visible-player
Aug 10, 2026
Merged

ralyodio merged 1 commit into
masterfrom
visible-player

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

You asked whether there is any way to see what the AI detected — boxes, focal points, tracking. Yes, and it answers your other question too.

Boxes on the video

Every moment's player now draws what was tracked at that instant:

  • your athlete — bright green, thick, labelled
  • ball / hoop / referee — their own colours, labelled
  • everyone else — grey at 45% opacity, present but quiet

Drawn on a canvas from a tracks endpoint scoped to the moment's window, not burned into a re-encoded video. Nothing to render, nothing to wait for, and a Hide boxes toggle.

It also says in words what the boxes show:

12 tracked here, 1 is your athlete, no ball seen

That is a diagnosis. "3755 tracks" was a number.

The player is no longer hidden

You said you still could not play a moment without generating clips. The player shipped in #21 — folded inside a collapsed <details> labelled "Play 2:16 → 2:21", among the Keep/Reject buttons. Easy to miss, and you did.

That is twice I have buried something necessary behind a <summary>: first the identify panel, now this. preload="none" already means an unwatched player costs nothing, so hiding it bought nothing and cost you an evening. It is visible now, and a test asserts it is not inside a <details>.

On "maybe we need more footage"

I do not think so, and the boxes will show you why. Your last run:

161,369 detections    3,652 player tracks    103 ball tracks

It is detecting people constantly. What it could not do is tell which person is Sam (fixed), see the ball more than ~7% of the time (improved by tiling), or see the hoop at all (fixed, below). More footage would have produced more of the same.

The basketball model is now live

REELEEL_CV_MODEL=/data/models/bard.onnx is set on the service and confirmed inside the container. Your next detection run uses it — the one whose log you pasted still said cannot detect referee, hoop because it started before this.

Measured on your footage on your hardware:

                 player  ball  hoop  referee
COCO               137     5     0        0
E-BARD             137     5     2       18
E-BARD + tiling    405    15     7       31

toward_goal and activity_near_goal — 0.35 of the scoring weight, dark since the first commit — can finally fire.

Caveat worth stating: that variable is global, so every project now uses the basketball model regardless of sport. Fine for one project; per-project model selection is the proper fix.

Verification

462 tests pass (2 new), lint and typecheck clean.

"It hasn't really detected anybody" cannot be answered with track counts, and
the question underneath it — is the thing being followed actually my child? —
cannot be answered with them either. Both take a second once the boxes are
drawn on the video.

Each moment's player now carries a canvas overlay fed by a tracks endpoint
scoped to that moment's window. Drawn client-side from data rather than burned
into a re-encoded video: nothing to render, nothing to wait for, and the focal
athlete can be drawn differently from everyone else — bright and thick, while
the other players stay deliberately quiet at 45% opacity. Ball, hoop and
referee get their own colours and labels.

Boxes are stored in source pixels and the player shows a 540p proxy, so
everything scales against the frame size the server reports rather than
whatever the element happens to be sized at.

It also says in words what the boxes show: "12 tracked here, 1 is your
athlete, no ball seen" is a diagnosis, where "3755 tracks" was a number.

The player itself is no longer folded inside a <details>. That is twice now
that something necessary has been hidden behind a summary and gone unnoticed
for hours — the identify panel, then this. preload=none already means an
unwatched player costs nothing, so hiding it bought nothing and cost an
evening.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit c98181f into master Aug 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant