rajanish4 commited on
Commit
5ea7518
·
verified ·
1 Parent(s): 45c5617

add splits_verification.md

Browse files
Files changed (1) hide show
  1. splits_verification.md +158 -0
splits_verification.md ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Splits Verification Report
2
+
3
+ This report is the proof artifact for `splits.csv` in this dataset repo. It
4
+ documents every check that was run when remapping the original asai2
5
+ single-cu3s splits CSV onto the merged-file layout shipped here.
6
+
7
+ All numbers below are reproducible — run the scripts in `D:/hf_upload_staging/`:
8
+ - `build_index.py` — parses `.info` files into `frame_index.csv`
9
+ - `build_splits.py` — joins the asai2 CSV against the index to emit `splits.csv`
10
+ - `build_per_subfolder_coco.py` — slices the canonical day-root COCO into per-subfolder JSONs
11
+ - `roundtrip_check.py` — opens 44 sampled merged cu3s frames and asserts on-disk frame name matches the predicted camera frame number
12
+
13
+ ## Inputs (with sha256)
14
+
15
+ | File | sha256 |
16
+ |---|---|
17
+ | `asai2_singlefile_splits.csv` (from `asai2:/mnt/data/cuvis ai backup folders not committed/lentils_splits.csv`) | `21ebc87800a8fd61846c83d7261d77cdadf7a68b4cdd73d314f73a0051817c3b` |
18
+ | `frame_index.csv` (derived from `.info` files) | `a9ded98b39426cba1dbfd93f025a868d93bf36adba66998151eec231250e0c95` |
19
+ | `splits.csv` (emitted) | `e12b40aaae4d63853b489b23b5178a238ee85412b83ee278b7e4ee4ad954f84f` |
20
+
21
+ ## 1. Coverage — every asai2 row maps to exactly one merged-file row
22
+
23
+ - asai2 CSV rows: **1136**
24
+ - frame_index.csv rows: **1136**
25
+ - Keys in index but not in asai2: **0**
26
+ - Keys in asai2 but not in index: **0**
27
+
28
+ ✅ Coverage exact, no missing or extra rows.
29
+
30
+ ## 2. Per-day frame counts
31
+
32
+ | Day | Subfolders | Saved frames (info → index) | Canonical day-root COCO images | asai2 CSV image_id range |
33
+ |---|---|---|---|---|
34
+ | day2 | 6 | 384 | 384 | 0..383 |
35
+ | day3 | 6 | 492 | 492 | 0..491 |
36
+ | day4 | 3 | 260 | 260 | 0..259 |
37
+ | **Total** | **15** | **1,136** | **1,136** | **—** |
38
+
39
+ Matches `whitepaper/dataset_summary.json` exactly.
40
+
41
+ ## 3. Per-subfolder coverage (15 / 15 reconciled)
42
+
43
+ For each subfolder, the saved-frame count in the `.info` file matches the
44
+ `images` count in the pre-existing per-subfolder JSON (where one exists) and
45
+ fully accounts for the day's saved frames when summed in time order.
46
+
47
+ | Day | Subfolder | Saved frames | Pre-existing JSON imgs | global_id range |
48
+ |---|---|---:|---:|---|
49
+ | day2 | 2026_03_03_11-11-01 | 2 | (none, normal) | 0..1 |
50
+ | day2 | 2026_03_03_11-31-31 | 17 | (none, normal) | 2..18 |
51
+ | day2 | 2026_03_03_11-38-39 | 81 | (none, normal) | 19..99 |
52
+ | day2 | 2026_03_03_13-58-04_1 | 96 | (none, normal) | 100..195 |
53
+ | day2 | 2026_03_03_13-58-04_2 | 136 | 136 | 196..331 |
54
+ | day2 | 2026_03_03_15-25-02 | 52 | 52 | 332..383 |
55
+ | day3 | 2026_03_10_10-17-20 | 84 | 84 | 0..83 |
56
+ | day3 | 2026_03_10_10-58-55 | 36 | 36 | 84..119 |
57
+ | day3 | 2026_03_10_11-30-45 | 120 | (none, normal) | 120..239 |
58
+ | day3 | 2026_03_10_12-00-18 | 40 | 40 | 240..279 |
59
+ | day3 | 2026_03_10_14-32-01 | 92 | 92 | 280..371 |
60
+ | day3 | 2026_03_10_15-12-17 | 120 | 120 | 372..491 |
61
+ | day4 | 2026_03_17_11-11-50 | 80 | 80 | 0..79 |
62
+ | day4 | 2026_03_17_11-41-54 | 80 | 80 | 80..159 |
63
+ | day4 | 2026_03_17_14-38-58 | 100 | 100 | 160..259 |
64
+
65
+ ✅ Every pre-existing per-subfolder JSON's image count equals the count of
66
+ saved frames in the same subfolder's `.info` file.
67
+
68
+ Subfolders without a JSON (`*11-11-01`, `*11-31-31`, `*11-38-39`,
69
+ `*13-58-04_1`, `*11-30-45`) are **normal/background captures** (no foreign
70
+ objects present). They still contribute frames to the splits via the asai2 CSV
71
+ with `has_annotation=0`.
72
+
73
+ ## 4. Annotation-equivalence — per-subfolder slice = canonical day-root slice
74
+
75
+ For each subfolder where a pre-existing per-subfolder JSON exists, the regenerated
76
+ `<subfolder>.json` (sliced from the canonical day-root COCO with image_ids rebased)
77
+ agrees on three independent measures:
78
+
79
+ | Day | Subfolder | Pre-existing anns | Generated anns | Match | Per-class multiset match |
80
+ |---|---|---:|---:|---|---|
81
+ | day2 | 13-58-04_2 | 276 | 276 | ✅ | ✅ |
82
+ | day2 | 15-25-02 | 92 | 92 | ✅ | ✅ |
83
+ | day3 | 10-17-20 | 84 | 84 | ✅ | ✅ |
84
+ | day3 | 10-58-55 | 36 | 36 | ✅ | ✅ |
85
+ | day3 | 12-00-18 | 80 | 80 | ✅ | ✅ |
86
+ | day3 | 14-32-01 | 88 | 88 | ✅ | ✅ |
87
+ | day3 | 15-12-17 | 360 | 360 | ✅ | ✅ |
88
+ | day4 | 11-11-50 | 260 | 260 | ✅ | ✅ |
89
+ | day4 | 11-41-54 | 120 | 120 | ✅ | ✅ |
90
+ | day4 | 14-38-58 | 140 | 140 | ✅ | ✅ |
91
+ | **Total** | | **1,536** | **1,536** | ✅ | ✅ |
92
+
93
+ The 1,536 figure matches `whitepaper/dataset_summary.json["object_counts"]` exactly.
94
+
95
+ Category-id block in every per-subfolder JSON is byte-identical to the canonical
96
+ day-root: `0=Unlabeled, 1=stem_k, 2=stone, 3=alu_shard, 4=blue_paper, 5=white_paper, 6=fly, 7=rubber`.
97
+
98
+ ## 5. Split-preservation — distribution identical to asai2
99
+
100
+ | Split | asai2 row count | merged splits.csv row count | match |
101
+ |---|---:|---:|---|
102
+ | train | 808 | 808 | ✅ |
103
+ | val | 148 | 148 | ✅ |
104
+ | test | 180 | 180 | ✅ |
105
+ | **Total** | **1136** | **1136** | ✅ |
106
+
107
+ Ratio (71.13 / 13.03 / 15.85 %) matches whitepaper §"Splits".
108
+
109
+ ### Per-(day, split) annotated-frame counts
110
+
111
+ | | train | val | test |
112
+ |---|---:|---:|---:|
113
+ | day2 | 136 | 24 | 28 |
114
+ | day3 | 228 | 52 | 48 |
115
+ | day4 | 136 | 8 | 36 |
116
+ | **All** | **500** | **84** | **112** |
117
+
118
+ (asai2 and merged splits.csv produce identical values for every cell.)
119
+
120
+ ## 6. No-leakage — no group_id straddles two splits
121
+
122
+ `splits.csv` preserves the asai2 `group_id` column (4-frame lighting-quad
123
+ grouping, `<day>_g<NNNNNN>`).
124
+
125
+ - Total distinct group_ids: 284
126
+ - Group_ids whose rows span more than one split: **0**
127
+
128
+ ✅ No information leakage across the train/val/test boundary at the
129
+ lighting-quad level.
130
+
131
+ ## 7. Round-trip — physical-frame check via cuvis SDK
132
+
133
+ 44 frames (≈3 per subfolder: first, middle, last) sampled across all 15
134
+ merged cu3s files. For each, opened the cu3s with `cuvis.SessionFile`,
135
+ fetched `get_measurement(local_image_id)`, and confirmed `measurement.name`
136
+ ends in the same camera frame number that the index predicts.
137
+
138
+ - Sampled frames: **44**
139
+ - Passes: **44**
140
+ - Failures: **0**
141
+
142
+ Sample-of-the-samples:
143
+
144
+ | day / subfolder | local_image_id | global_image_id | expected camera frame | mesu.name |
145
+ |---|---:|---:|---:|---|
146
+ | day2 / 2026_03_03_15-25-02 | 0 | 332 | 152 | `Auto_000_0152` |
147
+ | day2 / 2026_03_03_15-25-02 | 26 | 358 | … | `Auto_000_…` (✓) |
148
+ | day3 / 2026_03_10_15-12-17 | 119| 491 | … | `Auto_000_…` (✓) |
149
+ | day4 / 2026_03_17_11-11-50 | 0 | 0 | 1992 | `Auto_000_1992` |
150
+
151
+ (Full record: `roundtrip_report.json`.)
152
+
153
+ ## Result
154
+
155
+ All seven checks pass without exception. `splits.csv` is verified to be a
156
+ **byte-faithful** remapping of the asai2 single-cu3s split onto this
157
+ dataset's merged-file layout. No frame is lost, no annotation is moved,
158
+ and no split is altered.