Add files using upload-large-folder tool
Browse files- README.md +89 -0
- scripts/visualize_robotrack_dataset.py +585 -0
- train/1_29838012/point_tracks.npz +3 -0
- train/2d8646d63a7b6154_23804457_seg0004/point_track_vis.mp4 +3 -0
- train/2d8646d63a7b6154_23804457_seg0004/point_tracks.npz +3 -0
- train/2d8646d63a7b6154_23804457_seg0004/video.mp4 +3 -0
- train/2d8646d63a7b6154_23804457_seg0144/point_track_vis.mp4 +3 -0
- train/2d8646d63a7b6154_23804457_seg0144/point_tracks.npz +3 -0
- train/2d8646d63a7b6154_23804457_seg0144/video.mp4 +3 -0
- train/303f470e03136909_28834630_seg0048/point_track_vis.mp4 +3 -0
- train/303f470e03136909_28834630_seg0048/point_tracks.npz +3 -0
- train/303f470e03136909_28834630_seg0048/video.mp4 +3 -0
- train/303f470e03136909_28834630_seg0072/point_track_vis.mp4 +3 -0
- train/303f470e03136909_28834630_seg0072/point_tracks.npz +3 -0
- train/303f470e03136909_28834630_seg0072/video.mp4 +3 -0
- train/39965b22783c5193_13263313_seg0088/point_track_vis.mp4 +3 -0
- train/39965b22783c5193_13263313_seg0088/point_tracks.npz +3 -0
- train/39965b22783c5193_13263313_seg0088/video.mp4 +3 -0
- train/3_23404442/point_track_vis.mp4 +3 -0
- train/3_23404442/point_tracks.npz +3 -0
- train/3_23404442/video.mp4 +3 -0
- train/Fri_May_12_11_50_47_2023_recordings_MP4_ego/point_track_vis.mp4 +3 -0
- train/Fri_May_12_11_50_47_2023_recordings_MP4_ego/point_tracks.npz +3 -0
- train/Fri_May_12_11_50_47_2023_recordings_MP4_ego/video.mp4 +3 -0
- train/Sun_Jun_11_15_09_35_2023_recordings_MP4_23897859/point_track_vis.mp4 +3 -0
- train/Sun_Jun_11_15_09_35_2023_recordings_MP4_23897859/point_tracks.npz +3 -0
- train/Sun_Jun_11_15_09_35_2023_recordings_MP4_27904255/point_track_vis.mp4 +3 -0
- train/Sun_Jun_11_15_09_35_2023_recordings_MP4_27904255/point_tracks.npz +3 -0
- train/Sun_Jun_11_15_09_35_2023_recordings_MP4_27904255/video.mp4 +3 -0
- train/Tue_Feb_13_10_44_21_2024_recordings_MP4_14549178/point_track_vis.mp4 +3 -0
- train/Tue_Feb_13_10_44_21_2024_recordings_MP4_14549178/point_tracks.npz +3 -0
- train/Tue_Feb_13_10_44_21_2024_recordings_MP4_14549178/video.mp4 +3 -0
- train/Tue_Feb_13_10_49_35_2024_recordings_MP4_20252535/point_track_vis.mp4 +3 -0
- train/Tue_Feb_13_10_49_35_2024_recordings_MP4_20252535/point_tracks.npz +3 -0
- train/Tue_Feb_13_10_49_35_2024_recordings_MP4_20252535/video.mp4 +3 -0
- train/bimanual_yam_allenai_12012026-block2-1/video.mp4 +3 -0
- train/human_aria_bimanual_2025-10-29-22-02-43-003000/point_tracks.npz +3 -0
- train/metadata.parquet +3 -0
- train/nus_cpr_42_3_Place_the_other_hand_on_top_of_the_first_ego/point_track_vis.mp4 +3 -0
- train/nus_cpr_42_3_Place_the_other_hand_on_top_of_the_first_ego/point_tracks.npz +3 -0
- train/nus_cpr_42_3_Place_the_other_hand_on_top_of_the_first_ego/video.mp4 +3 -0
- train/robotic_eva_bimanual_2026-04-29-19-10-18-459000/point_track_vis.mp4 +3 -0
- train/robotic_eva_bimanual_2026-04-29-19-10-18-459000/point_tracks.npz +3 -0
- train/robotic_eva_bimanual_2026-04-29-19-10-18-459000/video.mp4 +3 -0
- train/so100_Loki0929_so100_lan/point_track_vis.mp4 +3 -0
- train/so100_Loki0929_so100_lan/point_tracks.npz +3 -0
- train/so100_Loki0929_so100_lan/video.mp4 +3 -0
- train/upenn_0324_Piano_1_2_random_clip_exo/point_track_vis.mp4 +3 -0
- train/upenn_0324_Piano_1_2_random_clip_exo/point_tracks.npz +3 -0
- train/upenn_0324_Piano_1_2_random_clip_exo/video.mp4 +3 -0
README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pretty_name: RoboTrack Real v3
|
| 3 |
+
tags:
|
| 4 |
+
- video
|
| 5 |
+
- robotics
|
| 6 |
+
- computer-vision
|
| 7 |
+
- point-tracking
|
| 8 |
+
configs:
|
| 9 |
+
- config_name: default
|
| 10 |
+
data_files:
|
| 11 |
+
- split: train
|
| 12 |
+
path:
|
| 13 |
+
- train/metadata.parquet
|
| 14 |
+
- train/*/video.mp4
|
| 15 |
+
- train/*/point_track_vis.mp4
|
| 16 |
+
drop_labels: true
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# RoboTrack Real v3
|
| 20 |
+
|
| 21 |
+
RoboTrack Real v3 is an evaluation dataset of 318 real-world video clips with
|
| 22 |
+
sparse 2D point trajectories and visibility annotations. Each example includes
|
| 23 |
+
the original RGB video, a rendered visualization of its point tracks, and the
|
| 24 |
+
underlying NumPy annotation archive.
|
| 25 |
+
|
| 26 |
+
## Dataset Viewer
|
| 27 |
+
|
| 28 |
+
The viewer exposes two playable video columns:
|
| 29 |
+
|
| 30 |
+
- `raw`: the original RGB clip (`raw_file_name` in `metadata.parquet`)
|
| 31 |
+
- `visualization`: the RGB clip with colored, numbered tracks and one second of
|
| 32 |
+
visibility-aware trajectory history (`visualization_file_name`)
|
| 33 |
+
|
| 34 |
+
The remaining columns provide clip dimensions, timing, annotation statistics,
|
| 35 |
+
and optional `review_status` and `review_notes` fields for annotator review.
|
| 36 |
+
|
| 37 |
+
## Layout
|
| 38 |
+
|
| 39 |
+
```text
|
| 40 |
+
train/
|
| 41 |
+
metadata.parquet
|
| 42 |
+
<clip_id>/
|
| 43 |
+
video.mp4
|
| 44 |
+
point_track_vis.mp4
|
| 45 |
+
point_tracks.npz
|
| 46 |
+
scripts/
|
| 47 |
+
visualize_robotrack_dataset.py
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
All media files are stored directly in this repository; there are no symbolic
|
| 51 |
+
links. Videos are H.264 with matching frame counts and timing between the raw
|
| 52 |
+
and visualization versions.
|
| 53 |
+
|
| 54 |
+
## Annotation format
|
| 55 |
+
|
| 56 |
+
Each `point_tracks.npz` contains:
|
| 57 |
+
|
| 58 |
+
- `trajs_2d`: `float32` array shaped `(T, N, 2)` containing pixel coordinates
|
| 59 |
+
in `(x, y)` order
|
| 60 |
+
- `visibility`: `float32` array shaped `(T, N)`, where values greater than `0.5`
|
| 61 |
+
are visible
|
| 62 |
+
- `query_frames`: `int32` array shaped `(N,)` containing the query frame for
|
| 63 |
+
each track
|
| 64 |
+
|
| 65 |
+
Here, `T` is the number of video frames and `N` is the number of annotated
|
| 66 |
+
tracks. Invisible coordinates are stored as `(0, 0)`.
|
| 67 |
+
|
| 68 |
+
## Frame rates
|
| 69 |
+
|
| 70 |
+
- 174 clips at 15 FPS
|
| 71 |
+
- 1 clip at 20 FPS
|
| 72 |
+
- 143 clips at 30 FPS
|
| 73 |
+
|
| 74 |
+
Forty-five clips whose containers incorrectly reported 60 FPS were retimed to
|
| 75 |
+
15 FPS without dropping frames. Their H.264 streams were copied without lossy
|
| 76 |
+
re-encoding, and the visualization videos use the same corrected timing.
|
| 77 |
+
|
| 78 |
+
## Loading
|
| 79 |
+
|
| 80 |
+
```python
|
| 81 |
+
from datasets import load_dataset
|
| 82 |
+
|
| 83 |
+
dataset = load_dataset("<namespace>/robotrack-real-v3", split="train")
|
| 84 |
+
example = dataset[0]
|
| 85 |
+
print(example["clip_id"], example["num_tracks"])
|
| 86 |
+
```
|
| 87 |
+
|
| 88 |
+
The NPZ path for each example is available in `annotation_path`. The included
|
| 89 |
+
renderer can recreate the point-track videos if needed.
|
scripts/visualize_robotrack_dataset.py
ADDED
|
@@ -0,0 +1,585 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Render RoboTrack point annotations on top of their source videos.
|
| 3 |
+
|
| 4 |
+
Expected layout:
|
| 5 |
+
|
| 6 |
+
DATASET_ROOT/
|
| 7 |
+
clip_id/
|
| 8 |
+
video.mp4
|
| 9 |
+
point_tracks.npz
|
| 10 |
+
|
| 11 |
+
Each NPZ must contain:
|
| 12 |
+
|
| 13 |
+
trajs_2d: (frames, tracks, 2) pixel coordinates
|
| 14 |
+
visibility: (frames, tracks) visibility scores
|
| 15 |
+
query_frames: (tracks,) first/query frame for each track
|
| 16 |
+
|
| 17 |
+
The default output is ``point_track_vis.mp4`` in each clip directory. Existing
|
| 18 |
+
outputs are skipped unless ``--overwrite`` is supplied, so interrupted runs can
|
| 19 |
+
be resumed safely.
|
| 20 |
+
"""
|
| 21 |
+
|
| 22 |
+
from __future__ import annotations
|
| 23 |
+
|
| 24 |
+
import argparse
|
| 25 |
+
import colorsys
|
| 26 |
+
import os
|
| 27 |
+
from concurrent.futures import ProcessPoolExecutor, as_completed
|
| 28 |
+
from pathlib import Path
|
| 29 |
+
import shutil
|
| 30 |
+
import subprocess
|
| 31 |
+
import sys
|
| 32 |
+
|
| 33 |
+
import cv2
|
| 34 |
+
import numpy as np
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
DEFAULT_FFMPEG_CANDIDATES = (
|
| 38 |
+
"/gpfs/projects/raivn/yunbos/.conda/envs/cotracker-perception/bin/ffmpeg",
|
| 39 |
+
)
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
def parse_args() -> argparse.Namespace:
|
| 43 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 44 |
+
parser.add_argument("dataset_root", type=Path, help="RoboTrack dataset directory")
|
| 45 |
+
parser.add_argument("--video-name", default="video.mp4")
|
| 46 |
+
parser.add_argument("--tracks-name", default="point_tracks.npz")
|
| 47 |
+
parser.add_argument("--output-name", default="point_track_vis.mp4")
|
| 48 |
+
parser.add_argument(
|
| 49 |
+
"--trail-seconds",
|
| 50 |
+
type=float,
|
| 51 |
+
default=1.0,
|
| 52 |
+
help="Length of the visible motion trail (default: 1.0)",
|
| 53 |
+
)
|
| 54 |
+
parser.add_argument(
|
| 55 |
+
"--visibility-threshold",
|
| 56 |
+
type=float,
|
| 57 |
+
default=0.5,
|
| 58 |
+
help="Scores above this value are drawn as visible (default: 0.5)",
|
| 59 |
+
)
|
| 60 |
+
parser.add_argument(
|
| 61 |
+
"--crf",
|
| 62 |
+
type=int,
|
| 63 |
+
default=20,
|
| 64 |
+
help="H.264 quality: lower is better/larger (default: 20)",
|
| 65 |
+
)
|
| 66 |
+
parser.add_argument(
|
| 67 |
+
"--preset",
|
| 68 |
+
default="veryfast",
|
| 69 |
+
help="libx264 encoding preset (default: veryfast)",
|
| 70 |
+
)
|
| 71 |
+
parser.add_argument(
|
| 72 |
+
"--workers",
|
| 73 |
+
type=int,
|
| 74 |
+
default=min(4, os.cpu_count() or 1),
|
| 75 |
+
help="Parallel clips to render (default: up to 4)",
|
| 76 |
+
)
|
| 77 |
+
parser.add_argument(
|
| 78 |
+
"--limit",
|
| 79 |
+
type=int,
|
| 80 |
+
help="Render only the first N clips (useful for testing)",
|
| 81 |
+
)
|
| 82 |
+
parser.add_argument("--overwrite", action="store_true")
|
| 83 |
+
parser.add_argument(
|
| 84 |
+
"--ffmpeg",
|
| 85 |
+
type=Path,
|
| 86 |
+
help="Path to ffmpeg; otherwise resolve it automatically",
|
| 87 |
+
)
|
| 88 |
+
return parser.parse_args()
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
def find_ffmpeg(explicit_path: Path | None) -> str:
|
| 92 |
+
if explicit_path is not None:
|
| 93 |
+
if not explicit_path.is_file():
|
| 94 |
+
raise FileNotFoundError(f"ffmpeg does not exist: {explicit_path}")
|
| 95 |
+
return str(explicit_path.resolve())
|
| 96 |
+
|
| 97 |
+
on_path = shutil.which("ffmpeg")
|
| 98 |
+
if on_path:
|
| 99 |
+
return on_path
|
| 100 |
+
|
| 101 |
+
for candidate in DEFAULT_FFMPEG_CANDIDATES:
|
| 102 |
+
if Path(candidate).is_file():
|
| 103 |
+
return candidate
|
| 104 |
+
|
| 105 |
+
raise FileNotFoundError("Could not find ffmpeg; pass its path with --ffmpeg")
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
def track_colors(count: int) -> list[tuple[int, int, int]]:
|
| 109 |
+
"""Return visually separated, stable BGR colors."""
|
| 110 |
+
colors = []
|
| 111 |
+
golden_ratio = 0.618033988749895
|
| 112 |
+
for index in range(count):
|
| 113 |
+
hue = (0.07 + index * golden_ratio) % 1.0
|
| 114 |
+
red, green, blue = colorsys.hsv_to_rgb(hue, 0.88, 1.0)
|
| 115 |
+
colors.append((round(blue * 255), round(green * 255), round(red * 255)))
|
| 116 |
+
return colors
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
def validate_tracks(
|
| 120 |
+
npz_path: Path,
|
| 121 |
+
) -> tuple[np.ndarray, np.ndarray, np.ndarray]:
|
| 122 |
+
with np.load(npz_path) as data:
|
| 123 |
+
required = {"trajs_2d", "visibility", "query_frames"}
|
| 124 |
+
missing = required.difference(data.files)
|
| 125 |
+
if missing:
|
| 126 |
+
raise ValueError(f"missing NPZ arrays: {', '.join(sorted(missing))}")
|
| 127 |
+
trajectories = np.asarray(data["trajs_2d"], dtype=np.float32)
|
| 128 |
+
visibility = np.asarray(data["visibility"], dtype=np.float32)
|
| 129 |
+
query_frames = np.asarray(data["query_frames"], dtype=np.int64)
|
| 130 |
+
|
| 131 |
+
if trajectories.ndim != 3 or trajectories.shape[-1] != 2:
|
| 132 |
+
raise ValueError(f"trajs_2d must have shape (T, N, 2), got {trajectories.shape}")
|
| 133 |
+
if visibility.shape != trajectories.shape[:2]:
|
| 134 |
+
raise ValueError(
|
| 135 |
+
f"visibility shape {visibility.shape} does not match {trajectories.shape[:2]}"
|
| 136 |
+
)
|
| 137 |
+
if query_frames.shape != (trajectories.shape[1],):
|
| 138 |
+
raise ValueError(
|
| 139 |
+
f"query_frames shape {query_frames.shape} does not match "
|
| 140 |
+
f"({trajectories.shape[1]},)"
|
| 141 |
+
)
|
| 142 |
+
if np.any(query_frames < 0) or np.any(query_frames >= trajectories.shape[0]):
|
| 143 |
+
raise ValueError("query_frames contains an index outside the video")
|
| 144 |
+
return trajectories, visibility, query_frames
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
def visible_segments(
|
| 148 |
+
points: np.ndarray, visible: np.ndarray
|
| 149 |
+
) -> list[np.ndarray]:
|
| 150 |
+
"""Split a short trajectory window into contiguous visible polylines."""
|
| 151 |
+
segments: list[np.ndarray] = []
|
| 152 |
+
start = None
|
| 153 |
+
for index, is_visible in enumerate(visible):
|
| 154 |
+
if is_visible and np.isfinite(points[index]).all():
|
| 155 |
+
if start is None:
|
| 156 |
+
start = index
|
| 157 |
+
elif start is not None:
|
| 158 |
+
if index - start >= 2:
|
| 159 |
+
segments.append(points[start:index])
|
| 160 |
+
start = None
|
| 161 |
+
if start is not None and len(points) - start >= 2:
|
| 162 |
+
segments.append(points[start:])
|
| 163 |
+
return segments
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
def outlined_text(
|
| 167 |
+
frame: np.ndarray,
|
| 168 |
+
text: str,
|
| 169 |
+
origin: tuple[int, int],
|
| 170 |
+
font_scale: float,
|
| 171 |
+
color: tuple[int, int, int],
|
| 172 |
+
thickness: int,
|
| 173 |
+
) -> None:
|
| 174 |
+
cv2.putText(
|
| 175 |
+
frame,
|
| 176 |
+
text,
|
| 177 |
+
origin,
|
| 178 |
+
cv2.FONT_HERSHEY_SIMPLEX,
|
| 179 |
+
font_scale,
|
| 180 |
+
(0, 0, 0),
|
| 181 |
+
thickness + 3,
|
| 182 |
+
cv2.LINE_AA,
|
| 183 |
+
)
|
| 184 |
+
cv2.putText(
|
| 185 |
+
frame,
|
| 186 |
+
text,
|
| 187 |
+
origin,
|
| 188 |
+
cv2.FONT_HERSHEY_SIMPLEX,
|
| 189 |
+
font_scale,
|
| 190 |
+
color,
|
| 191 |
+
thickness,
|
| 192 |
+
cv2.LINE_AA,
|
| 193 |
+
)
|
| 194 |
+
|
| 195 |
+
|
| 196 |
+
def fit_text_to_width(
|
| 197 |
+
text: str,
|
| 198 |
+
max_width: int,
|
| 199 |
+
font_scale: float,
|
| 200 |
+
thickness: int,
|
| 201 |
+
) -> str:
|
| 202 |
+
"""Elide the middle of text while preserving its identifying suffix."""
|
| 203 |
+
def width(candidate: str) -> int:
|
| 204 |
+
size, _ = cv2.getTextSize(
|
| 205 |
+
candidate, cv2.FONT_HERSHEY_SIMPLEX, font_scale, thickness
|
| 206 |
+
)
|
| 207 |
+
return size[0]
|
| 208 |
+
|
| 209 |
+
if width(text) <= max_width:
|
| 210 |
+
return text
|
| 211 |
+
for keep in range(len(text) - 1, 5, -1):
|
| 212 |
+
prefix_length = (keep + 1) // 2
|
| 213 |
+
suffix_length = keep // 2
|
| 214 |
+
candidate = f"{text[:prefix_length]}...{text[-suffix_length:]}"
|
| 215 |
+
if width(candidate) <= max_width:
|
| 216 |
+
return candidate
|
| 217 |
+
return "..."
|
| 218 |
+
|
| 219 |
+
|
| 220 |
+
def draw_overlay(
|
| 221 |
+
frame: np.ndarray,
|
| 222 |
+
frame_index: int,
|
| 223 |
+
trajectories: np.ndarray,
|
| 224 |
+
visibility: np.ndarray,
|
| 225 |
+
query_frames: np.ndarray,
|
| 226 |
+
colors: list[tuple[int, int, int]],
|
| 227 |
+
trail_frames: int,
|
| 228 |
+
visibility_threshold: float,
|
| 229 |
+
clip_id: str,
|
| 230 |
+
) -> np.ndarray:
|
| 231 |
+
height, width = frame.shape[:2]
|
| 232 |
+
num_frames, num_tracks = trajectories.shape[:2]
|
| 233 |
+
visible_now = visibility[frame_index] > visibility_threshold
|
| 234 |
+
visible_now &= query_frames <= frame_index
|
| 235 |
+
|
| 236 |
+
point_radius = max(4, round(min(width, height) / 120))
|
| 237 |
+
point_outline = max(2, round(point_radius / 3))
|
| 238 |
+
trail_width = max(2, round(point_radius / 2))
|
| 239 |
+
font_scale = min(1.0, max(0.5, min(width, height) / 900))
|
| 240 |
+
font_thickness = max(1, round(font_scale * 2))
|
| 241 |
+
|
| 242 |
+
trail_layer = frame.copy()
|
| 243 |
+
first_trail_frame = max(0, frame_index - trail_frames)
|
| 244 |
+
for track_index in range(num_tracks):
|
| 245 |
+
first = max(first_trail_frame, int(query_frames[track_index]))
|
| 246 |
+
points = trajectories[first : frame_index + 1, track_index]
|
| 247 |
+
visible = visibility[first : frame_index + 1, track_index] > visibility_threshold
|
| 248 |
+
for segment in visible_segments(points, visible):
|
| 249 |
+
rounded = np.rint(segment).astype(np.int32).reshape((-1, 1, 2))
|
| 250 |
+
cv2.polylines(
|
| 251 |
+
trail_layer,
|
| 252 |
+
[rounded],
|
| 253 |
+
isClosed=False,
|
| 254 |
+
color=colors[track_index],
|
| 255 |
+
thickness=trail_width,
|
| 256 |
+
lineType=cv2.LINE_AA,
|
| 257 |
+
)
|
| 258 |
+
cv2.addWeighted(trail_layer, 0.72, frame, 0.28, 0.0, dst=frame)
|
| 259 |
+
|
| 260 |
+
for track_index in range(num_tracks):
|
| 261 |
+
if not visible_now[track_index]:
|
| 262 |
+
continue
|
| 263 |
+
point = trajectories[frame_index, track_index]
|
| 264 |
+
if not np.isfinite(point).all():
|
| 265 |
+
continue
|
| 266 |
+
x, y = np.rint(point).astype(int)
|
| 267 |
+
# Coordinates just outside the image can occur in hand-authored tracks.
|
| 268 |
+
# Clipping keeps the renderer robust while still placing a marker at the edge.
|
| 269 |
+
x = int(np.clip(x, 0, width - 1))
|
| 270 |
+
y = int(np.clip(y, 0, height - 1))
|
| 271 |
+
|
| 272 |
+
if frame_index == int(query_frames[track_index]):
|
| 273 |
+
cv2.circle(
|
| 274 |
+
frame,
|
| 275 |
+
(x, y),
|
| 276 |
+
point_radius + point_outline + 3,
|
| 277 |
+
(255, 255, 255),
|
| 278 |
+
point_outline,
|
| 279 |
+
cv2.LINE_AA,
|
| 280 |
+
)
|
| 281 |
+
cv2.circle(
|
| 282 |
+
frame,
|
| 283 |
+
(x, y),
|
| 284 |
+
point_radius + point_outline,
|
| 285 |
+
(0, 0, 0),
|
| 286 |
+
-1,
|
| 287 |
+
cv2.LINE_AA,
|
| 288 |
+
)
|
| 289 |
+
cv2.circle(
|
| 290 |
+
frame,
|
| 291 |
+
(x, y),
|
| 292 |
+
point_radius,
|
| 293 |
+
colors[track_index],
|
| 294 |
+
-1,
|
| 295 |
+
cv2.LINE_AA,
|
| 296 |
+
)
|
| 297 |
+
label_x = min(width - 1, x + point_radius + 4)
|
| 298 |
+
label_y = int(np.clip(y - point_radius - 2, 14, height - 2))
|
| 299 |
+
outlined_text(
|
| 300 |
+
frame,
|
| 301 |
+
str(track_index),
|
| 302 |
+
(label_x, label_y),
|
| 303 |
+
font_scale * 0.78,
|
| 304 |
+
colors[track_index],
|
| 305 |
+
font_thickness,
|
| 306 |
+
)
|
| 307 |
+
|
| 308 |
+
active_count = int(np.count_nonzero(query_frames <= frame_index))
|
| 309 |
+
clip_line = fit_text_to_width(
|
| 310 |
+
f"clip: {clip_id}", width - 20, font_scale, font_thickness
|
| 311 |
+
)
|
| 312 |
+
stats_line = (
|
| 313 |
+
f"frame {frame_index + 1}/{num_frames} "
|
| 314 |
+
f"visible {int(np.count_nonzero(visible_now))}/{active_count} "
|
| 315 |
+
f"tracks {num_tracks}"
|
| 316 |
+
)
|
| 317 |
+
clip_size, baseline = cv2.getTextSize(
|
| 318 |
+
clip_line, cv2.FONT_HERSHEY_SIMPLEX, font_scale, font_thickness
|
| 319 |
+
)
|
| 320 |
+
stats_size, _ = cv2.getTextSize(
|
| 321 |
+
stats_line, cv2.FONT_HERSHEY_SIMPLEX, font_scale, font_thickness
|
| 322 |
+
)
|
| 323 |
+
line_gap = max(5, round(font_scale * 6))
|
| 324 |
+
header_height = clip_size[1] + stats_size[1] + baseline + line_gap + 18
|
| 325 |
+
header_width = min(width, max(clip_size[0], stats_size[0]) + 20)
|
| 326 |
+
header_layer = frame.copy()
|
| 327 |
+
cv2.rectangle(header_layer, (0, 0), (header_width, header_height), (0, 0, 0), -1)
|
| 328 |
+
cv2.addWeighted(header_layer, 0.62, frame, 0.38, 0.0, dst=frame)
|
| 329 |
+
cv2.putText(
|
| 330 |
+
frame,
|
| 331 |
+
clip_line,
|
| 332 |
+
(10, clip_size[1] + 7),
|
| 333 |
+
cv2.FONT_HERSHEY_SIMPLEX,
|
| 334 |
+
font_scale,
|
| 335 |
+
(255, 255, 255),
|
| 336 |
+
font_thickness,
|
| 337 |
+
cv2.LINE_AA,
|
| 338 |
+
)
|
| 339 |
+
cv2.putText(
|
| 340 |
+
frame,
|
| 341 |
+
stats_line,
|
| 342 |
+
(10, clip_size[1] + line_gap + stats_size[1] + 7),
|
| 343 |
+
cv2.FONT_HERSHEY_SIMPLEX,
|
| 344 |
+
font_scale,
|
| 345 |
+
(255, 255, 255),
|
| 346 |
+
font_thickness,
|
| 347 |
+
cv2.LINE_AA,
|
| 348 |
+
)
|
| 349 |
+
return frame
|
| 350 |
+
|
| 351 |
+
|
| 352 |
+
def render_clip(
|
| 353 |
+
clip_dir_string: str,
|
| 354 |
+
video_name: str,
|
| 355 |
+
tracks_name: str,
|
| 356 |
+
output_name: str,
|
| 357 |
+
trail_seconds: float,
|
| 358 |
+
visibility_threshold: float,
|
| 359 |
+
crf: int,
|
| 360 |
+
preset: str,
|
| 361 |
+
ffmpeg: str,
|
| 362 |
+
overwrite: bool,
|
| 363 |
+
) -> tuple[str, str, str]:
|
| 364 |
+
clip_dir = Path(clip_dir_string)
|
| 365 |
+
video_path = clip_dir / video_name
|
| 366 |
+
tracks_path = clip_dir / tracks_name
|
| 367 |
+
output_path = clip_dir / output_name
|
| 368 |
+
clip_id = clip_dir.name
|
| 369 |
+
|
| 370 |
+
if output_path.exists() and not overwrite:
|
| 371 |
+
return clip_id, "skipped", "already exists"
|
| 372 |
+
|
| 373 |
+
trajectories, visibility, query_frames = validate_tracks(tracks_path)
|
| 374 |
+
capture = cv2.VideoCapture(str(video_path))
|
| 375 |
+
if not capture.isOpened():
|
| 376 |
+
raise RuntimeError(f"could not open video: {video_path}")
|
| 377 |
+
|
| 378 |
+
width = int(capture.get(cv2.CAP_PROP_FRAME_WIDTH))
|
| 379 |
+
height = int(capture.get(cv2.CAP_PROP_FRAME_HEIGHT))
|
| 380 |
+
fps = float(capture.get(cv2.CAP_PROP_FPS))
|
| 381 |
+
reported_frames = int(capture.get(cv2.CAP_PROP_FRAME_COUNT))
|
| 382 |
+
if width <= 0 or height <= 0 or fps <= 0:
|
| 383 |
+
capture.release()
|
| 384 |
+
raise ValueError(f"invalid video metadata: {width}x{height} at {fps} fps")
|
| 385 |
+
if reported_frames > 0 and reported_frames != trajectories.shape[0]:
|
| 386 |
+
capture.release()
|
| 387 |
+
raise ValueError(
|
| 388 |
+
f"video reports {reported_frames} frames but tracks have "
|
| 389 |
+
f"{trajectories.shape[0]}"
|
| 390 |
+
)
|
| 391 |
+
|
| 392 |
+
temporary_path = output_path.with_name(
|
| 393 |
+
f".{output_path.stem}.tmp-{os.getpid()}{output_path.suffix}"
|
| 394 |
+
)
|
| 395 |
+
command = [
|
| 396 |
+
ffmpeg,
|
| 397 |
+
"-hide_banner",
|
| 398 |
+
"-loglevel",
|
| 399 |
+
"error",
|
| 400 |
+
"-y",
|
| 401 |
+
"-f",
|
| 402 |
+
"rawvideo",
|
| 403 |
+
"-pixel_format",
|
| 404 |
+
"bgr24",
|
| 405 |
+
"-video_size",
|
| 406 |
+
f"{width}x{height}",
|
| 407 |
+
"-framerate",
|
| 408 |
+
f"{fps:.8f}",
|
| 409 |
+
"-i",
|
| 410 |
+
"-",
|
| 411 |
+
"-an",
|
| 412 |
+
"-vf",
|
| 413 |
+
"pad=ceil(iw/2)*2:ceil(ih/2)*2",
|
| 414 |
+
"-c:v",
|
| 415 |
+
"libx264",
|
| 416 |
+
"-preset",
|
| 417 |
+
preset,
|
| 418 |
+
"-crf",
|
| 419 |
+
str(crf),
|
| 420 |
+
"-pix_fmt",
|
| 421 |
+
"yuv420p",
|
| 422 |
+
"-movflags",
|
| 423 |
+
"+faststart",
|
| 424 |
+
str(temporary_path),
|
| 425 |
+
]
|
| 426 |
+
|
| 427 |
+
encoder = subprocess.Popen(
|
| 428 |
+
command,
|
| 429 |
+
stdin=subprocess.PIPE,
|
| 430 |
+
stdout=subprocess.DEVNULL,
|
| 431 |
+
stderr=subprocess.PIPE,
|
| 432 |
+
)
|
| 433 |
+
frames_written = 0
|
| 434 |
+
colors = track_colors(trajectories.shape[1])
|
| 435 |
+
trail_frames = max(0, round(trail_seconds * fps))
|
| 436 |
+
failure: Exception | None = None
|
| 437 |
+
try:
|
| 438 |
+
assert encoder.stdin is not None
|
| 439 |
+
for frame_index in range(trajectories.shape[0]):
|
| 440 |
+
ok, frame = capture.read()
|
| 441 |
+
if not ok:
|
| 442 |
+
raise RuntimeError(
|
| 443 |
+
f"video ended after {frames_written}/{trajectories.shape[0]} frames"
|
| 444 |
+
)
|
| 445 |
+
draw_overlay(
|
| 446 |
+
frame,
|
| 447 |
+
frame_index,
|
| 448 |
+
trajectories,
|
| 449 |
+
visibility,
|
| 450 |
+
query_frames,
|
| 451 |
+
colors,
|
| 452 |
+
trail_frames,
|
| 453 |
+
visibility_threshold,
|
| 454 |
+
clip_id,
|
| 455 |
+
)
|
| 456 |
+
encoder.stdin.write(frame.tobytes())
|
| 457 |
+
frames_written += 1
|
| 458 |
+
except Exception as error:
|
| 459 |
+
failure = error
|
| 460 |
+
finally:
|
| 461 |
+
capture.release()
|
| 462 |
+
if encoder.stdin is not None:
|
| 463 |
+
try:
|
| 464 |
+
encoder.stdin.close()
|
| 465 |
+
except BrokenPipeError:
|
| 466 |
+
pass
|
| 467 |
+
|
| 468 |
+
assert encoder.stderr is not None
|
| 469 |
+
encoder_error = encoder.stderr.read().decode("utf-8", errors="replace").strip()
|
| 470 |
+
return_code = encoder.wait()
|
| 471 |
+
if failure is not None or return_code != 0:
|
| 472 |
+
temporary_path.unlink(missing_ok=True)
|
| 473 |
+
details = str(failure) if failure is not None else ""
|
| 474 |
+
if encoder_error:
|
| 475 |
+
details = f"{details}; ffmpeg: {encoder_error}".strip("; ")
|
| 476 |
+
raise RuntimeError(details or f"ffmpeg exited with status {return_code}")
|
| 477 |
+
|
| 478 |
+
if frames_written != trajectories.shape[0]:
|
| 479 |
+
temporary_path.unlink(missing_ok=True)
|
| 480 |
+
raise RuntimeError(
|
| 481 |
+
f"wrote {frames_written} frames, expected {trajectories.shape[0]}"
|
| 482 |
+
)
|
| 483 |
+
os.replace(temporary_path, output_path)
|
| 484 |
+
return clip_id, "rendered", f"{frames_written} frames"
|
| 485 |
+
|
| 486 |
+
|
| 487 |
+
def main() -> int:
|
| 488 |
+
args = parse_args()
|
| 489 |
+
dataset_root = args.dataset_root.resolve()
|
| 490 |
+
if not dataset_root.is_dir():
|
| 491 |
+
print(f"error: dataset root does not exist: {dataset_root}", file=sys.stderr)
|
| 492 |
+
return 2
|
| 493 |
+
if args.workers < 1:
|
| 494 |
+
print("error: --workers must be at least 1", file=sys.stderr)
|
| 495 |
+
return 2
|
| 496 |
+
if args.trail_seconds < 0:
|
| 497 |
+
print("error: --trail-seconds cannot be negative", file=sys.stderr)
|
| 498 |
+
return 2
|
| 499 |
+
if not 0 <= args.crf <= 51:
|
| 500 |
+
print("error: --crf must be between 0 and 51", file=sys.stderr)
|
| 501 |
+
return 2
|
| 502 |
+
|
| 503 |
+
try:
|
| 504 |
+
ffmpeg = find_ffmpeg(args.ffmpeg)
|
| 505 |
+
except FileNotFoundError as error:
|
| 506 |
+
print(f"error: {error}", file=sys.stderr)
|
| 507 |
+
return 2
|
| 508 |
+
|
| 509 |
+
clip_dirs = sorted(
|
| 510 |
+
path
|
| 511 |
+
for path in dataset_root.iterdir()
|
| 512 |
+
if path.is_dir()
|
| 513 |
+
and (path / args.video_name).is_file()
|
| 514 |
+
and (path / args.tracks_name).is_file()
|
| 515 |
+
)
|
| 516 |
+
if args.limit is not None:
|
| 517 |
+
if args.limit < 0:
|
| 518 |
+
print("error: --limit cannot be negative", file=sys.stderr)
|
| 519 |
+
return 2
|
| 520 |
+
clip_dirs = clip_dirs[: args.limit]
|
| 521 |
+
if not clip_dirs:
|
| 522 |
+
print("No matching clip directories found.")
|
| 523 |
+
return 0
|
| 524 |
+
|
| 525 |
+
print(
|
| 526 |
+
f"Rendering {len(clip_dirs)} clips from {dataset_root} with "
|
| 527 |
+
f"{args.workers} worker(s)",
|
| 528 |
+
flush=True,
|
| 529 |
+
)
|
| 530 |
+
print(f"ffmpeg: {ffmpeg}", flush=True)
|
| 531 |
+
|
| 532 |
+
rendered = 0
|
| 533 |
+
skipped = 0
|
| 534 |
+
failures: list[tuple[str, str]] = []
|
| 535 |
+
common_args = (
|
| 536 |
+
args.video_name,
|
| 537 |
+
args.tracks_name,
|
| 538 |
+
args.output_name,
|
| 539 |
+
args.trail_seconds,
|
| 540 |
+
args.visibility_threshold,
|
| 541 |
+
args.crf,
|
| 542 |
+
args.preset,
|
| 543 |
+
ffmpeg,
|
| 544 |
+
args.overwrite,
|
| 545 |
+
)
|
| 546 |
+
with ProcessPoolExecutor(max_workers=args.workers) as executor:
|
| 547 |
+
future_to_clip = {
|
| 548 |
+
executor.submit(render_clip, str(clip_dir), *common_args): clip_dir.name
|
| 549 |
+
for clip_dir in clip_dirs
|
| 550 |
+
}
|
| 551 |
+
for completed, future in enumerate(as_completed(future_to_clip), start=1):
|
| 552 |
+
clip_id = future_to_clip[future]
|
| 553 |
+
try:
|
| 554 |
+
_, status, detail = future.result()
|
| 555 |
+
if status == "rendered":
|
| 556 |
+
rendered += 1
|
| 557 |
+
else:
|
| 558 |
+
skipped += 1
|
| 559 |
+
print(
|
| 560 |
+
f"[{completed:>3}/{len(clip_dirs)}] {status:8} {clip_id} "
|
| 561 |
+
f"({detail})",
|
| 562 |
+
flush=True,
|
| 563 |
+
)
|
| 564 |
+
except Exception as error:
|
| 565 |
+
failures.append((clip_id, str(error)))
|
| 566 |
+
print(
|
| 567 |
+
f"[{completed:>3}/{len(clip_dirs)}] FAILED {clip_id}: {error}",
|
| 568 |
+
file=sys.stderr,
|
| 569 |
+
flush=True,
|
| 570 |
+
)
|
| 571 |
+
|
| 572 |
+
print(
|
| 573 |
+
f"Done: {rendered} rendered, {skipped} skipped, {len(failures)} failed.",
|
| 574 |
+
flush=True,
|
| 575 |
+
)
|
| 576 |
+
if failures:
|
| 577 |
+
print("Failures:", file=sys.stderr)
|
| 578 |
+
for clip_id, error in failures:
|
| 579 |
+
print(f" {clip_id}: {error}", file=sys.stderr)
|
| 580 |
+
return 1
|
| 581 |
+
return 0
|
| 582 |
+
|
| 583 |
+
|
| 584 |
+
if __name__ == "__main__":
|
| 585 |
+
raise SystemExit(main())
|
train/1_29838012/point_tracks.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e29c628d853945139b7e6b24ed494cd9a90e259c86d835e07e5a8e996bc80e88
|
| 3 |
+
size 20714
|
train/2d8646d63a7b6154_23804457_seg0004/point_track_vis.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:956a62e91be6bf9559a2c4726cab718fce6c54f98d46ebc29d09ca153990ce3c
|
| 3 |
+
size 1565247
|
train/2d8646d63a7b6154_23804457_seg0004/point_tracks.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:38b4265f54b5e401e3cb242f334bc6d58692f7215c464d2d424f4dc614940a9e
|
| 3 |
+
size 26034
|
train/2d8646d63a7b6154_23804457_seg0004/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a2b15265bef21d7093013d55fdfc047757771619258d87dde7051b732265c5a4
|
| 3 |
+
size 1705522
|
train/2d8646d63a7b6154_23804457_seg0144/point_track_vis.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3e5c8012b81ad597a8976dea7a2809931742687e56c8e0edccbacb68f7c4c43f
|
| 3 |
+
size 1937482
|
train/2d8646d63a7b6154_23804457_seg0144/point_tracks.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4fe70dcb5f3b49eef59050b4633d092a2a9e2a83849c71e95ab7d573b375cc2f
|
| 3 |
+
size 11602
|
train/2d8646d63a7b6154_23804457_seg0144/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d6152b387f5857b61e2124f39f2e6e16b8149297b902b54f5306b0c1671046bf
|
| 3 |
+
size 2083186
|
train/303f470e03136909_28834630_seg0048/point_track_vis.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7d1e25f78b3c8e6f7d47c291ebd657b8692c29da64997fa13d99096435773f26
|
| 3 |
+
size 1991746
|
train/303f470e03136909_28834630_seg0048/point_tracks.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:72d38b2288a108fb2535c35ab48b23465c510b49a263f9d31a3261c9e4608dcb
|
| 3 |
+
size 18818
|
train/303f470e03136909_28834630_seg0048/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5f253240f022bde9e820ae31c637dfcf2cc632acdd91db960b5bef3ea5adca7b
|
| 3 |
+
size 1933711
|
train/303f470e03136909_28834630_seg0072/point_track_vis.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a14023b70fc4cec1d31883bd66afe7863ab7922e30f48ac22f20c1f918084476
|
| 3 |
+
size 1845603
|
train/303f470e03136909_28834630_seg0072/point_tracks.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:30f0c6ffb62814cfcf331d3ca682c35e7e98469447ddd935daeda5c0a87daf75
|
| 3 |
+
size 7994
|
train/303f470e03136909_28834630_seg0072/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ff8651d180b8efe062564ea29722342e4b67c06166cbc5991b57db1fbafbcfea
|
| 3 |
+
size 1883887
|
train/39965b22783c5193_13263313_seg0088/point_track_vis.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:030a044e96a8c3c81821f9d8329a905a88a4ac576d6386b86bf70bd7903a6e43
|
| 3 |
+
size 2252098
|
train/39965b22783c5193_13263313_seg0088/point_tracks.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:38c58ec2db8ff45919154d06032f0670832f184ffd1aae0694352358caee54cc
|
| 3 |
+
size 24230
|
train/39965b22783c5193_13263313_seg0088/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:214ab8bc1bab74912751ad4ce9a5722871ef951ab1d6f5f03ab3e158258d0a80
|
| 3 |
+
size 1699196
|
train/3_23404442/point_track_vis.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:98c543d285c91b16604815cb716d0d16dd6d39ec854762d37b560d9d2fd4e26a
|
| 3 |
+
size 2283134
|
train/3_23404442/point_tracks.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a41814251f63aee10e59b8eb8c711bbbc7169edf6e3d4b11e046e56f0a99e30e
|
| 3 |
+
size 6354
|
train/3_23404442/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3712225a521374df47b1c9b225e1565d69e3344a4d1eb30a401eb28bb779030f
|
| 3 |
+
size 6395197
|
train/Fri_May_12_11_50_47_2023_recordings_MP4_ego/point_track_vis.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8b35edc0898c0266a8d132515a2e0f09c8ae72930324beb9a0c31ea4ef49598f
|
| 3 |
+
size 2666858
|
train/Fri_May_12_11_50_47_2023_recordings_MP4_ego/point_tracks.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eb178be51bb19242fd4bf1c3a0cdca76efb83a3d0674741551b8c7b8e189c782
|
| 3 |
+
size 6010
|
train/Fri_May_12_11_50_47_2023_recordings_MP4_ego/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c33e67af0a000c95e917746befb4e269c247b03e30db7ba32b2d087deda65f54
|
| 3 |
+
size 3202519
|
train/Sun_Jun_11_15_09_35_2023_recordings_MP4_23897859/point_track_vis.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:122a33488654e39b9719ab24f3fc079b322e9c8b22b308c45a43e227d26fdbcc
|
| 3 |
+
size 3557546
|
train/Sun_Jun_11_15_09_35_2023_recordings_MP4_23897859/point_tracks.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9575981f94cd50a340d60e5f1c59eb897e72b71101b107a64f9c3bea6726a241
|
| 3 |
+
size 26778
|
train/Sun_Jun_11_15_09_35_2023_recordings_MP4_27904255/point_track_vis.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:455b5c059b6ded1c44fea061c9edecc4d93b62641fa73db119503ef46dd2e5a1
|
| 3 |
+
size 3539950
|
train/Sun_Jun_11_15_09_35_2023_recordings_MP4_27904255/point_tracks.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:88d1a00eff1ae9abe7d11344ce4d6fd4be11bad0f09e2418c3139528ac745a24
|
| 3 |
+
size 42378
|
train/Sun_Jun_11_15_09_35_2023_recordings_MP4_27904255/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ad87be9a49c302660dd40a053db1525c100b4f82966fa41207d77abf5865fff7
|
| 3 |
+
size 10086900
|
train/Tue_Feb_13_10_44_21_2024_recordings_MP4_14549178/point_track_vis.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:da83cf03f5fcbe4fc1f8e7a5fb1156c66700f48a81477e84d13100f15309aea0
|
| 3 |
+
size 3128203
|
train/Tue_Feb_13_10_44_21_2024_recordings_MP4_14549178/point_tracks.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9c930b2a387d8ba54f22b1805e621fad26efc9f355a49cfcd424743f1c39334e
|
| 3 |
+
size 2990
|
train/Tue_Feb_13_10_44_21_2024_recordings_MP4_14549178/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a48d0edf917b4ed1978d6cc3a8434022cb87d6f3522e8ec37331057ca45fc035
|
| 3 |
+
size 5368314
|
train/Tue_Feb_13_10_49_35_2024_recordings_MP4_20252535/point_track_vis.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d5aa3367d49bbd2c5a14d6aac1d4bcf225120c51a53e974b16280063fb998c4b
|
| 3 |
+
size 1547571
|
train/Tue_Feb_13_10_49_35_2024_recordings_MP4_20252535/point_tracks.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c441985fc8bbc37a3ebaaa9530954bf3df6953fe5ec0083bbaf53dd92eb74228
|
| 3 |
+
size 8858
|
train/Tue_Feb_13_10_49_35_2024_recordings_MP4_20252535/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8342c97d22b7e657efa1f1057b6ccfbe13a4d2b926aeedbb6395547e8f54072e
|
| 3 |
+
size 5204629
|
train/bimanual_yam_allenai_12012026-block2-1/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:77b59c3494c5dfe32485d338afaed0039b618eafb2739ba3e24fa95b8e5ae3e5
|
| 3 |
+
size 1011437
|
train/human_aria_bimanual_2025-10-29-22-02-43-003000/point_tracks.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c1d141f48976088544bd8f677ea73ff2ec9de1091e2df300c967f3e684b5786c
|
| 3 |
+
size 22402
|
train/metadata.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4c3318faf9ecffb671d5810cd8609000cfb851c0387deeb1ed48de42fbc22422
|
| 3 |
+
size 21997
|
train/nus_cpr_42_3_Place_the_other_hand_on_top_of_the_first_ego/point_track_vis.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6d684c483a3ea498be47433545b61d029254571b78d23214a34ea807ea776e2b
|
| 3 |
+
size 1419642
|
train/nus_cpr_42_3_Place_the_other_hand_on_top_of_the_first_ego/point_tracks.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2d7abd8add4d2cff3818047faa722b09c48ef7fe212671cea44f42eb0ffd6895
|
| 3 |
+
size 4202
|
train/nus_cpr_42_3_Place_the_other_hand_on_top_of_the_first_ego/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:80063699f8870f9410eda7195cc06ffb24b286f531c90ad08c3ac1089b52c3fd
|
| 3 |
+
size 1133845
|
train/robotic_eva_bimanual_2026-04-29-19-10-18-459000/point_track_vis.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a61f984442827622242f05c3760db60f38a4435a77c3cc46734bc7625293f46a
|
| 3 |
+
size 952890
|
train/robotic_eva_bimanual_2026-04-29-19-10-18-459000/point_tracks.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:192523aa9951b97e23a6401339043f0b3d8abe389bd7da96af980da2f9ee4f11
|
| 3 |
+
size 15194
|
train/robotic_eva_bimanual_2026-04-29-19-10-18-459000/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:94c35c96b46b3bb9349d08672b1c0fab9cc89c50f38677e9b57c795d12143511
|
| 3 |
+
size 2042465
|
train/so100_Loki0929_so100_lan/point_track_vis.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d92798e25837a193fc98771760c172cc7f7ba6489e53740535e778414923f59d
|
| 3 |
+
size 982915
|
train/so100_Loki0929_so100_lan/point_tracks.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:24d3b1a07a0d1d5dd86280b71bdebb56c0638021eec95151253cf166e0bd0096
|
| 3 |
+
size 58250
|
train/so100_Loki0929_so100_lan/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:938a9c0e8f49a20ec7e5c63eef05305af6ba9da467a9fcbff70c6effa5325258
|
| 3 |
+
size 938405
|
train/upenn_0324_Piano_1_2_random_clip_exo/point_track_vis.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:04f21d0060fa991137f62f32b5fba73a70f1ea5cc9a49863c5800beb86c11487
|
| 3 |
+
size 3496252
|
train/upenn_0324_Piano_1_2_random_clip_exo/point_tracks.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:666b9375db0aede70358d9b0dae5fadbc2449a9058977f8637e37d896d17ca62
|
| 3 |
+
size 15194
|
train/upenn_0324_Piano_1_2_random_clip_exo/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:12e3d8baa7e54c637ac14b7aaeef22f57ac44c1ee5cb398a996a343ea78446b3
|
| 3 |
+
size 3576451
|