Team Ai
Datasetpublic

SparseWake/sparsewake

SparseWake SparseWake is a synthetic benchmark for sparse temporal hydrodynamic sensing. ICLR 2027 release The expanded release adds controlled multi-source mixtures and common-prior nearest-source tasks, with complete core data banks, reference checkpoints, a small review supplement, and reproduction code with a frozen wake-library input. Download release iclr2027-v1.0rc2 The version page lists the three archives, exact sizes, checksums, extraction instructions… See the full description on the dataset page: https://huggingface.co/datasets/SparseWake/sparsewake.

sourceHugging Facecc-by-4.0updated 14d agoView on Hugging Face
0likes279downloads
make_sample_dataset.py45 linesDownload Raw Back to scripts
1from __future__ import annotations2 3import argparse4from pathlib import Path5 6import h5py7import numpy as np8 9 10def main() -> None:11    parser = argparse.ArgumentParser()12    parser.add_argument("--source", required=True)13    parser.add_argument("--out", required=True)14    parser.add_argument("--poses", type=int, default=64)15    args = parser.parse_args()16    source = Path(args.source)17    out = Path(args.out)18    out.parent.mkdir(parents=True, exist_ok=True)19    with h5py.File(source, "r") as src:20        n = src["y"].shape[-1]21        phases = np.asarray(src["groups"]).reshape(-1)22        n_phase = len(np.unique(phases))23        n_pose = n // n_phase24        pose_count = min(args.poses, n_pose)25        selected = np.concatenate([np.arange(p * n_pose, p * n_pose + pose_count) for p in range(n_phase)])26        with h5py.File(out, "w") as dst:27            for key, value in src.items():28                arr = np.asarray(value)29                if arr.ndim > 0 and arr.shape[-1] == n:30                    dst.create_dataset(key, data=arr[..., selected], compression="gzip", compression_opts=4)31                else:32                    dst.create_dataset(key, data=arr, compression="gzip", compression_opts=4)33            dst.create_dataset("pose_id", data=np.tile(np.arange(pose_count, dtype=np.int32), n_phase), compression="gzip", compression_opts=4)34            dst.attrs["name"] = "SparseWake sample dataset"35            dst.attrs["source"] = "processed SparseWake HDF5 benchmark dataset"36            dst.attrs["units"] = "lengths are nondimensionalized by fish body length; angles are radians"37            dst.attrs["label_columns"] = "delta_x, delta_y, theta_rel, sin_phi, cos_phi, phi"38            dst.attrs["sensor_names"] = "anterior_left, anterior_right, midbody_left, midbody_right, posterior_left, posterior_right"39    print(f"Wrote {out}")40 41 42if __name__ == "__main__":43    main()44 45