EXCALORIO commited on
Commit
b429459
·
verified ·
1 Parent(s): e92dc26

ficha autocontenida: campos, parametros y errores

Browse files
Files changed (1) hide show
  1. README.md +97 -58
README.md CHANGED
@@ -10,48 +10,97 @@ tags:
10
  - video-understanding
11
  ---
12
 
13
- # FENCINGLY - what we extract from each fencing clip
14
 
15
- This repo holds the **derived, per-clip data** from a foil-fencing video corpus, plus the
16
- documentation that says **what each field means and how far it can be trusted**.
17
 
18
- The goal of the project is to learn who has **right of way** (priority for the touch) in a foil
19
- action. Foil is a weapon of convention: the valid touch is not simply the first to land, so the
20
- label cannot be read off the scoring lights alone.
21
 
22
- ## The one thing to read first
23
 
24
- Every field in this dataset ships with **its measured error**, and several capabilities are published
25
- as **not working**. That is deliberate. A pose tensor without its error is a promise; with its error
26
- it is data.
27
 
28
- | what | state |
 
 
 
 
29
  |---|---|
30
  | both fencers tracked, no intruders | **works** - median 100 % of frames with both, minimum 91 % |
31
- | always two poses (invented when missing) | **works** - 0 delivered frames without both |
32
- | provenance of every point (measured / invented / gap length) | **works** - and it is the part that cannot be recovered later |
33
- | movement events (march, retreat, lunge, halt, arm) | **works** - 90 % recall, confusion `march -> lunge` = 0 |
34
- | weapon hand | **works on a held-out set** - 1.000 over 19 fencers, 74 % coverage, rest flagged `uncertain` |
35
- | position along the piste, in metres | **partial** - the shape is signal, the **metric scale passes its physical control in only 2.6 % of clips** |
36
- | foil blade / threat cone | **partial** - the blade is actually seen in **3 %** of cones; 97 % carry an assumed direction |
37
- | right of way (the actual goal) | **does NOT work yet** - 69.7 % against **73.8 % for never answering** |
38
- | parry (the fencing parry) | **not implemented** - 0 annotated, and blade contact is not verifiable by eye in this material |
39
  | depth from `pointmap` | **discarded with measurements** - the free `foot y` orders depth better |
40
 
41
- ## What is in here
42
-
43
- | path | what |
44
- |---|---|
45
- | `docs/` | the documentation: what is extracted, the schema, the results and the guarantees |
46
- | `data/events/` | the **movement event series**, one row per event: 650 events over 22 clips |
47
- | `data/schema/` | the field-by-field schema of everything extracted per clip |
48
-
49
- ### The event series is the part built for training
50
-
51
- One row per **event**, not per frame. It is far lower-dimensional than raw poses and much easier to
52
- read, which is the point:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
  ```python
 
55
  ev = pd.read_csv("data/events/events.csv")
56
  ev.query("side == 1 and type == 'march' and index_of_type == 3")
57
  ```
@@ -59,40 +108,30 @@ ev.query("side == 1 and type == 'march' and index_of_type == 3")
59
  returns the third march of the right-hand fencer, with its start and end frame, its second, how many
60
  metres it covered and how long it took.
61
 
62
- Each row also carries **reliability flags**, and they matter more than the values: whether the clip
63
- has a metric scale at all, whether the pose behind the event was measured or interpolated, the gap
64
- length it came from, and whether that side is a real fencer.
65
-
66
- ## What is deliberately NOT in here
67
 
68
- **No frames, no crops, no video.** The source material shows **identifiable athletes in competition
69
- with visible faces**, and each clip is tied to a named bout via the on-screen scoreboard. Those stay
70
- in a private repo.
71
 
72
- **The 308 keypoints per frame are not published yet.** The schema is here, the values are not: they
73
- are derived from identifiable people, and publishing them is the project owner's call, not a
74
- technical consequence.
75
 
76
  ## Honest limits
77
 
78
- The figures come from **19 to 60 clips** depending on the measurement, **not** from the full corpus
79
- of 8,559. Ground truth for the weapon hand, the steps and blade contact **was built by eye inside
80
- this project**, not by an FIE referee, and it is kept in files so that it can be contradicted.
81
 
82
  One defect is open and recurrent: in about **6 % of clips the pipeline delivers the REFEREE as one of
83
- the two fencers**. Four detection routes were tried and **all four failed, each with its
84
- measurement** (uniform whiteness, mask held in hand, geometry, and movement behaviour). The referee's
85
- pose is perfectly good, so no pose-quality metric will ever flag it. Rows carry a `side_valid` flag,
86
- and it is a **lower bound**.
87
-
88
- The scoring lights are a **shortcut**, not a solution: a model reaches 64.96 % using only "the one
89
- who lights up second wins", and in the clips where that is false it falls **below chance**. And in
90
- one-light clips "whoever lights up wins" is right **96.19 %** of the time, so those clips teach
91
- nothing about right of way.
92
-
93
- ## Where the code is
94
 
95
- The extraction pipeline lives in the private repo, at [EXCALORIO/fencingly-extraccion](https://huggingface.co/datasets/EXCALORIO/fencingly-extraccion).
 
 
 
96
 
97
  ## Fencing terms
98
 
@@ -100,7 +139,7 @@ The extraction pipeline lives in the private repo, at [EXCALORIO/fencingly-extra
100
  |---|---|
101
  | **march** / **retreat** | a step forward / a step backward |
102
  | **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 |
103
- | **halt** | the fencer stops moving. **This is NOT a parry** |
104
  | **right of way** | which fencer has priority for the touch |
105
  | **valid target** | in foil, the torso. A **white light** means the tip landed **off-target** |
106
  | **on-guard** | the basic stance; the **front foot is on the same side as the weapon arm** |
 
10
  - video-understanding
11
  ---
12
 
13
+ # FENCINGLY - what we extract from each fencing clip, and how far it can be trusted
14
 
15
+ This is the **public** side of the project: the derived per-clip data that will be used for training,
16
+ and the specification of every field in it.
17
 
18
+ The goal is to learn who has **right of way** in a foil action. Foil is a weapon of convention: the
19
+ valid touch is not simply the first to land, so the label cannot be read off the scoring lights.
 
20
 
21
+ The extraction code lives in a private repo: [`EXCALORIO/fencingly-extraccion`](https://huggingface.co/datasets/EXCALORIO/fencingly-extraccion).
22
 
23
+ ## Read this first
 
 
24
 
25
+ Every field ships with **its measured error**, and several capabilities are published as **not
26
+ working**. That is deliberate. A pose tensor without its error is a promise; with its error it is
27
+ data.
28
+
29
+ | capability | state |
30
  |---|---|
31
  | both fencers tracked, no intruders | **works** - median 100 % of frames with both, minimum 91 % |
32
+ | always two poses, invented when missing | **works** - 0 delivered frames without both |
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, 74 % coverage |
36
+ | position along the piste | **partial** - shape is signal, **metric scale passes its control in 2.6 % of clips** |
37
+ | foil blade and threat cone | **partial** - the blade is actually seen in **3 %** of cones |
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 |
41
 
42
+ ## Scale of the data
43
+
44
+ | | |
45
+ |---|---:|
46
+ | clips in the corpus | 8,559 |
47
+ | clips with 308-point poses today | **39** |
48
+ | movement events published | **650** over 22 clips |
49
+ | frames per clip, median | 307 |
50
+ | resolution | 81 % at 1280x720, 18 % at 1920x1080 |
51
+
52
+ ## The fields, one by one
53
+
54
+ ### Per-clip poses - `poses_<clip>.npz`
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 | unit | measured error |
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 falling outside their own person's box are zeroed: there were **10,140** of them, and they sat on the other person |
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 over 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 |
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 belongs to a track never seen whole |
65
+ | `Be` | `(316, 2, 4)` | ESTIMATED box: where the fencer should be when missing | fraction of frame | used to search a crop; its own error has not been measured separately |
66
+ | `pres` | `(316, 2)` | whether that fencer's pose in that frame is MEASURED | bool | **0** delivered frames without both fencers, over 28 clips |
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` | `()` | how many measured poses were dropped for coming out empty | count | a pose with fewer than **20 useful body points out of 63** cannot serve as an anchor |
69
+ | `filtro_fuera_de_caja` | `-` | keypoints zeroed for falling outside their own box | count | **10,140** over 28 clips |
70
+ | `recortados_por_pose` | `-` | frames trimmed from the ends for not having both poses | count | **80** over 22 clips, which leaves **0 held poses** |
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
+ ### Movement events - `data/events/events.csv`
76
+
77
+ One row per **event**, not per frame: 650 events over 22 clips, 49 columns. This is the low-dimensional series built for training.
78
+
79
+ | column | what it is | unit | measured error |
80
+ |---|---|---|---|
81
+ | `type` | march, retreat, lunge, halt, arm, action, jump | category | confusion matrix against gestures annotated by eye: **5 of 6**, with **`march -> lunge` = 0**. `jump` ships with **0 events**: not detectable, and a ballistic assertion enforces it |
82
+ | `index_of_type` | the event's number within its type and side | count | 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** |
83
+ | `frame_start / frame_end` | when the event starts and ends | frame | 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 |
84
+ | `magnitude_m` | how far the fencer moved | m | 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 |
85
+ | `x_start_m` | position along the piste | m from the centre line | per-frame tremor p95 **0.025 m**, against 0.13-0.20 m/frame for a real lunge. Convention: **x increases towards image right** |
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
  ```python
103
+ import pandas as pd
104
  ev = pd.read_csv("data/events/events.csv")
105
  ev.query("side == 1 and type == 'march' and index_of_type == 3")
106
  ```
 
108
  returns the third march of the right-hand fencer, with its start and end frame, its second, how many
109
  metres it covered and how long it took.
110
 
111
+ ## What is deliberately NOT here
 
 
 
 
112
 
113
+ **No frames, no crops, no video.** The source shows **identifiable athletes in competition with
114
+ visible faces**, and each clip is tied to a named bout through the on-screen scoreboard.
 
115
 
116
+ **The 308 keypoints are not published yet.** The schema is above, the values are not: they are derived
117
+ from identifiable people, and publishing them is the project owner's call, not a technical
118
+ consequence.
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
  One defect is open and recurrent: in about **6 % of clips the pipeline delivers the REFEREE as one of
127
+ the two fencers**. Four routes were tried and **all four failed with measurements** (uniform
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
+ The scoring lights are a **shortcut, not a solution**: a model reaches 64.96 % using only "whoever
132
+ lights up second wins", and in the clips where that is false it falls **below chance**. In one-light
133
+ clips "whoever lights up wins" is right **96.19 %** of the time, so those clips teach nothing about
134
+ right of way.
135
 
136
  ## Fencing terms
137
 
 
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 NOT a parry**, and the parry is not implemented |
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** |