ficha: que se extrae, con que precision, y los videos
Browse files
README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
---
|
| 2 |
license: other
|
| 3 |
-
pretty_name: FENCINGLY -
|
| 4 |
language:
|
| 5 |
- en
|
| 6 |
tags:
|
|
@@ -8,33 +8,276 @@ tags:
|
|
| 8 |
- fencing
|
| 9 |
- pose-estimation
|
| 10 |
- video-understanding
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
-
# FENCINGLY - what we extract from
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
|
|
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
|
|
|
| 20 |
|
| 21 |
-
|
| 22 |
|
| 23 |
-
##
|
| 24 |
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
| capability | state |
|
| 30 |
|---|---|
|
| 31 |
-
| both fencers tracked, no intruders | **works** - median 100 % of frames
|
| 32 |
-
| always two poses, invented
|
| 33 |
| provenance of every point | **works** - and it is the part that cannot be recovered later |
|
|
|
|
| 34 |
| movement events | **works** - 90 % recall, `march -> lunge` confusion = 0 |
|
| 35 |
-
| weapon hand | **works on a held-out set** - 1.000 over 19 fencers
|
| 36 |
-
|
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
| **right of way** (the goal) | **does NOT work** - 69.7 % against **73.8 % for never answering** |
|
| 39 |
| parry | **not implemented** - 0 annotated, blade contact not verifiable by eye here |
|
| 40 |
| depth from `pointmap` | **discarded with measurements** - the free `foot y` orders depth better |
|
|
@@ -45,101 +288,116 @@ data.
|
|
| 45 |
|---|---:|
|
| 46 |
| clips in the corpus | 8,559 |
|
| 47 |
| clips with 308-point poses today | **39** |
|
| 48 |
-
| movement events
|
| 49 |
| frames per clip, median | 307 |
|
| 50 |
-
| resolution | 81 % at 1280x720, 18 % at 1920x1080 |
|
|
|
|
| 51 |
|
| 52 |
-
## The
|
| 53 |
|
| 54 |
-
###
|
| 55 |
|
| 56 |
-
`T` is the number of frames; the 2 is the two fencers, side 0 on the image left and side 1 on the right.
|
| 57 |
|
| 58 |
-
| field | shape | what it is |
|
| 59 |
|---|---|---|---|---|
|
| 60 |
-
| `KP` | `(316, 2, 308, 2)` | the 308 body keypoints of both fencers, in pixels | px | **2.26 px** torso error from running the pose at 384x288 instead of 1024 (7.8x cheaper). **96.0 %** of delivered poses are MEASURED |
|
| 61 |
-
| `SC` | `(316, 2, 308)` | per-keypoint confidence | 0-1 | used with a 0.3 threshold. Points
|
| 62 |
-
| `origen` | `(316, 2)` | how the pose was obtained: 0 measured, 1 interpolated, 2 held, -1 none | code | **0 held poses**. Without this field the data cannot be weighted, and it **cannot be recovered later** |
|
| 63 |
-
| `hueco` | `(316, 2)` | length in frames of the gap an invented pose comes from | frames | interpolating
|
| 64 |
-
| `B` | `(316, 2, 4)` | each fencer's box, normalised 0-1, xyxy | fraction of frame | no delivered frame jumps more than **0.60 box widths** (worst measured 0.563). No box is a border sliver, and no box
|
| 65 |
-
| `Be` | `(316, 2, 4)` | ESTIMATED box: where the fencer should be
|
| 66 |
-
| `pres` | `(316, 2)` | whether that fencer's pose in that frame is MEASURED | bool | **0** delivered frames without both fencers,
|
| 67 |
-
| `mask` | `(316,)` | usable frames: close-ups, replays and cross-fades removed | bool | a cross-fade is told from a zoom by the residual relative to contrast: **0.219 vs 0.062** |
|
| 68 |
-
| `filtro_vacias` | `()
|
| 69 |
-
| `filtro_fuera_de_caja` | `
|
| 70 |
-
| `recortados_por_pose` | `
|
| 71 |
-
| `W` | `()` | video width | px | **81 %** of the corpus is 1280x720 |
|
| 72 |
-
| `H` | `()` | video height | px | 18 % is 1920x1080, 0.8 % is 854x480 |
|
| 73 |
-
| `T` | `()` | frames in the clip | frames | median **307**. The previous pipeline stored a **129-frame window**, not the whole clip |
|
| 74 |
-
|
| 75 |
-
###
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
| column | what it is | unit | measured error |
|
| 80 |
|---|---|---|---|
|
| 81 |
-
| `
|
| 82 |
-
| `
|
| 83 |
-
| `
|
| 84 |
-
| `
|
| 85 |
-
| `
|
| 86 |
-
| `y_start_m` | position across the piste width | m | the **shape** is signal (excursion is **9 to 77 times** the noise) but the **scale is wrong**: the physical control passes 14 of 22 |
|
| 87 |
-
| `no_homography` | whether this clip has no metric scale at all | bool | **6 in 10 clips** have none. When true, the metric fields come out **None, not zero** |
|
| 88 |
-
| `action_route` | whether action was measured in metres or in box heights | category | both routes agree on the weapon-hand gate: 8 of 8 and 11 of 11 |
|
| 89 |
-
| `arbitrated` | whether two overlapping types had to be decided between | bool | overlaps between different types went from **73 to 0**, with an assertion |
|
| 90 |
-
| `razon_pie_atras` | rear-foot displacement over front-foot displacement | ratio | **the** march/lunge discriminator: boundary 0.45, measured in the extension phase and not over the whole window |
|
| 91 |
-
| `worst_pose_provenance` | the worst pose provenance used by the event | code | an event resting on an interpolated pose is weaker, and here you can see it |
|
| 92 |
-
| `gap_beyond_measured` | whether the event uses a pose from a gap longer than 24 frames | bool | flags data whose error is not verifiable |
|
| 93 |
-
| `side_valid` | whether that side is actually a fencer | bool | in **6.1 %** of clips the delivered side is the **REFEREE**, and **all four** detection routes tried have failed. This flag is a **lower bound** |
|
| 94 |
-
| `weapon_hand` | which hand holds the weapon | A/B | **1.000 accuracy with 19 of 19 coverage** on a held-out set that played no part in choosing the rule. What cannot be decided is flagged `uncertain` |
|
| 95 |
-
| `scale_passes_control` | whether the clip's metric scale passes the physical control | bool | **2.6 %** of clips, counted per fencer |
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
## How the results land here
|
| 99 |
-
|
| 100 |
-
Clip results are uploaded in **batches of 500** under `data/`. Nothing else lives in this repo.
|
| 101 |
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
-
|
| 109 |
-
metres it covered and how long it took.
|
| 110 |
|
| 111 |
-
|
|
|
|
|
|
|
|
|
|
| 112 |
|
| 113 |
-
|
| 114 |
-
|
|
|
|
|
|
|
| 115 |
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
|
| 120 |
## Honest limits
|
| 121 |
|
| 122 |
Figures come from **19 to 60 clips** depending on the measurement, **not** from the full corpus.
|
| 123 |
-
Ground truth for the weapon hand, the steps and blade contact **was built by eye inside this
|
| 124 |
-
project**, not by an FIE referee, and is kept in files so it can be contradicted.
|
| 125 |
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
whiteness, mask held in hand, geometry, movement behaviour). The referee's pose is perfectly good, so
|
| 129 |
-
no pose-quality metric will ever flag it.
|
| 130 |
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
right of way.
|
| 135 |
|
| 136 |
## Fencing terms
|
| 137 |
|
| 138 |
| term | meaning |
|
| 139 |
|---|---|
|
| 140 |
| **march** / **retreat** | a step forward / a step backward |
|
| 141 |
-
| **lunge** | the explosive attack: the front foot flies and **the rear foot stays planted**. That binary property, not the distance, separates it from a march |
|
| 142 |
-
| **halt** | the fencer stops moving. **This is
|
| 143 |
| **right of way** | which fencer has priority for the touch |
|
| 144 |
| **valid target** | in foil, the torso. A **white light** means the tip landed **off-target** |
|
| 145 |
| **on-guard** | the basic stance; the **front foot is on the same side as the weapon arm** |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: other
|
| 3 |
+
pretty_name: FENCINGLY - what we extract from a fencing clip
|
| 4 |
language:
|
| 5 |
- en
|
| 6 |
tags:
|
|
|
|
| 8 |
- fencing
|
| 9 |
- pose-estimation
|
| 10 |
- video-understanding
|
| 11 |
+
viewer: false
|
| 12 |
---
|
| 13 |
|
| 14 |
+
# FENCINGLY - what we extract from a fencing clip
|
| 15 |
|
| 16 |
+
We are trying to learn **who has right of way** in a foil action. Foil is a weapon of *convention*:
|
| 17 |
+
the valid touch is not simply the first one to land, so the answer **cannot be read off the scoring
|
| 18 |
+
lights**. That is the whole reason this project exists.
|
| 19 |
|
| 20 |
+
This repo is the public side: **what we extract from each clip, what it is worth, and the videos that
|
| 21 |
+
show it**. The extraction pipeline itself lives in a private repo (`EXCALORIO/fencingly-extraccion`, access on request) - a link
|
| 22 |
+
would 404 for everyone, so it is written out rather than linked.
|
| 23 |
|
| 24 |
+
## Credit and thanks
|
| 25 |
|
| 26 |
+
### The clips come from FencingDatabase - **https://fencingdatabase.com/**
|
| 27 |
|
| 28 |
+
**Thank you to the [FencingDatabase](https://fencingdatabase.com/) team for letting us use their
|
| 29 |
+
clips.** Without that corpus none of what follows exists: it is the only place where thousands of
|
| 30 |
+
foil touches are collected, cut and searchable, and building it from scratch was never an option for
|
| 31 |
+
us. If you work on fencing video, start there: **[fencingdatabase.com](https://fencingdatabase.com/)**.
|
| 32 |
+
|
| 33 |
+
**Nothing in this repo is broadcast footage.** Every video and every image here is model output drawn
|
| 34 |
+
on a black background: skeletons, masks, normals, alphas, cones. The source frames stay private,
|
| 35 |
+
because they show identifiable athletes in competition.
|
| 36 |
+
|
| 37 |
+
## See it first
|
| 38 |
+
|
| 39 |
+
Six panels, one per layer, all from one frame of one clip and all generated by us:
|
| 40 |
+
|
| 41 |
+
| panel | what you are looking at |
|
| 42 |
+
|---|---|
|
| 43 |
+
| **1 POSE** | the 308 keypoints of both fencers. Green = side 0, orange = side 1, red = a person the detector found and we **did not** select |
|
| 44 |
+
| **2 SEG** | body-part segmentation, after cleaning. Everything outside the two fencers is black |
|
| 45 |
+
| **3 NORMAL** | surface normals, one axis per colour channel |
|
| 46 |
+
| **4 MATTING** | the alpha, the soft silhouette |
|
| 47 |
+
| **5 POINTMAP** | the model's depth-like channel, labelled with why we **do not** use it |
|
| 48 |
+
| **6 FOIL** | the blade search: alpha in log scale, the detected line, the threat cone, and the same cone **turned 90 degrees** as a control |
|
| 49 |
+
|
| 50 |
+

|
| 51 |
+
**ZanyMeagerIndianrockpython** - [full-resolution MP4](media/extracted_layers_ZanyMeagerIndianrockpython.mp4)
|
| 52 |
+
|
| 53 |
+

|
| 54 |
+
**ImpeccablePertinentBasilisk** - [full-resolution MP4](media/extracted_layers_ImpeccablePertinentBasilisk.mp4)
|
| 55 |
+
|
| 56 |
+

|
| 57 |
+
**AromaticShockedGermanspitz** - [full-resolution MP4](media/extracted_layers_AromaticShockedGermanspitz.mp4)
|
| 58 |
+
|
| 59 |
+
More of the same, full resolution: [AliveIgnorantBarebirdbat](media/extracted_layers_AliveIgnorantBarebirdbat.mp4) | [GentleQuerulousElephantseal](media/extracted_layers_GentleQuerulousElephantseal.mp4) | [LavishDistantDikkops](media/extracted_layers_LavishDistantDikkops.mp4)
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
The looping previews above are there to show **what moves**. They are GIFs, so they lose colour and
|
| 63 |
+
frames: to **read the numbers** use the full-resolution stills below, or the MP4 links.
|
| 64 |
+
|
| 65 |
+
### Just the poses, at full resolution
|
| 66 |
+
|
| 67 |
+

|
| 68 |
+

|
| 69 |
+

|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
### Just the foil: the blade and the threat cone
|
| 73 |
+
|
| 74 |
+
The green or orange wedge is the cone. The grey wedge is **the same cone rotated 90 degrees**, which
|
| 75 |
+
is the control: if the cone in its real place does not catch more blade pixels than the rotated one,
|
| 76 |
+
the detection has nothing to do with the arm.
|
| 77 |
+
|
| 78 |
+

|
| 79 |
+

|
| 80 |
+

|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
### Which hand holds the weapon
|
| 84 |
+
|
| 85 |
+

|
| 86 |
+
|
| 87 |
+
## What we extract, thing by thing
|
| 88 |
+
|
| 89 |
+
### The pair of fencers
|
| 90 |
+
|
| 91 |
+
A clip is broadcast: it has replays, close-ups, cross-fades, and there are always more people in
|
| 92 |
+
frame than the two fencers. Selecting the pair is its own problem.
|
| 93 |
+
|
| 94 |
+
- both fencers tracked with **no intruders**: median **100 %** of frames, worst clip **91 %**
|
| 95 |
+
- a cross-fade is told apart from a zoom by residual against contrast: **0.219 vs 0.062**
|
| 96 |
+
- **0** delivered frames are missing either fencer, across 28 clips
|
| 97 |
+
- **open defect**: in about **6 % of clips one of the two "fencers" is the REFEREE.** Four
|
| 98 |
+
detection routes were tried and **all four failed, each with a number**: uniform whiteness (the
|
| 99 |
+
gold lame fires it; paired separation came out at -0.002, i.e. backwards), mask held in hand (a
|
| 100 |
+
darkness detector: fires on 469 of 3,386 patches while only 1 of 39 fencers holds a mask), geometry
|
| 101 |
+
(the referee passed all three gates **without touching them** - a referee walks beside the piste),
|
| 102 |
+
and movement behaviour (the referee scored **0.524** events/s, **above the p10 of real fencers**).
|
| 103 |
+
The referee's pose is perfectly good; what is wrong is **whose** it is, so no pose-quality metric
|
| 104 |
+
will ever flag it. Every row carries `side_valid`, and it is a lower bound.
|
| 105 |
+
|
| 106 |
+
### The poses: 308 keypoints, and their provenance
|
| 107 |
+
|
| 108 |
+
- **2.26 px** torso error from running the pose at 384x288 instead of 1024, which is **7.8x** cheaper
|
| 109 |
+
- **96.0 %** of delivered poses are measured; the rest are interpolated and **say so**
|
| 110 |
+
- **0 held poses**: a held pose is the same pose repeated, and it would look like a fencer standing
|
| 111 |
+
still
|
| 112 |
+
- **10,140** keypoints were landing outside their own person's box - on the other fencer - and are
|
| 113 |
+
now zeroed
|
| 114 |
+
- every point carries where it came from. That is the field that **cannot be recovered later**
|
| 115 |
+
|
| 116 |
+
### The five channels
|
| 117 |
+
|
| 118 |
+
For each fencer we keep `pose`, `seg`, `normal`, `matting` and `pointmap`. Referee leakage into the
|
| 119 |
+
cleaned mask measures **0.0000**. They are stored **per crop**, not per frame: the two masks cover
|
| 120 |
+
**4.6-4.8 %** of the frame, so full-frame storage would waste 21x.
|
| 121 |
+
|
| 122 |
+
Cost, measured over 50 clips: **17.3 s per clip** for detection and pairing (**83 %** of it is the
|
| 123 |
+
detector), plus **28 s per clip** for the four dense layers. Over the corpus that is **41 h** and
|
| 124 |
+
**67 h**.
|
| 125 |
+
|
| 126 |
+
### Which hand holds the weapon
|
| 127 |
+
|
| 128 |
+
The rule we adopted: **in the on-guard stance the front foot is on the same side as the weapon arm**
|
| 129 |
+
(FIE t.115.1). It is counter-intuitive and it is what works.
|
| 130 |
+
|
| 131 |
+
- **1.000 accuracy over 19 of 19 fencers** on a held-out set that played no part in choosing the rule
|
| 132 |
+
- the previous rule, *the hand closest to the opponent*, scored **0.741** - wrong one time in four
|
| 133 |
+
- the glove was tried and **failed**: the whiteness feature reads the **sleeve** (pearson 0.681), and
|
| 134 |
+
dark gloves exist. Paired separation **-0.002**
|
| 135 |
+
- what cannot be decided is flagged `uncertain` rather than guessed
|
| 136 |
+
|
| 137 |
+
### The foil: blade and threat cone
|
| 138 |
+
|
| 139 |
+
- the cone is **1.10 m** long, the length of a real foil plus the arm, and its semi-angle **25.4 deg**
|
| 140 |
+
is the **p90 of the measured** |blade angle - forearm angle| at 1080p, not a number chosen to look
|
| 141 |
+
good
|
| 142 |
+
- its axis is the **forearm**, `elbow -> hand root`. Using the hand axis instead put the cone more
|
| 143 |
+
than 40 deg off in **63.6 %** of frames; the forearm brings that to **15.7 %**
|
| 144 |
+
- the thumb axis was tried as the blade direction and **failed**: lever arm of 2.4-4.8 px, jumps over
|
| 145 |
+
40 deg in 10-26 % of frames, against 0.9-2.1 deg for the forearm
|
| 146 |
+
- **honest limit, broken down instead of pooled**: the blade line is actually found in **42.6 %** of
|
| 147 |
+
crops at 1920x1080 and in **1.6 %** at 1280x720 - and **81 %** of the corpus is 720p. So most of
|
| 148 |
+
the time the cone is a **geometric prior, not a detection**, and a single pooled percentage would
|
| 149 |
+
hide which clips it is true for
|
| 150 |
+
- the control that makes any of this meaningful is drawn in every foil panel: the same cone **turned
|
| 151 |
+
90 degrees**, in grey. If the cone in its real place does not catch more blade pixels than the
|
| 152 |
+
rotated one, the detection has nothing to do with the arm. On
|
| 153 |
+
`ImpeccablePertinentBasilisk` frame 112 the two fencers come out at **87 % and 21 %** of blade
|
| 154 |
+
pixels inside the real cone, against **0 %** for both rotated controls - so the cone is real, and
|
| 155 |
+
it is also **clearly better on one fencer than the other**. That asymmetry is left visible on
|
| 156 |
+
purpose rather than averaged away
|
| 157 |
+
- the threat test is **cone against cone**, not cone against torso
|
| 158 |
+
|
| 159 |
+
### The movement events
|
| 160 |
+
|
| 161 |
+
- march, retreat, lunge, halt, arm extension reach **90 % recall**, and the confusion that mattered,
|
| 162 |
+
**march mistaken for lunge, is 0**. The discriminator is the **rear foot**: in a lunge the front
|
| 163 |
+
foot flies and the rear foot stays planted, and the ratio is measured **in the extension phase**,
|
| 164 |
+
not over the whole window
|
| 165 |
+
- overlaps between different event types went from **73 to 0**, enforced by an assertion
|
| 166 |
+
- detection lag **+0.5 frames (+17 ms)** over 62 pairings, with no bias
|
| 167 |
+
- `balestra` and `jump` ship with **0 events**. The balestra was killed by ballistics: the 8.5 cm of
|
| 168 |
+
rise it needs would require **7.9 frames of flight**, and the candidate events lasted one
|
| 169 |
+
|
| 170 |
+
### The piste: where each fencer is, in metres
|
| 171 |
+
|
| 172 |
+
This was rebuilt from scratch, because the first version had a defect worth stating plainly: **the
|
| 173 |
+
origin was a convention, not a measurement**, so fencers appeared to start near the centre line when
|
| 174 |
+
they do not. It now rests only on what the **rulebook** fixes, which is what makes it independent of
|
| 175 |
+
the piste model.
|
| 176 |
+
|
| 177 |
+

|
| 178 |
+
**ForcefulAntiqueAlbacoretuna** - [MP4](media/trace_ForcefulAntiqueAlbacoretuna_public.mp4)
|
| 179 |
+
|
| 180 |
+
**ForcefulAntiqueAlbacoretuna** at quarter speed - [MP4](media/trace_ForcefulAntiqueAlbacoretuna_slow_public.mp4)
|
| 181 |
+
|
| 182 |
+

|
| 183 |
+
**UglyNiceAplomadofalcon** - [MP4](media/trace_UglyNiceAplomadofalcon_public.mp4)
|
| 184 |
+
|
| 185 |
+
**UglyNiceAplomadofalcon** at quarter speed - [MP4](media/trace_UglyNiceAplomadofalcon_slow_public.mp4)
|
| 186 |
+
|
| 187 |
+
Left: the 308-point skeleton over black, with each fencer's position in metres. Right: the trace - position along the piste against time, which is the racing-line view. Bottom: the piste from above, to scale, with the regulation lines and the events appearing as they happen. The counter is there so the count can be judged frame by frame rather than taken on trust.
|
| 188 |
+
|
| 189 |
+
|
| 190 |
+
**What is measured now**, each with its own denominator, never pooled:
|
| 191 |
+
|
| 192 |
+
| | value | out of |
|
| 193 |
+
|---|---:|---|
|
| 194 |
+
| rectified strip obtained (both edges) | **20** | 22 clips |
|
| 195 |
+
| **origin MEASURED** from the t.19 colour frontiers | **13** | 22 clips |
|
| 196 |
+
| of those, unambiguous | **11** | 22 clips |
|
| 197 |
+
| of those, with redundancy, i.e. **controlled** | **5** | 22 clips |
|
| 198 |
+
| both fencers land on the piste (\|x\| <= 7.5 m) | **11** | the 13 anchored clips |
|
| 199 |
+
| **held-out landmark prediction error** | **p50 5 cm, max 8 cm** | 5 clips |
|
| 200 |
+
| lateral travel <= 0.60 m (the physical control) | **11** | 40 fencer-clips |
|
| 201 |
+
| clips where **both** fencers pass that control | **3** | 22 clips |
|
| 202 |
+
| lateral travel p50 / p90 / max | **0.75 / 1.63 / 3.33 m** | 40 fencer-clips |
|
| 203 |
+
| foot contacts falling outside the piste | **p50 2.7 %, max 23 %** | 20 clips |
|
| 204 |
+
| fencers crossing each other (physical control) | **0** | 20 clips |
|
| 205 |
+
| extra lateral plank detected | **0** | 22 clips |
|
| 206 |
+
|
| 207 |
+
The **5 cm** row is the one that matters: fit the anchor with two landmarks, predict a **third one it
|
| 208 |
+
never saw**, and measure the miss. That is the independent control this part never had.
|
| 209 |
+
|
| 210 |
+
- **the origin is measured, the along-piste scale is not.** Three independent routes were tried and
|
| 211 |
+
**none passes its own control**: painted lines by separation ratios (fits 14 of 20 clips, ambiguous
|
| 212 |
+
in 10 of those 14, and off by 1.3-2.6x against the reference), square pixels from the two ground
|
| 213 |
+
vanishing directions (an exact camera solution that re-projects fencer heights of **0.4 to 4.9 m**),
|
| 214 |
+
and colour zones (13 of 22, only 5 controlled). There is a **geometric** reason it is not a matter
|
| 215 |
+
of tuning: two parallel lines with a known separation fix the scale **across** the piste everywhere
|
| 216 |
+
and say **nothing** about the scale **along** it. So the map is labelled *origin MEASURED, scale NOT
|
| 217 |
+
verified*, and it will stay that way until something else fixes the along axis
|
| 218 |
+
- **across** the piste is now metres between the two **detected** edges, bounded by construction. The
|
| 219 |
+
earlier version assigned each fencer a fixed lane, so the one on the right always appeared glued to
|
| 220 |
+
the right edge; that is gone
|
| 221 |
+
- the lateral coordinate is still **shape without scale**: travel of p50 **0.75 m** against a control
|
| 222 |
+
of **< 0.60 m**, and only **3 of 22 clips** have both fencers inside it. There is a physical reason:
|
| 223 |
+
across the piste is the camera's **depth** direction, and a foot in the air projects displaced
|
| 224 |
+
towards the background
|
| 225 |
+
- **there is more than one piste model, and here is the number**: of the 13 clips where the final zone
|
| 226 |
+
is identified, **8 are darker** than the piste and **5 are lighter**. A detector that looked for
|
| 227 |
+
grey would fail on more than a third of the corpus, so everything here detects a **colour change**
|
| 228 |
+
and never a colour
|
| 229 |
+
- where there is no scale, the metric fields come out **None, not zero**. Writing zero would claim the
|
| 230 |
+
fencer was standing on the centre line
|
| 231 |
+
|
| 232 |
+
### Depth: discarded, with the measurement
|
| 233 |
+
|
| 234 |
+
`pointmap` is kept as a channel but **not used**. It orders the two fencers in depth correctly in
|
| 235 |
+
**76 %** of frames - and the **y coordinate of the free foot**, which costs nothing, gets it right
|
| 236 |
+
**100 %** (28 of 28). Sapiens 1 depth scored **73.2 %**, below the free baseline. The 3D cone is
|
| 237 |
+
off for the same reason: negative Z in 11.4 % of one clip, implied field of view 21-144 deg where a
|
| 238 |
+
fencing camera uses 8-30, and the 11 places where 2D and 3D disagreed turned out to be **noise** -
|
| 239 |
+
permuting the depths at random reproduced them exactly.
|
| 240 |
+
|
| 241 |
+
### The scoring lights
|
| 242 |
+
|
| 243 |
+
Read per venue, because every scoreboard is different: **5 families** of scoreboard, and a per-venue
|
| 244 |
+
region of interest took detection from **71.4 % to 90.5 %**.
|
| 245 |
+
|
| 246 |
+
They are a **shortcut, not a solution**. A model reaches **64.96 %** using nothing but *whoever
|
| 247 |
+
lights up second wins*, and in the clips where that is false it falls **below chance**. In one-light
|
| 248 |
+
clips, *whoever lights up wins* is right **96.19 %** of the time - those clips teach nothing about
|
| 249 |
+
right of way. The audio beep was tried as a detector and **failed**: **50.6 %** of the corpus has no
|
| 250 |
+
audio track at all.
|
| 251 |
+
|
| 252 |
+
### Right of way - the goal, and it does not work yet
|
| 253 |
+
|
| 254 |
+
**69.7 % accuracy against 73.8 % for never answering at all**, and **9.1 %** on control clips. It
|
| 255 |
+
ships **off**, with the number next to the switch. This is the honest state of the thing the project
|
| 256 |
+
is for.
|
| 257 |
+
|
| 258 |
+
### Parry - not implemented
|
| 259 |
+
|
| 260 |
+
**0 parries annotated**, because blade contact turned out **not verifiable by eye** in this material:
|
| 261 |
+
of 16 blind plates, **zero** were decidable. Without ground truth there is nothing to measure against,
|
| 262 |
+
so there is nothing to ship.
|
| 263 |
+
|
| 264 |
+
## Where each capability stands
|
| 265 |
|
| 266 |
| capability | state |
|
| 267 |
|---|---|
|
| 268 |
+
| both fencers tracked, no intruders | **works** - median 100 % of frames, worst clip 91 % |
|
| 269 |
+
| always two poses, invented ones marked | **works** - 0 delivered frames without both |
|
| 270 |
| provenance of every point | **works** - and it is the part that cannot be recovered later |
|
| 271 |
+
| the five model channels | **works** - referee leakage 0.0000 |
|
| 272 |
| movement events | **works** - 90 % recall, `march -> lunge` confusion = 0 |
|
| 273 |
+
| weapon hand | **works on a held-out set** - 1.000 over 19 fencers |
|
| 274 |
+
| piste rectified from its two edges | **works** - 20 of 22 clips |
|
| 275 |
+
| **origin** on the piste, measured not assumed | **works where the colour frontiers are visible** - 13 of 22 clips, and a held-out landmark is predicted to **p50 5 cm, max 8 cm** |
|
| 276 |
+
| **scale along** the piste | **does NOT work** - three independent routes, none passes its own control, and there is a geometric reason |
|
| 277 |
+
| position **across** the piste | **partial** - metres between the detected edges, but the physical control passes in only 3 of 22 clips |
|
| 278 |
+
| foil blade and threat cone | **partial** - the blade is found in **42.6 %** of 1080p crops but **1.6 %** at 720p, and 81 % of the corpus is 720p |
|
| 279 |
+
| scoring lights | **works** - 90.5 % with a per-venue region of interest |
|
| 280 |
+
| referee told apart from a fencer | **does NOT work** - ~6 % of clips, four routes failed |
|
| 281 |
| **right of way** (the goal) | **does NOT work** - 69.7 % against **73.8 % for never answering** |
|
| 282 |
| parry | **not implemented** - 0 annotated, blade contact not verifiable by eye here |
|
| 283 |
| depth from `pointmap` | **discarded with measurements** - the free `foot y` orders depth better |
|
|
|
|
| 288 |
|---|---:|
|
| 289 |
| clips in the corpus | 8,559 |
|
| 290 |
| clips with 308-point poses today | **39** |
|
| 291 |
+
| movement events extracted | **650** over 22 clips |
|
| 292 |
| frames per clip, median | 307 |
|
| 293 |
+
| resolution | 81 % at 1280x720, 18 % at 1920x1080, 0.8 % at 854x480 |
|
| 294 |
+
| generated videos in this repo | 10 |
|
| 295 |
|
| 296 |
+
## The data table
|
| 297 |
|
| 298 |
+
### 1 - What comes out per clip, and in what shape
|
| 299 |
|
| 300 |
+
`T` is the number of frames in the clip; the `2` is the two fencers, side 0 on the image left and side 1 on the image right.
|
| 301 |
|
| 302 |
+
| field | shape on disk | what it is | format | measured precision |
|
| 303 |
|---|---|---|---|---|
|
| 304 |
+
| `KP` | `(316, 2, 308, 2), in 38 of 39 files` | the 308 body keypoints of both fencers, in pixels | px, float32 | **2.26 px** torso error from running the pose at 384x288 instead of 1024 (7.8x cheaper). **96.0 %** of delivered poses are MEASURED, not filled in |
|
| 305 |
+
| `SC` | `(316, 2, 308), in 38 of 39 files` | per-keypoint confidence | 0-1, float32 | used with a 0.3 threshold. Points that fell outside their own person's box are zeroed: there were **10,140** of them and they sat on the other fencer |
|
| 306 |
+
| `origen` | `(316, 2), in 38 of 39 files` | how the pose was obtained: 0 measured, 1 interpolated, 2 held, -1 none | code, int8 | **0 held poses** in what is delivered. Without this field the data cannot be weighted, and it **cannot be recovered later** |
|
| 307 |
+
| `hueco` | `(316, 2), in 38 of 39 files` | length in frames of the gap an invented pose comes from | frames, int16 | interpolating across a gap of <= 24 frames costs **2.2 % of torso length** (p90 6.0 %). Beyond 24 frames **there is no measurement**, and that is **2.2 %** of what is delivered |
|
| 308 |
+
| `B` | `(316, 2, 4), in 38 of 39 files` | each fencer's box, normalised 0-1, xyxy | fraction of frame, float32 | no delivered frame jumps more than **0.60 box widths** (worst measured 0.563). No box is a border sliver, and no box comes from a track that was never seen whole |
|
| 309 |
+
| `Be` | `(316, 2, 4), in 38 of 39 files` | ESTIMATED box: where the fencer should be in a frame where the detector missed | fraction of frame, float32 | used only to aim a crop re-detection; its own error is not measured separately |
|
| 310 |
+
| `pres` | `(316, 2), in 38 of 39 files` | whether that fencer's pose in that frame is MEASURED | bool | **0** delivered frames without both fencers, across 28 clips |
|
| 311 |
+
| `mask` | `(316,), in 38 of 39 files` | usable frames: close-ups, replays and cross-fades removed | bool | a cross-fade is told from a zoom by the residual relative to contrast: **0.219 vs 0.062** |
|
| 312 |
+
| `filtro_vacias` | `(), in 38 of 39 files` | measured poses dropped for coming out empty | count, int32 | a pose with fewer than **20 useful body points out of 63** cannot serve as an anchor |
|
| 313 |
+
| `filtro_fuera_de_caja` | `(), in 21 of 39 files` | keypoints zeroed for falling outside their own box | count, int32 | **10,140** across 28 clips |
|
| 314 |
+
| `recortados_por_pose` | `(), in 21 of 39 files` | frames trimmed off the ends for not having both poses | count, int32 | **80** across 22 clips, which is what leaves **0 held poses** |
|
| 315 |
+
| `W` | `(), in 38 of 39 files` | video width | px, int | **81 %** of the corpus is 1280x720 |
|
| 316 |
+
| `H` | `(), in 38 of 39 files` | video height | px, int | 18 % is 1920x1080, 0.8 % is 854x480 |
|
| 317 |
+
| `T` | `(), in 38 of 39 files` | frames in the clip | frames, int | median **307**. The previous pipeline stored a **129-frame window**, not the whole clip |
|
| 318 |
+
|
| 319 |
+
### 2 - The five model channels we keep per fencer
|
| 320 |
+
|
| 321 |
+
| channel | what it is | format | why it is there, measured |
|
|
|
|
|
|
|
| 322 |
|---|---|---|---|
|
| 323 |
+
| `pose` | 308 keypoints per fencer | (T, 2, 308, 2) float32 + (T, 2, 308) confidence | the map is MEASURED, not read off a datasheet: 5-6 shoulders, 7-8 elbows, 9-10 hips, 11-12 knees, 13-14 ankles, 15-20 feet, 21-41 hand A, 42-62 hand B, 63+ face. **There is no wrist index: the wrist IS the hand root** |
|
| 324 |
+
| `seg` | body-part segmentation of each fencer | crop-sized uint8 class map | referee leakage into the mask measured **0.0000**. Stored per crop and not per frame because the two masks cover **4.6-4.8 %** of the frame: full-frame would waste 21x |
|
| 325 |
+
| `normal` | surface normals | crop-sized float16, 3 channels, NaN outside the mask | the dense layer that **does** hold up for local geometry. NaN and not 0 outside the mask, because the zero vector is not a unit normal but averages silently in a convolution |
|
| 326 |
+
| `matting` | alpha, the soft silhouette | crop-sized float16, 0 outside the mask | at very low alpha the **edge of the blade** appears, which is what the foil detector uses |
|
| 327 |
+
| `pointmap` | the model's 3D point map, z channel | crop-sized float16, NaN outside | **kept but not used**: see the depth row in the capability table |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 328 |
|
| 329 |
+
### 3 - The movement events: one row per event, not per frame
|
| 330 |
+
|
| 331 |
+
This is the low-dimensional series built for training: **650 events over 22 clips**. It is **not published in this repo** as a file - the schema below is the contract, and the rows ship in batches once the piste rework lands.
|
| 332 |
+
|
| 333 |
+
| column | what it is | format | measured precision |
|
| 334 |
+
|---|---|---|---|
|
| 335 |
+
| `clip / side` | which clip and which fencer (0 = image left, 1 = image right) | str / int | side 0/1 is an image convention, not left/right-handedness |
|
| 336 |
+
| `type` | march, retreat, lunge, halt, arm extension, action, jump | category | confusion matrix against gestures annotated by eye: **5 of 6**, with **`march -> lunge` = 0**. `jump` ships with **0 events**: not detectable here, and a ballistic assertion enforces it |
|
| 337 |
+
| `index_of_type` | the event's number within its own type and side | int | this is what makes *the third march of the right-hand fencer* a one-line query, and it is **the same number the video counter shows** |
|
| 338 |
+
| `frame_start / frame_end` | when the event starts and ends | frame, int | detection lag measured at **+0.5 frames (+17 ms)** over 62 pairings, with no bias. The **boundary error is still unmeasured**: that is what is being annotated now |
|
| 339 |
+
| `magnitude_m` | how far the fencer moved during the event | m, float | march p50 **0.346 m**, lunge p50 **0.565 m**. Depends on the piste scale, which passes its physical control in only **2.6 %** of clips |
|
| 340 |
+
| `x_start_m / x_end_m` | position along the piste | m from the centre line, float | the **origin is measured** from the t.19 colour frontiers in 13 of 22 clips, and a held-out landmark is predicted to **p50 5 cm**. The **scale** along the piste is **not verified**. Per-frame tremor p95 **0.025 m**, against 0.13-0.20 m/frame for a real lunge. Convention: **x grows towards image right** |
|
| 341 |
+
| `y_start_m` | position across the width of the piste | m, float | metres between the two **detected** edges, bounded by construction, so no fencer is pinned to an edge. But the physical control (travel <= 0.60 m) passes for **11 of 40 fencer-clips**, and in only **3 of 22 clips** do both fencers pass it |
|
| 342 |
+
| `no_homography` | whether this clip has no metric scale at all | bool | **6 in 10 clips** have none. When true the metric fields come out **None, not zero** |
|
| 343 |
+
| `razon_pie_atras` | rear-foot displacement over front-foot displacement | ratio, float | **the** march/lunge discriminator: boundary 0.45, measured in the extension phase and not over the whole window |
|
| 344 |
+
| `worst_pose_provenance` | the worst pose provenance any frame of the event rests on | code, int | an event resting on an interpolated pose is weaker, and here you can see it |
|
| 345 |
+
| `gap_beyond_measured` | whether the event uses a pose from a gap longer than 24 frames | bool | flags data whose error is **not** verifiable |
|
| 346 |
+
| `side_valid` | whether that side really is a fencer | bool | in **6.1 %** of clips the delivered side is the **REFEREE**, and **all four** detection routes tried have failed. This flag is a **lower bound** |
|
| 347 |
+
| `weapon_hand` | which hand holds the weapon: A (root 21) or B (root 42) | category | **1.000 accuracy over 19 of 19 fencers** of a held-out set that played no part in choosing the rule. What cannot be decided is flagged `uncertain` instead of guessed |
|
| 348 |
+
| `scale_passes_control` | whether this clip's metric scale passes the physical control | bool | **2.6 %** of clips, counted per fencer |
|
| 349 |
+
|
| 350 |
+
|
| 351 |
+
## This table **is** the training input
|
| 352 |
|
| 353 |
+
Everything above is the model's input. Not the video: **the series**.
|
|
|
|
| 354 |
|
| 355 |
+
Per clip and per fencer we hand the model the 308-point pose with its provenance, the five channels,
|
| 356 |
+
the position along the piste where there is a scale, and the movement events as a row each - with
|
| 357 |
+
their type, their index, their start and end frame, their magnitude in metres, and the flags that say
|
| 358 |
+
how far each one can be trusted. The label to learn is **right of way**.
|
| 359 |
|
| 360 |
+
Which is why every row in the table above carries its **precision** and not just its name. A field
|
| 361 |
+
without its error is a promise; a field with its error is data. Several rows are published as **not
|
| 362 |
+
usable yet**, and one - the referee - as a **known defect with a flag**, because a model trained on
|
| 363 |
+
data that hides its own defects learns the defects.
|
| 364 |
|
| 365 |
+
Where a number appears twice in this page with two different denominators, that is deliberate: some
|
| 366 |
+
controls count **clips** and some count **fencers**, and pooling them would invent a figure that was
|
| 367 |
+
never measured.
|
| 368 |
+
|
| 369 |
+
```python
|
| 370 |
+
ev.query("side == 1 and type == 'march' and index_of_type == 3")
|
| 371 |
+
```
|
| 372 |
+
|
| 373 |
+
returns the third march of the right-hand fencer: start frame, end frame, second, metres covered, how
|
| 374 |
+
long it took, and how much of it was measured rather than filled in.
|
| 375 |
|
| 376 |
## Honest limits
|
| 377 |
|
| 378 |
Figures come from **19 to 60 clips** depending on the measurement, **not** from the full corpus.
|
|
|
|
|
|
|
| 379 |
|
| 380 |
+
Ground truth for the weapon hand, for step counting and for blade contact **was built by eye inside
|
| 381 |
+
this project**, not by an FIE referee, and is kept in files so it can be contradicted.
|
|
|
|
|
|
|
| 382 |
|
| 383 |
+
Three results in this project fell apart when the sample grew - 15/15 became 22/23, a feature changed
|
| 384 |
+
sign on a bigger set, a dispersion went from 14.0 deg to 4.2 deg. That is why criteria here are
|
| 385 |
+
declared before measuring and samples are broken down by bout and by venue before being aggregated.
|
|
|
|
| 386 |
|
| 387 |
## Fencing terms
|
| 388 |
|
| 389 |
| term | meaning |
|
| 390 |
|---|---|
|
| 391 |
| **march** / **retreat** | a step forward / a step backward |
|
| 392 |
+
| **lunge** | the explosive attack: the front foot flies and **the rear foot stays planted**. That binary property, not the distance, is what separates it from a march |
|
| 393 |
+
| **halt** | the fencer stops moving. **This is not a parry**, and the parry is not implemented |
|
| 394 |
| **right of way** | which fencer has priority for the touch |
|
| 395 |
| **valid target** | in foil, the torso. A **white light** means the tip landed **off-target** |
|
| 396 |
| **on-guard** | the basic stance; the **front foot is on the same side as the weapon arm** |
|
| 397 |
+
| **lame** | the conductive jacket that makes a valid touch register |
|
| 398 |
+
|
| 399 |
+
---
|
| 400 |
+
|
| 401 |
+
Source clips: **[FencingDatabase](https://fencingdatabase.com/)** - thanks to their team.
|
| 402 |
+
|
| 403 |
+
Mirror of this page, same README and same videos: [github.com/EXCALOFRIO/FENCINGLY.AI](https://github.com/EXCALOFRIO/FENCINGLY.AI)
|