yeszhong commited on
Commit
f5ee5de
·
verified ·
1 Parent(s): 3780cc5

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +143 -0
README.md ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: AFUN_pool
3
+ license: cc-by-nc-sa-4.0
4
+ language:
5
+ - en
6
+ size_categories:
7
+ - 100K<n<1M
8
+ tags:
9
+ - robotics
10
+ - affordance
11
+ - manipulation
12
+ - 3d-motion
13
+ - segmentation
14
+ ---
15
+
16
+ # AFUN_pool
17
+
18
+ The full data pool of **AFUN** ([arXiv:2606.02551](https://arxiv.org/abs/2606.02551)):
19
+ **183,657 data points** for affordance segmentation and 3D interaction-motion prediction,
20
+ i.e. the fitted-curve pool of Table 7 from which the curated
21
+ [**AFUN**](https://huggingface.co/datasets/AFUN-dataset/AFUN) training set (44,749) was
22
+ selected. AFUN ⊂ AFUN_pool. Same folder format as AFUN, same `trajectory.json` schemas.
23
+
24
+ It comes in two parts:
25
+
26
+ | part | data points | what each folder contains |
27
+ |---|---:|---|
28
+ | **full** | 77,432 | `obs_frame.png`, `obs_frame_depth.npy`, `sam_mask.png`, `trajectory.json` |
29
+ | **ego4d** (annotations only) | 106,225 | `sam_mask.png`, `trajectory.json`, `provenance.json` — RGB/depth are rebuilt from your own Ego4D download, see below |
30
+
31
+ The 106,225 `ego4d` data points are human videos from [Ego4D](https://ego4d-data.org),
32
+ whose license allows redistributing annotations but not the video frames themselves.
33
+ Everything we produced for them is here; the frame is one script call away.
34
+
35
+ Of the 223,334 fitted curves in Table 7, 39,677 are not in this release: their affordance
36
+ mask was not tracked at the observation frame, or their `trajectory.json` lacks `motion_2d`
37
+ (HOI4D).
38
+
39
+ ## Download & extract
40
+
41
+ ```bash
42
+ pip install -U huggingface_hub
43
+ hf download AFUN-dataset/AFUN_pool --repo-type dataset --local-dir afun_pool
44
+ cd afun_pool
45
+ for f in data/*.tar.zst; do tar --zstd -xf "$f"; done
46
+ ```
47
+
48
+ Download ≈ 363 GiB (of which the `ego4d` part is 0.26 GiB), extracted ≈ 748 GiB. After extraction:
49
+
50
+ ```
51
+ afun_pool/
52
+ ├── manifest.json # index — one entry per data point, with `part`
53
+ ├── reconstruct_ego4d_frames.py # rebuilds obs_frame.png for the ego4d part
54
+ ├── <source>/<episode>/<interval>/<cam>/ # 77,432 folders (part = "full")
55
+ │ ├── obs_frame.png # RGB frame
56
+ │ ├── obs_frame_depth.npy # float32 H×W depth, millimeters
57
+ │ ├── sam_mask.png # affordance mask (non-zero = actionable region)
58
+ │ └── trajectory.json # 3D motion + camera intrinsics
59
+ └── ego4d/<episode>/<interval>/<cam>/ # 106,225 folders (part = "ego4d")
60
+ ├── sam_mask.png
61
+ ├── trajectory.json
62
+ └── provenance.json # which Ego4D frame this is (+ pixel hash)
63
+ ```
64
+
65
+ Loading a data point is identical to AFUN — `manifest.json` entries carry `path`,
66
+ `dataset` / `episode_id` / `interval` / `cam`, `language`, `shard`, plus `part`.
67
+ `trajectory.json` follows the two AFUN schemas (top-level fields for robot / human sources,
68
+ nested `trajectories[]` for `scenefun3d`); see the
69
+ [AFUN README](https://huggingface.co/datasets/AFUN-dataset/AFUN#trajectoryjson).
70
+
71
+ ## Rebuilding the Ego4D frames
72
+
73
+ Each `ego4d` folder's `provenance.json` records the Ego4D video and frame:
74
+
75
+ ```json
76
+ {
77
+ "ego4d_video_uid": "0031d268-818c-4ec4-a804-935be610a61a",
78
+ "ego4d_frame_index": 56979, // 0-based frame in the full_scale video
79
+ "fps": 30.0,
80
+ "image_hw": [1440, 1920],
81
+ "rgb_sha256": "b22fda36…", // sha256 of the raw H×W×3 uint8 pixels
82
+ "language": "Spread adhesive with the trowel over the underlayment.",
83
+ "vitra_episode_file": "ego4d_other/episodic_annotations/Ego4D_0031d268-…_ep_000859.npy",
84
+ "episode_frame_index": 0, // index within that VITRA-1M episode
85
+ "depth": { "model": "depth-anything/DA3NESTED-GIANT-LARGE-1.1", "...": "..." }
86
+ }
87
+ ```
88
+
89
+ 1. Get Ego4D access at https://ego4d-data.org and download only the videos you need:
90
+
91
+ ```bash
92
+ pip install ego4d av Pillow
93
+ python reconstruct_ego4d_frames.py --pool-root ego4d --list-uids > uids.txt
94
+ ego4d --output_directory ~/ego4d --datasets full_scale --version v2 --video_uid_file uids.txt
95
+ ```
96
+
97
+ 2. Decode the frames into place and verify them against the recorded pixel hashes:
98
+
99
+ ```bash
100
+ python reconstruct_ego4d_frames.py --pool-root ego4d --ego4d-root ~/ego4d --verify
101
+ ```
102
+
103
+ This writes `obs_frame.png` into every `ego4d/...` folder using the same decoder and
104
+ frame indexing the annotations were made with (PyAV, native resolution, no resizing);
105
+ `--verify` confirms each decoded frame matches `rgb_sha256`.
106
+
107
+ The intervals were taken from [VITRA-1M](https://github.com/microsoft/VITRA) (MIT), and
108
+ `vitra_episode_file` / `episode_frame_index` locate the same frame in its episode files.
109
+ Depth maps are not shipped for this part; `provenance.json → depth` gives the settings we
110
+ used (Depth Anything 3 streaming video depth, every 4th frame, metric millimeters) if you
111
+ want to regenerate them.
112
+
113
+ ## Sources
114
+
115
+ | key | dataset | part | data points |
116
+ |---|---|---|---:|
117
+ | ego4d | Ego4D via VITRA-1M (human videos) | ego4d | 106,225 |
118
+ | scenefun3d | SceneFun3D | full | 49,706 |
119
+ | vitra_epic | EPIC-KITCHENS via VITRA-1M (human videos) | full | 9,155 |
120
+ | robomind | RoboMIND | full | 7,077 |
121
+ | calvin | CALVIN | full | 3,105 |
122
+ | droid | DROID | full | 2,751 |
123
+ | robomind2 | RoboMIND 2 | full | 2,356 |
124
+ | rh20t_human | RH20T human demos | full | 1,422 |
125
+ | rh20t | RH20T | full | 1,044 |
126
+ | agibot | AgiBot World | full | 783 |
127
+ | rlbench | RLBench | full | 33 |
128
+
129
+ AFUN's `vitra` source corresponds to `vitra_epic` ∪ `ego4d` here. EPIC-KITCHENS frames are
130
+ redistributed under CC BY-NC 4.0 (Damen et al.); Ego4D frames are not redistributed.
131
+ The evaluation sets ([**AFUN_eval**](https://huggingface.co/datasets/AFUN-dataset/AFUN_eval))
132
+ are disjoint from this pool at the sample level.
133
+
134
+ ## Citation
135
+
136
+ ```bibtex
137
+ @article{wang2026afun,
138
+ title = {AFUN: Towards an Affordance Foundation Model for Functionality Understanding},
139
+ author = {Wang, Zhaoning and Zhong, Yi and Fu, Jiawei and Christensen, Henrik I. and Gao, Jun},
140
+ journal = {arXiv preprint arXiv:2606.02551},
141
+ year = {2026}
142
+ }
143
+ ```