Spaces:
Running

abc-grasp-eval / world-models.html
tianxiaoshen's picture
Show ground truth and recorded outcome on the left
2d8da67 verified
Raw History Blame Contribute Delete
35.7 kB
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>World Model Rollouts</title>
<style>
*{box-sizing:border-box}body{margin:0;background:#f5f6f7;color:#20252a;font:15px system-ui,sans-serif;letter-spacing:0}main{max-width:1250px;margin:auto;padding:24px}h1{font-size:24px;margin:0 0 20px}h2{font-size:18px;margin:20px 0 6px}header,.controls,.cameras{display:flex;align-items:center;gap:12px;flex-wrap:wrap}header{justify-content:space-between;border-bottom:1px solid #ccd2d8;padding-bottom:16px}select,button{font:inherit;color:inherit;background:white;border:1px solid #b6c0c8;border-radius:4px;padding:8px;min-height:38px}select{max-width:100%}button{cursor:pointer;min-width:40px}button:disabled{opacity:.45;cursor:default}button[aria-pressed=true]{background:#146b65;color:white;border-color:#146b65}.meta{color:#525e67;line-height:1.7;overflow-wrap:anywhere;margin:0 0 16px}.comparison{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin:16px 0}figure{margin:0;min-width:0}figcaption{font-weight:600;margin-bottom:8px}canvas{display:block;width:100%;aspect-ratio:4/3;background:#161b1e;border-radius:4px}input[type=range]{flex:1;min-width:100px;accent-color:#146b65}.timeline{display:flex;gap:12px;align-items:center;margin:16px 0}output{min-width:120px;font-variant-numeric:tabular-nums}.error{color:#a52727}video{display:none}svg{width:18px;height:18px;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}@media(max-width:600px){main{padding:14px}.comparison{gap:8px}h1{font-size:21px}figcaption{font-size:13px}.controls{gap:8px}}
</style>
<style>
.filters{display:flex;align-items:end;gap:16px;flex-wrap:wrap;margin:18px 0}.filters label{display:grid;gap:6px;font-size:13px}.filters select{min-width:150px}.filters .meta{margin:0;padding-bottom:8px}[hidden]{display:none!important}
header label{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;font-size:13px;width:390px;max-width:100%;min-width:0}#model{width:100%;min-width:0}
.filters .attempt-field{flex:1 1 360px;min-width:0}#attempt{width:100%;min-width:0}.performance{padding:16px 0;border-bottom:1px solid #ccd2d8}.performance h2{margin:0 0 12px;font-size:16px}.metrics{display:flex;gap:24px;flex-wrap:wrap;margin:0}.metrics div{min-width:100px}.metrics dt{font-size:13px;color:#525e67}.metrics dd{margin:4px 0 0;font-size:24px;font-weight:600;font-variant-numeric:tabular-nums}.metrics small{display:block;font-size:12px;color:#525e67;margin-top:4px}.performance .meta{font-size:12px;margin:12px 0 0}@media(max-width:700px){.metrics{gap:16px}.metrics div{min-width:90px}}
</style>
<style>.site-nav{display:flex;gap:20px;align-items:center;flex-wrap:wrap;padding:16px 24px;background:white;border-bottom:1px solid #ccd2d8;font:14px system-ui}.site-nav a{color:#47545e;text-decoration:none;padding:6px 0}.site-nav a[aria-current]{color:#146b65;border-bottom:2px solid #146b65;font-weight:600}.site-nav strong{margin-right:auto}@media(max-width:500px){.site-nav{padding:12px 14px;gap:16px}.site-nav strong{flex-basis:100%}}</style><nav class="site-nav" aria-label="Evaluation views"><strong>ABC Grasp Evaluation</strong><a href="index.html">Agents</a><a href="world-models.html" aria-current="page">World Models</a></nav><main>
<header><h1>World Model Rollouts</h1><label>Model<select id="model"></select></label></header>
<section id="performance" class="performance" hidden>
<h2>Performance <span id="performance-scope" class="meta"></span></h2>
<dl class="metrics">
<div><dt>Outcome agreement</dt><dd id="agreement"></dd><small id="agreement-count"></small></div>
<div><dt>Failure recall</dt><dd id="failure-recall"></dd><small id="failure-count"></small></div>
<div><dt>Success recall</dt><dd id="success-recall"></dd><small id="success-count"></small></div>
</dl>
<p class="meta">Generated outcomes are AI-reviewed with user corrections; not all are human-confirmed.</p>
</section>
<div class="filters">
<label>Generated outcome<select id="generated-filter" disabled><option value="all">All</option><option value="success">Success</option><option value="failure">Failure</option></select></label>
<label>Recorded outcome<select id="recorded-filter"><option value="all">All</option><option value="success">Success</option><option value="failure">Failure</option></select></label>
<label class="attempt-field">Attempt<select id="attempt"></select></label>
<span id="match-count" class="meta" role="status"></span>
</div>
<p id="filter-status" class="meta" role="status"></p>
<p id="empty" class="meta" hidden>No matching attempts.</p>
<section id="viewer">
<h2 id="task"></h2><p class="meta" id="meta"></p>
<div class="cameras" aria-label="Camera"><button data-camera="0" aria-pressed="true">Top</button><button data-camera="1" aria-pressed="false">Left wrist</button><button data-camera="2" aria-pressed="false">Right wrist</button></div>
<div class="comparison"><figure><figcaption>Ground truth</figcaption><p class="meta" id="recorded-review"></p><canvas id="truth" width="640" height="480"></canvas></figure><figure><figcaption>World model</figcaption><p class="meta" id="generated-review" hidden></p><canvas id="pred" width="640" height="480"></canvas></figure></div>
<div class="timeline"><input id="scrub" type="range" min="0" max="1" value="0" step="1" aria-label="Frame"><output id="position"></output></div>
<div class="controls">
<button id="previous" title="Previous frame" aria-label="Previous frame"><svg viewBox="0 0 24 24"><path d="M6 4v16M19 5l-11 7 11 7z"/></svg></button>
<button id="play" title="Play" aria-label="Play"><svg viewBox="0 0 24 24"><path id="playIcon" d="M7 4l14 8-14 8z"/></svg></button>
<button id="next" title="Next frame" aria-label="Next frame"><svg viewBox="0 0 24 24"><path d="M18 4v16M5 5l11 7-11 7z"/></svg></button>
<label>Speed <select id="speed"><option value="0.25" selected>0.25x</option><option value="0.5">0.5x</option><option value="1">1x</option></select></label>
<label><input id="loop" type="checkbox" checked> Loop</label>
</div><p id="status" class="meta" role="status"></p>
<video id="pv" muted playsinline preload="auto"></video><video id="gv" muted playsinline preload="auto"></video>
</section>
</main>
<script>
const models=[{"id": "cosmos3-super-56525", "name": "Cosmos3 Super 56525 - Joint Denoising", "rows": [{"id": "055c48f3d867e1c9", "task": "tie_the_shoes", "side": "right", "fps": 30, "label": "success", "pair": 7, "frames": 64, "prediction": "media/cosmos3-super-56525/055c48f3d867e1c9/prediction.webm", "ground_truth": "media/cosmos3-super-56525/055c48f3d867e1c9/ground_truth.webm"}, {"id": "09b34a26c82571a5", "task": "unload_the_bowls_from_the_dish_rack", "side": "left", "fps": 30, "label": "success", "pair": 35, "frames": 81, "prediction": "media/cosmos3-super-56525/09b34a26c82571a5/prediction.webm", "ground_truth": "media/cosmos3-super-56525/09b34a26c82571a5/ground_truth.webm"}, {"id": "0a90d037d716f3dd", "task": "fold_and_stack_the_t_shirts", "side": "right", "fps": 30, "label": "failure", "pair": 1, "frames": 37, "prediction": "media/cosmos3-super-56525/0a90d037d716f3dd/prediction.webm", "ground_truth": "media/cosmos3-super-56525/0a90d037d716f3dd/ground_truth.webm"}, {"id": "161222e9db14bdfa", "task": "load_the_bowls_into_the_dish_rack", "side": "left", "fps": 30, "label": "failure", "pair": 2, "frames": 54, "prediction": "media/cosmos3-super-56525/161222e9db14bdfa/prediction.webm", "ground_truth": "media/cosmos3-super-56525/161222e9db14bdfa/ground_truth.webm"}, {"id": "16672203ef9e9b11", "task": "put_the_trash_bags_into_the_trash_bin", "side": "right", "fps": 30, "label": "failure", "pair": 3, "frames": 65, "prediction": "media/cosmos3-super-56525/16672203ef9e9b11/prediction.webm", "ground_truth": "media/cosmos3-super-56525/16672203ef9e9b11/ground_truth.webm"}, {"id": "16d079eed98ef92a", "task": "fold_and_stack_the_towels", "side": "left", "fps": 30, "label": "failure", "pair": 4, "frames": 51, "prediction": "media/cosmos3-super-56525/16d079eed98ef92a/prediction.webm", "ground_truth": "media/cosmos3-super-56525/16d079eed98ef92a/ground_truth.webm"}, {"id": "1e4dcde4eef7c676", "task": "put_the_trash_bags_into_the_trash_bin", "side": "right", "fps": 30, "label": "success", "pair": 5, "frames": 33, "prediction": "media/cosmos3-super-56525/1e4dcde4eef7c676/prediction.webm", "ground_truth": "media/cosmos3-super-56525/1e4dcde4eef7c676/ground_truth.webm"}, {"id": "28aa17d0727b7d68", "task": "load_the_bowls_into_the_dish_rack", "side": "left", "fps": 30, "label": "success", "pair": 2, "frames": 65, "prediction": "media/cosmos3-super-56525/28aa17d0727b7d68/prediction.webm", "ground_truth": "media/cosmos3-super-56525/28aa17d0727b7d68/ground_truth.webm"}, {"id": "29a609ff7225d763", "task": "put_the_trash_bags_into_the_trash_bin", "side": "right", "fps": 30, "label": "failure", "pair": 5, "frames": 35, "prediction": "media/cosmos3-super-56525/29a609ff7225d763/prediction.webm", "ground_truth": "media/cosmos3-super-56525/29a609ff7225d763/ground_truth.webm"}, {"id": "2d7d99c39166582f", "task": "zip_up_the_jacket", "side": "right", "fps": 30, "label": "failure", "pair": 6, "frames": 45, "prediction": "media/cosmos3-super-56525/2d7d99c39166582f/prediction.webm", "ground_truth": "media/cosmos3-super-56525/2d7d99c39166582f/ground_truth.webm"}, {"id": "34d285a80844cee5", "task": "sort_the_eating_utensils_into_containers", "side": "right", "fps": 30, "label": "success", "pair": 27, "frames": 35, "prediction": "media/cosmos3-super-56525/34d285a80844cee5/prediction.webm", "ground_truth": "media/cosmos3-super-56525/34d285a80844cee5/ground_truth.webm"}, {"id": "373137380f35e21c", "task": "tie_the_shoes", "side": "right", "fps": 30, "label": "failure", "pair": 7, "frames": 52, "prediction": "media/cosmos3-super-56525/373137380f35e21c/prediction.webm", "ground_truth": "media/cosmos3-super-56525/373137380f35e21c/ground_truth.webm"}, {"id": "3a27281c89c1c90c", "task": "build_the_wood_block_tower", "side": "left", "fps": 30, "label": "success", "pair": 24, "frames": 51, "prediction": "media/cosmos3-super-56525/3a27281c89c1c90c/prediction.webm", "ground_truth": "media/cosmos3-super-56525/3a27281c89c1c90c/ground_truth.webm"}, {"id": "3a292d88375dc132", "task": "pack_the_takeout_coffee", "side": "right", "fps": 30, "label": "failure", "pair": 8, "frames": 50, "prediction": "media/cosmos3-super-56525/3a292d88375dc132/prediction.webm", "ground_truth": "media/cosmos3-super-56525/3a292d88375dc132/ground_truth.webm"}, {"id": "3e598c0e3398ad7b", "task": "fold_the_paper_box", "side": "left", "fps": 30, "label": "success", "pair": 17, "frames": 53, "prediction": "media/cosmos3-super-56525/3e598c0e3398ad7b/prediction.webm", "ground_truth": "media/cosmos3-super-56525/3e598c0e3398ad7b/ground_truth.webm"}, {"id": "470ab9f7c8740e13", "task": "fold_the_inside_out_t_shirt", "side": "right", "fps": 30, "label": "success", "pair": 16, "frames": 29, "prediction": "media/cosmos3-super-56525/470ab9f7c8740e13/prediction.webm", "ground_truth": "media/cosmos3-super-56525/470ab9f7c8740e13/ground_truth.webm"}, {"id": "4b19605d096bcc38", "task": "open_the_umbrella", "side": "right", "fps": 30, "label": "success", "pair": 26, "frames": 58, "prediction": "media/cosmos3-super-56525/4b19605d096bcc38/prediction.webm", "ground_truth": "media/cosmos3-super-56525/4b19605d096bcc38/ground_truth.webm"}, {"id": "54f3e533ea482f19", "task": "pack_the_student_bag", "side": "left", "fps": 30, "label": "failure", "pair": 9, "frames": 55, "prediction": "media/cosmos3-super-56525/54f3e533ea482f19/prediction.webm", "ground_truth": "media/cosmos3-super-56525/54f3e533ea482f19/ground_truth.webm"}, {"id": "56e79010450986c0", "task": "fold_and_stack_the_skirts", "side": "right", "fps": 30, "label": "failure", "pair": 10, "frames": 40, "prediction": "media/cosmos3-super-56525/56e79010450986c0/prediction.webm", "ground_truth": "media/cosmos3-super-56525/56e79010450986c0/ground_truth.webm"}, {"id": "604d4f56215df917", "task": "unlock_with_the_key", "side": "right", "fps": 30, "label": "failure", "pair": 11, "frames": 51, "prediction": "media/cosmos3-super-56525/604d4f56215df917/prediction.webm", "ground_truth": "media/cosmos3-super-56525/604d4f56215df917/ground_truth.webm"}, {"id": "617af15d9c23fec0", "task": "prepare_toiletry_sets_of_a_toothbrush_and_toothpaste_on_the_tray", "side": "right", "fps": 30, "label": "success", "pair": 25, "frames": 44, "prediction": "media/cosmos3-super-56525/617af15d9c23fec0/prediction.webm", "ground_truth": "media/cosmos3-super-56525/617af15d9c23fec0/ground_truth.webm"}, {"id": "61bac130fb58b535", "task": "wrap_the_cables", "side": "right", "fps": 30, "label": "failure", "pair": 12, "frames": 47, "prediction": "media/cosmos3-super-56525/61bac130fb58b535/prediction.webm", "ground_truth": "media/cosmos3-super-56525/61bac130fb58b535/ground_truth.webm"}, {"id": "6204ee4f756869d9", "task": "unlock_the_padlock_with_the_key", "side": "left", "fps": 30, "label": "failure", "pair": 13, "frames": 43, "prediction": "media/cosmos3-super-56525/6204ee4f756869d9/prediction.webm", "ground_truth": "media/cosmos3-super-56525/6204ee4f756869d9/ground_truth.webm"}, {"id": "655e6c7c71761042", "task": "build_the_wood_block_tower", "side": "right", "fps": 30, "label": "success", "pair": 18, "frames": 35, "prediction": "media/cosmos3-super-56525/655e6c7c71761042/prediction.webm", "ground_truth": "media/cosmos3-super-56525/655e6c7c71761042/ground_truth.webm"}, {"id": "69d0b27c00a2a730", "task": "untangle_the_cables", "side": "left", "fps": 30, "label": "success", "pair": 28, "frames": 37, "prediction": "media/cosmos3-super-56525/69d0b27c00a2a730/prediction.webm", "ground_truth": "media/cosmos3-super-56525/69d0b27c00a2a730/ground_truth.webm"}, {"id": "6a36685622a7c7c9", "task": "place_and_organize_the_paper_towels_onto_the_shelf", "side": "right", "fps": 30, "label": "failure", "pair": 14, "frames": 47, "prediction": "media/cosmos3-super-56525/6a36685622a7c7c9/prediction.webm", "ground_truth": "media/cosmos3-super-56525/6a36685622a7c7c9/ground_truth.webm"}, {"id": "6f653ab79c351e3e", "task": "fold_and_stack_the_towels", "side": "left", "fps": 30, "label": "success", "pair": 4, "frames": 57, "prediction": "media/cosmos3-super-56525/6f653ab79c351e3e/prediction.webm", "ground_truth": "media/cosmos3-super-56525/6f653ab79c351e3e/ground_truth.webm"}, {"id": "7361adce046b9a6b", "task": "set_the_dinner_table_for_one_person", "side": "left", "fps": 30, "label": "failure", "pair": 15, "frames": 46, "prediction": "media/cosmos3-super-56525/7361adce046b9a6b/prediction.webm", "ground_truth": "media/cosmos3-super-56525/7361adce046b9a6b/ground_truth.webm"}, {"id": "73b30b35053af0bf", "task": "put_the_files_into_the_folder", "side": "right", "fps": 30, "label": "success", "pair": 30, "frames": 79, "prediction": "media/cosmos3-super-56525/73b30b35053af0bf/prediction.webm", "ground_truth": "media/cosmos3-super-56525/73b30b35053af0bf/ground_truth.webm"}, {"id": "74924795d7ddcde9", "task": "fold_the_inside_out_t_shirt", "side": "right", "fps": 30, "label": "failure", "pair": 16, "frames": 24, "prediction": "media/cosmos3-super-56525/74924795d7ddcde9/prediction.webm", "ground_truth": "media/cosmos3-super-56525/74924795d7ddcde9/ground_truth.webm"}, {"id": "7584094d93079ff2", "task": "unlock_the_padlock_with_the_key", "side": "left", "fps": 30, "label": "success", "pair": 13, "frames": 61, "prediction": "media/cosmos3-super-56525/7584094d93079ff2/prediction.webm", "ground_truth": "media/cosmos3-super-56525/7584094d93079ff2/ground_truth.webm"}, {"id": "767c18c8b77f3154", "task": "fold_the_paper_box", "side": "left", "fps": 30, "label": "failure", "pair": 17, "frames": 49, "prediction": "media/cosmos3-super-56525/767c18c8b77f3154/prediction.webm", "ground_truth": "media/cosmos3-super-56525/767c18c8b77f3154/ground_truth.webm"}, {"id": "7b8335664935ffdf", "task": "build_the_wood_block_tower", "side": "right", "fps": 30, "label": "failure", "pair": 18, "frames": 39, "prediction": "media/cosmos3-super-56525/7b8335664935ffdf/prediction.webm", "ground_truth": "media/cosmos3-super-56525/7b8335664935ffdf/ground_truth.webm"}, {"id": "7f7923e7f4a80eac", "task": "organize_the_makeup", "side": "right", "fps": 30, "label": "failure", "pair": 19, "frames": 74, "prediction": "media/cosmos3-super-56525/7f7923e7f4a80eac/prediction.webm", "ground_truth": "media/cosmos3-super-56525/7f7923e7f4a80eac/ground_truth.webm"}, {"id": "817e729365023414", "task": "organize_the_makeup", "side": "left", "fps": 30, "label": "failure", "pair": 20, "frames": 40, "prediction": "media/cosmos3-super-56525/817e729365023414/prediction.webm", "ground_truth": "media/cosmos3-super-56525/817e729365023414/ground_truth.webm"}, {"id": "81f793bd740327e1", "task": "organize_the_sunglasses", "side": "right", "fps": 30, "label": "failure", "pair": 21, "frames": 39, "prediction": "media/cosmos3-super-56525/81f793bd740327e1/prediction.webm", "ground_truth": "media/cosmos3-super-56525/81f793bd740327e1/ground_truth.webm"}, {"id": "84031575e1a5fb3a", "task": "fold_and_stack_the_t_shirts", "side": "left", "fps": 30, "label": "success", "pair": 34, "frames": 48, "prediction": "media/cosmos3-super-56525/84031575e1a5fb3a/prediction.webm", "ground_truth": "media/cosmos3-super-56525/84031575e1a5fb3a/ground_truth.webm"}, {"id": "895b36261a658593", "task": "take_the_credit_cards_out_of_the_card_holder", "side": "right", "fps": 30, "label": "failure", "pair": 22, "frames": 73, "prediction": "media/cosmos3-super-56525/895b36261a658593/prediction.webm", "ground_truth": "media/cosmos3-super-56525/895b36261a658593/ground_truth.webm"}, {"id": "8a5d0464ecf5aeae", "task": "organize_the_makeup", "side": "right", "fps": 30, "label": "success", "pair": 19, "frames": 27, "prediction": "media/cosmos3-super-56525/8a5d0464ecf5aeae/prediction.webm", "ground_truth": "media/cosmos3-super-56525/8a5d0464ecf5aeae/ground_truth.webm"}, {"id": "910226ee6f481529", "task": "pack_the_takeout_coffee", "side": "right", "fps": 30, "label": "success", "pair": 8, "frames": 52, "prediction": "media/cosmos3-super-56525/910226ee6f481529/prediction.webm", "ground_truth": "media/cosmos3-super-56525/910226ee6f481529/ground_truth.webm"}, {"id": "91f3bafa3990f009", "task": "untangle_the_cables", "side": "left", "fps": 30, "label": "success", "pair": 29, "frames": 26, "prediction": "media/cosmos3-super-56525/91f3bafa3990f009/prediction.webm", "ground_truth": "media/cosmos3-super-56525/91f3bafa3990f009/ground_truth.webm"}, {"id": "936216d3d8922cda", "task": "fold_and_stack_the_t_shirts", "side": "left", "fps": 30, "label": "failure", "pair": 23, "frames": 60, "prediction": "media/cosmos3-super-56525/936216d3d8922cda/prediction.webm", "ground_truth": "media/cosmos3-super-56525/936216d3d8922cda/ground_truth.webm"}, {"id": "96038de43e46c116", "task": "zip_up_the_jacket", "side": "right", "fps": 30, "label": "success", "pair": 6, "frames": 32, "prediction": "media/cosmos3-super-56525/96038de43e46c116/prediction.webm", "ground_truth": "media/cosmos3-super-56525/96038de43e46c116/ground_truth.webm"}, {"id": "9f821a733806fe09", "task": "build_the_wood_block_tower", "side": "left", "fps": 30, "label": "failure", "pair": 24, "frames": 50, "prediction": "media/cosmos3-super-56525/9f821a733806fe09/prediction.webm", "ground_truth": "media/cosmos3-super-56525/9f821a733806fe09/ground_truth.webm"}, {"id": "a0a12c82e3195f62", "task": "open_the_umbrella", "side": "right", "fps": 30, "label": "success", "pair": 33, "frames": 32, "prediction": "media/cosmos3-super-56525/a0a12c82e3195f62/prediction.webm", "ground_truth": "media/cosmos3-super-56525/a0a12c82e3195f62/ground_truth.webm"}, {"id": "a0b772602652de2b", "task": "organize_the_makeup", "side": "left", "fps": 30, "label": "success", "pair": 20, "frames": 39, "prediction": "media/cosmos3-super-56525/a0b772602652de2b/prediction.webm", "ground_truth": "media/cosmos3-super-56525/a0b772602652de2b/ground_truth.webm"}, {"id": "a399629b853caed3", "task": "prepare_toiletry_sets_of_a_toothbrush_and_toothpaste_on_the_tray", "side": "right", "fps": 30, "label": "failure", "pair": 25, "frames": 48, "prediction": "media/cosmos3-super-56525/a399629b853caed3/prediction.webm", "ground_truth": "media/cosmos3-super-56525/a399629b853caed3/ground_truth.webm"}, {"id": "a5a5ce4fc11a2bdd", "task": "open_the_umbrella", "side": "right", "fps": 30, "label": "failure", "pair": 26, "frames": 44, "prediction": "media/cosmos3-super-56525/a5a5ce4fc11a2bdd/prediction.webm", "ground_truth": "media/cosmos3-super-56525/a5a5ce4fc11a2bdd/ground_truth.webm"}, {"id": "a7856e8c6197d55a", "task": "set_the_dinner_table_for_one_person", "side": "left", "fps": 30, "label": "success", "pair": 15, "frames": 33, "prediction": "media/cosmos3-super-56525/a7856e8c6197d55a/prediction.webm", "ground_truth": "media/cosmos3-super-56525/a7856e8c6197d55a/ground_truth.webm"}, {"id": "ad7d932c87e931a5", "task": "sort_the_eating_utensils_into_containers", "side": "right", "fps": 30, "label": "failure", "pair": 27, "frames": 40, "prediction": "media/cosmos3-super-56525/ad7d932c87e931a5/prediction.webm", "ground_truth": "media/cosmos3-super-56525/ad7d932c87e931a5/ground_truth.webm"}, {"id": "af684e9cacdada64", "task": "fold_and_stack_the_t_shirts", "side": "left", "fps": 30, "label": "success", "pair": 23, "frames": 32, "prediction": "media/cosmos3-super-56525/af684e9cacdada64/prediction.webm", "ground_truth": "media/cosmos3-super-56525/af684e9cacdada64/ground_truth.webm"}, {"id": "b1929d3efc1a6308", "task": "untangle_the_cables", "side": "left", "fps": 30, "label": "failure", "pair": 28, "frames": 56, "prediction": "media/cosmos3-super-56525/b1929d3efc1a6308/prediction.webm", "ground_truth": "media/cosmos3-super-56525/b1929d3efc1a6308/ground_truth.webm"}, {"id": "b1e2cf320096dd2d", "task": "fold_and_stack_the_t_shirts", "side": "right", "fps": 30, "label": "success", "pair": 1, "frames": 26, "prediction": "media/cosmos3-super-56525/b1e2cf320096dd2d/prediction.webm", "ground_truth": "media/cosmos3-super-56525/b1e2cf320096dd2d/ground_truth.webm"}, {"id": "bc9f40e5184f008c", "task": "put_the_trash_bags_into_the_trash_bin", "side": "right", "fps": 30, "label": "success", "pair": 36, "frames": 52, "prediction": "media/cosmos3-super-56525/bc9f40e5184f008c/prediction.webm", "ground_truth": "media/cosmos3-super-56525/bc9f40e5184f008c/ground_truth.webm"}, {"id": "c0e842b1fb977fe5", "task": "untangle_the_cables", "side": "left", "fps": 30, "label": "failure", "pair": 29, "frames": 25, "prediction": "media/cosmos3-super-56525/c0e842b1fb977fe5/prediction.webm", "ground_truth": "media/cosmos3-super-56525/c0e842b1fb977fe5/ground_truth.webm"}, {"id": "c505114f90d6e639", "task": "put_the_files_into_the_folder", "side": "right", "fps": 30, "label": "failure", "pair": 30, "frames": 44, "prediction": "media/cosmos3-super-56525/c505114f90d6e639/prediction.webm", "ground_truth": "media/cosmos3-super-56525/c505114f90d6e639/ground_truth.webm"}, {"id": "c55ab566f4954a54", "task": "tie_the_shoes", "side": "right", "fps": 30, "label": "success", "pair": 37, "frames": 35, "prediction": "media/cosmos3-super-56525/c55ab566f4954a54/prediction.webm", "ground_truth": "media/cosmos3-super-56525/c55ab566f4954a54/ground_truth.webm"}, {"id": "c7a59c200f542f94", "task": "wrap_the_cables", "side": "right", "fps": 30, "label": "success", "pair": 12, "frames": 25, "prediction": "media/cosmos3-super-56525/c7a59c200f542f94/prediction.webm", "ground_truth": "media/cosmos3-super-56525/c7a59c200f542f94/ground_truth.webm"}, {"id": "d27aaced283ff39c", "task": "put_the_trash_bags_into_the_trash_bin", "side": "right", "fps": 30, "label": "success", "pair": 3, "frames": 39, "prediction": "media/cosmos3-super-56525/d27aaced283ff39c/prediction.webm", "ground_truth": "media/cosmos3-super-56525/d27aaced283ff39c/ground_truth.webm"}, {"id": "d7b9e3d2f7988014", "task": "unlock_with_the_key", "side": "right", "fps": 30, "label": "success", "pair": 11, "frames": 26, "prediction": "media/cosmos3-super-56525/d7b9e3d2f7988014/prediction.webm", "ground_truth": "media/cosmos3-super-56525/d7b9e3d2f7988014/ground_truth.webm"}, {"id": "e5586892859605fa", "task": "pack_the_student_bag", "side": "left", "fps": 30, "label": "success", "pair": 9, "frames": 47, "prediction": "media/cosmos3-super-56525/e5586892859605fa/prediction.webm", "ground_truth": "media/cosmos3-super-56525/e5586892859605fa/ground_truth.webm"}, {"id": "e897ba9a34909e39", "task": "stack_the_hats", "side": "left", "fps": 30, "label": "failure", "pair": 31, "frames": 47, "prediction": "media/cosmos3-super-56525/e897ba9a34909e39/prediction.webm", "ground_truth": "media/cosmos3-super-56525/e897ba9a34909e39/ground_truth.webm"}, {"id": "e9657021789b83a0", "task": "organize_the_sunglasses", "side": "right", "fps": 30, "label": "success", "pair": 21, "frames": 82, "prediction": "media/cosmos3-super-56525/e9657021789b83a0/prediction.webm", "ground_truth": "media/cosmos3-super-56525/e9657021789b83a0/ground_truth.webm"}, {"id": "e99e08cc7e6e4325", "task": "fold_and_stack_the_skirts", "side": "right", "fps": 30, "label": "success", "pair": 10, "frames": 33, "prediction": "media/cosmos3-super-56525/e99e08cc7e6e4325/prediction.webm", "ground_truth": "media/cosmos3-super-56525/e99e08cc7e6e4325/ground_truth.webm"}, {"id": "ec7beb91fcc2a1a9", "task": "unlock_the_padlock_with_the_key", "side": "left", "fps": 30, "label": "failure", "pair": 32, "frames": 32, "prediction": "media/cosmos3-super-56525/ec7beb91fcc2a1a9/prediction.webm", "ground_truth": "media/cosmos3-super-56525/ec7beb91fcc2a1a9/ground_truth.webm"}, {"id": "ec8e07ace805df9a", "task": "open_the_umbrella", "side": "right", "fps": 30, "label": "failure", "pair": 33, "frames": 46, "prediction": "media/cosmos3-super-56525/ec8e07ace805df9a/prediction.webm", "ground_truth": "media/cosmos3-super-56525/ec8e07ace805df9a/ground_truth.webm"}, {"id": "f4badd186c760ef1", "task": "fold_and_stack_the_t_shirts", "side": "left", "fps": 30, "label": "failure", "pair": 34, "frames": 55, "prediction": "media/cosmos3-super-56525/f4badd186c760ef1/prediction.webm", "ground_truth": "media/cosmos3-super-56525/f4badd186c760ef1/ground_truth.webm"}, {"id": "f658ea3ab85a850a", "task": "unload_the_bowls_from_the_dish_rack", "side": "left", "fps": 30, "label": "failure", "pair": 35, "frames": 74, "prediction": "media/cosmos3-super-56525/f658ea3ab85a850a/prediction.webm", "ground_truth": "media/cosmos3-super-56525/f658ea3ab85a850a/ground_truth.webm"}, {"id": "f6c0ea841989aacb", "task": "put_the_trash_bags_into_the_trash_bin", "side": "right", "fps": 30, "label": "failure", "pair": 36, "frames": 78, "prediction": "media/cosmos3-super-56525/f6c0ea841989aacb/prediction.webm", "ground_truth": "media/cosmos3-super-56525/f6c0ea841989aacb/ground_truth.webm"}, {"id": "f803c48342e46aeb", "task": "take_the_credit_cards_out_of_the_card_holder", "side": "right", "fps": 30, "label": "success", "pair": 22, "frames": 33, "prediction": "media/cosmos3-super-56525/f803c48342e46aeb/prediction.webm", "ground_truth": "media/cosmos3-super-56525/f803c48342e46aeb/ground_truth.webm"}, {"id": "f9e247ac4102e527", "task": "tie_the_shoes", "side": "right", "fps": 30, "label": "failure", "pair": 37, "frames": 72, "prediction": "media/cosmos3-super-56525/f9e247ac4102e527/prediction.webm", "ground_truth": "media/cosmos3-super-56525/f9e247ac4102e527/ground_truth.webm"}, {"id": "fada9b592611ac8d", "task": "stack_the_hats", "side": "left", "fps": 30, "label": "success", "pair": 31, "frames": 29, "prediction": "media/cosmos3-super-56525/fada9b592611ac8d/prediction.webm", "ground_truth": "media/cosmos3-super-56525/fada9b592611ac8d/ground_truth.webm"}, {"id": "fcaef65105a925bc", "task": "unlock_the_padlock_with_the_key", "side": "left", "fps": 30, "label": "success", "pair": 32, "frames": 31, "prediction": "media/cosmos3-super-56525/fcaef65105a925bc/prediction.webm", "ground_truth": "media/cosmos3-super-56525/fcaef65105a925bc/ground_truth.webm"}, {"id": "ff8b9b5813ffdbe5", "task": "place_and_organize_the_paper_towels_onto_the_shelf", "side": "right", "fps": 30, "label": "success", "pair": 14, "frames": 65, "prediction": "media/cosmos3-super-56525/ff8b9b5813ffdbe5/prediction.webm", "ground_truth": "media/cosmos3-super-56525/ff8b9b5813ffdbe5/ground_truth.webm"}], "review": "cosmos3-super-56525-outcomes.json"}];
let rows=[];
const $=id=>document.getElementById(id), videos=[$('pv'),$('gv')], canvases=[$('pred'),$('truth')];
let row,frame=0,camera=0,playing=false,timer,version=0,busy=false,generatedReviews={},modelVersion=0;
function showReview(){const review=row&&generatedReviews[row.id];$('generated-review').hidden=!review;$('generated-review').textContent=review?`Generated outcome: ${review.generated_outcome}`:''}
async function selectModel(){
const token=++modelVersion,previousId=row?.id,model=models.find(m=>m.id===$('model').value);
generatedReviews={};row=null;
rows=model.rows.slice().sort((a,b)=>a.pair-b.pair || a.label.localeCompare(b.label));
$('performance').hidden=true;$('generated-filter').value='all';$('generated-filter').disabled=true;
$('generated-review').hidden=true;$('filter-status').textContent='Loading outcomes...';
filterAttempts(previousId);
try{
const response=await fetch(model.review,{cache:'no-store'});
if(!response.ok)throw Error('Generated outcomes unavailable.');
const data=await response.json();if(token!==modelVersion)return;
generatedReviews=Object.fromEntries(data.rows.map(review=>[review.candidate_id,review]));
$('generated-filter').disabled=false;$('filter-status').textContent='';filterAttempts();showReview();showPerformance();
}catch(e){if(token===modelVersion)$('filter-status').textContent='Generated outcomes unavailable.'}
}
function showPerformance(){const matrix={failure:{failure:0,success:0},success:{failure:0,success:0}};let count=0;for(const r of rows){const outcome=generatedReviews[r.id]?.generated_outcome;if(outcome==='failure'||outcome==='success'){matrix[r.label][outcome]++;count++}}const percent=(n,d)=>d?(100*n/d).toFixed(1)+'%':'N/A';const correct=matrix.failure.failure+matrix.success.success;const failures=matrix.failure.failure+matrix.failure.success;const successes=matrix.success.failure+matrix.success.success;$('performance').hidden=false;$('performance-scope').textContent=`· Overall, ${count}/${rows.length} scored`;$('agreement').textContent=percent(correct,count);$('agreement-count').textContent=`${correct} / ${count} matching`;$('failure-recall').textContent=percent(matrix.failure.failure,failures);$('failure-count').textContent=`${matrix.failure.failure} / ${failures} failures`;$('success-recall').textContent=percent(matrix.success.success,successes);$('success-count').textContent=`${matrix.success.success} / ${successes} successes`}
const controls=[$('previous'),$('play'),$('next'),$('scrub')];
function filterAttempts(preferredId){const previous=row;const indices=rows.map((r,i)=>i).filter(i=>($('recorded-filter').value==='all'||rows[i].label===$('recorded-filter').value)&&($('generated-filter').value==='all'||generatedReviews[rows[i].id]?.generated_outcome===$('generated-filter').value));$('attempt').replaceChildren();indices.forEach(i=>{const r=rows[i],o=document.createElement('option');o.value=i;o.textContent=`Pair ${r.pair} · ${r.label} · ${r.task.replaceAll('_',' ')}`;$('attempt').append(o)});$('match-count').textContent=`${indices.length} / ${rows.length} attempts`;$('attempt').disabled=!indices.length;const retained=indices.find(i=>rows[i].id===(preferredId||previous?.id));if(retained!==undefined){$('attempt').value=retained;if(rows[retained]===previous)return}select()}
function pause(){playing=false;clearTimeout(timer);$('playIcon').setAttribute('d','M7 4l14 8-14 8z');$('play').title='Play';$('play').setAttribute('aria-label','Play')}
function draw(){videos.forEach((v,i)=>canvases[i].getContext('2d').drawImage(v,0,camera*480,640,480,0,0,640,480));$('position').textContent=`Frame ${frame} / ${row.frames-1}`;$('scrub').value=frame;}
function seek(v,t){return new Promise((resolve,reject)=>{if(Math.abs(v.currentTime-t)<.0001&&v.readyState>=2&&!v.seeking){resolve();return}let timeout;const cleanup=()=>{clearTimeout(timeout);v.removeEventListener('seeked',done);v.removeEventListener('error',fail)};const done=()=>{if(v.seeking||v.readyState<2||Math.abs(v.currentTime-t)>.001)return;cleanup();resolve()};const fail=()=>{cleanup();reject(Error('Could not seek video'))};v.addEventListener('seeked',done);v.addEventListener('error',fail);timeout=setTimeout(fail,10000);v.currentTime=t;})}
async function show(n){if(busy)return;busy=true;const token=version;try{const target=Math.max(0,Math.min(row.frames-1,n));await Promise.all(videos.map(v=>seek(v,target===0?0:(target+.1)/row.fps)));if(token===version){frame=target;draw()}}catch(e){if(token===version){pause();$('status').textContent=e.message}}finally{if(token===version)busy=false}}
async function tick(){if(!playing)return;const token=version;await show(frame+1<row.frames?frame+1:0);if(!playing||token!==version)return;if(frame===row.frames-1&&!$('loop').checked){pause();return}timer=setTimeout(tick,1000/row.fps/Number($('speed').value))}
async function load(v,src){let url=src;if(location.protocol.startsWith('http')){const response=await fetch(src);if(!response.ok)throw Error('Could not load '+src);url=URL.createObjectURL(await response.blob())}return new Promise((resolve,reject)=>{v.onloadeddata=()=>{if(v.readyState>=2){if(url.startsWith('blob:'))URL.revokeObjectURL(url);resolve()}};v.onerror=()=>{if(url.startsWith('blob:'))URL.revokeObjectURL(url);reject(Error('Could not load '+src))};v.src=url;v.load()})}
async function select(){pause();const token=++version;busy=false;videos.forEach((v,i)=>{const fresh=v.cloneNode(false);fresh.removeAttribute('src');v.replaceWith(fresh);videos[i]=fresh});row=$('attempt').selectedIndex<0?null:rows[Number($('attempt').value)];controls.forEach(c=>c.disabled=true);$('viewer').hidden=!row;$('empty').hidden=!!row;if(!row)return;camera=row.side==='left'?1:2;document.querySelectorAll('[data-camera]').forEach(b=>b.setAttribute('aria-pressed',String(Number(b.dataset.camera)===camera)));frame=0;showReview();$('task').textContent=row.task.replaceAll('_',' ');$('meta').textContent=`${row.side} arm · ${row.id}`;$('recorded-review').textContent=`Recorded outcome: ${row.label}`;$('scrub').max=row.frames-1;$('scrub').value=0;$('status').textContent='Loading…';try{await Promise.all([load(videos[0],row.prediction),load(videos[1],row.ground_truth)]);if(token!==version)return;await show(0);if(token!==version)return;controls.forEach(c=>c.disabled=false);$('status').textContent=''}catch(e){if(token===version)$('status').textContent=e.message}}
$('attempt').onchange=select;
$('generated-filter').onchange=()=>filterAttempts();$('recorded-filter').onchange=()=>filterAttempts();
$('play').onclick=()=>{if(playing){pause();return}playing=true;$('playIcon').setAttribute('d','M8 4v16M16 4v16');$('play').title='Pause';$('play').setAttribute('aria-label','Pause');tick()};
$('previous').onclick=()=>{pause();show(frame-1)};$('next').onclick=()=>{pause();show(frame+1)};$('scrub').oninput=()=>{pause();show(Number($('scrub').value))};
document.querySelectorAll('[data-camera]').forEach(b=>b.onclick=()=>{camera=Number(b.dataset.camera);document.querySelectorAll('[data-camera]').forEach(c=>c.setAttribute('aria-pressed',String(c===b)));if(videos.every(v=>v.readyState>=2))draw()});
models.forEach(model=>{const option=document.createElement('option');option.value=model.id;option.textContent=model.name;$('model').append(option)});
$('model').onchange=selectModel;
selectModel();
</script>
</html>