Sinjhin commited on
Commit
6e9a017
·
unverified ·
1 Parent(s): 09bce11
Files changed (2) hide show
  1. README.md +39 -11
  2. dataset_infos.json +453 -0
README.md CHANGED
@@ -48,7 +48,8 @@ configs:
48
  path: "meta-*.parquet"
49
  ---
50
 
51
- # NexusDataset (Temporal Multimodal Slices)
 
52
 
53
  This dataset is a multi-modal, hierarchical, temporal representation derived from `HuggingFaceFV/finevideo`. It is designed for streaming training where the primary unit is a 10 ms "slice" that aggregates upward into moments (100 ms), seconds (1 s), experiences (10 s), and minutes (60 s).
54
 
@@ -64,21 +65,47 @@ This is a working dataset and will be changing and getting more filled out as I
64
 
65
 
66
  ## Quickstart
67
- To stream by video with all modalities grouped together (slices, moments, seconds,
68
- experiences, minutes, frames, and meta), use the dataset script config:
69
-
70
- Each list is sorted by its per-level index for temporal order.
71
-
72
 
 
 
73
  ```python
 
74
  from datasets import load_dataset
75
 
76
- ds = load_dataset(
77
- "Ardea/NEXUS-temporal_hierarchical_multi-modal",
78
- "by_video",
79
- streaming=True,
80
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  ```
 
82
 
83
 
84
  ## Summary
@@ -210,6 +237,7 @@ Key fields:
210
  ## Streaming usage
211
 
212
  Slices are ordered by `(video_id, slice_idx)` in each shard, so you can stream them in order. Use `is_video_start` / `is_video_end` or `video_id` changes to detect boundaries.
 
213
 
214
  ```python
215
  from datasets import load_dataset
 
48
  path: "meta-*.parquet"
49
  ---
50
 
51
+ # NEXUS: Neural Evolution for eXtensible Universal Semantics Dataset
52
+ ### (Temporal Multimodal Slices)
53
 
54
  This dataset is a multi-modal, hierarchical, temporal representation derived from `HuggingFaceFV/finevideo`. It is designed for streaming training where the primary unit is a 10 ms "slice" that aggregates upward into moments (100 ms), seconds (1 s), experiences (10 s), and minutes (60 s).
55
 
 
65
 
66
 
67
  ## Quickstart
 
 
 
 
 
68
 
69
+ To stream by video with all modalities grouped together (slices, moments, seconds,
70
+ experiences, minutes, frames, and meta), we need a helper script:
71
  ```python
72
+ from itertools import groupby
73
  from datasets import load_dataset
74
 
75
+ DATASET = "Ardea/NEXUS-temporal_hierarchical_multi-modal"
76
+ TABLES = ["slices", "moments", "seconds", "experiences", "minutes", "frames"]
77
+
78
+ def group_by_video(rows):
79
+ for video_id, group in groupby(rows, key=lambda r: r["video_id"]):
80
+ yield video_id, list(group)
81
+
82
+ def stream_by_video():
83
+ table_iters = {
84
+ name: group_by_video(iter(load_dataset(DATASET, name, streaming=True)))
85
+ for name in TABLES
86
+ }
87
+ table_heads = {name: next(it, None) for name, it in table_iters.items()}
88
+ meta = load_dataset(DATASET, "meta", streaming=True)
89
+
90
+ for meta_row in meta:
91
+ video_id = meta_row["video_id"]
92
+ payload = {"video_id": video_id, "meta": meta_row}
93
+ for name, group_iter in table_iters.items():
94
+ head = table_heads[name]
95
+ while head and head[0] != video_id:
96
+ head = next(group_iter, None)
97
+ if head and head[0] == video_id:
98
+ payload[name] = head[1]
99
+ table_heads[name] = next(group_iter, None)
100
+ else:
101
+ payload[name] = []
102
+ table_heads[name] = head
103
+ yield payload
104
+
105
+ example = next(stream_by_video())
106
+ print(example["video_id"], len(example["slices"]), len(example["frames"]))
107
  ```
108
+ Each list is sorted by its per-level index for temporal order.
109
 
110
 
111
  ## Summary
 
237
  ## Streaming usage
238
 
239
  Slices are ordered by `(video_id, slice_idx)` in each shard, so you can stream them in order. Use `is_video_start` / `is_video_end` or `video_id` changes to detect boundaries.
240
+ For multi-modal by-video streaming, use the Quickstart snippet.
241
 
242
  ```python
243
  from datasets import load_dataset
dataset_infos.json ADDED
@@ -0,0 +1,453 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "slices": {
3
+ "features": {
4
+ "video_id": {
5
+ "dtype": "string",
6
+ "id": null,
7
+ "_type": "Value"
8
+ },
9
+ "slice_idx": {
10
+ "dtype": "int32",
11
+ "id": null,
12
+ "_type": "Value"
13
+ },
14
+ "start_ms": {
15
+ "dtype": "int64",
16
+ "id": null,
17
+ "_type": "Value"
18
+ },
19
+ "audio_l_pcm16": {
20
+ "dtype": "binary",
21
+ "id": null,
22
+ "_type": "Value"
23
+ },
24
+ "audio_r_pcm16": {
25
+ "dtype": "binary",
26
+ "id": null,
27
+ "_type": "Value"
28
+ },
29
+ "frame_idx": {
30
+ "dtype": "int64",
31
+ "id": null,
32
+ "_type": "Value"
33
+ },
34
+ "moment_idx": {
35
+ "dtype": "int32",
36
+ "id": null,
37
+ "_type": "Value"
38
+ },
39
+ "second_idx": {
40
+ "dtype": "int32",
41
+ "id": null,
42
+ "_type": "Value"
43
+ },
44
+ "experience_idx": {
45
+ "dtype": "int32",
46
+ "id": null,
47
+ "_type": "Value"
48
+ },
49
+ "minute_idx": {
50
+ "dtype": "int32",
51
+ "id": null,
52
+ "_type": "Value"
53
+ },
54
+ "text": {
55
+ "dtype": "string",
56
+ "id": null,
57
+ "_type": "Value"
58
+ },
59
+ "imu": {
60
+ "feature": {
61
+ "feature": {
62
+ "dtype": "float32",
63
+ "id": null,
64
+ "_type": "Value"
65
+ },
66
+ "length": -1,
67
+ "id": null,
68
+ "_type": "List"
69
+ },
70
+ "length": -1,
71
+ "id": null,
72
+ "_type": "List"
73
+ },
74
+ "gps": {
75
+ "feature": {
76
+ "dtype": "float64",
77
+ "id": null,
78
+ "_type": "Value"
79
+ },
80
+ "length": -1,
81
+ "id": null,
82
+ "_type": "List"
83
+ },
84
+ "temp": {
85
+ "dtype": "float32",
86
+ "id": null,
87
+ "_type": "Value"
88
+ },
89
+ "humidity": {
90
+ "dtype": "float32",
91
+ "id": null,
92
+ "_type": "Value"
93
+ },
94
+ "baro": {
95
+ "dtype": "float32",
96
+ "id": null,
97
+ "_type": "Value"
98
+ },
99
+ "lidar": {
100
+ "dtype": "string",
101
+ "id": null,
102
+ "_type": "Value"
103
+ },
104
+ "ranges": {
105
+ "feature": {
106
+ "dtype": "float32",
107
+ "id": null,
108
+ "_type": "Value"
109
+ },
110
+ "length": -1,
111
+ "id": null,
112
+ "_type": "List"
113
+ },
114
+ "screen": {
115
+ "dtype": "string",
116
+ "id": null,
117
+ "_type": "Value"
118
+ },
119
+ "data": {
120
+ "dtype": "string",
121
+ "id": null,
122
+ "_type": "Value"
123
+ },
124
+ "is_video_start": {
125
+ "dtype": "bool",
126
+ "id": null,
127
+ "_type": "Value"
128
+ },
129
+ "is_video_end": {
130
+ "dtype": "bool",
131
+ "id": null,
132
+ "_type": "Value"
133
+ }
134
+ },
135
+ "config_name": "slices"
136
+ },
137
+ "moments": {
138
+ "features": {
139
+ "video_id": {
140
+ "dtype": "string",
141
+ "id": null,
142
+ "_type": "Value"
143
+ },
144
+ "moment_idx": {
145
+ "dtype": "int32",
146
+ "id": null,
147
+ "_type": "Value"
148
+ },
149
+ "start_ms": {
150
+ "dtype": "int64",
151
+ "id": null,
152
+ "_type": "Value"
153
+ },
154
+ "end_ms": {
155
+ "dtype": "int64",
156
+ "id": null,
157
+ "_type": "Value"
158
+ },
159
+ "slice_start_idx": {
160
+ "dtype": "int32",
161
+ "id": null,
162
+ "_type": "Value"
163
+ },
164
+ "slice_end_idx": {
165
+ "dtype": "int32",
166
+ "id": null,
167
+ "_type": "Value"
168
+ },
169
+ "phoneme": {
170
+ "dtype": "string",
171
+ "id": null,
172
+ "_type": "Value"
173
+ }
174
+ },
175
+ "config_name": "moments"
176
+ },
177
+ "seconds": {
178
+ "features": {
179
+ "video_id": {
180
+ "dtype": "string",
181
+ "id": null,
182
+ "_type": "Value"
183
+ },
184
+ "second_idx": {
185
+ "dtype": "int32",
186
+ "id": null,
187
+ "_type": "Value"
188
+ },
189
+ "start_ms": {
190
+ "dtype": "int64",
191
+ "id": null,
192
+ "_type": "Value"
193
+ },
194
+ "end_ms": {
195
+ "dtype": "int64",
196
+ "id": null,
197
+ "_type": "Value"
198
+ },
199
+ "moment_start_idx": {
200
+ "dtype": "int32",
201
+ "id": null,
202
+ "_type": "Value"
203
+ },
204
+ "moment_end_idx": {
205
+ "dtype": "int32",
206
+ "id": null,
207
+ "_type": "Value"
208
+ },
209
+ "words": {
210
+ "feature": {
211
+ "dtype": "string",
212
+ "id": null,
213
+ "_type": "Value"
214
+ },
215
+ "length": -1,
216
+ "id": null,
217
+ "_type": "List"
218
+ }
219
+ },
220
+ "config_name": "seconds"
221
+ },
222
+ "experiences": {
223
+ "features": {
224
+ "video_id": {
225
+ "dtype": "string",
226
+ "id": null,
227
+ "_type": "Value"
228
+ },
229
+ "experience_idx": {
230
+ "dtype": "int32",
231
+ "id": null,
232
+ "_type": "Value"
233
+ },
234
+ "start_ms": {
235
+ "dtype": "int64",
236
+ "id": null,
237
+ "_type": "Value"
238
+ },
239
+ "end_ms": {
240
+ "dtype": "int64",
241
+ "id": null,
242
+ "_type": "Value"
243
+ },
244
+ "second_start_idx": {
245
+ "dtype": "int32",
246
+ "id": null,
247
+ "_type": "Value"
248
+ },
249
+ "second_end_idx": {
250
+ "dtype": "int32",
251
+ "id": null,
252
+ "_type": "Value"
253
+ },
254
+ "statements": {
255
+ "feature": {
256
+ "dtype": "string",
257
+ "id": null,
258
+ "_type": "Value"
259
+ },
260
+ "length": -1,
261
+ "id": null,
262
+ "_type": "List"
263
+ },
264
+ "gestures": {
265
+ "feature": {
266
+ "dtype": "string",
267
+ "id": null,
268
+ "_type": "Value"
269
+ },
270
+ "length": -1,
271
+ "id": null,
272
+ "_type": "List"
273
+ }
274
+ },
275
+ "config_name": "experiences"
276
+ },
277
+ "minutes": {
278
+ "features": {
279
+ "video_id": {
280
+ "dtype": "string",
281
+ "id": null,
282
+ "_type": "Value"
283
+ },
284
+ "minute_idx": {
285
+ "dtype": "int32",
286
+ "id": null,
287
+ "_type": "Value"
288
+ },
289
+ "start_ms": {
290
+ "dtype": "int64",
291
+ "id": null,
292
+ "_type": "Value"
293
+ },
294
+ "end_ms": {
295
+ "dtype": "int64",
296
+ "id": null,
297
+ "_type": "Value"
298
+ },
299
+ "experience_start_idx": {
300
+ "dtype": "int32",
301
+ "id": null,
302
+ "_type": "Value"
303
+ },
304
+ "experience_end_idx": {
305
+ "dtype": "int32",
306
+ "id": null,
307
+ "_type": "Value"
308
+ },
309
+ "actions": {
310
+ "feature": {
311
+ "dtype": "string",
312
+ "id": null,
313
+ "_type": "Value"
314
+ },
315
+ "length": -1,
316
+ "id": null,
317
+ "_type": "List"
318
+ }
319
+ },
320
+ "config_name": "minutes"
321
+ },
322
+ "frames": {
323
+ "features": {
324
+ "video_id": {
325
+ "dtype": "string",
326
+ "id": null,
327
+ "_type": "Value"
328
+ },
329
+ "frame_idx": {
330
+ "dtype": "int64",
331
+ "id": null,
332
+ "_type": "Value"
333
+ },
334
+ "frame_time_ms": {
335
+ "dtype": "int64",
336
+ "id": null,
337
+ "_type": "Value"
338
+ },
339
+ "image": {
340
+ "mode": null,
341
+ "decode": true,
342
+ "id": null,
343
+ "_type": "Image"
344
+ }
345
+ },
346
+ "config_name": "frames"
347
+ },
348
+ "meta": {
349
+ "features": {
350
+ "video_id": {
351
+ "dtype": "string",
352
+ "id": null,
353
+ "_type": "Value"
354
+ },
355
+ "duration_ms": {
356
+ "dtype": "int64",
357
+ "id": null,
358
+ "_type": "Value"
359
+ },
360
+ "content_fine_category": {
361
+ "dtype": "string",
362
+ "id": null,
363
+ "_type": "Value"
364
+ },
365
+ "content_metadata": {
366
+ "dtype": "string",
367
+ "id": null,
368
+ "_type": "Value"
369
+ },
370
+ "content_parent_category": {
371
+ "dtype": "string",
372
+ "id": null,
373
+ "_type": "Value"
374
+ },
375
+ "original_json_filename": {
376
+ "dtype": "string",
377
+ "id": null,
378
+ "_type": "Value"
379
+ },
380
+ "original_video_filename": {
381
+ "dtype": "string",
382
+ "id": null,
383
+ "_type": "Value"
384
+ },
385
+ "resolution": {
386
+ "dtype": "string",
387
+ "id": null,
388
+ "_type": "Value"
389
+ },
390
+ "text_to_speech_word_count": {
391
+ "dtype": "string",
392
+ "id": null,
393
+ "_type": "Value"
394
+ },
395
+ "youtube_age_limit": {
396
+ "dtype": "string",
397
+ "id": null,
398
+ "_type": "Value"
399
+ },
400
+ "youtube_categories": {
401
+ "dtype": "string",
402
+ "id": null,
403
+ "_type": "Value"
404
+ },
405
+ "youtube_channel": {
406
+ "dtype": "string",
407
+ "id": null,
408
+ "_type": "Value"
409
+ },
410
+ "youtube_channel_follower_count": {
411
+ "dtype": "string",
412
+ "id": null,
413
+ "_type": "Value"
414
+ },
415
+ "youtube_comment_count": {
416
+ "dtype": "string",
417
+ "id": null,
418
+ "_type": "Value"
419
+ },
420
+ "youtube_description": {
421
+ "dtype": "string",
422
+ "id": null,
423
+ "_type": "Value"
424
+ },
425
+ "youtube_like_count": {
426
+ "dtype": "string",
427
+ "id": null,
428
+ "_type": "Value"
429
+ },
430
+ "youtube_tags": {
431
+ "dtype": "string",
432
+ "id": null,
433
+ "_type": "Value"
434
+ },
435
+ "youtube_title": {
436
+ "dtype": "string",
437
+ "id": null,
438
+ "_type": "Value"
439
+ },
440
+ "youtube_upload_date": {
441
+ "dtype": "string",
442
+ "id": null,
443
+ "_type": "Value"
444
+ },
445
+ "youtube_view_count": {
446
+ "dtype": "string",
447
+ "id": null,
448
+ "_type": "Value"
449
+ }
450
+ },
451
+ "config_name": "meta"
452
+ }
453
+ }