File size: 3,435 Bytes
3d613ee
 
3b61cbc
3d613ee
3b61cbc
3d613ee
3b61cbc
 
 
 
3d613ee
3b61cbc
 
 
 
 
3d613ee
 
 
 
 
 
 
 
 
 
 
3b61cbc
3d613ee
3b61cbc
3d613ee
3b61cbc
3d613ee
 
 
 
 
3b61cbc
3d613ee
 
 
 
 
 
 
 
 
3b61cbc
3d613ee
 
 
 
 
3b61cbc
 
3d613ee
3b61cbc
3d613ee
3b61cbc
 
 
3d613ee
3b61cbc
3d613ee
3b61cbc
 
 
 
 
3d613ee
3b61cbc
 
 
 
3d613ee
3b61cbc
3d613ee
3b61cbc
 
 
3d613ee
3b61cbc
 
 
3d613ee
 
3b61cbc
 
 
3d613ee
3b61cbc
d6582a4
3b61cbc
 
 
 
 
 
d6582a4
3b61cbc
d6582a4
3b61cbc
d6582a4
3b61cbc
 
d6582a4
3b61cbc
 
 
 
d6582a4
3b61cbc
 
 
 
 
d6582a4
3b61cbc
d6582a4
 
3b61cbc
d6582a4
3b61cbc
d6582a4
3b61cbc
 
d6582a4
3b61cbc
 
 
d6582a4
 
3b61cbc
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# EventActivityNet Dataset Format

## Representations

EventActivityNet stores one HDF5 file per video for each supported bin count.

| Bin count `B` | Public payload | Event shape |
|---:|---|---|
| 5 | `data_5bin/` | `(T5, 5, H, W)` |
| 9 | `data_9bin/` | `(T9, 9, H, W)` |

File size varies substantially with duration and spatial resolution.

## HDF5 Schema

Every HDF5 file has exactly these root datasets:

```text
events
voxel_event_start
voxel_event_count
```

### `events`

| Property | Value |
|---|---|
| Shape | `(T_B, B, H, W)` |
| Dtype | `int16` |
| Compression | gzip, level 4 |
| Shuffle | enabled |
| Chunking | `(1, B, min(H, 256), min(W, 256))` |

### `voxel_event_start`

| Property | Value |
|---|---|
| Shape | `(T_B,)` |
| Dtype | `int64` |
| Compression | LZF |
| Shuffle | enabled |
| Chunking | `(1024,)` |

### `voxel_event_count`

| Property | Value |
|---|---|
| Shape | `(T_B,)` |
| Dtype | `int32` |
| Compression | LZF |
| Shuffle | enabled |
| Chunking | `(1024,)` |

Required root attributes are `fps`, `height`, `width`, `num_bins`, and
`interpolate_bins`. `num_bins` is 5 or 9 and matches `events.shape[1]`.

## Transition Grouping

Construction follows decoded frame order. For `N` source frames there are
`N - 1` adjacent-frame transitions. Transition index `e` corresponds to source
frames `(e, e + 1)`.

For bin count `B`:

```text
T_B = ceil((N - 1) / B)
voxel_event_start[t] = B * t
voxel_event_count[t] = min(B, N - 1 - B * t)
```

`events[t]` groups transitions in the half-open range
`[B*t, min(B*t + B, N - 1))`. The associated source-frame interval is
`[B*t, min(B*t + B, N - 1)]`. The final group can contain fewer than `B`
valid transitions; unused bins are zero-filled.

## Timing

The HDF5 `fps` attribute is source-frame FPS stored as a float. Use the released
`fps_num` and `fps_den` fields for reproducible conversion. Approximate voxel
times are:

```text
start_seconds = B * t * fps_den / fps_num
end_seconds = min(B * t + B, N - 1) * fps_den / fps_num
```

Per-frame presentation timestamps are not consumed. These conversions are
therefore approximate for within-video variable-frame-rate streams. Do not
assume fixed 25 fps or 240 fps, and do not use `t / fps` as voxel time.

For a caption/action interval `[start_seconds, end_seconds]`:

```text
start_frame = floor(start_seconds * fps_num / fps_den)
end_frame = ceil(end_seconds * fps_num / fps_den)
t_start = max(0, floor(start_frame / B))
t_end_exclusive = min(T_B, ceil(end_frame / B))
```

Use `[t_start, t_end_exclusive)` for Python slicing.

## Memory-Safe Loading

```python
import h5py

with h5py.File("v_example.h5", "r") as f:
    events = f["events"]
    starts = f["voxel_event_start"]
    counts = f["voxel_event_count"]

    B = int(f.attrs["num_bins"])
    print(events.shape)  # (T_B, B, H, W)
    print(events.dtype)  # int16
    print(starts.dtype)  # int64
    print(counts.dtype)  # int32

    selected = events[10:18]  # reads only the selected temporal range
```

Avoid loading complete event tensors unless sufficient memory is available.

## Shards and Metadata

Each representation has 157 train shards, 62 validation shards, and 3,263 HDF5
members. Representation-specific manifests and checksums are under:

```text
metadata/5bin/
metadata/9bin/
```

Shared source/timing metadata is in `metadata/video_metadata.jsonl`, with
representation-specific tensor fields nested under `representations`.