Dataset Preview
Duplicate

The dataset viewer should be available soon. Please retry later.

calibration
dict
extra
dict
train
dict
validation
dict
{"attrs":[[0.6203866600990295,0.07369145005941391,0.805947482585907],[1.305928111076355,0.0851892977(...TRUNCATED)
{"attrs":[[1.4862760305404663,0.08674989640712738,0.5805550217628479],[1.3110105991363525,0.09074275(...TRUNCATED)
{"attrs":[[1.3815162181854248,0.09188084304332733,0.5851335525512695],[1.1787505149841309,0.07003651(...TRUNCATED)
{"attrs":[[0.6758869886398315,0.0628090351819992,0.46579742431640625],[0.5872979164123535,0.09996204(...TRUNCATED)
{"attrs":[[1.4238637685775757,0.09101434797048569,0.7500574588775635],[0.6730229258537292,0.06391054(...TRUNCATED)
{"attrs":[[1.0671013593673706,0.08810931444168091,0.8530694842338562],[1.3749245405197144,0.09073353(...TRUNCATED)
{"attrs":[[0.6993529200553894,0.07349735498428345,0.41359516978263855],[0.8036952018737793,0.0910508(...TRUNCATED)
{"attrs":[[0.5467697381973267,0.08800961822271347,0.8250613212585449],[0.7650266885757446,0.07904548(...TRUNCATED)
{"attrs":[[1.130033254623413,0.07273814082145691,0.7569542527198792],[0.779803991317749,0.0684356614(...TRUNCATED)
{"attrs":[[0.7678793668746948,0.07878271490335464,0.811697781085968],[0.6316618323326111,0.063872471(...TRUNCATED)
{"attrs":[[0.553257942199707,0.07730460166931152,0.7103634476661682],[1.0416251420974731,0.088893927(...TRUNCATED)
{"attrs":[[0.5199525356292725,0.08453681319952011,0.8582993149757385],[1.0849310159683228,0.06920117(...TRUNCATED)
{"attrs":[[1.036102056503296,0.09874355792999268,0.8986896276473999],[1.3870302438735962,0.084146805(...TRUNCATED)
{"attrs":[[0.6188768744468689,0.061214037239551544,0.606680691242218],[0.6507453322410583,0.09989700(...TRUNCATED)
{"attrs":[[0.9327017068862915,0.09324672818183899,0.6765264272689819],[0.7814019918441772,0.09040186(...TRUNCATED)
{"attrs":[[0.7755765318870544,0.08666302263736725,0.41221705079078674],[1.1216368675231934,0.0981992(...TRUNCATED)
{"attrs":[[1.191467046737671,0.07892192900180817,0.6280804872512817],[0.6354150772094727,0.068179160(...TRUNCATED)
{"attrs":[[1.4399030208587646,0.09632217139005661,0.4508102238178253],[1.259774923324585,0.089749209(...TRUNCATED)
{"attrs":[[0.596701979637146,0.0935002937912941,0.5892778038978577],[1.3394322395324707,0.0967223495(...TRUNCATED)
{"attrs":[[1.010340929031372,0.08630777150392532,0.811339259147644],[0.5686931014060974,0.0748538225(...TRUNCATED)
{"attrs":[[0.5712080001831055,0.07629220932722092,0.601473331451416],[1.3837740421295166,0.067491561(...TRUNCATED)
{"attrs":[[0.6183122396469116,0.0666203424334526,0.8386088609695435],[1.3593801259994507,0.075006917(...TRUNCATED)
{"attrs":[[0.6026225090026855,0.07041364908218384,0.5398098826408386],[0.914115309715271,0.071048468(...TRUNCATED)
{"attrs":[[0.5760216116905212,0.06001681089401245,0.7009966373443604],[1.0914753675460815,0.06922191(...TRUNCATED)
{"attrs":[[1.2887964248657227,0.07566963136196136,0.46659326553344727],[0.9151450395584106,0.0753792(...TRUNCATED)
{"attrs":[[1.1846117973327637,0.0921199843287468,0.6428013443946838],[1.151256799697876,0.0913650095(...TRUNCATED)
{"attrs":[[0.889035701751709,0.08627188950777054,0.7091372609138489],[0.8467836380004883,0.086232498(...TRUNCATED)
{"attrs":[[0.9717137217521667,0.0928853452205658,0.8697530031204224],[1.062203288078308,0.0752194300(...TRUNCATED)
{"attrs":[[1.01853609085083,0.087826207280159,0.5471785664558411],[1.3712233304977417,0.076798975467(...TRUNCATED)
{"attrs":[[0.8090271353721619,0.06483633071184158,0.4609079957008362],[0.9316893219947815,0.09136259(...TRUNCATED)
{"attrs":[[0.8004662990570068,0.061435602605342865,0.4090019166469574],[0.5642873644828796,0.0788342(...TRUNCATED)
{"attrs":[[0.7043322324752808,0.09914980828762054,0.7687573432922363],[1.0127332210540771,0.06793224(...TRUNCATED)
{"attrs":[[0.5661545991897583,0.09360238909721375,0.4740733206272125],[1.1551469564437866,0.09907443(...TRUNCATED)
{"attrs":[[1.4164981842041016,0.0862896516919136,0.8046204447746277],[0.8163362145423889,0.094348676(...TRUNCATED)
{"attrs":[[0.5105672478675842,0.08662912249565125,0.7830097079277039],[0.9597568511962891,0.09805573(...TRUNCATED)
{"attrs":[[0.9076364636421204,0.08069886267185211,0.6109369397163391],[0.8967767357826233,0.07618916(...TRUNCATED)
{"attrs":[[0.8859077095985413,0.08320785313844681,0.8636289238929749],[1.2340452671051025,0.09482291(...TRUNCATED)
{"attrs":[[0.7938157320022583,0.07669061422348022,0.7538454532623291],[1.0672014951705933,0.06039307(...TRUNCATED)
{"attrs":[[1.0959616899490356,0.07755433768033981,0.6127039790153503],[1.4121097326278687,0.08534056(...TRUNCATED)
{"attrs":[[0.895592987537384,0.07819274812936783,0.8209704756736755],[0.536595344543457,0.0936274081(...TRUNCATED)
End of preview.

HamiBalls

HamiBalls is a pair of synthetic physical-trajectory datasets combining smooth spring dynamics with inelastic contacts. Each trajectory contains an initial state and 192 subsequent states, sampled at 30 Hz.

Code and generators · Model weights

Environments

HamiBalls-1: Five balls move in a closed two-dimensional square. Each ball is attached to the fixed center by a harmonic spring; ball–ball and ball–wall contacts are inelastic. Gravity is zero. Simulation uses Pymunk with eight internal substeps per recorded transition.

HamiBalls-2: Five to ten balls move inside a three-dimensional box with gravity, a sparse inter-object spring graph, and ball–ball and boundary contacts. Simulation uses PyBullet with 32 internal substeps per recorded transition. Object arrays are padded to ten slots and accompanied by validity masks.

Mass, radius, restitution, initial conditions, and, for HamiBalls-2, spring parameters vary across scenes.

Files and splits

File train calibration validation extra Total trajectories
hamiballs1.h5 14,336 512 512 1,024 16,384
hamiballs2.h5 30,720 512 512 1,024 32,768

Each split is an HDF5 group. The supplied trajectory evaluator reads validation.

Data format

Below, S is the number of trajectories in a split, T=193, N=5 for HamiBalls-1 and N=10 for HamiBalls-2, and spatial dimension d is 2 or 3.

Field Shape Meaning
phase [S, T, N, 2d] Position followed by momentum: [qx, qy, px, py] or [qx, qy, qz, px, py, pz]
attrs [S, N, 3] Mass, radius, restitution, in that order
time [S, T] Physical frame times; consecutive frames are separated by 1/30 s
contact [S, 192, N] Object-wise contact indicator for each transition

phase, attrs, and time are float32 arrays. States are stored in physical simulation coordinates; momentum is mass times velocity. The supplied model loaders and evaluator handle model-specific normalization, with scales carried in the weight files. Contact indicators are uint8 and occur in HamiBalls-1's validation group and all HamiBalls-2 groups.

HamiBalls-2 includes these additional fields:

Field Shape Meaning
object_mask [S, 10] Valid object slots
spring_mask [S, 10, 10] Spring adjacency
spring_k [S, 10, 10] Spring stiffness
spring_rest_length [S, 10, 10] Spring rest length
gravity [S, 3] Gravity vector
bounds [S, 6] [xmin, xmax, ymin, ymax, zmin, zmax]
window_start [S] Start frame of the designated 48-transition training window

Masks are uint8, window_start is int16, and the remaining fields are float32. Exclude padded objects using object_mask when computing metrics.

Download and read

python -m pip install huggingface_hub h5py
import h5py
from huggingface_hub import hf_hub_download

path = hf_hub_download(
    repo_id="HamiFormer/Hamiballs",
    repo_type="dataset",
    filename="hamiballs2.h5",
)
with h5py.File(path, "r") as data:
    group = data["validation"]
    phase = group["phase"][0]
    attrs = group["attrs"][0]
    valid = group["object_mask"][0].astype(bool)
    positions = phase[:, valid, :3]
    momenta = phase[:, valid, 3:]

HDF5 slicing supports reading individual trajectories or batches without loading a whole file into memory. Evaluation commands and weight mappings are provided in the model card.

Generation and use

The code repository provides generate-h1, pack-h1, and generate-h2 commands. Generator configurations are under configs/generator/; the supported simulator versions are Pymunk 7.3.0 and PyBullet 3.2.7.

The datasets support research on multi-object dynamics, contact-aware prediction, and long-horizon physical simulation. Their physical systems and parameter ranges are defined by the accompanying generator configurations. The generator code is distributed under the MIT license.

Downloads last month
36

Models trained or fine-tuned on HamiFormer/Hamiballs