vLAR commited on
Commit
4b9a54c
Β·
verified Β·
1 Parent(s): 4634fd6

Separate rendered-data guide from asset and leaderboard downloads

Browse files
Files changed (1) hide show
  1. Utils/DATA_DOWNLOAD.md +144 -248
Utils/DATA_DOWNLOAD.md CHANGED
@@ -1,163 +1,61 @@
1
- # PhysInOne Public Data Download
2
 
3
- The PhysInOne public downloader retrieves the released Leaderboard inputs and
4
- released 3D assets from the public `vLAR/PhysInOne` dataset repository. It
5
- uses only the Python standard library and anonymous HTTPS requests.
6
 
7
- Ground-truth outputs for the Leaderboard are private and are not included.
 
8
 
9
- ## Requirements
 
 
 
 
10
 
11
- - Python 3.9 or newer
12
- - Enough free disk space for the selected release
13
- - Unreal Engine 5.5.4 when using the 3D asset project
 
14
 
15
- No Python package installation or account configuration is required.
16
 
17
- ## Get the downloader
 
 
18
 
19
- Clone the GitHub repository and run the script from the project root:
20
 
21
  ```bash
22
  git clone https://github.com/vLAR-group/PhysInOne.git
23
  cd PhysInOne
24
- python scripts/download_data.py --help
25
- ```
26
-
27
- The maintained download lists are stored in `scripts/download_lists/`. The
28
- script reads them locally and does not fetch utility files at runtime. A
29
- byte-identical public mirror of the complete script tree is maintained under
30
- [`Utils/scripts/`](https://huggingface.co/datasets/vLAR/PhysInOne/tree/main/Utils/scripts).
31
-
32
- ## Progress display
33
-
34
- Interactive terminals show a single live progress bar with completed file count,
35
- transferred and estimated total size, current download speed, and ETA. The total
36
- size and ETA are marked as estimates because public manifests do not store object
37
- sizes; they become more accurate as Hugging Face responses provide file sizes.
38
- When output is redirected to a log, the downloader automatically writes periodic
39
- plain-text snapshots instead of terminal control characters. Per-file success and
40
- failure details are always retained under `_download_logs/`.
41
-
42
- ## Quick start
43
-
44
- Download all four public Leaderboard tasks:
45
-
46
- ```bash
47
- python scripts/download_data.py \
48
- --task video_generation future_prediction \
49
- physical_properties_estimation motion_transfer \
50
- --output-dir ./PhysInOne_data
51
- ```
52
-
53
- Download one task:
54
-
55
- ```bash
56
- python scripts/download_data.py \
57
- --task future_prediction \
58
- --output-dir ./PhysInOne_data
59
- ```
60
-
61
- Download and assemble all currently released 3D assets:
62
-
63
- ```bash
64
- python scripts/download_data.py \
65
- --task 3d_assets \
66
- --output-dir ./PhysInOne_data
67
  ```
68
 
69
- ZIP extraction is enabled by default for `3d_assets`. Leaderboard ZIP files
70
- remain compressed unless `--extract` is specified.
71
-
72
- ## Task values
73
-
74
- | `--task` value | Released public content | File count |
75
- | --- | --- | ---: |
76
- | `video_generation` | Initial frames, camera metadata, and captions | 75,865 |
77
- | `future_prediction` | Fixed-view input sequences and split metadata | 103 ZIP files |
78
- | `physical_properties_estimation` | Scene inputs and shared supplementary files | 72 scene ZIP files plus 2 shared files |
79
- | `motion_transfer` | Source videos, reference frames, and captions | 214 ZIP files |
80
- | `3d_assets` | Unreal Engine project assets for 14,847 Val and 120,660 Train scenes | 4,585 files |
81
- | `all` | Every item above | 80,841 files |
82
-
83
- Multiple task values can follow one `--task` option. Hyphenated names and the
84
- short aliases shown by `--help` are also accepted.
85
 
86
- ## Command-line options
87
-
88
- | Option | Description |
89
- | --- | --- |
90
- | `--task NAME [NAME ...]` | Select one or more tasks, or `all`. |
91
- | `--output-dir PATH` | Set the local output root. The path must not contain whitespace. |
92
- | `--scene TEXT` | Keep paths containing a scene name or six-character scene ID. Repeatable. |
93
- | `--workers N` | Set concurrent downloads. Default: `4`. |
94
- | `--revision REV` | Select a dataset revision. Default: `main`. |
95
- | `--retries N` | Set retries after each failed request. Default: `3`. |
96
- | `--timeout SECONDS` | Set the timeout for each network request. Default: `60`. |
97
- | `--extract` | Safely validate and extract selected ZIP files. |
98
- | `--no-extract` | Keep all ZIP files compressed, including 3D asset archives. |
99
- | `--delete-zip-after-extract` | Remove a ZIP only after successful extraction. |
100
- | `--no-resume` | Restart incomplete `.part` files instead of resuming. |
101
- | `--force` | Replace completed local downloads. |
102
- | `--list-only` | Print the selected public URLs and exit. |
103
- | `--dry-run` | Show counts and output locations without downloading. |
104
-
105
- ## Examples
106
-
107
- Download Video Generation inputs:
108
-
109
- ```bash
110
- python scripts/download_data.py \
111
- --task video_generation \
112
- --output-dir ./PhysInOne_data
113
- ```
114
-
115
- Download and extract Future Prediction inputs:
116
-
117
- ```bash
118
- python scripts/download_data.py \
119
- --task future_prediction \
120
- --extract \
121
- --output-dir ./PhysInOne_data
122
- ```
123
-
124
- Download selected Motion Transfer scenes by ID:
125
-
126
- ```bash
127
- python scripts/download_data.py \
128
- --task motion_transfer \
129
- --scene B15ta6 \
130
- --scene 7omQio \
131
- --output-dir ./PhysInOne_data
132
- ```
133
-
134
- Preview Physical Properties Estimation without downloading:
135
-
136
- ```bash
137
- python scripts/download_data.py \
138
- --task physical_properties_estimation \
139
- --dry-run \
140
- --output-dir ./PhysInOne_data
141
- ```
142
 
143
- Download 3D assets and remove archives after verified extraction:
144
 
145
- ```bash
146
- python scripts/download_data.py \
147
- --task 3d_assets \
148
- --delete-zip-after-extract \
149
- --output-dir ./PhysInOne_data
150
- ```
151
 
152
- ## Full rendered dataset selection
 
 
 
 
153
 
154
- The repository also includes a filter and downloader for selecting scene
155
- archives from the public rendered dataset. Train archives are distributed
156
- across 16 shard repositories, while the currently released Val archives are
157
- stored in the main `vLAR/PhysInOne` dataset repository. The bundled index and
158
- repository map handle this difference automatically.
159
 
160
- Create a selection file:
 
161
 
162
  ```bash
163
  python scripts/filter_cases.py \
@@ -165,137 +63,135 @@ python scripts/filter_cases.py \
165
  --activity_type double \
166
  --phenomena FrictionStop \
167
  --num 100 \
168
- --output selected_cases.json
 
 
169
  ```
170
 
171
- Select all currently released Val archives:
172
 
173
  ```bash
174
- python scripts/filter_cases.py \
175
- --split val \
176
- --output selected_val_cases.json \
177
- --show_stats
 
178
  ```
179
 
180
- This currently selects 199 Val scene archives. The count follows the public
181
- files present under `Val/` and may increase as additional validation data is
182
- released.
183
-
184
  Download the selected archives:
185
 
186
  ```bash
187
  python scripts/download_selected.py \
188
- --selection selected_cases.json \
189
- --output-dir ./PhysInOne_data/full_dataset \
190
  --keep-shard-structure
191
  ```
192
 
193
- `filter_cases.py` reads the bundled
194
- `scripts/download_lists/repo_assignment.txt` index. `download_selected.py`
195
- reads the bundled `repo_map.json` and uses the same anonymous, resumable HTTPS
196
- implementation as the task downloader.
197
-
198
- | Selection option | Description |
199
- | --- | --- |
200
- | `--split train|val|test` | Filter by dataset split. |
201
- | `--activity_type single|double|triple` | Filter by interaction complexity. |
202
- | `--phenomena NAME [NAME ...]` | Require one or more physical phenomena. |
203
- | `--match_mode contains|exact` | Control phenomenon matching. |
204
- | `--num N` | Randomly sample at most `N` matching cases. |
205
- | `--seed N` | Set the sampling seed. |
206
- | `--output PATH` | Write the selection JSON. |
207
-
208
- | Selected-download option | Description |
209
- | --- | --- |
210
- | `--selection PATH` | Read a selection JSON produced by `filter_cases.py`. |
211
- | `--output-dir PATH` | Set the whitespace-free archive destination. |
212
- | `--keep-shard-structure` | Preserve part, split, and activity directories. |
213
- | `--workers N` | Set concurrent downloads. |
214
- | `--retries N` | Set retries after a failed request. |
215
- | `--no-resume` | Restart incomplete `.part` files. |
216
- | `--overwrite` | Replace completed local archives. |
217
- | `--dry-run` | Preview transfers without downloading. |
218
-
219
- ## Local directory layout
220
 
221
- All directories created by the downloader have names without spaces:
222
-
223
- ```text
224
- PhysInOne_data/
225
- β”œβ”€β”€ leaderboard/
226
- β”‚ β”œβ”€β”€ video_generation/
227
- β”‚ β”œβ”€β”€ future_prediction/
228
- β”‚ β”œβ”€β”€ physical_properties_estimation/
229
- β”‚ └── motion_transfer/
230
- β”œβ”€β”€ 3d_assets/
231
- β”‚ └── PhysicBenchmark/
232
- └── _download_logs/
233
- └── YYYYMMDD_HHMMSS/
234
- β”œβ”€β”€ downloads.tsv
235
- β”œβ”€β”€ extractions.tsv
236
- β”œβ”€β”€ failures.tsv
237
- └── summary.json
238
- ```
239
-
240
- Published object paths are URL-encoded by the maintained lists. The downloader
241
- maps them to the no-space local layout above, so shell commands do not require
242
- special quoting for task directories.
243
-
244
- ## Resume and verification
245
-
246
- Downloads are written to `.part` files and renamed atomically after completion.
247
- Run the same command again to reuse completed files and resume incomplete ones.
248
- Use `--force` only when a completed local file must be replaced.
249
-
250
- ZIP archives are checked for unsafe paths, symbolic links, and CRC errors before
251
- extraction. A completion marker is written only after successful extraction.
252
- Detailed progress and failures are recorded under `_download_logs/`.
253
-
254
- For slower or rate-limited networks, reduce concurrency:
255
 
256
  ```bash
257
- python scripts/download_data.py \
258
- --task all \
259
- --workers 2 \
260
- --output-dir ./PhysInOne_data
261
- ```
262
 
263
- ## 3D asset setup
 
 
 
 
264
 
265
- The completed public release contains Unreal Engine 5.5.4 resources for 14,847
266
- validation scenes and 120,660 training scenes, together with the released Train
267
- and Val resource libraries. The download contains 4,585 files and 285 ZIP
268
- archives (approximately 139.67 GiB before extraction). The 273 validation
269
- origins reserved for the Motion Transfer test set are intentionally excluded to
270
- prevent evaluation leakage. The release also includes ten Movie Render Queue
271
- configurations at `Content/PhysInOne/Scripts/`, corresponding to
272
- `/Game/PhysInOne/Scripts/` in Unreal Engine. Windows is recommended for the
273
- simplest setup; Linux is also supported with additional Unreal Engine
274
- configuration.
275
 
276
- Every 3D asset ZIP is extracted in place into its current parent directory. The
277
- Scene and Trajectory archives are deliberately kept separate:
278
 
279
- | Archive pattern | ZIP member layout | Result after extraction |
280
- | --- | --- | --- |
281
- | `Content/PhysInOne/Scenes/val_scenes_batch_*.zip` | `Val/<Physics>/<Scene>.umap` | `Content/PhysInOne/Scenes/Val/<Physics>/<Scene>.umap` |
282
- | `Content/PhysInOne/Scenes/train_scenes_batch_*.zip` | `Train/<Physics>/<Scene>.umap` | `Content/PhysInOne/Scenes/Train/<Physics>/<Scene>.umap` |
283
- | `Content/PhysInOne/Trajectories/val_trajectory_batch_*.zip` | `Val/<Physics>/<Scene>_trajectory.uasset` | `Content/PhysInOne/Trajectories/Val/<Physics>/<Scene>_trajectory.uasset` |
284
- | `Content/PhysInOne/Trajectories/train_trajectory_batch_*.zip` | `Train/<Physics>/<Scene>_trajectory.uasset` | `Content/PhysInOne/Trajectories/Train/<Physics>/<Scene>_trajectory.uasset` |
285
 
286
- The Train Scene and Trajectory series each span batches `0000–0120`; the Val
287
- series each span batches `0000–0014`. The final Train batch contains 660
288
- scenes, and the final Val batch contains 847 scenes.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
289
 
290
- The Train and Val ZIP files can therefore share the same remote directory
291
- without colliding: their members begin with different split directories.
292
 
293
- After the default 3D asset download finishes, launch:
294
 
295
  ```text
296
- PhysInOne_data/assets/PhysicBenchmark/PhysInOne.uproject
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
297
  ```
298
 
299
- Do not rename directories inside `PhysicBenchmark/`. Unreal Engine resolves
300
- assets by project-relative package paths, including `BackGrounds_raw`,
301
- `__ExternalActors__`, and `__ExternalObjects__`.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # PhysInOne Rendered Data Download
2
 
3
+ ## Choose your data
 
 
4
 
5
+ PhysInOne provides three separate public releases. Choose the guide that matches
6
+ the resources you need:
7
 
8
+ | Release | Contents | Download guide |
9
+ | --- | --- | --- |
10
+ | **1. Rendered Data** | Released Train and Val scene archives containing rendered observations and annotations | **This guide** |
11
+ | **2. 3D Assets** | Unreal Engine project files, asset libraries, Scenes, and Trajectories | [3D Assets: download and project setup](https://huggingface.co/datasets/vLAR/PhysInOne/blob/main/Utils/3D_ASSETS_DOWNLOAD.md) |
12
+ | **3. Leaderboard Evaluation Data** | Public inputs for Video Generation, Future Prediction, Physical Properties Estimation, and Motion Transfer; private ground truth is excluded | [Leaderboard: task inputs and download commands](https://huggingface.co/datasets/vLAR/PhysInOne/blob/main/Utils/LEADERBOARD_DOWNLOAD.md) |
13
 
14
+ The instructions below cover **Rendered Data only**. Use `filter_cases.py` to
15
+ select scenes, then `download_selected.py` to download their archives.
16
+ `download_data.py --task all` covers the separate 3D Assets and Leaderboard
17
+ releases; it does **not** download the full rendered dataset.
18
 
19
+ ## Requirements and tools
20
 
21
+ - Python 3.9 or newer and Git for the setup command below.
22
+ - Enough disk space for the scene archives you select.
23
+ - No Python package installation, account, or authentication is required.
24
 
25
+ Clone the repository and run all commands from its root:
26
 
27
  ```bash
28
  git clone https://github.com/vLAR-group/PhysInOne.git
29
  cd PhysInOne
30
+ python scripts/filter_cases.py --help
31
+ python scripts/download_selected.py --help
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  ```
33
 
34
+ The tools are also available under [Hugging Face `Utils/scripts/`](https://huggingface.co/datasets/vLAR/PhysInOne/tree/main/Utils/scripts).
35
+ Keep the script directory together: `download_selected.py` imports shared
36
+ functions from `download_data.py`, and both the scene index and repository map
37
+ are supplied under `scripts/download_lists/`. These are local dependencies;
38
+ the scripts do not install packages or fetch supporting scripts at runtime.
 
 
 
 
 
 
 
 
 
 
 
39
 
40
+ ## Full rendered dataset selection
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
+ ### Where the data is stored
43
 
44
+ | Split | Remote location | Selection |
45
+ | --- | --- | --- |
46
+ | Train | The 16 shard repositories listed on the [dataset homepage](https://huggingface.co/datasets/vLAR/PhysInOne#dataset-repositories) | `--split train` |
47
+ | Val | The main repository's [Val directory](https://huggingface.co/datasets/vLAR/PhysInOne/tree/main/Val) | `--split val` |
 
 
48
 
49
+ The bundled index lists the available scenes; the repository map resolves their
50
+ download locations automatically. Selection counts reflect that bundled index,
51
+ not a live scan of Hugging Face. Update your checkout when new data is released.
52
+ The released Val archive count is separate from the 103-scene Future Prediction
53
+ Leaderboard task.
54
 
55
+ ### Example A: select and download a Train subset
 
 
 
 
56
 
57
+ This example selects up to 100 double-physics scenes containing `FrictionStop`.
58
+ The seed makes the selection reproducible for the same index.
59
 
60
  ```bash
61
  python scripts/filter_cases.py \
 
63
  --activity_type double \
64
  --phenomena FrictionStop \
65
  --num 100 \
66
+ --seed 42 \
67
+ --output selected_train_cases.json \
68
+ --show_stats
69
  ```
70
 
71
+ Preview the selection's download destinations:
72
 
73
  ```bash
74
+ python scripts/download_selected.py \
75
+ --selection selected_train_cases.json \
76
+ --output-dir ./PhysInOne_data/rendered_data \
77
+ --keep-shard-structure \
78
+ --dry-run
79
  ```
80
 
 
 
 
 
81
  Download the selected archives:
82
 
83
  ```bash
84
  python scripts/download_selected.py \
85
+ --selection selected_train_cases.json \
86
+ --output-dir ./PhysInOne_data/rendered_data \
87
  --keep-shard-structure
88
  ```
89
 
90
+ To select all indexed Train scenes, use `--split train` without
91
+ `--activity_type`, `--phenomena`, or `--num`. Preview the resulting selection
92
+ before starting a large download.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
 
94
+ ### Example B: select and download all indexed Val scenes
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
 
96
  ```bash
97
+ python scripts/filter_cases.py \
98
+ --split val \
99
+ --output selected_val_cases.json \
100
+ --show_stats
 
101
 
102
+ python scripts/download_selected.py \
103
+ --selection selected_val_cases.json \
104
+ --output-dir ./PhysInOne_data/rendered_data \
105
+ --keep-shard-structure
106
+ ```
107
 
108
+ Use `val`, not `valid`. Add `--dry-run` to the download command to preview the
109
+ transfers. The selection command writes JSON only and does not download images.
 
 
 
 
 
 
 
 
110
 
111
+ ## Selection options
 
112
 
113
+ These options belong to `filter_cases.py`:
 
 
 
 
 
114
 
115
+ | Option | Meaning |
116
+ | --- | --- |
117
+ | `--split train` / `--split val` | Select a rendered-data split. Omitting this option includes all indexed splits. |
118
+ | `--activity_type single` / `double` / `triple` | Filter by physical-interaction complexity. |
119
+ | `--phenomena NAME [NAME ...]` | Filter using phenomenon abbreviations, such as `FrictionStop`. |
120
+ | `--match_mode contains` | Require all requested phenomena; allow additional phenomena. This is the default. |
121
+ | `--match_mode exact` | Require exactly the requested set of phenomena. |
122
+ | `--num N` | Randomly select at most N matching scenes. Omit to keep all matches. |
123
+ | `--seed N` | Random sampling seed. Default: `42`. |
124
+ | `--output PATH` | Selection JSON destination. Default: `selected_cases.json`. |
125
+ | `--show_stats` | Print selected counts by split, complexity, and repository-map key. |
126
+ | `--assignment_file PATH` | Use a custom scene index. Default: `scripts/download_lists/repo_assignment.txt`. |
127
+
128
+ The parser also accepts `--split test`, but it only searches the scene index.
129
+ It is not a way to download the four Leaderboard task packages; use the
130
+ [Leaderboard guide](https://huggingface.co/datasets/vLAR/PhysInOne/blob/main/Utils/LEADERBOARD_DOWNLOAD.md) for those inputs.
131
+
132
+ ## Download options
133
+
134
+ These options belong to `download_selected.py`:
135
+
136
+ | Option | Meaning |
137
+ | --- | --- |
138
+ | `--selection PATH` | Read the selection JSON. Default: `selected_cases.json`. |
139
+ | `--output-dir PATH` | Set a local output root without whitespace. The examples use `./PhysInOne_data/rendered_data`; the script default is `PhysInOne_data/full_dataset`. |
140
+ | `--keep-shard-structure` | Preserve repository-map key, split, and physics category directories. Without this option, ZIPs go directly into the output root. |
141
+ | `--workers N` | Concurrent downloads. Default: `4`. |
142
+ | `--retries N` | Retries after a failed request. Default: `3`. |
143
+ | `--timeout SECONDS` | Request timeout. Default: `60`. |
144
+ | `--revision REV` | Remote repository revision. Default: `main`. |
145
+ | `--no-resume` | Restart incomplete `.part` files instead of resuming. |
146
+ | `--overwrite` | Download again even when a completed local file exists. |
147
+ | `--dry-run` | Show the transfer count and up to 20 planned paths without downloading. |
148
+ | `--repo-map PATH` | Use a custom repository map. Default: `scripts/download_lists/repo_map.json`. |
149
 
150
+ ## Downloaded files and logs
 
151
 
152
+ With `--keep-shard-structure`, the example commands produce this layout:
153
 
154
  ```text
155
+ PhysInOne_data/
156
+ └── rendered_data/
157
+ β”œβ”€β”€ physinone_part1/
158
+ β”‚ └── Train/
159
+ β”‚ └── DoublePhysics/
160
+ β”‚ └── <scene>_trajectory.zip
161
+ β”œβ”€β”€ ...
162
+ β”œβ”€β”€ physinone_val/
163
+ β”‚ └── Val/
164
+ β”‚ └── <Physics>/
165
+ β”‚ └── <scene>_trajectory.zip
166
+ └── _download_logs/
167
+ └── YYYYMMDD_HHMMSS/
168
+ β”œβ”€β”€ downloads.tsv
169
+ β”œβ”€β”€ failures.tsv
170
+ └── summary.json
171
  ```
172
 
173
+ Only directories needed by your selection are created. `physinone_val` is the
174
+ local repository-map key for Val data hosted in the main HF repository.
175
+
176
+ `download_selected.py` keeps the downloaded scene ZIPs compressed; it does not
177
+ automatically extract them. Extract the archives you need with a ZIP tool,
178
+ preserving their internal scene and camera directories. Its options differ from
179
+ the separate `download_data.py` used for 3D Assets and Leaderboard inputs.
180
+
181
+ Interactive terminals display file progress, transferred size, speed, and an
182
+ estimated remaining time. Redirected output uses periodic text updates. Use
183
+ `downloads.tsv`, `failures.tsv`, and `summary.json` to review individual files
184
+ and the overall result.
185
+
186
+ ## Resume and troubleshooting
187
+
188
+ - Run the same download command again to reuse completed files and resume
189
+ incomplete `.part` files. Files are renamed to their final names after download.
190
+ - If a completed ZIP needs replacement, use `--overwrite`.
191
+ - For a slow or rate-limited connection, lower concurrency with `--workers 2`.
192
+ - If a filter matches zero cases, check the spelling (`val`, not `valid`),
193
+ update your checkout, and check that the requested scenes are included in
194
+ `scripts/download_lists/repo_assignment.txt`.
195
+ - Keep `filter_cases.py`, `download_selected.py`, `download_data.py`, and
196
+ `download_lists/` from the same release so that selection and repository
197
+ mapping stay consistent.