Spaces:
Running
Running
Commit Β·
66d097c
0
Parent(s):
Initial commit
Browse files- .gitattributes +40 -0
- LICENSE +26 -0
- LICENSE-Action100M +118 -0
- README.md +79 -0
- css/styles.css +1419 -0
- hero.mp4 +3 -0
- hero_poster.png +3 -0
- index.html +610 -0
- index.minimal.html.bak +100 -0
- js/app.js +1216 -0
- js/sample_viewer.minimal.js.bak +495 -0
- js/timeseries.js +267 -0
- stats/ngrams.png +3 -0
- stats/sunburst_categories.png +3 -0
- stats/word_cloud.png +3 -0
- style.css +28 -0
- viser-client/index.html +0 -0
.gitattributes
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
stats/word_cloud.png filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
stats/sunburst_categories.png filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
stats/ngrams.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
hero.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
hero_poster.png filter=lfs diff=lfs merge=lfs -text
|
LICENSE
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2026 Rice University Intelligent Robotics & Manipulation Group
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
| 22 |
+
|
| 23 |
+
Note: this license covers only the frontend and tools code in this directory.
|
| 24 |
+
The data assets exported by these tools (under _dist/ or pushed to HF Dataset)
|
| 25 |
+
are derivative works of Action100M and are governed by the FAIR Noncommercial
|
| 26 |
+
Research License v1 (see LICENSE-Action100M).
|
LICENSE-Action100M
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FAIR Noncommercial Research License
|
| 2 |
+
v1 Last Updated: October 16, 2024
|
| 3 |
+
|
| 4 |
+
βAcceptable Use Policyβ means the FAIR Acceptable Use Policy, applicable to Research Materials, that is incorporated into this Agreement.
|
| 5 |
+
|
| 6 |
+
βAgreementβ means the terms and conditions for use, reproduction, distribution and modification of the Research Materials set forth herein.
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
βDocumentationβ means the specifications, manuals and documentation accompanying
|
| 10 |
+
Research Materials distributed by Meta.
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
βLicenseeβ or βyouβ means you, or your employer or any other person or entity (if you are entering into this Agreement on such person or entityβs behalf), of the age required under applicable laws, rules or regulations to provide legal consent and that has legal authority to bind your employer or such other person or entity if you are entering in this Agreement on their behalf.
|
| 14 |
+
|
| 15 |
+
βMetaβ or βweβ means Meta Platforms Ireland Limited (if you are located in or, if you are an entity, your principal place of business is in the EEA or Switzerland) and Meta Platforms, Inc. (if you are located outside of the EEA or Switzerland).
|
| 16 |
+
βNoncommercial Research Usesβ means noncommercial research use cases related to research, development, education, processing, or analysis and in each case, is not primarily intended for commercial advantage or monetary compensation to you or others.
|
| 17 |
+
|
| 18 |
+
βResearch Materialsβ means, collectively, Documentation and the models, software and algorithms, including machine-learning model code, trained model weights, inference-enabling code, training-enabling code, fine-tuning enabling code, demonstration materials and other elements of the foregoing distributed by Meta and made available under this Agreement.
|
| 19 |
+
|
| 20 |
+
By clicking βI Acceptβ below or by using or distributing any portion or element of the Research Materials, you agree to be bound by this Agreement.
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
1. License Rights and Redistribution.
|
| 24 |
+
|
| 25 |
+
a. Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable and royalty-free limited license under Metaβs intellectual property or other rights owned by Meta embodied in the Research Materials to use, reproduce, distribute, copy, create derivative works of, and make modifications to the Research Materials.
|
| 26 |
+
|
| 27 |
+
b. Redistribution and Use.
|
| 28 |
+
i. You will not use the Research Materials or any outputs or results of the Research Materials in connection with any commercial uses or for any uses other than Noncommercial Research Uses;
|
| 29 |
+
|
| 30 |
+
ii. Distribution of Research Materials, and any derivative works thereof, are subject to the terms of this Agreement. If you distribute or make the Research Materials, or any derivative works thereof, available to a third party, you may only do so under the terms of this Agreement. You shall also provide a copy of this Agreement to such third party.
|
| 31 |
+
|
| 32 |
+
iii. If you submit for publication the results of research you perform on, using, or otherwise in connection with Research Materials, you must acknowledge the use of Research Materials in your publication.
|
| 33 |
+
|
| 34 |
+
iv. Your use of the Research Materials must comply with applicable laws and regulations (including Trade Control Laws) and adhere to the FAIR Acceptable Use Policy, which is hereby incorporated by reference into this Agreement.
|
| 35 |
+
|
| 36 |
+
2. User Support. Your Noncommercial Research Use of the Research Materials is done at your own discretion; Meta does not process any information nor provide any service in relation to such use. Meta is under no obligation to provide any support services for the Research Materials. Any support provided is βas isβ, βwith all faultsβ, and without warranty of any kind.
|
| 37 |
+
|
| 38 |
+
3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE RESEARCH MATERIALS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN βAS ISβ BASIS, WITHOUT WARRANTIES OF ANY KIND, AND META DISCLAIMS ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE RESEARCH MATERIALS AND ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE RESEARCH MATERIALS AND ANY OUTPUT AND RESULTS.
|
| 39 |
+
|
| 40 |
+
4. Limitation of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY DIRECT OR INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF META OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING.
|
| 41 |
+
|
| 42 |
+
5. Intellectual Property.
|
| 43 |
+
|
| 44 |
+
a. Subject to Metaβs ownership of Research Materials and derivatives made by or for Meta, with respect to any derivative works and modifications of the Research Materials that are made by you, as between you and Meta, you are and will be the owner of such derivative works and modifications.
|
| 45 |
+
|
| 46 |
+
b. If you institute litigation or other proceedings against Meta or any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Research Materials, outputs or results, or any portion of any of the foregoing, constitutes infringement of intellectual property or other rights owned or licensable by you, then any licenses granted to you under this Agreement shall terminate as of the date such litigation or claim is filed or instituted. You will indemnify and hold harmless Meta from and against any claim by any third party arising out of or related to your use or distribution of the Research Materials.
|
| 47 |
+
|
| 48 |
+
6. Term and Termination. The term of this Agreement will commence upon your acceptance of this Agreement or access to the Research Materials and will continue in full force and effect until terminated in accordance with the terms and conditions herein. Meta may terminate this Agreement if you are in breach of any term or condition of this Agreement. Upon termination of this Agreement, you shall delete and cease use of the Research Materials. Sections 5, 6 and 9 shall survive the termination of this Agreement.
|
| 49 |
+
|
| 50 |
+
7. Governing Law and Jurisdiction. This Agreement will be governed and construed under the laws of the State of California without regard to choice of law principles, and the UN Convention on Contracts for the International Sale of Goods does not apply to this Agreement. The courts of California shall have exclusive jurisdiction of any dispute arising out of this Agreement.
|
| 51 |
+
|
| 52 |
+
8. Modifications and Amendments. Meta may modify this Agreement from time to time; provided that they are similar in spirit to the current version of the Agreement, but may differ in detail to address new problems or concerns. All such changes will be effective immediately. Your continued use of the Research Materials after any modification to this Agreement constitutes your agreement to such modification. Except as provided in this Agreement, no modification or addition to any provision of this Agreement will be binding unless it is in writing and signed by an authorized representative of both you and Meta.
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
FAIR Acceptable Use Policy
|
| 56 |
+
|
| 57 |
+
The Fundamental AI Research (FAIR) team at Meta seeks to further understanding of new and existing research domains with the mission of advancing the state-of-the-art in artificial intelligence through open research for the benefit of all.
|
| 58 |
+
|
| 59 |
+
As part of this mission, Meta makes certain research materials available for noncommercial research use. Meta is committed to promoting the safe and responsible use of such research materials.
|
| 60 |
+
|
| 61 |
+
Prohibited Uses
|
| 62 |
+
|
| 63 |
+
You agree you will not use, or allow others to use, Research Materials to:
|
| 64 |
+
|
| 65 |
+
1. Violate the law or othersβ rights, including to:
|
| 66 |
+
a. Engage in, promote, generate, contribute to, encourage, plan, incite, or further illegal or unlawful activity or content, such as:
|
| 67 |
+
i. Violence or terrorism
|
| 68 |
+
|
| 69 |
+
ii. Exploitation or harm to children, including the solicitation, creation, acquisition, or dissemination of child exploitative content or failure to report Child Sexual Abuse Material
|
| 70 |
+
|
| 71 |
+
iii. Human trafficking, exploitation, and sexual violence
|
| 72 |
+
|
| 73 |
+
iv. The illegal distribution of information or materials to minors, including obscene materials, or failure to employ legally required age-gating in connection with such information or materials.
|
| 74 |
+
|
| 75 |
+
v. Sexual solicitation
|
| 76 |
+
|
| 77 |
+
vi.Any other criminal activity
|
| 78 |
+
|
| 79 |
+
b. Engage in, promote, incite, or facilitate the harassment, abuse, threatening, or bullying of individuals or groups of individuals
|
| 80 |
+
|
| 81 |
+
c. Engage in, promote, incite, or facilitate discrimination or other unlawful or harmful conduct in the provision of employment, employment benefits, credit, housing, other economic benefits, or other essential goods and services
|
| 82 |
+
|
| 83 |
+
d. Engage in the unauthorized or unlicensed practice of any profession including, but not limited to, financial, legal, medical/health, or related professional practices
|
| 84 |
+
|
| 85 |
+
e. Collect, process, disclose, generate, or infer health, demographic, or other sensitive personal or private information about individuals without rights and consents required by applicable laws
|
| 86 |
+
|
| 87 |
+
f. Engage in or facilitate any action or generate any content that infringes, misappropriates, or otherwise violates any third-party rights, including the outputs or results of any technology using FAIR research materials
|
| 88 |
+
|
| 89 |
+
g. Create, generate, or facilitate the creation of malicious code, malware, computer viruses or do anything else that could disable, overburden, interfere with or impair the proper working, integrity, operation or appearance of a website or computer system
|
| 90 |
+
|
| 91 |
+
2. Engage in, promote, incite, facilitate, or assist in the planning or development of activities that present a risk of death or bodily harm to individuals, including use of research artifacts related to the following:
|
| 92 |
+
|
| 93 |
+
a. Military, warfare, nuclear industries or applications, espionage, use for materials or activities that are subject to the International Traffic Arms Regulations (ITAR) maintained by the United States Department of State
|
| 94 |
+
|
| 95 |
+
b. Guns and illegal weapons (including weapon development)
|
| 96 |
+
|
| 97 |
+
c. Illegal drugs and regulated/controlled substances
|
| 98 |
+
d. Operation of critical infrastructure, transportation technologies, or heavy machinery
|
| 99 |
+
|
| 100 |
+
e. Self-harm or harm to others, including suicide, cutting, and eating disorders
|
| 101 |
+
f. Any content intended to incite or promote violence, abuse, or any infliction of bodily harm to an individual
|
| 102 |
+
|
| 103 |
+
3. Intentionally deceive or mislead others, including use of FAIR Research Materials related to the following:
|
| 104 |
+
|
| 105 |
+
a. Generating, promoting, or furthering fraud or the creation or promotion of disinformation
|
| 106 |
+
b. Generating, promoting, or furthering defamatory content, including the creation of defamatory statements, images, or other content
|
| 107 |
+
|
| 108 |
+
c. Generating, promoting, or further distributing spam
|
| 109 |
+
|
| 110 |
+
d. Impersonating another individual without consent, authorization, or legal right
|
| 111 |
+
|
| 112 |
+
e. Representing that outputs of FAIR research materials or outputs from technology using FAIR research materials are human-generated
|
| 113 |
+
|
| 114 |
+
f. Generating or facilitating false online engagement, including fake reviews and other means of fake online engagement
|
| 115 |
+
|
| 116 |
+
4. Fail to appropriately disclose to end users any known dangers of your Research Materials.
|
| 117 |
+
|
| 118 |
+
Please report any violation of this Policy or other problems that could lead to a violation of this Policy by submitting a report here [https://docs.google.com/forms/d/e/1FAIpQLSeb11cryAopJ7LNrC4nxEUXrHY26hfkXQMf_uH-oFgA3WlYZQ/viewform].
|
README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: EgoInfinity Browser
|
| 3 |
+
emoji: πͺ
|
| 4 |
+
colorFrom: indigo
|
| 5 |
+
colorTo: pink
|
| 6 |
+
sdk: static
|
| 7 |
+
pinned: false
|
| 8 |
+
license: mit
|
| 9 |
+
short_description: Static viewer for the EgoInfinity dataset
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# EgoInfinity Browser
|
| 13 |
+
|
| 14 |
+
A static, browser-only viewer for curated EgoInfinity clips. No backend, no
|
| 15 |
+
Python, no live viser server. Every clip is served as pre-baked assets and
|
| 16 |
+
rendered with three.js / the viser-build-client.
|
| 17 |
+
|
| 18 |
+
Source code: <https://github.com/Rice-RobotPI-Lab/EgoInfinity>
|
| 19 |
+
|
| 20 |
+
Dataset: <https://huggingface.co/datasets/Rice-RobotPI-Lab/egoinfinity>
|
| 21 |
+
|
| 22 |
+
## What you see
|
| 23 |
+
|
| 24 |
+
For each clip:
|
| 25 |
+
|
| 26 |
+
- **YouTube iframe**: the original source video, embedded from YouTube.
|
| 27 |
+
- **Depth video** (MoGe-2) and **optical flow** (MEMFOF), rendered as colormapped MP4s.
|
| 28 |
+
- **SAM-tracked object mask** highlighting the active object across the clip.
|
| 29 |
+
- **3D scene**: viser recording showing the per-frame point cloud, hand mesh,
|
| 30 |
+
object meshes (Gaussian Splat baked), and skeleton.
|
| 31 |
+
- **Hand skeleton overlay** projected onto the depth video.
|
| 32 |
+
- **Action signals**: per-frame timeseries (hand velocity, contact, etc.).
|
| 33 |
+
|
| 34 |
+
## Get the data
|
| 35 |
+
|
| 36 |
+
The full processed dataset is hosted on Hugging Face Datasets:
|
| 37 |
+
|
| 38 |
+
```bash
|
| 39 |
+
# Snapshot download (entire dataset, ~370 MB)
|
| 40 |
+
pip install huggingface_hub
|
| 41 |
+
hf download Rice-RobotPI-Lab/egoinfinity --repo-type=dataset --local-dir ./egoinfinity-data
|
| 42 |
+
|
| 43 |
+
# Or browse interactively at:
|
| 44 |
+
# https://huggingface.co/datasets/Rice-RobotPI-Lab/egoinfinity
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
While this Space is private, you must be logged into a Hugging Face account
|
| 48 |
+
with read access to both repositories for assets to load in the viewer.
|
| 49 |
+
|
| 50 |
+
## License & attribution
|
| 51 |
+
|
| 52 |
+
- **Code** in this Space (HTML, JS, viser-client) is released under the MIT
|
| 53 |
+
License. See [LICENSE](LICENSE).
|
| 54 |
+
- **Data assets** (depth/flow/mask videos, viser recordings, hand parameters,
|
| 55 |
+
scene metadata) are derivative works of [Action100M (Meta FAIR)] and are
|
| 56 |
+
governed by the FAIR Noncommercial Research License v1. See
|
| 57 |
+
[LICENSE-Action100M](LICENSE-Action100M).
|
| 58 |
+
- **Original videos** remain on YouTube and are embedded via the YouTube
|
| 59 |
+
IFrame API. Only the SAM-tracked region of each frame appears in the
|
| 60 |
+
derivative `mask.mp4` (the rest is painted black).
|
| 61 |
+
- **Hand visualization** uses pose parameters derived from the MANO hand model
|
| 62 |
+
(Romero et al., 2017). MANO is not redistributed; only baked vertex positions
|
| 63 |
+
appear in the viewer.
|
| 64 |
+
- **WiLoR** weights (CC-BY-NC-ND) are not redistributed.
|
| 65 |
+
|
| 66 |
+
[Action100M (Meta FAIR)]: https://github.com/facebookresearch/Action100M
|
| 67 |
+
|
| 68 |
+
## Citation
|
| 69 |
+
|
| 70 |
+
If you find this useful in your research, please cite:
|
| 71 |
+
|
| 72 |
+
```bibtex
|
| 73 |
+
@misc{egoinfinity2026,
|
| 74 |
+
title = {EgoInfinity: A Web-Scale Data Engine for Video-to-Action Robot Learning through Egocentric Views},
|
| 75 |
+
author = {Rice RobotPI Lab},
|
| 76 |
+
year = {2026},
|
| 77 |
+
note = {Preview release}
|
| 78 |
+
}
|
| 79 |
+
```
|
css/styles.css
ADDED
|
@@ -0,0 +1,1419 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* EgoInfinity Dataset Viewer - adapted from design/project/EgoInfinity Explorer.html */
|
| 2 |
+
:root {
|
| 3 |
+
--paper: oklch(0.975 0.008 80);
|
| 4 |
+
--paper-2: oklch(0.955 0.01 80);
|
| 5 |
+
--ink: oklch(0.18 0.01 60);
|
| 6 |
+
--ink-2: oklch(0.38 0.01 60);
|
| 7 |
+
--ink-3: oklch(0.58 0.01 60);
|
| 8 |
+
--rule: oklch(0.88 0.01 70);
|
| 9 |
+
--rule-2: oklch(0.82 0.01 70);
|
| 10 |
+
--accent: oklch(0.68 0.18 40);
|
| 11 |
+
--accent-ink: oklch(0.32 0.12 40);
|
| 12 |
+
--chip: oklch(0.93 0.012 80);
|
| 13 |
+
--ok: oklch(0.58 0.12 150);
|
| 14 |
+
}
|
| 15 |
+
[data-theme="noir"] {
|
| 16 |
+
--paper: oklch(0.16 0.008 260);
|
| 17 |
+
--paper-2: oklch(0.20 0.01 260);
|
| 18 |
+
--ink: oklch(0.96 0.006 80);
|
| 19 |
+
--ink-2: oklch(0.78 0.01 70);
|
| 20 |
+
--ink-3: oklch(0.58 0.01 70);
|
| 21 |
+
--rule: oklch(0.30 0.01 260);
|
| 22 |
+
--rule-2: oklch(0.38 0.01 260);
|
| 23 |
+
--accent: oklch(0.78 0.18 70);
|
| 24 |
+
--accent-ink: oklch(0.90 0.14 70);
|
| 25 |
+
--chip: oklch(0.24 0.01 260);
|
| 26 |
+
}
|
| 27 |
+
[data-theme="ink"] {
|
| 28 |
+
--paper: oklch(0.97 0.006 230);
|
| 29 |
+
--paper-2: oklch(0.94 0.01 230);
|
| 30 |
+
--ink: oklch(0.20 0.04 260);
|
| 31 |
+
--ink-2: oklch(0.40 0.03 260);
|
| 32 |
+
--ink-3: oklch(0.60 0.02 260);
|
| 33 |
+
--rule: oklch(0.86 0.015 240);
|
| 34 |
+
--rule-2: oklch(0.78 0.015 240);
|
| 35 |
+
--accent: oklch(0.52 0.16 260);
|
| 36 |
+
--accent-ink: oklch(0.32 0.14 260);
|
| 37 |
+
--chip: oklch(0.92 0.015 240);
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
* { box-sizing: border-box; }
|
| 41 |
+
html, body { margin: 0; padding: 0; }
|
| 42 |
+
body {
|
| 43 |
+
font-family: 'Inter', system-ui, sans-serif;
|
| 44 |
+
background: var(--paper);
|
| 45 |
+
color: var(--ink);
|
| 46 |
+
font-size: 14px;
|
| 47 |
+
line-height: 1.5;
|
| 48 |
+
-webkit-font-smoothing: antialiased;
|
| 49 |
+
}
|
| 50 |
+
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
|
| 51 |
+
|
| 52 |
+
/* topbar */
|
| 53 |
+
.topbar {
|
| 54 |
+
display: flex; align-items: center; justify-content: space-between;
|
| 55 |
+
padding: 14px 28px;
|
| 56 |
+
border-bottom: 1px solid var(--rule);
|
| 57 |
+
background: var(--paper);
|
| 58 |
+
position: sticky; top: 0; z-index: 30;
|
| 59 |
+
}
|
| 60 |
+
.brand {
|
| 61 |
+
display: flex; align-items: center; gap: 10px;
|
| 62 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 63 |
+
font-weight: 600; letter-spacing: -0.01em;
|
| 64 |
+
font-size: 13px;
|
| 65 |
+
}
|
| 66 |
+
.brand-mark {
|
| 67 |
+
width: 22px; height: 22px; position: relative;
|
| 68 |
+
border: 1.5px solid var(--ink); border-radius: 50%;
|
| 69 |
+
}
|
| 70 |
+
.brand-mark::after {
|
| 71 |
+
content: ''; position: absolute; inset: 4px;
|
| 72 |
+
border: 1.5px solid var(--ink); border-radius: 50%;
|
| 73 |
+
border-left-color: transparent; border-top-color: transparent;
|
| 74 |
+
transform: rotate(-20deg);
|
| 75 |
+
}
|
| 76 |
+
.brand-mark::before {
|
| 77 |
+
content: ''; position: absolute; width: 3px; height: 3px;
|
| 78 |
+
background: var(--accent); border-radius: 50%;
|
| 79 |
+
top: 50%; left: 50%; transform: translate(-50%,-50%);
|
| 80 |
+
}
|
| 81 |
+
.brand-sub { color: var(--ink-3); font-weight: 400; margin-left: 6px; }
|
| 82 |
+
.topbar-right { display: flex; align-items: center; gap: 18px; font-size: 12px; }
|
| 83 |
+
.topbar-right a { color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
|
| 84 |
+
.topbar-right a:hover { color: var(--ink); }
|
| 85 |
+
.topbar-right .pill {
|
| 86 |
+
border: 1px solid var(--rule-2); border-radius: 99px;
|
| 87 |
+
padding: 5px 10px; font-family: 'IBM Plex Mono', monospace;
|
| 88 |
+
font-size: 11px; color: var(--ink-2);
|
| 89 |
+
display: inline-flex; gap: 6px; align-items: center;
|
| 90 |
+
}
|
| 91 |
+
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
|
| 92 |
+
|
| 93 |
+
/* hero */
|
| 94 |
+
.hero {
|
| 95 |
+
position: relative;
|
| 96 |
+
overflow: hidden;
|
| 97 |
+
border-bottom: 1px solid var(--rule);
|
| 98 |
+
/* full-bleed: video + scrim span the whole viewport width;
|
| 99 |
+
the text is re-constrained to the page width by .hero-inner below. */
|
| 100 |
+
}
|
| 101 |
+
.hero-inner {
|
| 102 |
+
position: relative; z-index: 2;
|
| 103 |
+
max-width: 1480px; margin: 0 auto;
|
| 104 |
+
padding: 64px 28px 52px;
|
| 105 |
+
min-height: 480px;
|
| 106 |
+
display: flex;
|
| 107 |
+
align-items: center; /* vertically center the text over the video */
|
| 108 |
+
justify-content: space-between;
|
| 109 |
+
gap: 48px;
|
| 110 |
+
flex-wrap: wrap;
|
| 111 |
+
}
|
| 112 |
+
/* Full-cover background video (10s loop). Autoplay needs muted + playsinline. */
|
| 113 |
+
.hero-bg {
|
| 114 |
+
position: absolute; inset: 0;
|
| 115 |
+
width: 100%; height: 100%;
|
| 116 |
+
object-fit: cover;
|
| 117 |
+
/* nudge-zoom to clip thin black bars baked into the source clip; bump if
|
| 118 |
+
they still peek through (overflow:hidden on .hero crops the overscan). */
|
| 119 |
+
transform: scale(1.06);
|
| 120 |
+
z-index: 0;
|
| 121 |
+
}
|
| 122 |
+
/* Paper-coloured veil between video and text. Heavier behind the text (left),
|
| 123 |
+
lighter on the right so the clip stays visible. Tune the % to taste. */
|
| 124 |
+
.hero-scrim {
|
| 125 |
+
position: absolute; inset: 0;
|
| 126 |
+
z-index: 1;
|
| 127 |
+
/* uniform paper veil - same opacity everywhere (tune the %). */
|
| 128 |
+
background: color-mix(in oklch, var(--paper) 66%, transparent);
|
| 129 |
+
}
|
| 130 |
+
.hero-content {
|
| 131 |
+
position: relative;
|
| 132 |
+
z-index: 2;
|
| 133 |
+
max-width: 820px;
|
| 134 |
+
flex: 1 1 520px;
|
| 135 |
+
}
|
| 136 |
+
/* Right-side keyword column - mono kicker + Fraunces phrase, matching the
|
| 137 |
+
"001 /" eyebrow system. Paper text-glow keeps it readable over the video. */
|
| 138 |
+
.hero-stats {
|
| 139 |
+
position: relative; z-index: 2;
|
| 140 |
+
flex: 0 0 auto;
|
| 141 |
+
display: flex; flex-direction: column; gap: 22px;
|
| 142 |
+
text-align: right;
|
| 143 |
+
}
|
| 144 |
+
.hero-stat { display: flex; flex-direction: column; gap: 5px; }
|
| 145 |
+
.hero-stat-kicker {
|
| 146 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 147 |
+
font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
|
| 148 |
+
color: var(--accent-ink);
|
| 149 |
+
}
|
| 150 |
+
.hero-stat-key {
|
| 151 |
+
font-family: 'Fraunces', 'Inter', serif;
|
| 152 |
+
font-weight: 400;
|
| 153 |
+
font-size: clamp(26px, 2.9vw, 40px);
|
| 154 |
+
line-height: 1.08; letter-spacing: -0.01em;
|
| 155 |
+
color: var(--ink);
|
| 156 |
+
text-shadow: 0 1px 16px var(--paper), 0 0 3px var(--paper);
|
| 157 |
+
}
|
| 158 |
+
.hero-stat-key sup { font-size: 0.5em; color: var(--accent-ink); }
|
| 159 |
+
.hero-stat-note {
|
| 160 |
+
margin-top: 4px;
|
| 161 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 162 |
+
font-size: 10.5px; color: var(--ink-3);
|
| 163 |
+
text-shadow: 0 1px 10px var(--paper);
|
| 164 |
+
}
|
| 165 |
+
.hero-links {
|
| 166 |
+
display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px;
|
| 167 |
+
margin-top: 20px;
|
| 168 |
+
}
|
| 169 |
+
@media (max-width: 720px) {
|
| 170 |
+
.hero-stats { text-align: left; }
|
| 171 |
+
.hero-links { justify-content: flex-start; }
|
| 172 |
+
}
|
| 173 |
+
.eyebrow {
|
| 174 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 175 |
+
font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
|
| 176 |
+
color: var(--ink-3);
|
| 177 |
+
display: flex; align-items: center; gap: 10px;
|
| 178 |
+
margin-bottom: 22px;
|
| 179 |
+
}
|
| 180 |
+
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--ink-3); }
|
| 181 |
+
h1 {
|
| 182 |
+
font-family: 'Fraunces', 'Inter', serif;
|
| 183 |
+
font-weight: 400;
|
| 184 |
+
font-size: clamp(44px, 6vw, 84px);
|
| 185 |
+
line-height: 0.95;
|
| 186 |
+
letter-spacing: -0.02em;
|
| 187 |
+
margin: 0 0 20px;
|
| 188 |
+
color: var(--ink);
|
| 189 |
+
}
|
| 190 |
+
h1 em { font-style: italic; color: var(--accent-ink); }
|
| 191 |
+
.hero-subtitle {
|
| 192 |
+
font-family: 'Fraunces', 'Inter', serif;
|
| 193 |
+
font-style: italic;
|
| 194 |
+
font-weight: 400;
|
| 195 |
+
font-size: clamp(18px, 2vw, 24px);
|
| 196 |
+
line-height: 1.3;
|
| 197 |
+
letter-spacing: -0.005em;
|
| 198 |
+
color: var(--accent-ink);
|
| 199 |
+
margin: -8px 0 22px;
|
| 200 |
+
max-width: 56ch;
|
| 201 |
+
}
|
| 202 |
+
.hero-lead {
|
| 203 |
+
font-size: 17px; color: var(--ink-2);
|
| 204 |
+
max-width: 52ch; margin: 0 0 14px;
|
| 205 |
+
}
|
| 206 |
+
.hero-lead:last-of-type { margin-bottom: 28px; }
|
| 207 |
+
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
|
| 208 |
+
.btn-icon {
|
| 209 |
+
width: 16px; height: 16px;
|
| 210 |
+
flex-shrink: 0;
|
| 211 |
+
display: inline-block;
|
| 212 |
+
vertical-align: -3px;
|
| 213 |
+
}
|
| 214 |
+
.btn {
|
| 215 |
+
display: inline-flex; align-items: center; gap: 8px;
|
| 216 |
+
padding: 10px 16px; border-radius: 2px;
|
| 217 |
+
border: 1px solid var(--ink);
|
| 218 |
+
background: var(--ink); color: var(--paper);
|
| 219 |
+
font-size: 13px; font-weight: 500;
|
| 220 |
+
cursor: pointer; text-decoration: none;
|
| 221 |
+
font-family: inherit;
|
| 222 |
+
transition: transform 0.15s;
|
| 223 |
+
}
|
| 224 |
+
.btn:hover { transform: translate(-1px,-1px); box-shadow: 2px 2px 0 var(--ink); }
|
| 225 |
+
.btn.ghost { background: transparent; color: var(--ink); }
|
| 226 |
+
.btn .mono { font-size: 11px; opacity: 0.7; }
|
| 227 |
+
|
| 228 |
+
.hero-side { display: flex; flex-direction: column; gap: 14px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; }
|
| 229 |
+
.hero-meta {
|
| 230 |
+
display: grid; grid-template-columns: auto 1fr; gap: 8px 16px;
|
| 231 |
+
padding: 18px 20px;
|
| 232 |
+
border: 1px solid var(--rule);
|
| 233 |
+
background: var(--paper-2);
|
| 234 |
+
}
|
| 235 |
+
.hero-meta dt { color: var(--ink-3); }
|
| 236 |
+
.hero-meta dd { margin: 0; color: var(--ink); }
|
| 237 |
+
.hero-partners { display: flex; gap: 6px; flex-wrap: wrap; }
|
| 238 |
+
.partner { padding: 4px 9px; border: 1px solid var(--rule-2); font-size: 11px; color: var(--ink-2); }
|
| 239 |
+
|
| 240 |
+
/* Promo video placeholder (right column of the hero) */
|
| 241 |
+
.promo-video {
|
| 242 |
+
position: relative;
|
| 243 |
+
width: 100%;
|
| 244 |
+
aspect-ratio: 4 / 3;
|
| 245 |
+
background: var(--paper-2);
|
| 246 |
+
border: 1px solid var(--rule);
|
| 247 |
+
display: flex;
|
| 248 |
+
align-items: center;
|
| 249 |
+
justify-content: center;
|
| 250 |
+
overflow: hidden;
|
| 251 |
+
}
|
| 252 |
+
.promo-video-inner {
|
| 253 |
+
display: flex;
|
| 254 |
+
flex-direction: column;
|
| 255 |
+
align-items: center;
|
| 256 |
+
gap: 12px;
|
| 257 |
+
color: var(--ink-3);
|
| 258 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 259 |
+
font-size: 12px;
|
| 260 |
+
letter-spacing: 0.04em;
|
| 261 |
+
}
|
| 262 |
+
.promo-video-label { text-transform: uppercase; }
|
| 263 |
+
|
| 264 |
+
/* Release-info block above the footer (release stats + pipeline stages) */
|
| 265 |
+
.release-info {
|
| 266 |
+
max-width: 1480px;
|
| 267 |
+
margin: 0 auto;
|
| 268 |
+
padding: 40px 28px 32px;
|
| 269 |
+
border-top: 1px solid var(--rule);
|
| 270 |
+
}
|
| 271 |
+
.release-info-grid {
|
| 272 |
+
display: grid;
|
| 273 |
+
grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
|
| 274 |
+
gap: 32px;
|
| 275 |
+
align-items: start;
|
| 276 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 277 |
+
font-size: 12px;
|
| 278 |
+
}
|
| 279 |
+
@media (max-width: 880px) {
|
| 280 |
+
.release-info-grid { grid-template-columns: 1fr; }
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
+
/* sections */
|
| 284 |
+
.section {
|
| 285 |
+
max-width: 1480px; margin: 0 auto;
|
| 286 |
+
padding: 56px 28px;
|
| 287 |
+
border-bottom: 1px solid var(--rule);
|
| 288 |
+
}
|
| 289 |
+
.section-head {
|
| 290 |
+
display: flex; justify-content: space-between; align-items: baseline;
|
| 291 |
+
margin-bottom: 28px; gap: 24px; flex-wrap: wrap;
|
| 292 |
+
}
|
| 293 |
+
.section-title {
|
| 294 |
+
font-family: 'Fraunces', serif;
|
| 295 |
+
font-size: 32px; font-weight: 400;
|
| 296 |
+
letter-spacing: -0.01em;
|
| 297 |
+
margin: 0;
|
| 298 |
+
}
|
| 299 |
+
.section-num {
|
| 300 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 301 |
+
font-size: 11px; color: var(--ink-3);
|
| 302 |
+
letter-spacing: 0.1em;
|
| 303 |
+
}
|
| 304 |
+
.section-note { color: var(--ink-2); max-width: 60ch; font-size: 14px; }
|
| 305 |
+
|
| 306 |
+
/* showcase: thumbnail grid (first-frame jpg). 3 cols Γ 4 rows = 12 / page. */
|
| 307 |
+
.showcase {
|
| 308 |
+
display: grid;
|
| 309 |
+
grid-template-columns: repeat(4, 1fr);
|
| 310 |
+
gap: 14px;
|
| 311 |
+
}
|
| 312 |
+
@media (min-width: 1100px) {
|
| 313 |
+
.showcase { grid-template-columns: repeat(4, 1fr); }
|
| 314 |
+
}
|
| 315 |
+
@media (max-width: 1099px) {
|
| 316 |
+
.showcase { grid-template-columns: repeat(3, 1fr); }
|
| 317 |
+
}
|
| 318 |
+
@media (max-width: 800px) {
|
| 319 |
+
.showcase { grid-template-columns: repeat(2, 1fr); }
|
| 320 |
+
}
|
| 321 |
+
.clip {
|
| 322 |
+
position: relative; aspect-ratio: 16/10;
|
| 323 |
+
background: var(--paper-2);
|
| 324 |
+
overflow: hidden; cursor: pointer;
|
| 325 |
+
border-radius: 14px;
|
| 326 |
+
border: 1px solid var(--rule);
|
| 327 |
+
transition: transform 0.15s, box-shadow 0.15s;
|
| 328 |
+
}
|
| 329 |
+
.clip:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
|
| 330 |
+
.clip.selected { box-shadow: 0 0 0 2px var(--accent); }
|
| 331 |
+
.clip img, .clip video {
|
| 332 |
+
position: absolute; inset: 0; width: 100%; height: 100%;
|
| 333 |
+
object-fit: cover; background: var(--paper-2);
|
| 334 |
+
display: block;
|
| 335 |
+
}
|
| 336 |
+
.clip video { opacity: 0; transition: opacity 0.15s; }
|
| 337 |
+
.clip:hover video { opacity: 1; }
|
| 338 |
+
.clip-tag {
|
| 339 |
+
position: absolute; top: 10px; left: 10px;
|
| 340 |
+
padding: 3px 7px;
|
| 341 |
+
background: rgba(0,0,0,0.55); color: white;
|
| 342 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 343 |
+
font-size: 10px; letter-spacing: 0.05em;
|
| 344 |
+
border-radius: 3px;
|
| 345 |
+
}
|
| 346 |
+
.clip-label {
|
| 347 |
+
position: absolute; left: 0; right: 0; bottom: 0;
|
| 348 |
+
padding: 12px 14px;
|
| 349 |
+
background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
|
| 350 |
+
color: white;
|
| 351 |
+
font-family: 'Inter', sans-serif;
|
| 352 |
+
font-size: 13px; font-weight: 500;
|
| 353 |
+
display: flex; justify-content: space-between; align-items: end; gap: 8px;
|
| 354 |
+
pointer-events: none;
|
| 355 |
+
transition: opacity 0.16s ease;
|
| 356 |
+
}
|
| 357 |
+
.clip-label .clip-sub {
|
| 358 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 359 |
+
font-size: 10px; opacity: 0.85; font-weight: 400;
|
| 360 |
+
}
|
| 361 |
+
|
| 362 |
+
/* hover overlay: replaces clip-label on hover, shows table-style metadata */
|
| 363 |
+
.clip-overlay {
|
| 364 |
+
position: absolute; inset: 0;
|
| 365 |
+
padding: 16px 18px;
|
| 366 |
+
background: linear-gradient(170deg, rgba(8,12,18,0.18) 0%, rgba(12,18,28,0.34) 60%, rgba(8,12,18,0.55) 100%);
|
| 367 |
+
color: rgba(255,255,255,0.96);
|
| 368 |
+
text-shadow: 0 1px 3px rgba(0,0,0,0.55);
|
| 369 |
+
display: flex; flex-direction: column; gap: 6px;
|
| 370 |
+
opacity: 0; transition: opacity 0.16s ease;
|
| 371 |
+
pointer-events: none;
|
| 372 |
+
z-index: 2;
|
| 373 |
+
font-family: 'Inter', sans-serif;
|
| 374 |
+
}
|
| 375 |
+
.clip:hover .clip-overlay { opacity: 1; }
|
| 376 |
+
.clip:hover .clip-label { opacity: 0; }
|
| 377 |
+
.clip-overlay .ov-title {
|
| 378 |
+
font-family: 'Fraunces', serif;
|
| 379 |
+
font-size: 17px;
|
| 380 |
+
letter-spacing: -0.005em;
|
| 381 |
+
line-height: 1.2;
|
| 382 |
+
color: white;
|
| 383 |
+
}
|
| 384 |
+
.clip-overlay .ov-actor {
|
| 385 |
+
font-size: 10.5px;
|
| 386 |
+
color: white;
|
| 387 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 388 |
+
line-height: 1.4;
|
| 389 |
+
display: -webkit-box;
|
| 390 |
+
-webkit-line-clamp: 2;
|
| 391 |
+
-webkit-box-orient: vertical;
|
| 392 |
+
overflow: hidden;
|
| 393 |
+
}
|
| 394 |
+
.clip-overlay .ov-objects {
|
| 395 |
+
font-size: 10.5px;
|
| 396 |
+
color: white;
|
| 397 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 398 |
+
line-height: 1.35;
|
| 399 |
+
letter-spacing: 0.01em;
|
| 400 |
+
overflow: hidden;
|
| 401 |
+
text-overflow: ellipsis;
|
| 402 |
+
white-space: nowrap;
|
| 403 |
+
}
|
| 404 |
+
.clip-overlay .ov-meta {
|
| 405 |
+
margin-top: auto;
|
| 406 |
+
display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
|
| 407 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 408 |
+
font-size: 10.5px;
|
| 409 |
+
color: rgba(255,255,255,0.85);
|
| 410 |
+
padding-top: 8px;
|
| 411 |
+
border-top: 1px solid rgba(255,255,255,0.12);
|
| 412 |
+
}
|
| 413 |
+
.clip-overlay .ov-meta strong { color: white; font-weight: 500; }
|
| 414 |
+
.clip-overlay .ov-meta .ov-dot { opacity: 0.4; }
|
| 415 |
+
.clip-overlay .ov-grasp {
|
| 416 |
+
display: inline-block;
|
| 417 |
+
padding: 2px 7px;
|
| 418 |
+
background: var(--accent);
|
| 419 |
+
color: oklch(0.18 0.05 40);
|
| 420 |
+
border-radius: 3px;
|
| 421 |
+
font-size: 9.5px;
|
| 422 |
+
letter-spacing: 0.06em;
|
| 423 |
+
text-transform: uppercase;
|
| 424 |
+
font-weight: 600;
|
| 425 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 426 |
+
}
|
| 427 |
+
.clip-overlay .ov-trust {
|
| 428 |
+
color: rgba(255,255,255,0.6);
|
| 429 |
+
}
|
| 430 |
+
|
| 431 |
+
/* pagination */
|
| 432 |
+
.pagination {
|
| 433 |
+
display: flex; gap: 6px; align-items: center;
|
| 434 |
+
margin-top: 22px; padding-top: 16px;
|
| 435 |
+
border-top: 1px solid var(--rule);
|
| 436 |
+
flex-wrap: wrap;
|
| 437 |
+
}
|
| 438 |
+
.pg-btn {
|
| 439 |
+
padding: 6px 12px;
|
| 440 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 11px;
|
| 441 |
+
border: 1px solid var(--rule); background: var(--paper);
|
| 442 |
+
color: var(--ink-2); cursor: pointer;
|
| 443 |
+
}
|
| 444 |
+
.pg-btn:hover:not(:disabled) { color: var(--ink); border-color: var(--ink-2); }
|
| 445 |
+
.pg-btn:disabled { color: var(--ink-3); opacity: 0.4; cursor: not-allowed; }
|
| 446 |
+
.pg-pages { display: flex; gap: 4px; }
|
| 447 |
+
.pg-pages .pg-page {
|
| 448 |
+
min-width: 28px; padding: 6px 8px;
|
| 449 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 11px;
|
| 450 |
+
border: 1px solid var(--rule); background: var(--paper);
|
| 451 |
+
color: var(--ink-2); cursor: pointer; text-align: center;
|
| 452 |
+
}
|
| 453 |
+
.pg-pages .pg-page[aria-current="true"] {
|
| 454 |
+
background: var(--ink); color: var(--paper); border-color: var(--ink);
|
| 455 |
+
}
|
| 456 |
+
.pg-pages .pg-page:hover:not([aria-current="true"]) { color: var(--ink); border-color: var(--ink-2); }
|
| 457 |
+
.pg-pages .pg-ellipsis {
|
| 458 |
+
padding: 6px 4px;
|
| 459 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 11px;
|
| 460 |
+
color: var(--ink-3);
|
| 461 |
+
}
|
| 462 |
+
.pg-info {
|
| 463 |
+
margin-left: auto;
|
| 464 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 11px;
|
| 465 |
+
color: var(--ink-3);
|
| 466 |
+
}
|
| 467 |
+
|
| 468 |
+
/* viser launch overlay */
|
| 469 |
+
.viser-overlay {
|
| 470 |
+
position: absolute; inset: 0;
|
| 471 |
+
display: flex; align-items: center; justify-content: center;
|
| 472 |
+
background: rgba(10,14,22,0.6);
|
| 473 |
+
color: rgba(255,255,255,0.85);
|
| 474 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 12px;
|
| 475 |
+
backdrop-filter: blur(6px);
|
| 476 |
+
text-align: center; padding: 24px;
|
| 477 |
+
pointer-events: none;
|
| 478 |
+
}
|
| 479 |
+
.viser-overlay-inner { width: 100%; max-width: 460px; }
|
| 480 |
+
.viser-overlay-title {
|
| 481 |
+
font-family: 'Fraunces', serif; font-size: 20px; color: white;
|
| 482 |
+
margin-bottom: 8px; letter-spacing: -0.005em;
|
| 483 |
+
}
|
| 484 |
+
.viser-overlay-sub {
|
| 485 |
+
opacity: 0.78; line-height: 1.5;
|
| 486 |
+
}
|
| 487 |
+
.viser-progress {
|
| 488 |
+
position: relative; height: 2px;
|
| 489 |
+
background: rgba(255,255,255,0.12);
|
| 490 |
+
overflow: hidden;
|
| 491 |
+
margin: 18px auto 10px;
|
| 492 |
+
width: 70%;
|
| 493 |
+
}
|
| 494 |
+
.viser-progress > span {
|
| 495 |
+
position: absolute; top: 0; bottom: 0;
|
| 496 |
+
width: 35%;
|
| 497 |
+
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.85), transparent);
|
| 498 |
+
animation: viser-bar 1.35s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
| 499 |
+
}
|
| 500 |
+
@keyframes viser-bar {
|
| 501 |
+
0% { left: -45%; }
|
| 502 |
+
100% { left: 110%; }
|
| 503 |
+
}
|
| 504 |
+
.viser-stage {
|
| 505 |
+
font-size: 10.5px; letter-spacing: 0.04em;
|
| 506 |
+
color: rgba(255,255,255,0.55);
|
| 507 |
+
text-transform: lowercase;
|
| 508 |
+
min-height: 1em;
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
/* stats */
|
| 512 |
+
.stats {
|
| 513 |
+
display: grid;
|
| 514 |
+
grid-template-columns: repeat(4, 1fr);
|
| 515 |
+
gap: 0;
|
| 516 |
+
border-top: 1px solid var(--ink);
|
| 517 |
+
border-bottom: 1px solid var(--rule);
|
| 518 |
+
margin: 40px 0 32px;
|
| 519 |
+
}
|
| 520 |
+
.stat {
|
| 521 |
+
padding: 24px 20px;
|
| 522 |
+
border-right: 1px solid var(--rule);
|
| 523 |
+
}
|
| 524 |
+
.stat:last-child { border-right: none; }
|
| 525 |
+
.stat-value {
|
| 526 |
+
font-family: 'Fraunces', serif;
|
| 527 |
+
font-size: 44px; font-weight: 400; line-height: 1;
|
| 528 |
+
letter-spacing: -0.02em;
|
| 529 |
+
color: var(--ink);
|
| 530 |
+
}
|
| 531 |
+
.stat-value sub {
|
| 532 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 533 |
+
font-size: 12px; color: var(--ink-3);
|
| 534 |
+
margin-left: 4px; font-weight: 400; vertical-align: baseline;
|
| 535 |
+
}
|
| 536 |
+
.stat-label {
|
| 537 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 538 |
+
font-size: 11px; color: var(--ink-3);
|
| 539 |
+
text-transform: uppercase; letter-spacing: 0.08em;
|
| 540 |
+
margin-top: 10px;
|
| 541 |
+
}
|
| 542 |
+
.stat-spark { margin-top: 10px; height: 20px; width: 100%; }
|
| 543 |
+
|
| 544 |
+
/* filters */
|
| 545 |
+
.filter-grid {
|
| 546 |
+
display: grid; grid-template-columns: repeat(3, 1fr);
|
| 547 |
+
gap: 1px; background: var(--rule);
|
| 548 |
+
border: 1px solid var(--rule);
|
| 549 |
+
}
|
| 550 |
+
.filter {
|
| 551 |
+
background: var(--paper); padding: 12px 14px;
|
| 552 |
+
display: flex; flex-direction: column; gap: 6px;
|
| 553 |
+
min-height: 66px;
|
| 554 |
+
}
|
| 555 |
+
.filter label {
|
| 556 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 557 |
+
font-size: 10px; letter-spacing: 0.08em;
|
| 558 |
+
color: var(--ink-3); text-transform: uppercase;
|
| 559 |
+
}
|
| 560 |
+
.filter select, .filter input {
|
| 561 |
+
border: none; background: transparent;
|
| 562 |
+
font-family: 'Inter', sans-serif; font-size: 13px;
|
| 563 |
+
color: var(--ink); outline: none; padding: 0;
|
| 564 |
+
font-weight: 500;
|
| 565 |
+
width: 100%;
|
| 566 |
+
}
|
| 567 |
+
.filter select { appearance: none; cursor: pointer;
|
| 568 |
+
background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
|
| 569 |
+
background-position: calc(100% - 8px) 8px, calc(100% - 4px) 8px;
|
| 570 |
+
background-size: 4px 4px; background-repeat: no-repeat;
|
| 571 |
+
padding-right: 18px;
|
| 572 |
+
}
|
| 573 |
+
|
| 574 |
+
.filter-bar-tail {
|
| 575 |
+
display: flex; justify-content: space-between; align-items: center;
|
| 576 |
+
padding: 14px 0; margin-top: 16px;
|
| 577 |
+
border-top: 1px solid var(--rule);
|
| 578 |
+
}
|
| 579 |
+
.chip {
|
| 580 |
+
display: inline-flex; gap: 6px; align-items: center;
|
| 581 |
+
padding: 4px 9px; background: var(--chip);
|
| 582 |
+
border-radius: 99px; font-size: 11px; font-family: 'IBM Plex Mono', monospace;
|
| 583 |
+
color: var(--ink-2);
|
| 584 |
+
}
|
| 585 |
+
.filter-tail-right { display: flex; gap: 12px; align-items: center; color: var(--ink-3); font-family: 'IBM Plex Mono', monospace; font-size: 12px; }
|
| 586 |
+
|
| 587 |
+
/* browse: combined toolbar */
|
| 588 |
+
.browse-toolbar {
|
| 589 |
+
display: flex; gap: 14px; align-items: stretch;
|
| 590 |
+
margin-top: 22px; padding-bottom: 12px;
|
| 591 |
+
border-bottom: 1px solid var(--rule);
|
| 592 |
+
}
|
| 593 |
+
.browse-search { flex: 1; }
|
| 594 |
+
.browse-search input {
|
| 595 |
+
width: 100%; padding: 10px 14px;
|
| 596 |
+
font-family: 'Inter', sans-serif; font-size: 14px;
|
| 597 |
+
border: 1px solid var(--rule); background: var(--paper);
|
| 598 |
+
color: var(--ink); outline: none;
|
| 599 |
+
}
|
| 600 |
+
.browse-search input:focus { border-color: var(--ink-2); }
|
| 601 |
+
.browse-toolbar-right { display: flex; gap: 10px; align-items: stretch; }
|
| 602 |
+
.browse-select {
|
| 603 |
+
appearance: none; cursor: pointer;
|
| 604 |
+
padding: 8px 28px 8px 12px;
|
| 605 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 12px;
|
| 606 |
+
border: 1px solid var(--rule); background: var(--paper);
|
| 607 |
+
color: var(--ink);
|
| 608 |
+
background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
|
| 609 |
+
background-position: calc(100% - 14px) 50%, calc(100% - 10px) 50%;
|
| 610 |
+
background-size: 4px 4px; background-repeat: no-repeat;
|
| 611 |
+
}
|
| 612 |
+
.view-toggle {
|
| 613 |
+
display: inline-flex; border: 1px solid var(--rule); overflow: hidden;
|
| 614 |
+
}
|
| 615 |
+
.vt-btn {
|
| 616 |
+
display: inline-flex; gap: 6px; align-items: center;
|
| 617 |
+
padding: 6px 12px;
|
| 618 |
+
background: var(--paper); border: 0; cursor: pointer;
|
| 619 |
+
color: var(--ink-3);
|
| 620 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 11px;
|
| 621 |
+
}
|
| 622 |
+
.vt-btn + .vt-btn { border-left: 1px solid var(--rule); }
|
| 623 |
+
.vt-btn[aria-pressed="true"] {
|
| 624 |
+
background: var(--ink); color: var(--paper);
|
| 625 |
+
}
|
| 626 |
+
.vt-icon { font-size: 13px; line-height: 1; }
|
| 627 |
+
|
| 628 |
+
.browse-filters {
|
| 629 |
+
display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
|
| 630 |
+
padding: 14px 0;
|
| 631 |
+
border-bottom: 1px solid var(--rule);
|
| 632 |
+
}
|
| 633 |
+
.chip-toggle {
|
| 634 |
+
display: inline-flex; gap: 6px; align-items: center;
|
| 635 |
+
padding: 5px 11px; cursor: pointer;
|
| 636 |
+
border: 1px solid var(--rule);
|
| 637 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 11px;
|
| 638 |
+
color: var(--ink-2);
|
| 639 |
+
user-select: none;
|
| 640 |
+
}
|
| 641 |
+
.chip-toggle input { appearance: none; width: 9px; height: 9px; border: 1px solid var(--ink-3); margin: 0; cursor: pointer; }
|
| 642 |
+
.chip-toggle input:checked { background: var(--accent); border-color: var(--accent); }
|
| 643 |
+
.chip-toggle:has(input:checked) { color: var(--ink); border-color: var(--ink-2); }
|
| 644 |
+
.browse-count { margin-left: auto; color: var(--ink-3); font-family: 'IBM Plex Mono', monospace; font-size: 11px; }
|
| 645 |
+
|
| 646 |
+
.browse-content { margin-top: 18px; }
|
| 647 |
+
.browse-content[data-view="grid"] #browse-table-wrap { display: none; }
|
| 648 |
+
.browse-content[data-view="list"] #showcase { display: none; }
|
| 649 |
+
|
| 650 |
+
/* table */
|
| 651 |
+
.table-wrap { position: relative; }
|
| 652 |
+
table.episodes {
|
| 653 |
+
width: 100%; border-collapse: collapse;
|
| 654 |
+
font-family: 'Inter', sans-serif; font-size: 13px;
|
| 655 |
+
}
|
| 656 |
+
.episodes thead th {
|
| 657 |
+
text-align: left; font-weight: 500; color: var(--ink-3);
|
| 658 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 659 |
+
font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
|
| 660 |
+
padding: 12px 14px;
|
| 661 |
+
border-bottom: 1px solid var(--ink);
|
| 662 |
+
background: var(--paper);
|
| 663 |
+
}
|
| 664 |
+
.episodes tbody td {
|
| 665 |
+
padding: 14px 14px;
|
| 666 |
+
border-bottom: 1px solid var(--rule);
|
| 667 |
+
vertical-align: middle;
|
| 668 |
+
}
|
| 669 |
+
.episodes tbody tr { cursor: pointer; transition: background 0.1s; }
|
| 670 |
+
.episodes tbody tr:hover { background: var(--paper-2); }
|
| 671 |
+
.episodes tbody tr.active { background: var(--chip); }
|
| 672 |
+
.episodes tbody tr.active td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
|
| 673 |
+
.task-cell { display: flex; align-items: center; gap: 12px; }
|
| 674 |
+
.task-cell .task-thumb {
|
| 675 |
+
flex: none;
|
| 676 |
+
width: 56px; height: 36px;
|
| 677 |
+
object-fit: cover;
|
| 678 |
+
background: var(--paper-2);
|
| 679 |
+
border: 1px solid var(--rule);
|
| 680 |
+
border-radius: 4px;
|
| 681 |
+
}
|
| 682 |
+
.task-cell .task-text { display: flex; flex-direction: column; min-width: 0; }
|
| 683 |
+
.task-cell .task-name { font-weight: 500; color: var(--ink); }
|
| 684 |
+
.task-cell .task-scene { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--ink-3); }
|
| 685 |
+
.mono-cell { font-family: 'IBM Plex Mono', monospace; color: var(--ink-2); font-size: 12px; }
|
| 686 |
+
.num-cell { font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; color: var(--ink); text-align: right; }
|
| 687 |
+
.badge {
|
| 688 |
+
display: inline-flex; gap: 5px; align-items: center;
|
| 689 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 11px;
|
| 690 |
+
color: var(--ink-2);
|
| 691 |
+
}
|
| 692 |
+
.badge::before {
|
| 693 |
+
content: ''; width: 7px; height: 7px; border-radius: 1px;
|
| 694 |
+
background: var(--badge-color, var(--ink-3));
|
| 695 |
+
}
|
| 696 |
+
|
| 697 |
+
/* viewer */
|
| 698 |
+
.viewer-grid {
|
| 699 |
+
display: grid;
|
| 700 |
+
grid-template-columns: 3fr 1fr;
|
| 701 |
+
gap: 18px;
|
| 702 |
+
}
|
| 703 |
+
.viewer-stage {
|
| 704 |
+
position: relative;
|
| 705 |
+
aspect-ratio: 16/11;
|
| 706 |
+
background: oklch(0.09 0.008 260);
|
| 707 |
+
border: 1px solid var(--rule);
|
| 708 |
+
border-radius: 18px;
|
| 709 |
+
overflow: hidden;
|
| 710 |
+
color: oklch(0.96 0.006 80);
|
| 711 |
+
}
|
| 712 |
+
#viewer-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
|
| 713 |
+
#viewer-canvas:active { cursor: grabbing; }
|
| 714 |
+
.viewer-chrome-tl { position: absolute; top: 14px; left: 14px; display: flex; flex-direction: column; gap: 8px; z-index: 3; }
|
| 715 |
+
.viewer-chrome-tr { position: absolute; top: 14px; right: 14px; display: flex; gap: 4px; z-index: 3; }
|
| 716 |
+
.viewer-chip-row { display: flex; gap: 6px; }
|
| 717 |
+
.viewer-chip {
|
| 718 |
+
padding: 4px 8px; background: rgba(0,0,0,0.45); backdrop-filter: blur(6px);
|
| 719 |
+
border: 1px solid rgba(255,255,255,0.08); border-radius: 6px;
|
| 720 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: rgba(255,255,255,0.78);
|
| 721 |
+
}
|
| 722 |
+
.viewer-hint {
|
| 723 |
+
padding: 10px 14px; background: rgba(0,0,0,0.62); backdrop-filter: blur(8px);
|
| 724 |
+
border: 1px solid rgba(255,255,255,0.14); border-radius: 10px;
|
| 725 |
+
box-shadow: 0 6px 18px rgba(0,0,0,0.25);
|
| 726 |
+
color: white; max-width: 260px;
|
| 727 |
+
}
|
| 728 |
+
.viewer-hint-title {
|
| 729 |
+
font-family: 'Inter', sans-serif; font-weight: 600; font-size: 15px;
|
| 730 |
+
letter-spacing: -0.005em; line-height: 1.2; color: white;
|
| 731 |
+
}
|
| 732 |
+
.viewer-hint-sub {
|
| 733 |
+
font-family: 'Inter', sans-serif; font-weight: 400; font-size: 12px;
|
| 734 |
+
color: rgba(255,255,255,0.72); margin-top: 3px;
|
| 735 |
+
}
|
| 736 |
+
.viewer-btn {
|
| 737 |
+
width: 26px; height: 26px; background: rgba(0,0,0,0.45); backdrop-filter: blur(6px);
|
| 738 |
+
border: 1px solid rgba(255,255,255,0.08); border-radius: 6px;
|
| 739 |
+
color: rgba(255,255,255,0.78); cursor: pointer; font-family: 'IBM Plex Mono', monospace; font-size: 12px;
|
| 740 |
+
}
|
| 741 |
+
.viewer-btn:hover { color: white; border-color: rgba(255,255,255,0.25); }
|
| 742 |
+
.viewer-layers {
|
| 743 |
+
position: absolute; right: 14px; top: 52px; width: 200px;
|
| 744 |
+
background: rgba(10,14,22,0.6); backdrop-filter: blur(10px);
|
| 745 |
+
border: 1px solid rgba(255,255,255,0.08); border-radius: 10px;
|
| 746 |
+
padding: 10px 12px; z-index: 3;
|
| 747 |
+
display: flex; flex-direction: column; gap: 6px;
|
| 748 |
+
}
|
| 749 |
+
.viewer-layers .panel-label { margin-bottom: 4px; color: rgba(255,255,255,0.4); font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
|
| 750 |
+
.layer {
|
| 751 |
+
display: flex; align-items: center; gap: 8px;
|
| 752 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 11px;
|
| 753 |
+
color: rgba(255,255,255,0.82); cursor: pointer;
|
| 754 |
+
padding: 2px 0;
|
| 755 |
+
}
|
| 756 |
+
.layer input { position: absolute; opacity: 0; pointer-events: none; }
|
| 757 |
+
.layer .sw {
|
| 758 |
+
width: 20px; height: 12px; background: rgba(255,255,255,0.1);
|
| 759 |
+
border-radius: 99px; position: relative; flex-shrink: 0;
|
| 760 |
+
transition: background 0.15s;
|
| 761 |
+
}
|
| 762 |
+
.layer .sw::after {
|
| 763 |
+
content: ''; position: absolute; top: 1px; left: 1px;
|
| 764 |
+
width: 10px; height: 10px; border-radius: 50%;
|
| 765 |
+
background: rgba(255,255,255,0.5); transition: transform 0.15s, background 0.15s;
|
| 766 |
+
}
|
| 767 |
+
.layer input:checked ~ .sw { background: var(--accent); }
|
| 768 |
+
.layer input:checked ~ .sw::after { transform: translateX(8px); background: white; }
|
| 769 |
+
.layer .num { margin-left: auto; color: rgba(255,255,255,0.4); font-size: 10px; }
|
| 770 |
+
|
| 771 |
+
.viewer-gizmo {
|
| 772 |
+
position: absolute; left: 16px; bottom: 70px;
|
| 773 |
+
display: flex; gap: 6px; font-family: 'IBM Plex Mono', monospace;
|
| 774 |
+
font-size: 10px; color: rgba(255,255,255,0.7);
|
| 775 |
+
background: rgba(0,0,0,0.45); padding: 4px 8px; border-radius: 6px;
|
| 776 |
+
border: 1px solid rgba(255,255,255,0.08);
|
| 777 |
+
}
|
| 778 |
+
.viewer-timeline {
|
| 779 |
+
position: absolute; left: 14px; right: 14px; bottom: 14px;
|
| 780 |
+
display: flex; align-items: center; gap: 10px;
|
| 781 |
+
background: rgba(10,14,22,0.65); backdrop-filter: blur(10px);
|
| 782 |
+
border: 1px solid rgba(255,255,255,0.08); border-radius: 10px;
|
| 783 |
+
padding: 8px 12px;
|
| 784 |
+
}
|
| 785 |
+
.viewer-play {
|
| 786 |
+
width: 26px; height: 26px; border-radius: 50%;
|
| 787 |
+
background: var(--accent); color: white; border: none;
|
| 788 |
+
cursor: pointer; font-size: 10px; display: flex; align-items: center; justify-content: center;
|
| 789 |
+
}
|
| 790 |
+
.v-time { font-size: 11px; color: rgba(255,255,255,0.75); min-width: 38px; font-family: 'IBM Plex Mono', monospace; }
|
| 791 |
+
.v-track { flex: 1; position: relative; height: 16px; display: flex; align-items: center; cursor: pointer; }
|
| 792 |
+
.v-track::before {
|
| 793 |
+
content: ''; position: absolute; left: 0; right: 0; height: 3px; top: 50%; transform: translateY(-50%);
|
| 794 |
+
background: rgba(255,255,255,0.1); border-radius: 99px;
|
| 795 |
+
}
|
| 796 |
+
.v-played { position: absolute; top: 50%; transform: translateY(-50%); height: 3px; background: var(--accent); border-radius: 99px; pointer-events: none; }
|
| 797 |
+
.v-handle { position: absolute; top: 50%; transform: translate(-50%,-50%); width: 10px; height: 10px; border-radius: 50%; background: white; box-shadow: 0 0 0 3px rgba(255,255,255,0.15); pointer-events: none; }
|
| 798 |
+
|
| 799 |
+
.viewer-side {
|
| 800 |
+
display: flex; flex-direction: column; gap: 14px;
|
| 801 |
+
/* Geometry lock: 3fr stage @16:11 has the same height as 1fr side @16:33,
|
| 802 |
+
so the side panel matches the viser stage exactly regardless of viewport. */
|
| 803 |
+
aspect-ratio: 16 / 33;
|
| 804 |
+
min-height: 0;
|
| 805 |
+
overflow: hidden;
|
| 806 |
+
}
|
| 807 |
+
|
| 808 |
+
/* Wide retarget strip below the viser stage (5:1 aspect). One per clip;
|
| 809 |
+
per-clip mp4 swap happens in app.js once retarget videos are available. */
|
| 810 |
+
.viewer-retargets {
|
| 811 |
+
margin-top: 22px;
|
| 812 |
+
width: 100%;
|
| 813 |
+
/* Height derived from cell aspect-ratio (4:3 per cell) plus row padding.
|
| 814 |
+
min-height kicks in when row is hidden (idle / empty fallback states)
|
| 815 |
+
so the absolutely-positioned overlay still has something to fill. */
|
| 816 |
+
min-height: 220px;
|
| 817 |
+
background: var(--paper-2);
|
| 818 |
+
border: 1px solid var(--rule-2);
|
| 819 |
+
border-radius: 14px;
|
| 820 |
+
overflow: hidden;
|
| 821 |
+
position: relative;
|
| 822 |
+
}
|
| 823 |
+
/* 4-column grid of robot replay videos. Each cell is 4:3, the video inside
|
| 824 |
+
is 1:1 centered horizontally with letterbox on left/right. Per-robot
|
| 825 |
+
transform (scale + object-position) zooms in on the robot since the
|
| 826 |
+
source render frames each robot at a different size/position.
|
| 827 |
+
`[hidden]` override required because `display: grid` beats UA stylesheet. */
|
| 828 |
+
.retarget-row {
|
| 829 |
+
display: grid;
|
| 830 |
+
grid-template-columns: repeat(4, 1fr);
|
| 831 |
+
gap: 10px;
|
| 832 |
+
padding: 10px;
|
| 833 |
+
box-sizing: border-box;
|
| 834 |
+
}
|
| 835 |
+
.retarget-row[hidden] { display: none; }
|
| 836 |
+
.retarget-cell {
|
| 837 |
+
aspect-ratio: 4 / 3; /* each frame is 4:3 */
|
| 838 |
+
background: #fff; /* match robot_sim white bg so letterbox blends */
|
| 839 |
+
border-radius: 8px;
|
| 840 |
+
overflow: hidden;
|
| 841 |
+
position: relative;
|
| 842 |
+
min-width: 0;
|
| 843 |
+
}
|
| 844 |
+
.retarget-label {
|
| 845 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 846 |
+
font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
|
| 847 |
+
color: #fff;
|
| 848 |
+
padding: 4px 8px 3px;
|
| 849 |
+
background: rgba(0, 0, 0, 0.55);
|
| 850 |
+
position: absolute; top: 0; left: 0; right: 0;
|
| 851 |
+
z-index: 1;
|
| 852 |
+
}
|
| 853 |
+
/* Video is 1:1 (height = cell height, width = cell height, centered horizontally).
|
| 854 |
+
Letterbox fills the remaining ~12.5% on each side. transform: scale() applies
|
| 855 |
+
the per-robot zoom (defaults below tuned to the -9A2VyaIkX4_105.4_109.4 clip
|
| 856 |
+
middle frame; should generalize across clips since each robot's framing is
|
| 857 |
+
consistent across clips). object-position picks which part of the 4:3 source
|
| 858 |
+
stays in the 1:1 crop. */
|
| 859 |
+
.retarget-cell video {
|
| 860 |
+
position: absolute;
|
| 861 |
+
top: 0; bottom: 0;
|
| 862 |
+
left: 50%;
|
| 863 |
+
height: 100%;
|
| 864 |
+
aspect-ratio: 1 / 1;
|
| 865 |
+
transform: translateX(-50%) scale(var(--robot-zoom, 1));
|
| 866 |
+
transform-origin: center center;
|
| 867 |
+
object-fit: cover;
|
| 868 |
+
object-position: var(--robot-pos, 50% 50%);
|
| 869 |
+
background: #fff;
|
| 870 |
+
display: block;
|
| 871 |
+
}
|
| 872 |
+
/* Per-robot tuning. Values reflect where the robot sits in its source frame
|
| 873 |
+
(1440Γ1080 4:3) and how much to zoom for parity across the row. */
|
| 874 |
+
.retarget-cell[data-robot="franka"] { --robot-zoom: 1.45; --robot-pos: 30% 65%; }
|
| 875 |
+
.retarget-cell[data-robot="g1"] { --robot-zoom: 1.15; --robot-pos: 50% 55%; }
|
| 876 |
+
.retarget-cell[data-robot="robonaut2"] { --robot-zoom: 1.20; --robot-pos: 55% 55%; }
|
| 877 |
+
.retarget-cell[data-robot="xlerobot"] { --robot-zoom: 1.00; --robot-pos: 70% 50%; }
|
| 878 |
+
/* Idle (no clip picked) + Empty (clip has no retarget) overlays.
|
| 879 |
+
Cover the whole 160px box, mutually exclusive with .retarget-row.
|
| 880 |
+
`[hidden]` override needed for the same reason as .retarget-row. */
|
| 881 |
+
.retarget-idle, .retarget-empty {
|
| 882 |
+
position: absolute; inset: 0;
|
| 883 |
+
display: flex; flex-direction: column;
|
| 884 |
+
align-items: center; justify-content: center;
|
| 885 |
+
gap: 10px;
|
| 886 |
+
color: var(--ink-3);
|
| 887 |
+
background: var(--paper-2);
|
| 888 |
+
}
|
| 889 |
+
.retarget-idle[hidden], .retarget-empty[hidden] { display: none; }
|
| 890 |
+
.retarget-idle svg, .retarget-empty svg {
|
| 891 |
+
width: 36px; height: 36px;
|
| 892 |
+
fill: currentColor; opacity: 0.55;
|
| 893 |
+
}
|
| 894 |
+
.retarget-idle-label, .retarget-empty-label {
|
| 895 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 896 |
+
font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
|
| 897 |
+
padding: 0 16px; text-align: center;
|
| 898 |
+
}
|
| 899 |
+
.side-block {
|
| 900 |
+
border: 1px solid var(--rule); border-radius: 14px; padding: 16px 18px;
|
| 901 |
+
background: var(--paper);
|
| 902 |
+
}
|
| 903 |
+
.side-block-list {
|
| 904 |
+
flex: 1; min-height: 0;
|
| 905 |
+
display: flex; flex-direction: column;
|
| 906 |
+
padding: 16px 18px 12px;
|
| 907 |
+
}
|
| 908 |
+
.side-cliplist {
|
| 909 |
+
flex: 1; min-height: 0;
|
| 910 |
+
overflow-y: auto;
|
| 911 |
+
margin: 4px -6px 0;
|
| 912 |
+
padding: 2px 4px;
|
| 913 |
+
}
|
| 914 |
+
.side-clip {
|
| 915 |
+
display: flex; gap: 10px; align-items: center;
|
| 916 |
+
padding: 6px 6px; cursor: pointer;
|
| 917 |
+
border-bottom: 1px solid var(--rule);
|
| 918 |
+
transition: background 0.1s;
|
| 919 |
+
}
|
| 920 |
+
.side-clip:last-child { border-bottom: 0; }
|
| 921 |
+
.side-clip:hover { background: var(--paper-2); }
|
| 922 |
+
.side-clip.active {
|
| 923 |
+
background: var(--chip);
|
| 924 |
+
box-shadow: inset 3px 0 0 var(--accent);
|
| 925 |
+
}
|
| 926 |
+
.side-clip-thumb {
|
| 927 |
+
width: 56px; height: 32px; object-fit: cover; border-radius: 3px;
|
| 928 |
+
flex-shrink: 0;
|
| 929 |
+
background: var(--paper-2);
|
| 930 |
+
}
|
| 931 |
+
.side-clip-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
|
| 932 |
+
.side-clip-title {
|
| 933 |
+
font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 500; color: var(--ink);
|
| 934 |
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
| 935 |
+
line-height: 1.3;
|
| 936 |
+
}
|
| 937 |
+
.side-clip-id {
|
| 938 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--ink-3);
|
| 939 |
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
| 940 |
+
margin-top: 1px;
|
| 941 |
+
}
|
| 942 |
+
.panel-label-light {
|
| 943 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 944 |
+
font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
|
| 945 |
+
color: var(--ink-3); margin-bottom: 8px;
|
| 946 |
+
}
|
| 947 |
+
.loaded-card .obj-row {
|
| 948 |
+
display: grid; grid-template-columns: 14px 1fr auto auto;
|
| 949 |
+
gap: 10px; align-items: center;
|
| 950 |
+
padding: 6px 0;
|
| 951 |
+
border-top: 1px solid var(--rule);
|
| 952 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 11px;
|
| 953 |
+
}
|
| 954 |
+
.loaded-card .obj-row:first-of-type { border-top: none; padding-top: 10px; }
|
| 955 |
+
.obj-swatch { width: 10px; height: 10px; border-radius: 50%; }
|
| 956 |
+
.obj-prompt { color: var(--ink); font-family: 'Inter', sans-serif; font-weight: 500; font-size: 12px; }
|
| 957 |
+
.obj-stat { color: var(--ink-3); }
|
| 958 |
+
.obj-tag {
|
| 959 |
+
font-size: 9px; padding: 2px 5px; border-radius: 3px;
|
| 960 |
+
background: var(--chip); color: var(--ink-2); letter-spacing: 0.04em;
|
| 961 |
+
}
|
| 962 |
+
|
| 963 |
+
.viewer-video-wrap {
|
| 964 |
+
position: relative; aspect-ratio: 16/10;
|
| 965 |
+
margin-top: 8px;
|
| 966 |
+
border-radius: 10px; overflow: hidden;
|
| 967 |
+
background: oklch(0.10 0.01 260);
|
| 968 |
+
border: 1px solid var(--rule);
|
| 969 |
+
}
|
| 970 |
+
.viewer-video-wrap video {
|
| 971 |
+
position: absolute; inset: 0; width: 100%; height: 100%;
|
| 972 |
+
object-fit: cover; display: block;
|
| 973 |
+
}
|
| 974 |
+
|
| 975 |
+
.ep-list { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; max-height: 300px; overflow: auto; }
|
| 976 |
+
.ep-item {
|
| 977 |
+
display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center;
|
| 978 |
+
padding: 8px; border-radius: 8px; cursor: pointer; font-size: 12px;
|
| 979 |
+
}
|
| 980 |
+
.ep-item:hover { background: var(--paper-2); }
|
| 981 |
+
.ep-item.active { background: var(--chip); }
|
| 982 |
+
.ep-item.active .ep-dot { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
|
| 983 |
+
.ep-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); margin-left: 6px; }
|
| 984 |
+
.ep-name { font-weight: 500; color: var(--ink); }
|
| 985 |
+
.ep-meta { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--ink-3); }
|
| 986 |
+
|
| 987 |
+
.mini-grid { margin: 6px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
|
| 988 |
+
.mini-grid dt { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
|
| 989 |
+
.mini-grid dd { margin: 2px 0 0; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--ink); }
|
| 990 |
+
|
| 991 |
+
@media (max-width: 1400px) {
|
| 992 |
+
.showcase { grid-template-columns: repeat(3, 1fr); }
|
| 993 |
+
}
|
| 994 |
+
@media (max-width: 1100px) {
|
| 995 |
+
.viewer-grid { grid-template-columns: 1fr; }
|
| 996 |
+
.viewer-layers { width: 170px; }
|
| 997 |
+
.hero { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; }
|
| 998 |
+
.showcase { grid-template-columns: repeat(2, 1fr); }
|
| 999 |
+
.stats { grid-template-columns: repeat(2, 1fr); }
|
| 1000 |
+
.filter-grid { grid-template-columns: repeat(2, 1fr); }
|
| 1001 |
+
.detail { grid-template-columns: 1fr; }
|
| 1002 |
+
}
|
| 1003 |
+
|
| 1004 |
+
/* inspect / detail */
|
| 1005 |
+
.detail {
|
| 1006 |
+
display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr);
|
| 1007 |
+
gap: 36px;
|
| 1008 |
+
margin-top: 32px;
|
| 1009 |
+
}
|
| 1010 |
+
.detail-video {
|
| 1011 |
+
position: relative; aspect-ratio: 16/10;
|
| 1012 |
+
background: var(--paper-2); border: 1px solid var(--rule);
|
| 1013 |
+
overflow: hidden; border-radius: 18px;
|
| 1014 |
+
}
|
| 1015 |
+
.detail-video video {
|
| 1016 |
+
position: absolute; inset: 0; width: 100%; height: 100%;
|
| 1017 |
+
object-fit: cover;
|
| 1018 |
+
}
|
| 1019 |
+
.detail-subs {
|
| 1020 |
+
display: grid;
|
| 1021 |
+
grid-template-columns: repeat(2, 1fr);
|
| 1022 |
+
grid-auto-rows: auto;
|
| 1023 |
+
gap: 10px;
|
| 1024 |
+
}
|
| 1025 |
+
.sub-frame {
|
| 1026 |
+
aspect-ratio: 16/10; background: var(--paper-2); border: 1px solid var(--rule);
|
| 1027 |
+
position: relative; border-radius: 12px; overflow: hidden;
|
| 1028 |
+
}
|
| 1029 |
+
.sub-frame video, .sub-frame img, .sub-frame iframe, .sub-frame canvas {
|
| 1030 |
+
position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: oklch(0.10 0.01 260);
|
| 1031 |
+
border: 0;
|
| 1032 |
+
}
|
| 1033 |
+
/* skeleton overlay sits on top of the depth video; pixel-aligned 2D draw */
|
| 1034 |
+
.overlay-skeleton {
|
| 1035 |
+
pointer-events: none;
|
| 1036 |
+
background: transparent !important;
|
| 1037 |
+
z-index: 2;
|
| 1038 |
+
}
|
| 1039 |
+
.sub-label {
|
| 1040 |
+
position: absolute; bottom: 6px; left: 8px;
|
| 1041 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 10px;
|
| 1042 |
+
color: white; background: rgba(0,0,0,0.5); padding: 2px 6px; border-radius: 3px;
|
| 1043 |
+
}
|
| 1044 |
+
|
| 1045 |
+
/* signal panel */
|
| 1046 |
+
.signal-panel {
|
| 1047 |
+
margin-top: 12px;
|
| 1048 |
+
border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px;
|
| 1049 |
+
background: var(--paper);
|
| 1050 |
+
}
|
| 1051 |
+
.signal-row {
|
| 1052 |
+
display: grid; grid-template-columns: 90px 1fr 56px;
|
| 1053 |
+
align-items: center;
|
| 1054 |
+
gap: 12px;
|
| 1055 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 10px;
|
| 1056 |
+
color: var(--ink-3);
|
| 1057 |
+
height: 22px;
|
| 1058 |
+
}
|
| 1059 |
+
.signal-row .signal-label { text-transform: uppercase; letter-spacing: 0.06em; }
|
| 1060 |
+
.signal-row .signal-value { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
|
| 1061 |
+
.signal-row svg { width: 100%; height: 18px; display: block; }
|
| 1062 |
+
.signal-playhead {
|
| 1063 |
+
stroke: var(--accent); stroke-width: 1.5;
|
| 1064 |
+
}
|
| 1065 |
+
|
| 1066 |
+
/* per-object state timeline */
|
| 1067 |
+
.state-legend {
|
| 1068 |
+
display: inline-flex; gap: 10px; margin-left: 8px;
|
| 1069 |
+
font-size: 9.5px; color: var(--ink-3); align-items: center;
|
| 1070 |
+
}
|
| 1071 |
+
.state-chip {
|
| 1072 |
+
display: inline-block; width: 10px; height: 10px;
|
| 1073 |
+
border-radius: 2px; vertical-align: middle;
|
| 1074 |
+
margin-right: 3px;
|
| 1075 |
+
}
|
| 1076 |
+
.state-static { background: oklch(0.78 0.01 240); } /* light gray */
|
| 1077 |
+
.state-grasped-l { background: oklch(0.70 0.16 50); } /* warm orange = left */
|
| 1078 |
+
.state-grasped-r { background: oklch(0.60 0.20 20); } /* red-orange = right */
|
| 1079 |
+
.state-grasped-both { background: oklch(0.42 0.20 15); } /* deep red = both */
|
| 1080 |
+
.state-moving { background: oklch(0.55 0.10 240); } /* cool blue */
|
| 1081 |
+
.state-grasped { background: oklch(0.58 0.18 30); } /* legacy single-grasp */
|
| 1082 |
+
|
| 1083 |
+
.state-row {
|
| 1084 |
+
display: grid; grid-template-columns: 100px 1fr 56px;
|
| 1085 |
+
align-items: center;
|
| 1086 |
+
gap: 12px;
|
| 1087 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 10px;
|
| 1088 |
+
color: var(--ink-3);
|
| 1089 |
+
height: 22px;
|
| 1090 |
+
}
|
| 1091 |
+
.state-row .state-label {
|
| 1092 |
+
text-transform: uppercase; letter-spacing: 0.04em;
|
| 1093 |
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
| 1094 |
+
}
|
| 1095 |
+
.state-row .state-value { text-align: right; color: var(--ink); }
|
| 1096 |
+
.state-row svg { width: 100%; height: 18px; display: block; }
|
| 1097 |
+
|
| 1098 |
+
/* detail meta */
|
| 1099 |
+
.detail-meta h3 {
|
| 1100 |
+
font-family: 'Fraunces', serif; font-size: 28px;
|
| 1101 |
+
font-weight: 400; margin: 0 0 4px; letter-spacing: -0.01em;
|
| 1102 |
+
}
|
| 1103 |
+
.detail-id {
|
| 1104 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 11px;
|
| 1105 |
+
color: var(--ink-3); margin-bottom: 4px;
|
| 1106 |
+
}
|
| 1107 |
+
.detail-source-title {
|
| 1108 |
+
font-family: 'Fraunces', serif; font-style: italic;
|
| 1109 |
+
font-size: 13px; color: var(--ink-3);
|
| 1110 |
+
margin-bottom: 20px; max-width: 56ch;
|
| 1111 |
+
}
|
| 1112 |
+
.detail-source-title:empty { display: none; }
|
| 1113 |
+
.detail-grid {
|
| 1114 |
+
display: grid; grid-template-columns: repeat(3, 1fr);
|
| 1115 |
+
border-top: 1px solid var(--rule);
|
| 1116 |
+
border-left: 1px solid var(--rule);
|
| 1117 |
+
margin-bottom: 22px;
|
| 1118 |
+
}
|
| 1119 |
+
.detail-grid > div {
|
| 1120 |
+
padding: 12px 14px;
|
| 1121 |
+
border-right: 1px solid var(--rule);
|
| 1122 |
+
border-bottom: 1px solid var(--rule);
|
| 1123 |
+
}
|
| 1124 |
+
.detail-grid dt {
|
| 1125 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 1126 |
+
font-size: 10px; letter-spacing: 0.08em;
|
| 1127 |
+
color: var(--ink-3); text-transform: uppercase;
|
| 1128 |
+
margin-bottom: 4px;
|
| 1129 |
+
}
|
| 1130 |
+
.detail-grid dd {
|
| 1131 |
+
margin: 0; font-family: 'IBM Plex Mono', monospace; font-size: 13px;
|
| 1132 |
+
color: var(--ink); font-weight: 500;
|
| 1133 |
+
}
|
| 1134 |
+
.detail-desc {
|
| 1135 |
+
font-size: 14px; color: var(--ink-2); padding: 14px 0;
|
| 1136 |
+
border-top: 1px solid var(--rule);
|
| 1137 |
+
}
|
| 1138 |
+
.detail-desc-label {
|
| 1139 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 1140 |
+
font-size: 10px; letter-spacing: 0.08em;
|
| 1141 |
+
color: var(--ink-3); text-transform: uppercase;
|
| 1142 |
+
margin-bottom: 8px;
|
| 1143 |
+
}
|
| 1144 |
+
.object-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
|
| 1145 |
+
.object-pill {
|
| 1146 |
+
padding: 4px 9px; border: 1px solid var(--rule-2);
|
| 1147 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 11px;
|
| 1148 |
+
color: var(--ink-2);
|
| 1149 |
+
display: inline-flex; align-items: center; gap: 6px;
|
| 1150 |
+
}
|
| 1151 |
+
.object-pill::before {
|
| 1152 |
+
content: ''; width: 7px; height: 7px; border-radius: 50%;
|
| 1153 |
+
background: var(--obj-color, var(--ink-3));
|
| 1154 |
+
}
|
| 1155 |
+
|
| 1156 |
+
/* footer */
|
| 1157 |
+
footer {
|
| 1158 |
+
max-width: 1480px; margin: 0 auto;
|
| 1159 |
+
padding: 40px 28px; display: flex; justify-content: space-between;
|
| 1160 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 11px;
|
| 1161 |
+
color: var(--ink-3);
|
| 1162 |
+
}
|
| 1163 |
+
|
| 1164 |
+
/* loading state */
|
| 1165 |
+
.loading {
|
| 1166 |
+
color: var(--ink-3);
|
| 1167 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 1168 |
+
font-size: 12px;
|
| 1169 |
+
}
|
| 1170 |
+
|
| 1171 |
+
/* team */
|
| 1172 |
+
.team-grid {
|
| 1173 |
+
display: grid;
|
| 1174 |
+
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
| 1175 |
+
gap: 18px 28px;
|
| 1176 |
+
margin-top: 8px;
|
| 1177 |
+
}
|
| 1178 |
+
.team-author {
|
| 1179 |
+
padding: 16px 18px;
|
| 1180 |
+
border: 1px solid var(--rule);
|
| 1181 |
+
background: var(--paper-2);
|
| 1182 |
+
}
|
| 1183 |
+
.team-name {
|
| 1184 |
+
font-family: 'Fraunces', serif;
|
| 1185 |
+
font-size: 18px;
|
| 1186 |
+
letter-spacing: -0.005em;
|
| 1187 |
+
color: var(--ink);
|
| 1188 |
+
}
|
| 1189 |
+
.team-affil {
|
| 1190 |
+
margin-top: 4px;
|
| 1191 |
+
font-size: 11px;
|
| 1192 |
+
color: var(--ink-3);
|
| 1193 |
+
}
|
| 1194 |
+
|
| 1195 |
+
/* ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
|
| 1196 |
+
/* 005 / Statistics */
|
| 1197 |
+
/* ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
|
| 1198 |
+
.stats-card {
|
| 1199 |
+
margin: 0 0 22px;
|
| 1200 |
+
border: 1px solid var(--rule);
|
| 1201 |
+
background: var(--paper);
|
| 1202 |
+
border-radius: 14px;
|
| 1203 |
+
overflow: hidden;
|
| 1204 |
+
display: flex;
|
| 1205 |
+
flex-direction: column;
|
| 1206 |
+
}
|
| 1207 |
+
.stats-card-wide { width: 100%; }
|
| 1208 |
+
.stats-card > img {
|
| 1209 |
+
display: block;
|
| 1210 |
+
width: 100%;
|
| 1211 |
+
height: auto;
|
| 1212 |
+
object-fit: contain;
|
| 1213 |
+
background: var(--paper-2);
|
| 1214 |
+
}
|
| 1215 |
+
.stats-card figcaption {
|
| 1216 |
+
padding: 14px 22px 18px;
|
| 1217 |
+
border-top: 1px solid var(--rule);
|
| 1218 |
+
background: var(--paper);
|
| 1219 |
+
}
|
| 1220 |
+
.stats-tag {
|
| 1221 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 1222 |
+
font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
|
| 1223 |
+
color: var(--ink-3); display: block; margin-bottom: 6px;
|
| 1224 |
+
}
|
| 1225 |
+
.stats-card h3 {
|
| 1226 |
+
font-family: 'Fraunces', serif; font-size: 18px;
|
| 1227 |
+
margin: 0; color: var(--ink); letter-spacing: -0.005em;
|
| 1228 |
+
}
|
| 1229 |
+
.stats-card p { font-size: 13px; color: var(--ink-2); line-height: 1.5; margin: 6px 0 0; }
|
| 1230 |
+
|
| 1231 |
+
/* Row 3: 33% / 67% split */
|
| 1232 |
+
.stats-row-split {
|
| 1233 |
+
display: grid;
|
| 1234 |
+
grid-template-columns: 1fr 2fr;
|
| 1235 |
+
gap: 22px;
|
| 1236 |
+
margin-top: 0;
|
| 1237 |
+
align-items: stretch;
|
| 1238 |
+
}
|
| 1239 |
+
@media (max-width: 900px) { .stats-row-split { grid-template-columns: 1fr; } }
|
| 1240 |
+
.stats-card-split { margin-bottom: 0; }
|
| 1241 |
+
.stats-card-split > img {
|
| 1242 |
+
/* the n-grams chart is wide (~4:1); contain it so all 3 mini-charts stay readable */
|
| 1243 |
+
max-height: 480px;
|
| 1244 |
+
background: var(--paper);
|
| 1245 |
+
}
|
| 1246 |
+
.stats-side-note {
|
| 1247 |
+
border: 1px solid var(--rule);
|
| 1248 |
+
background: var(--paper);
|
| 1249 |
+
border-radius: 14px;
|
| 1250 |
+
padding: 22px 26px;
|
| 1251 |
+
display: flex; flex-direction: column; gap: 10px;
|
| 1252 |
+
color: var(--ink-2); font-size: 14px; line-height: 1.55;
|
| 1253 |
+
}
|
| 1254 |
+
.stats-side-note h3 {
|
| 1255 |
+
font-family: 'Fraunces', serif; font-size: 22px;
|
| 1256 |
+
margin: 0; color: var(--ink); letter-spacing: -0.005em;
|
| 1257 |
+
}
|
| 1258 |
+
.stats-side-note p { margin: 0; }
|
| 1259 |
+
.stats-side-note a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
|
| 1260 |
+
.stats-citation-lead {
|
| 1261 |
+
margin-top: 8px !important;
|
| 1262 |
+
font-size: 12px !important;
|
| 1263 |
+
color: var(--ink-3) !important;
|
| 1264 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 1265 |
+
letter-spacing: 0.04em;
|
| 1266 |
+
}
|
| 1267 |
+
.stats-bibtex {
|
| 1268 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 1269 |
+
font-size: 11px;
|
| 1270 |
+
line-height: 1.55;
|
| 1271 |
+
color: var(--ink-2);
|
| 1272 |
+
background: var(--paper-2);
|
| 1273 |
+
border: 1px solid var(--rule);
|
| 1274 |
+
border-radius: 8px;
|
| 1275 |
+
padding: 12px 14px;
|
| 1276 |
+
margin: 0;
|
| 1277 |
+
white-space: pre-wrap;
|
| 1278 |
+
word-break: normal;
|
| 1279 |
+
overflow-x: auto;
|
| 1280 |
+
}
|
| 1281 |
+
|
| 1282 |
+
/* ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
|
| 1283 |
+
/* 006 / Roadmap */
|
| 1284 |
+
/* ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
|
| 1285 |
+
.roadmap-list {
|
| 1286 |
+
list-style: none; padding: 0 0 0 38px; margin: 8px 0 0;
|
| 1287 |
+
position: relative;
|
| 1288 |
+
}
|
| 1289 |
+
.roadmap-list::before {
|
| 1290 |
+
content: ''; position: absolute;
|
| 1291 |
+
left: 11px; top: 8px; bottom: 8px; width: 1px;
|
| 1292 |
+
background: linear-gradient(to bottom, transparent, var(--rule-2) 12%, var(--rule-2) 88%, transparent);
|
| 1293 |
+
}
|
| 1294 |
+
.roadmap-item {
|
| 1295 |
+
position: relative;
|
| 1296 |
+
padding-bottom: 40px;
|
| 1297 |
+
display: grid;
|
| 1298 |
+
grid-template-columns: 110px 1fr;
|
| 1299 |
+
gap: 24px;
|
| 1300 |
+
align-items: baseline;
|
| 1301 |
+
}
|
| 1302 |
+
.roadmap-item:last-child { padding-bottom: 0; }
|
| 1303 |
+
.roadmap-dot {
|
| 1304 |
+
position: absolute;
|
| 1305 |
+
left: -32px; top: 10px;
|
| 1306 |
+
width: 12px; height: 12px;
|
| 1307 |
+
border-radius: 50%;
|
| 1308 |
+
box-shadow: 0 0 0 4px var(--paper);
|
| 1309 |
+
background: var(--ink-3);
|
| 1310 |
+
}
|
| 1311 |
+
.roadmap-item[data-status="shipped"] .roadmap-dot { background: var(--ok); }
|
| 1312 |
+
.roadmap-item[data-status="active"] .roadmap-dot { background: var(--accent); }
|
| 1313 |
+
.roadmap-quarter {
|
| 1314 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 1315 |
+
font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
|
| 1316 |
+
color: var(--ink-3);
|
| 1317 |
+
}
|
| 1318 |
+
.roadmap-body h3 {
|
| 1319 |
+
font-family: 'Fraunces', serif; font-size: 20px;
|
| 1320 |
+
margin: 0 0 6px; color: var(--ink); letter-spacing: -0.005em;
|
| 1321 |
+
}
|
| 1322 |
+
.roadmap-status {
|
| 1323 |
+
font-family: 'IBM Plex Mono', monospace; font-size: 10px;
|
| 1324 |
+
letter-spacing: 0.22em; text-transform: uppercase;
|
| 1325 |
+
color: var(--ink-3); margin-left: 6px;
|
| 1326 |
+
}
|
| 1327 |
+
.roadmap-item[data-status="shipped"] .roadmap-status { color: var(--ok); }
|
| 1328 |
+
.roadmap-item[data-status="active"] .roadmap-status { color: var(--accent-ink); }
|
| 1329 |
+
.roadmap-body p {
|
| 1330 |
+
font-size: 14px; color: var(--ink-2); line-height: 1.55;
|
| 1331 |
+
margin: 0; max-width: 60ch;
|
| 1332 |
+
}
|
| 1333 |
+
/* Sub-bullets inside a single roadmap item (used for the consolidated
|
| 1334 |
+
Shipped + Future entries). Marker is a CSS-drawn short horizontal line
|
| 1335 |
+
so no em-dash character is needed. */
|
| 1336 |
+
.roadmap-sublist {
|
| 1337 |
+
list-style: none; padding: 0; margin: 12px 0 0;
|
| 1338 |
+
display: flex; flex-direction: column; gap: 10px;
|
| 1339 |
+
max-width: 62ch;
|
| 1340 |
+
}
|
| 1341 |
+
.roadmap-sublist > li {
|
| 1342 |
+
position: relative;
|
| 1343 |
+
padding-left: 20px;
|
| 1344 |
+
font-size: 14px;
|
| 1345 |
+
color: var(--ink-2);
|
| 1346 |
+
line-height: 1.55;
|
| 1347 |
+
}
|
| 1348 |
+
.roadmap-sublist > li::before {
|
| 1349 |
+
content: '';
|
| 1350 |
+
position: absolute;
|
| 1351 |
+
left: 0; top: 10px;
|
| 1352 |
+
width: 10px; height: 1px;
|
| 1353 |
+
background: var(--ink-3);
|
| 1354 |
+
}
|
| 1355 |
+
.roadmap-sublist > li strong {
|
| 1356 |
+
color: var(--ink); font-weight: 600;
|
| 1357 |
+
}
|
| 1358 |
+
.roadmap-artifacts {
|
| 1359 |
+
list-style: none; padding: 0; margin: 14px 0 0;
|
| 1360 |
+
display: flex; flex-wrap: wrap; gap: 6px;
|
| 1361 |
+
}
|
| 1362 |
+
.roadmap-artifacts li {
|
| 1363 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 1364 |
+
font-size: 10px; letter-spacing: 0.04em;
|
| 1365 |
+
padding: 3px 8px; border: 1px solid var(--rule-2); border-radius: 3px;
|
| 1366 |
+
color: var(--ink-2);
|
| 1367 |
+
}
|
| 1368 |
+
|
| 1369 |
+
/* ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
|
| 1370 |
+
/* 008 / Waitlist */
|
| 1371 |
+
/* ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
|
| 1372 |
+
.waitlist-grid {
|
| 1373 |
+
display: grid;
|
| 1374 |
+
grid-template-columns: 5fr 7fr;
|
| 1375 |
+
gap: 36px;
|
| 1376 |
+
margin-top: 8px;
|
| 1377 |
+
align-items: start;
|
| 1378 |
+
}
|
| 1379 |
+
@media (max-width: 900px) {
|
| 1380 |
+
.waitlist-grid { grid-template-columns: 1fr; }
|
| 1381 |
+
}
|
| 1382 |
+
.waitlist-bullets {
|
| 1383 |
+
list-style: none; padding: 0; margin: 0;
|
| 1384 |
+
display: flex; flex-direction: column; gap: 18px;
|
| 1385 |
+
font-size: 14px; color: var(--ink-2); line-height: 1.5;
|
| 1386 |
+
}
|
| 1387 |
+
.waitlist-bullets li {
|
| 1388 |
+
display: flex; align-items: flex-start; gap: 12px;
|
| 1389 |
+
}
|
| 1390 |
+
.waitlist-bullets li::before {
|
| 1391 |
+
content: ''; display: block;
|
| 1392 |
+
width: 6px; height: 6px; border-radius: 50%;
|
| 1393 |
+
background: var(--accent); flex-shrink: 0;
|
| 1394 |
+
margin-top: 8px;
|
| 1395 |
+
}
|
| 1396 |
+
.waitlist-card {
|
| 1397 |
+
border: 1px solid var(--rule);
|
| 1398 |
+
background: var(--paper);
|
| 1399 |
+
border-radius: 14px;
|
| 1400 |
+
padding: 24px 28px;
|
| 1401 |
+
display: flex; flex-direction: column; gap: 18px;
|
| 1402 |
+
}
|
| 1403 |
+
.waitlist-card-head h3 {
|
| 1404 |
+
font-family: 'Fraunces', serif; font-size: 22px;
|
| 1405 |
+
margin: 0; color: var(--ink); letter-spacing: -0.005em;
|
| 1406 |
+
}
|
| 1407 |
+
.waitlist-card-head p {
|
| 1408 |
+
font-size: 13px; color: var(--ink-3); margin: 4px 0 0;
|
| 1409 |
+
}
|
| 1410 |
+
.waitlist-cta {
|
| 1411 |
+
justify-content: center;
|
| 1412 |
+
padding: 14px 18px;
|
| 1413 |
+
width: 100%;
|
| 1414 |
+
font-family: 'IBM Plex Mono', monospace;
|
| 1415 |
+
font-size: 11px;
|
| 1416 |
+
letter-spacing: 0.22em;
|
| 1417 |
+
text-transform: uppercase;
|
| 1418 |
+
margin-top: 4px;
|
| 1419 |
+
}
|
hero.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:35b56873e1073c99fe6d40d9e113db5a49cbbefbd8175b96d2db037f27e87a7f
|
| 3 |
+
size 12574044
|
hero_poster.png
ADDED
|
Git LFS Details
|
index.html
ADDED
|
@@ -0,0 +1,610 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!doctype html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="utf-8" />
|
| 5 |
+
<title>EgoInfinity / Dataset Viewer</title>
|
| 6 |
+
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
| 7 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 8 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 9 |
+
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,400;9..144,500&display=swap" rel="stylesheet">
|
| 10 |
+
<link rel="stylesheet" href="css/styles.css">
|
| 11 |
+
</head>
|
| 12 |
+
<body data-theme="noir">
|
| 13 |
+
|
| 14 |
+
<header class="topbar">
|
| 15 |
+
<div class="brand">
|
| 16 |
+
<div class="brand-mark"></div>
|
| 17 |
+
<span>EGOINFINITY</span>
|
| 18 |
+
</div>
|
| 19 |
+
<div class="topbar-right">
|
| 20 |
+
<a href="#viewer">3D Viewer</a>
|
| 21 |
+
<a href="#browse">Browse</a>
|
| 22 |
+
<a href="#stats">Stats</a>
|
| 23 |
+
<a href="#roadmap">Roadmap</a>
|
| 24 |
+
<a href="#waitlist">Waitlist</a>
|
| 25 |
+
<a href="#team">Team</a>
|
| 26 |
+
<a href="https://github.com/Rice-RobotPI-Lab/EgoInfinity" target="_blank" rel="noopener">GitHub β</a>
|
| 27 |
+
<a href="https://huggingface.co/datasets/Rice-RobotPI-Lab/egoinfinity" target="_blank" rel="noopener">Dataset β</a>
|
| 28 |
+
<button class="btn ghost" id="theme-btn" style="padding: 6px 10px; font-size: 11px;">Theme</button>
|
| 29 |
+
</div>
|
| 30 |
+
</header>
|
| 31 |
+
|
| 32 |
+
<section class="hero">
|
| 33 |
+
<video class="hero-bg" autoplay muted loop playsinline preload="metadata" poster="hero_poster.png">
|
| 34 |
+
<source src="hero.mp4" type="video/mp4">
|
| 35 |
+
</video>
|
| 36 |
+
<div class="hero-scrim"></div>
|
| 37 |
+
<div class="hero-inner">
|
| 38 |
+
<div class="hero-content">
|
| 39 |
+
<div class="eyebrow">001 / Curated, processed, ready</div>
|
| 40 |
+
<h1>EgoInfinity</h1>
|
| 41 |
+
<p class="hero-subtitle">A Web-Scale Data Engine for Video-to-Action Robot Learning through Egocentric Views</p>
|
| 42 |
+
<p class="hero-lead"><span class="mono" style="color:var(--ink)">EgoInfinity</span> is a <strong>data engine</strong> that automatically curates and processes any-view video clips into high-quality 4D hand-object-interaction (HOI) sequences, and transforms them into any other views, including egocentric. <span class="mono" style="color:var(--ink)">EgoInfinity</span> also provides a framework to retarget processed human motions to motions on any robots.</p>
|
| 43 |
+
<p class="hero-lead"><strong>Click any clip in the Browse section below to load it into the 3D viewer and inspect panels.</strong></p>
|
| 44 |
+
<div class="hero-actions">
|
| 45 |
+
<a class="btn" href="#browse">Browse <span id="hero-count">-</span> episodes <span class="mono">β</span></a>
|
| 46 |
+
<a class="btn ghost" href="#viewer">
|
| 47 |
+
<svg class="btn-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round" aria-hidden="true">
|
| 48 |
+
<path d="M12 2 L21 7 L21 17 L12 22 L3 17 L3 7 Z"/>
|
| 49 |
+
<path d="M12 2 L12 12 L21 7"/>
|
| 50 |
+
<path d="M12 12 L12 22"/>
|
| 51 |
+
<path d="M12 12 L3 7"/>
|
| 52 |
+
</svg>
|
| 53 |
+
Open 3D viewer <span class="mono">β</span>
|
| 54 |
+
</a>
|
| 55 |
+
</div>
|
| 56 |
+
<div style="margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--ink-3);">
|
| 57 |
+
<span style="padding: 3px 8px; border: 1px solid var(--rule-2); color: var(--ink-2);">source: action100m</span>
|
| 58 |
+
<span style="opacity:0.6">β</span>
|
| 59 |
+
<span style="padding: 3px 8px; border: 1px solid var(--rule-2); color: var(--ink-2);">extract: pose Β· contact Β· sam3d_mesh</span>
|
| 60 |
+
<span style="opacity:0.6">β</span>
|
| 61 |
+
<span style="padding: 3px 8px; border: 1px solid var(--accent); color: var(--accent-ink);">retarget: any embodiment</span>
|
| 62 |
+
</div>
|
| 63 |
+
</div>
|
| 64 |
+
<div class="hero-stats">
|
| 65 |
+
<div class="hero-stat">
|
| 66 |
+
<span class="hero-stat-kicker">01 / Duration</span>
|
| 67 |
+
<span class="hero-stat-key">14.6+ Years<sup>*</sup></span>
|
| 68 |
+
</div>
|
| 69 |
+
<div class="hero-stat">
|
| 70 |
+
<span class="hero-stat-kicker">02 / Pipeline</span>
|
| 71 |
+
<span class="hero-stat-key">Modular & Upgradable</span>
|
| 72 |
+
</div>
|
| 73 |
+
<div class="hero-stat">
|
| 74 |
+
<span class="hero-stat-kicker">03 / Scope</span>
|
| 75 |
+
<span class="hero-stat-key">Data Engine For Any Video</span>
|
| 76 |
+
</div>
|
| 77 |
+
<div class="hero-stat">
|
| 78 |
+
<span class="hero-stat-kicker">04 / Enabling</span>
|
| 79 |
+
<span class="hero-stat-key">Retargeting to Any Robot</span>
|
| 80 |
+
</div>
|
| 81 |
+
<span class="hero-stat-note"><sup>*</sup> total duration, sourced from Action100M</span>
|
| 82 |
+
<div class="hero-links">
|
| 83 |
+
<a class="btn ghost" href="https://huggingface.co/datasets/Rice-RobotPI-Lab/egoinfinity" target="_blank" rel="noopener">
|
| 84 |
+
<svg class="btn-icon" viewBox="0 0 95 88" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
| 85 |
+
<path d="M47.2 75.5c20.5 0 37.1-13.4 37.1-30s-16.6-30-37.1-30-37.1 13.4-37.1 30 16.6 30 37.1 30Z" fill="#FFD21E"/>
|
| 86 |
+
<path d="M81.3 47.4c0 14.4-15.3 26-34.1 26s-34.1-11.6-34.1-26c0-7.1 3.7-13.5 9.7-18.2-2.7 4.5-4.3 9.6-4.3 15 0 14 13.7 25.4 30.5 25.4s30.5-11.4 30.5-25.4c0-5.4-1.6-10.5-4.3-15 6 4.7 9.7 11.1 9.7 18.2Z" fill="#FF9D0B"/>
|
| 87 |
+
<circle cx="34" cy="42" r="5" fill="#3A3B45"/>
|
| 88 |
+
<circle cx="60" cy="42" r="5" fill="#3A3B45"/>
|
| 89 |
+
<path d="M37 56c2 4 6 6.5 10.2 6.5S55.4 60 57.4 56" stroke="#3A3B45" stroke-width="3" stroke-linecap="round" fill="none"/>
|
| 90 |
+
</svg>
|
| 91 |
+
Dataset <span class="mono">β</span>
|
| 92 |
+
</a>
|
| 93 |
+
<a class="btn ghost" href="https://github.com/Rice-RobotPI-Lab/EgoInfinity" target="_blank" rel="noopener">
|
| 94 |
+
<svg class="btn-icon" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
|
| 95 |
+
<path d="M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91.58.11.79-.25.79-.55v-1.94c-3.2.7-3.87-1.54-3.87-1.54-.52-1.32-1.27-1.67-1.27-1.67-1.04-.71.08-.7.08-.7 1.15.08 1.76 1.18 1.76 1.18 1.02 1.75 2.69 1.24 3.34.95.1-.74.4-1.24.73-1.53-2.55-.29-5.24-1.28-5.24-5.69 0-1.26.45-2.29 1.18-3.1-.12-.29-.51-1.46.11-3.05 0 0 .97-.31 3.18 1.19a11.06 11.06 0 0 1 5.79 0c2.21-1.5 3.18-1.19 3.18-1.19.62 1.59.23 2.76.11 3.05.74.81 1.18 1.84 1.18 3.1 0 4.42-2.69 5.4-5.25 5.68.41.36.78 1.06.78 2.13v3.16c0 .31.21.67.79.55A11.51 11.51 0 0 0 23.5 12C23.5 5.65 18.35.5 12 .5z"/>
|
| 96 |
+
</svg>
|
| 97 |
+
GitHub <span class="mono">β</span>
|
| 98 |
+
</a>
|
| 99 |
+
<a class="btn ghost" href="https://rice-robotpi-lab.github.io/EgoInfinity/" target="_blank" rel="noopener">Project page <span class="mono">β</span></a>
|
| 100 |
+
<a class="btn ghost" href="https://arxiv.org/abs/2606.17385" target="_blank" rel="noopener">arXiv <span class="mono">β</span></a>
|
| 101 |
+
</div>
|
| 102 |
+
</div>
|
| 103 |
+
</div>
|
| 104 |
+
</section>
|
| 105 |
+
|
| 106 |
+
<!-- 4D VIEWER -->
|
| 107 |
+
<section class="section" id="viewer">
|
| 108 |
+
<div class="section-head">
|
| 109 |
+
<div>
|
| 110 |
+
<div class="section-num">002 / 3D Viewer <span style="color:var(--accent-ink); margin-left:8px">Β· viser</span></div>
|
| 111 |
+
<h2 class="section-title">Same scene as the pipeline.</h2>
|
| 112 |
+
</div>
|
| 113 |
+
<p class="section-note"><strong>Click any clip in the Browse section below to load its 3D scene here.</strong> Embedded <span class="mono" style="color:var(--ink)">viser</span> session with the same renderer, GUI controls, and layers as <span class="mono">exo_pipeline.py --load-cache</span>. One viser process at a time; selecting an episode swaps it.</p>
|
| 114 |
+
</div>
|
| 115 |
+
|
| 116 |
+
<div class="viewer-grid">
|
| 117 |
+
<div class="viewer-stage">
|
| 118 |
+
<iframe id="viser-iframe" src="about:blank" allow="fullscreen"
|
| 119 |
+
style="position:absolute;inset:0;width:100%;height:100%;border:0;background:white"></iframe>
|
| 120 |
+
<div class="viewer-chrome-tl">
|
| 121 |
+
<div class="viewer-hint">
|
| 122 |
+
<div class="viewer-hint-title">Default view: Egocentric</div>
|
| 123 |
+
<div class="viewer-hint-sub">Drag to interact</div>
|
| 124 |
+
</div>
|
| 125 |
+
<div class="viewer-chip-row">
|
| 126 |
+
<span class="viewer-chip mono" id="viewer-clip-tag">-</span>
|
| 127 |
+
<span class="viewer-chip mono" id="viser-state">idle</span>
|
| 128 |
+
</div>
|
| 129 |
+
</div>
|
| 130 |
+
<div class="viewer-chrome-tr">
|
| 131 |
+
<button class="viewer-btn" id="viser-open" title="open in new tab">β</button>
|
| 132 |
+
</div>
|
| 133 |
+
<div id="viser-overlay" class="viser-overlay" data-state="idle">
|
| 134 |
+
<div class="viser-overlay-inner">
|
| 135 |
+
<div id="viser-overlay-title" class="viser-overlay-title">Pick an episode</div>
|
| 136 |
+
<div id="viser-overlay-sub" class="viser-overlay-sub">Click any clip in the browse list. Its pre-recorded viser scene will load here.</div>
|
| 137 |
+
</div>
|
| 138 |
+
</div>
|
| 139 |
+
</div>
|
| 140 |
+
|
| 141 |
+
<aside class="viewer-side">
|
| 142 |
+
<div class="side-block">
|
| 143 |
+
<div class="panel-label-light">now loaded</div>
|
| 144 |
+
<div class="loaded-card">
|
| 145 |
+
<div id="loaded-title" style="font-family:'Fraunces',serif; font-size:22px; letter-spacing:-0.01em">-</div>
|
| 146 |
+
<div class="mono" id="loaded-meta" style="font-size:11px; color:var(--ink-3); margin-top:2px">select an episode below</div>
|
| 147 |
+
<div id="loaded-objects" style="margin-top: 14px;"></div>
|
| 148 |
+
</div>
|
| 149 |
+
</div>
|
| 150 |
+
|
| 151 |
+
|
| 152 |
+
<div class="side-block side-block-list">
|
| 153 |
+
<div class="panel-label-light">clips</div>
|
| 154 |
+
<div class="side-cliplist" id="side-cliplist"></div>
|
| 155 |
+
</div>
|
| 156 |
+
</aside>
|
| 157 |
+
</div>
|
| 158 |
+
|
| 159 |
+
<!-- Robot-embodiment retargets, 4-column row below the viser stage.
|
| 160 |
+
Per-clip robot_sim.mp4 is swapped in by app.js when a clip is picked.
|
| 161 |
+
Clips without retarget (per index.json `has_retarget=false`) get
|
| 162 |
+
a fallback empty-state instead. -->
|
| 163 |
+
<div class="viewer-retargets" id="viewer-retargets">
|
| 164 |
+
<div class="retarget-row" id="retarget-row" hidden>
|
| 165 |
+
<div class="retarget-cell" data-robot="franka">
|
| 166 |
+
<div class="retarget-label">Franka</div>
|
| 167 |
+
<video id="retarget-franka" src="" muted playsinline autoplay loop preload="metadata"></video>
|
| 168 |
+
</div>
|
| 169 |
+
<div class="retarget-cell" data-robot="g1">
|
| 170 |
+
<div class="retarget-label">Unitree G1</div>
|
| 171 |
+
<video id="retarget-g1" src="" muted playsinline autoplay loop preload="metadata"></video>
|
| 172 |
+
</div>
|
| 173 |
+
<div class="retarget-cell" data-robot="robonaut2">
|
| 174 |
+
<div class="retarget-label">Robonaut2</div>
|
| 175 |
+
<video id="retarget-robonaut2" src="" muted playsinline autoplay loop preload="metadata"></video>
|
| 176 |
+
</div>
|
| 177 |
+
<div class="retarget-cell" data-robot="xlerobot">
|
| 178 |
+
<div class="retarget-label">XLeRobot</div>
|
| 179 |
+
<video id="retarget-xlerobot" src="" muted playsinline autoplay loop preload="metadata"></video>
|
| 180 |
+
</div>
|
| 181 |
+
</div>
|
| 182 |
+
<div class="retarget-empty" id="retarget-empty" hidden>
|
| 183 |
+
<svg viewBox="0 0 64 64" aria-hidden="true">
|
| 184 |
+
<path d="M22 18 L46 32 L22 46 Z"/>
|
| 185 |
+
</svg>
|
| 186 |
+
<div class="retarget-empty-label">No robot-embodiment retarget available for this clip yet.</div>
|
| 187 |
+
</div>
|
| 188 |
+
<div class="retarget-idle" id="retarget-idle">
|
| 189 |
+
<svg viewBox="0 0 64 64" aria-hidden="true">
|
| 190 |
+
<path d="M22 18 L46 32 L22 46 Z"/>
|
| 191 |
+
</svg>
|
| 192 |
+
<div class="retarget-idle-label">Pick a clip below to view its robot-embodiment retargets.</div>
|
| 193 |
+
</div>
|
| 194 |
+
</div>
|
| 195 |
+
</section>
|
| 196 |
+
|
| 197 |
+
<!-- INSPECT -->
|
| 198 |
+
<section class="section" id="inspect">
|
| 199 |
+
<div class="section-head">
|
| 200 |
+
<div>
|
| 201 |
+
<div class="section-num">003 / Inspect</div>
|
| 202 |
+
<h2 class="section-title">Episode detail.</h2>
|
| 203 |
+
</div>
|
| 204 |
+
<p class="section-note"><strong>Click any clip in the Browse section below to populate these panels.</strong> Annotated stream (hand skeleton), raw clip, MoGe-2 depth, MEMFOF flow, plus per-frame contact / grasp / motion / trust signals from the 6-DoF tracker.</p>
|
| 205 |
+
</div>
|
| 206 |
+
|
| 207 |
+
<div class="detail">
|
| 208 |
+
<div>
|
| 209 |
+
<div class="detail-subs">
|
| 210 |
+
<div class="sub-frame">
|
| 211 |
+
<iframe id="yt-iframe" src="about:blank" allow="autoplay; encrypted-media; picture-in-picture" allowfullscreen referrerpolicy="origin-when-cross-origin"></iframe>
|
| 212 |
+
<span class="sub-label">raw Β· YouTube</span>
|
| 213 |
+
</div>
|
| 214 |
+
<div class="sub-frame">
|
| 215 |
+
<video id="detail-mask" src="" muted playsinline preload="metadata" autoplay loop></video>
|
| 216 |
+
<canvas id="detail-skeleton" class="overlay-skeleton"></canvas>
|
| 217 |
+
<span class="sub-label">mask Β· sam-tracked Β· skeleton overlay</span>
|
| 218 |
+
</div>
|
| 219 |
+
<div class="sub-frame">
|
| 220 |
+
<video id="detail-depth" src="" controls muted playsinline preload="metadata" autoplay loop></video>
|
| 221 |
+
<span class="sub-label">depth Β· moge2</span>
|
| 222 |
+
</div>
|
| 223 |
+
<div class="sub-frame">
|
| 224 |
+
<video id="detail-flow" src="" muted playsinline preload="metadata" autoplay loop></video>
|
| 225 |
+
<span class="sub-label">flow Β· memfof</span>
|
| 226 |
+
</div>
|
| 227 |
+
</div>
|
| 228 |
+
|
| 229 |
+
<div class="signal-panel" id="signal-panel">
|
| 230 |
+
<div class="panel-label-light">signals (per-frame)</div>
|
| 231 |
+
<div class="signal-row">
|
| 232 |
+
<div class="signal-label">contact_l</div>
|
| 233 |
+
<svg id="sig-contact-l" preserveAspectRatio="none" viewBox="0 0 200 18"></svg>
|
| 234 |
+
<div class="signal-value" id="sig-val-contact-l">-</div>
|
| 235 |
+
</div>
|
| 236 |
+
<div class="signal-row">
|
| 237 |
+
<div class="signal-label">contact_r</div>
|
| 238 |
+
<svg id="sig-contact-r" preserveAspectRatio="none" viewBox="0 0 200 18"></svg>
|
| 239 |
+
<div class="signal-value" id="sig-val-contact-r">-</div>
|
| 240 |
+
</div>
|
| 241 |
+
<div class="signal-row">
|
| 242 |
+
<div class="signal-label">grasp</div>
|
| 243 |
+
<svg id="sig-grasp" preserveAspectRatio="none" viewBox="0 0 200 18"></svg>
|
| 244 |
+
<div class="signal-value" id="sig-val-grasp">-</div>
|
| 245 |
+
</div>
|
| 246 |
+
<div class="signal-row">
|
| 247 |
+
<div class="signal-label">motion (px)</div>
|
| 248 |
+
<svg id="sig-motion" preserveAspectRatio="none" viewBox="0 0 200 18"></svg>
|
| 249 |
+
<div class="signal-value" id="sig-val-motion">-</div>
|
| 250 |
+
</div>
|
| 251 |
+
<div class="signal-row">
|
| 252 |
+
<div class="signal-label">trust (any)</div>
|
| 253 |
+
<svg id="sig-trust" preserveAspectRatio="none" viewBox="0 0 200 18"></svg>
|
| 254 |
+
<div class="signal-value" id="sig-val-trust">-</div>
|
| 255 |
+
</div>
|
| 256 |
+
</div>
|
| 257 |
+
|
| 258 |
+
<!-- Per-object state timeline (static / grasped-L/R/both / moving) -->
|
| 259 |
+
<div class="signal-panel" id="state-timeline-panel" style="margin-top: 12px;">
|
| 260 |
+
<div class="panel-label-light">object state Β· <span class="state-legend">
|
| 261 |
+
<span class="state-chip state-static"></span>static
|
| 262 |
+
<span class="state-chip state-grasped-l"></span>grasp L
|
| 263 |
+
<span class="state-chip state-grasped-r"></span>grasp R
|
| 264 |
+
<span class="state-chip state-grasped-both"></span>both
|
| 265 |
+
<span class="state-chip state-moving"></span>moving
|
| 266 |
+
</span></div>
|
| 267 |
+
<div id="state-timeline-rows"></div>
|
| 268 |
+
</div>
|
| 269 |
+
</div>
|
| 270 |
+
|
| 271 |
+
<div class="detail-meta">
|
| 272 |
+
<h3 id="d-title">-</h3>
|
| 273 |
+
<div class="detail-id mono" id="d-id">-</div>
|
| 274 |
+
<div class="detail-source-title" id="d-source-title"></div>
|
| 275 |
+
|
| 276 |
+
<dl class="detail-grid" id="d-grid">
|
| 277 |
+
<div><dt>duration</dt><dd id="d-dur">-</dd></div>
|
| 278 |
+
<div><dt>frames</dt><dd id="d-frames">-</dd></div>
|
| 279 |
+
<div><dt>fps</dt><dd id="d-fps">-</dd></div>
|
| 280 |
+
<div><dt>video uid</dt><dd id="d-uid">-</dd></div>
|
| 281 |
+
<div><dt>start</dt><dd id="d-start">-</dd></div>
|
| 282 |
+
<div><dt>end</dt><dd id="d-end">-</dd></div>
|
| 283 |
+
</dl>
|
| 284 |
+
|
| 285 |
+
<div class="detail-desc-label">description</div>
|
| 286 |
+
<p class="detail-desc" style="padding-top: 0; border-top: none;" id="d-desc">-</p>
|
| 287 |
+
|
| 288 |
+
<div class="detail-desc-label" id="d-summary-label" style="margin-top: 14px; display: none;">full summary</div>
|
| 289 |
+
<p class="detail-desc" style="padding-top: 0; border-top: none; display: none;" id="d-summary"></p>
|
| 290 |
+
|
| 291 |
+
<div class="detail-desc-label" style="margin-top: 14px;">objects in scene</div>
|
| 292 |
+
<div class="object-list" id="d-objects"></div>
|
| 293 |
+
|
| 294 |
+
<div class="detail-desc-label" style="margin-top: 18px;">tracking summary</div>
|
| 295 |
+
<div id="d-tracking" class="mono" style="font-size:12px; color:var(--ink-2)"></div>
|
| 296 |
+
</div>
|
| 297 |
+
</div>
|
| 298 |
+
</section>
|
| 299 |
+
|
| 300 |
+
<!-- BROWSE (combined showcase + explorer) -->
|
| 301 |
+
<section class="section" id="browse">
|
| 302 |
+
<div class="section-head">
|
| 303 |
+
<div>
|
| 304 |
+
<div class="section-num">004 / Browse</div>
|
| 305 |
+
<h2 class="section-title">Episode-level dataset preview.</h2>
|
| 306 |
+
</div>
|
| 307 |
+
<p class="section-note">Search, filter, and sort all favorites. Switch between thumbnail and table view. <strong>Click any clip to load it into the inspect and viser panels above.</strong></p>
|
| 308 |
+
</div>
|
| 309 |
+
|
| 310 |
+
<div class="stats">
|
| 311 |
+
<div class="stat">
|
| 312 |
+
<div class="stat-value" id="stat-eps">-<sub>ep</sub></div>
|
| 313 |
+
<div class="stat-label">Filtered episodes</div>
|
| 314 |
+
</div>
|
| 315 |
+
<div class="stat">
|
| 316 |
+
<div class="stat-value" id="stat-dur">-<sub>s</sub></div>
|
| 317 |
+
<div class="stat-label">Filtered duration</div>
|
| 318 |
+
</div>
|
| 319 |
+
<div class="stat">
|
| 320 |
+
<div class="stat-value" id="stat-objs">-<sub>obj</sub></div>
|
| 321 |
+
<div class="stat-label">SAM3D objects</div>
|
| 322 |
+
</div>
|
| 323 |
+
<div class="stat">
|
| 324 |
+
<div class="stat-value" id="stat-grasp">-<sub>%</sub></div>
|
| 325 |
+
<div class="stat-label">With grasp</div>
|
| 326 |
+
</div>
|
| 327 |
+
</div>
|
| 328 |
+
|
| 329 |
+
<div class="browse-toolbar">
|
| 330 |
+
<div class="browse-search">
|
| 331 |
+
<input id="f-search" type="text" placeholder="search action, actor, object, sourceβ¦" />
|
| 332 |
+
</div>
|
| 333 |
+
<div class="browse-toolbar-right">
|
| 334 |
+
<select id="f-sort" class="browse-select" title="sort">
|
| 335 |
+
<option value="default:asc">default (shuffled)</option>
|
| 336 |
+
<option value="favorited_at:desc">favorited β</option>
|
| 337 |
+
<option value="favorited_at:asc">favorited β</option>
|
| 338 |
+
<option value="duration_sec:desc">duration β</option>
|
| 339 |
+
<option value="duration_sec:asc">duration β</option>
|
| 340 |
+
<option value="n_frames:desc">frames β</option>
|
| 341 |
+
<option value="n_objects:desc">objects β</option>
|
| 342 |
+
<option value="mean_trust:desc">hand quality β (trust)</option>
|
| 343 |
+
<option value="mean_iou:desc">mask iou β</option>
|
| 344 |
+
<option value="action_brief:asc">action AβZ</option>
|
| 345 |
+
</select>
|
| 346 |
+
<div class="view-toggle" role="tablist" aria-label="view mode">
|
| 347 |
+
<button id="view-grid" class="vt-btn" aria-pressed="true" title="grid view"><span class="vt-icon">β¦</span><span class="vt-label">grid</span></button>
|
| 348 |
+
<button id="view-list" class="vt-btn" aria-pressed="false" title="list view"><span class="vt-icon">β°</span><span class="vt-label">list</span></button>
|
| 349 |
+
</div>
|
| 350 |
+
</div>
|
| 351 |
+
</div>
|
| 352 |
+
|
| 353 |
+
<div class="browse-filters">
|
| 354 |
+
<select id="f-source" class="browse-select" title="source video">
|
| 355 |
+
<option value="">All sources</option>
|
| 356 |
+
</select>
|
| 357 |
+
<label class="chip-toggle"><input type="checkbox" id="f-has-grasp"><span>has grasp</span></label>
|
| 358 |
+
<label class="chip-toggle"><input type="checkbox" id="f-has-tracking"><span>has tracking</span></label>
|
| 359 |
+
<label class="chip-toggle"><input type="checkbox" id="f-multi-obj"><span>multi-object</span></label>
|
| 360 |
+
<span class="browse-count" id="visible-count">-</span>
|
| 361 |
+
</div>
|
| 362 |
+
|
| 363 |
+
<div class="browse-content" id="browse-content" data-view="grid">
|
| 364 |
+
<div class="showcase" id="showcase">
|
| 365 |
+
<div class="loading" style="grid-column:1/-1; padding:40px; text-align:center">loading clipsβ¦</div>
|
| 366 |
+
</div>
|
| 367 |
+
<div class="table-wrap" id="browse-table-wrap">
|
| 368 |
+
<table class="episodes" id="episodes-table">
|
| 369 |
+
<thead>
|
| 370 |
+
<tr>
|
| 371 |
+
<th style="width: 28%">Clip</th>
|
| 372 |
+
<th>Actor</th>
|
| 373 |
+
<th>Source</th>
|
| 374 |
+
<th>Objects</th>
|
| 375 |
+
<th style="text-align: right;">Frames</th>
|
| 376 |
+
<th style="text-align: right;">Duration</th>
|
| 377 |
+
<th>Grasp</th>
|
| 378 |
+
</tr>
|
| 379 |
+
</thead>
|
| 380 |
+
<tbody id="episodes-body"></tbody>
|
| 381 |
+
</table>
|
| 382 |
+
</div>
|
| 383 |
+
</div>
|
| 384 |
+
|
| 385 |
+
<div class="pagination" id="pagination">
|
| 386 |
+
<button class="pg-btn" id="pg-prev" title="previous page">βΉ prev</button>
|
| 387 |
+
<div class="pg-pages" id="pg-pages"></div>
|
| 388 |
+
<button class="pg-btn" id="pg-next" title="next page">next βΊ</button>
|
| 389 |
+
<span class="pg-info" id="pg-info">-</span>
|
| 390 |
+
</div>
|
| 391 |
+
</section>
|
| 392 |
+
|
| 393 |
+
<!-- STATISTICS -->
|
| 394 |
+
<section class="section" id="stats">
|
| 395 |
+
<div class="section-head">
|
| 396 |
+
<div>
|
| 397 |
+
<div class="section-num">005 / Statistics</div>
|
| 398 |
+
<h2 class="section-title">Inside the preview corpus.</h2>
|
| 399 |
+
</div>
|
| 400 |
+
<p class="section-note">Statistics from <a href="https://arxiv.org/abs/2601.10592" target="_blank" rel="noopener" class="mono" style="color:var(--ink)">Action100M</a> annotations.</p>
|
| 401 |
+
</div>
|
| 402 |
+
|
| 403 |
+
<!-- Row 1: word cloud, full width -->
|
| 404 |
+
<figure class="stats-card stats-card-wide">
|
| 405 |
+
<img src="stats/word_cloud.png" alt="Word cloud of Action100M task titles and action labels"
|
| 406 |
+
loading="lazy" decoding="async">
|
| 407 |
+
<figcaption>
|
| 408 |
+
<span class="stats-tag">01 Β· word cloud</span>
|
| 409 |
+
<h3>Action & task vocabulary at corpus scale.</h3>
|
| 410 |
+
</figcaption>
|
| 411 |
+
</figure>
|
| 412 |
+
|
| 413 |
+
<!-- Row 2: sunburst pies, full width -->
|
| 414 |
+
<figure class="stats-card stats-card-wide">
|
| 415 |
+
<img src="stats/sunburst_categories.png" alt="Sunburst breakdowns of the four most-common verbs (add / stir / demonstrate / place) with their inner-ring objects and outer-ring qualifiers"
|
| 416 |
+
loading="lazy" decoding="async">
|
| 417 |
+
<figcaption>
|
| 418 |
+
<span class="stats-tag">02 Β· category sunbursts</span>
|
| 419 |
+
<h3>Top-verb co-occurrence rings.</h3>
|
| 420 |
+
</figcaption>
|
| 421 |
+
</figure>
|
| 422 |
+
|
| 423 |
+
<!-- Row 3: n-grams (33%) + description / source (67%) -->
|
| 424 |
+
<div class="stats-row-split">
|
| 425 |
+
<figure class="stats-card stats-card-split">
|
| 426 |
+
<img src="stats/ngrams.png" alt="Three-column frequency chart: unigrams, bigrams, and trigrams in the Action100M annotation text"
|
| 427 |
+
loading="lazy" decoding="async">
|
| 428 |
+
<figcaption>
|
| 429 |
+
<span class="stats-tag">03 Β· n-grams</span>
|
| 430 |
+
<h3>Unigram / bigram / trigram frequency.</h3>
|
| 431 |
+
</figcaption>
|
| 432 |
+
</figure>
|
| 433 |
+
|
| 434 |
+
<div class="stats-side-note">
|
| 435 |
+
<span class="stats-tag">Source</span>
|
| 436 |
+
<h3>Action100M annotations.</h3>
|
| 437 |
+
<p>The vocabulary, sunburst rings, and n-gram frequencies above are from <a href="https://arxiv.org/abs/2601.10592" target="_blank" rel="noopener">Action100M</a>'s human-written action labels and detailed descriptions. Each EgoInfinity clip carries its source <span class="mono">action_brief</span> + <span class="mono">action_detailed</span> + <span class="mono">summary</span> verbatim in <span class="mono">scene.json.action100m_metadata</span>.</p>
|
| 438 |
+
<p class="stats-citation-lead">Please cite Action100M alongside EgoInfinity if you use these statistics:</p>
|
| 439 |
+
<pre class="stats-bibtex">@article{chen2026action100m,
|
| 440 |
+
title = {Action100M: A Large-scale Video Action Dataset},
|
| 441 |
+
author = {Chen, Delong and Kasarla, Tejaswi and Bang, Yejin
|
| 442 |
+
and Shukor, Mustafa and Chung, Willy and Yu, Jade
|
| 443 |
+
and Bolourchi, Allen and Moutakanni, Théo
|
| 444 |
+
and Fung, Pascale},
|
| 445 |
+
journal = {arXiv preprint arXiv:2601.10592},
|
| 446 |
+
year = {2026}
|
| 447 |
+
}</pre>
|
| 448 |
+
</div>
|
| 449 |
+
</div>
|
| 450 |
+
</section>
|
| 451 |
+
|
| 452 |
+
<!-- ROADMAP -->
|
| 453 |
+
<section class="section" id="roadmap">
|
| 454 |
+
<div class="section-head">
|
| 455 |
+
<div>
|
| 456 |
+
<div class="section-num">006 / Roadmap</div>
|
| 457 |
+
<h2 class="section-title">What we're working on <span style="color:var(--accent-ink)">next</span>.</h2>
|
| 458 |
+
</div>
|
| 459 |
+
<p class="section-note">Public-facing milestones for the EgoInfinity dataset and pipeline. Status: <span class="mono">shipped</span> Β· <span class="mono">active</span> Β· <span class="mono">queued</span>.</p>
|
| 460 |
+
</div>
|
| 461 |
+
|
| 462 |
+
<ol class="roadmap-list">
|
| 463 |
+
<li class="roadmap-item" data-status="shipped">
|
| 464 |
+
<span class="roadmap-dot"></span>
|
| 465 |
+
<div class="roadmap-quarter">Shipped</div>
|
| 466 |
+
<div class="roadmap-body">
|
| 467 |
+
<h3>Preview release v1.0 <span class="roadmap-status">Β· shipped</span></h3>
|
| 468 |
+
<ul class="roadmap-sublist">
|
| 469 |
+
<li><strong>106-clip demo:</strong> public HF Dataset of 106 curated Action100M clips with full 4D HOI scenes; browsable via the viewer Space you're on.</li>
|
| 470 |
+
<li><strong>Embodiment retargeting:</strong> each clip ships with Shadow / dexterous-hand retargets so downstream policies can train on any-embodiment trajectories.</li>
|
| 471 |
+
<li><strong>Open-source pipeline code:</strong> full pipeline on GitHub; modular stages (filter / depth / hands / flow / segmentation / 3D mesh / tracking) swappable stage-by-stage.</li>
|
| 472 |
+
</ul>
|
| 473 |
+
<ul class="roadmap-artifacts">
|
| 474 |
+
<li>HF dataset</li><li>viewer space</li><li>shadow retarget</li><li>pipeline code</li>
|
| 475 |
+
</ul>
|
| 476 |
+
</div>
|
| 477 |
+
</li>
|
| 478 |
+
<li class="roadmap-item" data-status="active">
|
| 479 |
+
<span class="roadmap-dot"></span>
|
| 480 |
+
<div class="roadmap-quarter">Now</div>
|
| 481 |
+
<div class="roadmap-body">
|
| 482 |
+
<h3>Action100M-scale processing <span class="roadmap-status">Β· active</span></h3>
|
| 483 |
+
<p>Run the pipeline across the full Action100M corpus, growing the curated subset from 106 clips toward the 100M-clip headline number.</p>
|
| 484 |
+
<ul class="roadmap-artifacts">
|
| 485 |
+
<li>batch scale-up</li><li>v0.2 release</li>
|
| 486 |
+
</ul>
|
| 487 |
+
</div>
|
| 488 |
+
</li>
|
| 489 |
+
<li class="roadmap-item" data-status="queued">
|
| 490 |
+
<span class="roadmap-dot"></span>
|
| 491 |
+
<div class="roadmap-quarter">Future</div>
|
| 492 |
+
<div class="roadmap-body">
|
| 493 |
+
<h3>Beyond v1.0 <span class="roadmap-status">Β· queued</span></h3>
|
| 494 |
+
<ul class="roadmap-sublist">
|
| 495 |
+
<li><strong>Dynamic-camera support:</strong> adopt <span class="mono">Depth Anything V3</span> for depth and switch to a <span class="mono">V-SLAM</span> based scene reconstruction, unlocking all clips with moving cameras, including egocentric capture.</li>
|
| 496 |
+
<li><strong>Component refinement:</strong> iterate on individual modules (filter, curation, contact / grasp signals, hand smoothing) to lift quality and recall across the whole corpus.</li>
|
| 497 |
+
</ul>
|
| 498 |
+
<ul class="roadmap-artifacts">
|
| 499 |
+
<li>depth-anything v3</li><li>v-slam</li><li>ego-centric</li><li>filter</li><li>curation</li>
|
| 500 |
+
</ul>
|
| 501 |
+
</div>
|
| 502 |
+
</li>
|
| 503 |
+
</ol>
|
| 504 |
+
</section>
|
| 505 |
+
|
| 506 |
+
<!-- WAITLIST -->
|
| 507 |
+
<section class="section" id="waitlist">
|
| 508 |
+
<div class="section-head">
|
| 509 |
+
<div>
|
| 510 |
+
<div class="section-num">007 / Waitlist</div>
|
| 511 |
+
<h2 class="section-title">Get the next dataset drop <span style="color:var(--accent-ink)">before the public mirror</span>.</h2>
|
| 512 |
+
</div>
|
| 513 |
+
<p class="section-note">We'll email you when there's an update. Unsubscribe anytime.</p>
|
| 514 |
+
</div>
|
| 515 |
+
|
| 516 |
+
<div class="waitlist-grid">
|
| 517 |
+
<ul class="waitlist-bullets">
|
| 518 |
+
<li>New EgoInfinity releases delivered directly to your inbox.</li>
|
| 519 |
+
</ul>
|
| 520 |
+
|
| 521 |
+
<div class="waitlist-card">
|
| 522 |
+
<div class="waitlist-card-head">
|
| 523 |
+
<h3>Request early access</h3>
|
| 524 |
+
<p>We usually respond within a few business days.</p>
|
| 525 |
+
</div>
|
| 526 |
+
|
| 527 |
+
<a class="btn waitlist-cta" href="https://tally.so/r/jaJPvR" target="_blank" rel="noopener">
|
| 528 |
+
Open the waitlist form <span class="mono">β</span>
|
| 529 |
+
</a>
|
| 530 |
+
</div>
|
| 531 |
+
</div>
|
| 532 |
+
</section>
|
| 533 |
+
|
| 534 |
+
<!-- TEAM -->
|
| 535 |
+
<section class="section" id="team">
|
| 536 |
+
<div class="section-head">
|
| 537 |
+
<div>
|
| 538 |
+
<div class="section-num">008 / Team</div>
|
| 539 |
+
<h2 class="section-title">Authors.</h2>
|
| 540 |
+
</div>
|
| 541 |
+
<p class="section-note">Built by the <span class="mono" style="color:var(--ink)">Rice RobotPI Lab</span> together with collaborators at the Robotics and AI Institute.</p>
|
| 542 |
+
</div>
|
| 543 |
+
|
| 544 |
+
<div class="team-grid">
|
| 545 |
+
<div class="team-author">
|
| 546 |
+
<div class="team-name">Gaotian Wang</div>
|
| 547 |
+
<div class="team-affil mono">Rice University</div>
|
| 548 |
+
</div>
|
| 549 |
+
<div class="team-author">
|
| 550 |
+
<div class="team-name">Kejia Ren</div>
|
| 551 |
+
<div class="team-affil mono">Rice University</div>
|
| 552 |
+
</div>
|
| 553 |
+
<div class="team-author">
|
| 554 |
+
<div class="team-name">Howard Qian</div>
|
| 555 |
+
<div class="team-affil mono">Rice University</div>
|
| 556 |
+
</div>
|
| 557 |
+
<div class="team-author">
|
| 558 |
+
<div class="team-name">Andrew S. Morgan</div>
|
| 559 |
+
<div class="team-affil mono">Robotics and AI Institute</div>
|
| 560 |
+
</div>
|
| 561 |
+
<div class="team-author">
|
| 562 |
+
<div class="team-name">Yiting Chen</div>
|
| 563 |
+
<div class="team-affil mono">Rice University</div>
|
| 564 |
+
</div>
|
| 565 |
+
<div class="team-author">
|
| 566 |
+
<div class="team-name">Podshara Chanrungmaneekul</div>
|
| 567 |
+
<div class="team-affil mono">Rice University</div>
|
| 568 |
+
</div>
|
| 569 |
+
<div class="team-author">
|
| 570 |
+
<div class="team-name">Kaiyu Hang</div>
|
| 571 |
+
<div class="team-affil mono">Rice University</div>
|
| 572 |
+
</div>
|
| 573 |
+
</div>
|
| 574 |
+
</section>
|
| 575 |
+
|
| 576 |
+
<section class="release-info">
|
| 577 |
+
<div class="release-info-grid">
|
| 578 |
+
<dl class="hero-meta" id="hero-meta">
|
| 579 |
+
<dt>release</dt><dd>v0.1 Β· favorites</dd>
|
| 580 |
+
<dt>license</dt><dd>CC BY-SA 4.0</dd>
|
| 581 |
+
<dt>source</dt><dd>action100m Β· curated</dd>
|
| 582 |
+
<dt>episodes</dt><dd id="hm-eps">-</dd>
|
| 583 |
+
<dt>frames</dt><dd id="hm-frames">-</dd>
|
| 584 |
+
<dt>duration</dt><dd id="hm-dur">-</dd>
|
| 585 |
+
<dt>retargeting</dt><dd style="color:var(--accent-ink)">planned</dd>
|
| 586 |
+
</dl>
|
| 587 |
+
<div>
|
| 588 |
+
<div class="eyebrow" style="margin-bottom: 10px;">pipeline stages</div>
|
| 589 |
+
<div class="hero-partners">
|
| 590 |
+
<span class="partner">moge2_depth</span>
|
| 591 |
+
<span class="partner">geocalib</span>
|
| 592 |
+
<span class="partner">wilor_hand</span>
|
| 593 |
+
<span class="partner">memfof_flow</span>
|
| 594 |
+
<span class="partner">sam3_track</span>
|
| 595 |
+
<span class="partner">sam3d_mesh</span>
|
| 596 |
+
</div>
|
| 597 |
+
</div>
|
| 598 |
+
</div>
|
| 599 |
+
</section>
|
| 600 |
+
|
| 601 |
+
<footer>
|
| 602 |
+
<span>EGOINFINITY Β· dataset viewer Β· 2026</span>
|
| 603 |
+
<span id="footer-counts">-</span>
|
| 604 |
+
</footer>
|
| 605 |
+
|
| 606 |
+
<script type="module" src="js/timeseries.js"></script>
|
| 607 |
+
<script type="module" src="js/app.js"></script>
|
| 608 |
+
|
| 609 |
+
</body>
|
| 610 |
+
</html>
|
index.minimal.html.bak
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!doctype html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="utf-8" />
|
| 5 |
+
<title>EgoInfinity Demo β Phase 1 sample</title>
|
| 6 |
+
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
| 7 |
+
<link rel="stylesheet" href="css/styles.css" />
|
| 8 |
+
<style>
|
| 9 |
+
body { margin: 0; padding: 24px; font-family: ui-sans-serif, system-ui, sans-serif; background: oklch(0.975 0.008 80); color: oklch(0.18 0.01 60); }
|
| 10 |
+
h1 { font-size: 22px; margin: 0 0 6px; }
|
| 11 |
+
.sub { font-size: 12px; color: oklch(0.5 0.01 60); margin-bottom: 14px; font-family: ui-monospace, monospace; }
|
| 12 |
+
.row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
|
| 13 |
+
.panel { background: white; border: 1px solid oklch(0.88 0.01 70); border-radius: 8px; padding: 12px; }
|
| 14 |
+
.panel h2 { font-size: 12px; margin: 0 0 8px; font-family: ui-monospace, monospace; color: oklch(0.4 0.01 60); text-transform: uppercase; letter-spacing: 0.06em; }
|
| 15 |
+
#stage { width: 100%; aspect-ratio: 16/10; background: oklch(0.975 0.008 80); border-radius: 6px; overflow: hidden; position: relative; border: 1px solid oklch(0.88 0.01 70); }
|
| 16 |
+
#three-canvas { width: 100%; height: 100%; display: block; }
|
| 17 |
+
.gui {
|
| 18 |
+
position: absolute; top: 8px; left: 8px;
|
| 19 |
+
background: rgba(255,255,255,0.92);
|
| 20 |
+
border: 1px solid oklch(0.85 0.01 70);
|
| 21 |
+
border-radius: 4px; padding: 8px 10px;
|
| 22 |
+
font-family: ui-monospace, monospace; font-size: 11px;
|
| 23 |
+
color: oklch(0.25 0.01 60);
|
| 24 |
+
backdrop-filter: blur(4px);
|
| 25 |
+
user-select: none;
|
| 26 |
+
}
|
| 27 |
+
.gui label { display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 2px 0; }
|
| 28 |
+
.gui label input { margin: 0; }
|
| 29 |
+
.gui .gui-title { font-weight: 600; color: oklch(0.18 0.01 60); margin-bottom: 4px; letter-spacing: 0.04em; text-transform: uppercase; font-size: 9.5px; }
|
| 30 |
+
.grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
|
| 31 |
+
.videopane { aspect-ratio: 16/10; background: black; border-radius: 4px; position: relative; overflow: hidden; }
|
| 32 |
+
.videopane video, .videopane iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
|
| 33 |
+
.videopane .lab { position: absolute; left: 6px; bottom: 6px; padding: 2px 6px; background: rgba(0,0,0,0.6); color: white; font-family: ui-monospace, monospace; font-size: 10px; border-radius: 3px; }
|
| 34 |
+
.controls { margin-top: 10px; display: flex; gap: 8px; align-items: center; font-family: ui-monospace, monospace; font-size: 11px; }
|
| 35 |
+
.controls input[type=range] { flex: 1; }
|
| 36 |
+
.btn { padding: 6px 10px; border: 1px solid oklch(0.6 0.01 60); background: white; cursor: pointer; font-family: ui-monospace, monospace; font-size: 11px; }
|
| 37 |
+
pre.meta { font-family: ui-monospace, monospace; font-size: 11px; color: oklch(0.4 0.01 60); white-space: pre-wrap; word-break: break-all; max-height: 220px; overflow: auto; }
|
| 38 |
+
</style>
|
| 39 |
+
<script type="importmap">
|
| 40 |
+
{ "imports": {
|
| 41 |
+
"three": "https://unpkg.com/three@0.160.0/build/three.module.js",
|
| 42 |
+
"three/addons/": "https://unpkg.com/three@0.160.0/examples/jsm/"
|
| 43 |
+
}
|
| 44 |
+
}
|
| 45 |
+
</script>
|
| 46 |
+
</head>
|
| 47 |
+
<body>
|
| 48 |
+
|
| 49 |
+
<h1>EgoInfinity Demo Β· Phase 1 single-sample preview</h1>
|
| 50 |
+
<div class="sub" id="sub">loadingβ¦</div>
|
| 51 |
+
|
| 52 |
+
<div class="row">
|
| 53 |
+
<div class="panel">
|
| 54 |
+
<h2>3D Scene Β· Three.js</h2>
|
| 55 |
+
<div id="stage">
|
| 56 |
+
<canvas id="three-canvas"></canvas>
|
| 57 |
+
<div class="gui" id="gui">
|
| 58 |
+
<div class="gui-title">Display</div>
|
| 59 |
+
<label><input type="checkbox" id="t-mesh" checked> Hand Mesh</label>
|
| 60 |
+
<label><input type="checkbox" id="t-skeleton" checked> Hand Skeleton</label>
|
| 61 |
+
<label><input type="checkbox" id="t-joints" checked> Hand Joints</label>
|
| 62 |
+
<label><input type="checkbox" id="t-objects" checked> SAM3D Mesh (6DoF)</label>
|
| 63 |
+
<label><input type="checkbox" id="t-obb" > Object OBB</label>
|
| 64 |
+
</div>
|
| 65 |
+
</div>
|
| 66 |
+
<div class="controls">
|
| 67 |
+
<button class="btn" id="play">β―</button>
|
| 68 |
+
<input type="range" id="frame" min="0" max="0" step="1" value="0" />
|
| 69 |
+
<span id="frame-label">0 / 0</span>
|
| 70 |
+
</div>
|
| 71 |
+
</div>
|
| 72 |
+
|
| 73 |
+
<div class="panel">
|
| 74 |
+
<h2>Inspect</h2>
|
| 75 |
+
<div class="grid4">
|
| 76 |
+
<div class="videopane">
|
| 77 |
+
<iframe id="yt-iframe" allow="autoplay; encrypted-media" allowfullscreen></iframe>
|
| 78 |
+
<span class="lab">YouTube Β· exo</span>
|
| 79 |
+
</div>
|
| 80 |
+
<div class="videopane">
|
| 81 |
+
<video id="annotated-video" muted playsinline preload="metadata" autoplay loop></video>
|
| 82 |
+
<span class="lab">depth Β· moge2</span>
|
| 83 |
+
</div>
|
| 84 |
+
<div class="videopane">
|
| 85 |
+
<video id="depth-video" muted playsinline preload="metadata" autoplay loop></video>
|
| 86 |
+
<span class="lab">depth Β· moge2</span>
|
| 87 |
+
</div>
|
| 88 |
+
<div class="videopane">
|
| 89 |
+
<video id="flow-video" muted playsinline preload="metadata" autoplay loop></video>
|
| 90 |
+
<span class="lab">flow Β· memfof</span>
|
| 91 |
+
</div>
|
| 92 |
+
</div>
|
| 93 |
+
<h2 style="margin-top:14px">Scene metadata</h2>
|
| 94 |
+
<pre class="meta" id="scene-meta">β</pre>
|
| 95 |
+
</div>
|
| 96 |
+
</div>
|
| 97 |
+
|
| 98 |
+
<script type="module" src="js/sample_viewer.js"></script>
|
| 99 |
+
</body>
|
| 100 |
+
</html>
|
js/app.js
ADDED
|
@@ -0,0 +1,1216 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Main page glue: static-deployment build.
|
| 2 |
+
// - episode list comes from <ASSET_BASE>/index.json
|
| 3 |
+
// - per-sample assets live at <ASSET_BASE>/<id>/{depth.mp4, recording.viser, ...}
|
| 4 |
+
// - the 3D viewer is the viser-build-client iframe loading recording.viser
|
| 5 |
+
import { SignalPanel, StateTimelinePanel } from './timeseries.js';
|
| 6 |
+
|
| 7 |
+
// Where to fetch episode data from. Resolution order:
|
| 8 |
+
// 1. ?base=<url> query param (manual override)
|
| 9 |
+
// 2. localhost: ./samples (local dev via symlink to _dist)
|
| 10 |
+
// 3. otherwise: HF Dataset resolve URL (Private dataset uses cookie auth
|
| 11 |
+
// from the same huggingface.co origin - user must be logged in)
|
| 12 |
+
const ASSET_BASE = (() => {
|
| 13 |
+
const u = new URL(window.location.href);
|
| 14 |
+
const explicit = u.searchParams.get('base');
|
| 15 |
+
if (explicit) return explicit;
|
| 16 |
+
if (location.hostname === 'localhost' || location.hostname.startsWith('127.')) {
|
| 17 |
+
return './samples';
|
| 18 |
+
}
|
| 19 |
+
return 'https://huggingface.co/datasets/Rice-RobotPI-Lab/egoinfinity/resolve/main/samples';
|
| 20 |
+
})();
|
| 21 |
+
const INDEX_URL = `${ASSET_BASE}/index.json`;
|
| 22 |
+
|
| 23 |
+
// Build an absolute URL to a sample's recording.viser. The viser client iframe
|
| 24 |
+
// lives at viser-client/, so a relative ASSET_BASE like ./samples would resolve
|
| 25 |
+
// against viser-client/ instead of the page. We resolve against location.href
|
| 26 |
+
// (not document.baseURI) because HF Static Spaces sandbox the page's baseURI
|
| 27 |
+
// to a different origin than the URL we actually want to anchor to.
|
| 28 |
+
function viserPlaybackUrl(name) {
|
| 29 |
+
return new URL(
|
| 30 |
+
`${ASSET_BASE}/${encodeURIComponent(name)}/recording.viser`,
|
| 31 |
+
location.href
|
| 32 |
+
).href;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
// Absolute URL of the viser-client iframe's index.html, with the playbackPath
|
| 36 |
+
// query already attached. Two non-obvious bits:
|
| 37 |
+
// - Anchored to location.href so the iframe loads from the same origin as
|
| 38 |
+
// app.js (HF Static Spaces sandbox baseURI to a different origin).
|
| 39 |
+
// - Path explicitly ends in /index.html - HF's static-file server does
|
| 40 |
+
// NOT auto-serve directory indexes, so requesting "viser-client/" 404s.
|
| 41 |
+
function viserClientUrl(name) {
|
| 42 |
+
return new URL(
|
| 43 |
+
`viser-client/index.html?playbackPath=${encodeURIComponent(viserPlaybackUrl(name))}`,
|
| 44 |
+
location.href
|
| 45 |
+
).href;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
// === YouTube IFrame API integration =========================================
|
| 49 |
+
// YouTube is the master clock - the local <video> elements (depth/mask/flow)
|
| 50 |
+
// snap their currentTime to whatever YT reports. This direction is more
|
| 51 |
+
// robust than depth-as-master because we can set <video>.currentTime
|
| 52 |
+
// instantly and exactly, while seeking YT via the IFrame API costs ~200ms
|
| 53 |
+
// of buffering and has ~0.1s precision.
|
| 54 |
+
//
|
| 55 |
+
// Post clip-trim, depth.mp4 / mask.mp4 / flow.mp4 cover exactly the manifest
|
| 56 |
+
// [start_sec, end_sec] window of source content (no padding). depth.mp4 is
|
| 57 |
+
// re-encoded at scene.fps, so its wall-clock duration differs from the source
|
| 58 |
+
// duration; we recover the rate from the loaded <video>.duration:
|
| 59 |
+
// depthRate = depth.duration / (manifestEnd - manifestStart)
|
| 60 |
+
// and the per-tick mapping is:
|
| 61 |
+
// depth.currentTime = (yt.currentTime - manifestStart) Γ depthRate
|
| 62 |
+
const FOLLOW_DRIFT_S = 0.40; // re-snap depth if drift exceeds this
|
| 63 |
+
const FOLLOW_INTERVAL_MS = 250; // poll YT.getCurrentTime this often
|
| 64 |
+
let _ytApiReady = null;
|
| 65 |
+
|
| 66 |
+
function loadYouTubeIframeAPI() {
|
| 67 |
+
if (_ytApiReady) return _ytApiReady;
|
| 68 |
+
_ytApiReady = new Promise(resolve => {
|
| 69 |
+
if (window.YT && window.YT.Player) { resolve(); return; }
|
| 70 |
+
const prev = window.onYouTubeIframeAPIReady;
|
| 71 |
+
window.onYouTubeIframeAPIReady = () => { if (prev) try { prev(); } catch {} resolve(); };
|
| 72 |
+
const tag = document.createElement('script');
|
| 73 |
+
tag.src = 'https://www.youtube.com/iframe_api';
|
| 74 |
+
tag.async = true;
|
| 75 |
+
document.head.appendChild(tag);
|
| 76 |
+
});
|
| 77 |
+
return _ytApiReady;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
async function ensureYouTubePlayer(videoId, manifestStart, manifestEnd) {
|
| 81 |
+
await loadYouTubeIframeAPI();
|
| 82 |
+
// depth.mp4 / mask.mp4 / flow.mp4 cover exactly the manifest window.
|
| 83 |
+
const startSec = manifestStart;
|
| 84 |
+
const endSec = manifestEnd;
|
| 85 |
+
state.ytStartSec = startSec;
|
| 86 |
+
state.ytEndSec = endSec;
|
| 87 |
+
// depthToYtRatio = depth.currentTime per yt content-second; computed
|
| 88 |
+
// once <video> metadata is loaded (we need depth.duration). Default to 1
|
| 89 |
+
// so the first sync tick before metadata loads doesn't divide by NaN.
|
| 90 |
+
state.depthToYtRatio = 1;
|
| 91 |
+
// Reset the stale-value extrapolator so we don't carry the previous
|
| 92 |
+
// episode's (lastReportedTime, lastReportedAt) into the new one.
|
| 93 |
+
state._ytLastReportedTime = null;
|
| 94 |
+
state._ytLastReportedAt = 0;
|
| 95 |
+
// Per-episode YT reset + failure watchdog. If the raw clip is private /
|
| 96 |
+
// age-restricted / embed-disabled / sign-in-required, it never reaches
|
| 97 |
+
// PLAYING; without this, the YT-master sync loop would also pause the local
|
| 98 |
+
// depth/mask/flow/robot videos. The watchdog flips to standalone local
|
| 99 |
+
// playback (and shows a "watch on YouTube" placeholder) instead.
|
| 100 |
+
state.ytVideoId = videoId;
|
| 101 |
+
state.ytStarted = false;
|
| 102 |
+
_ytClearFallback();
|
| 103 |
+
const epoch = (state._ytEpoch = (state._ytEpoch || 0) + 1);
|
| 104 |
+
setTimeout(() => {
|
| 105 |
+
if (state._ytEpoch === epoch && !state.ytFallbackActive && !state.ytStarted) {
|
| 106 |
+
_ytEnterFallback();
|
| 107 |
+
}
|
| 108 |
+
}, 7000);
|
| 109 |
+
if (state.ytPlayer && state.ytReady) {
|
| 110 |
+
try {
|
| 111 |
+
state.ytPlayer.loadVideoById({
|
| 112 |
+
videoId, startSeconds: startSec, endSeconds: endSec,
|
| 113 |
+
});
|
| 114 |
+
} catch {}
|
| 115 |
+
return;
|
| 116 |
+
}
|
| 117 |
+
// First load on this page: seed the iframe URL with enablejsapi=1 so the
|
| 118 |
+
// YT.Player constructor can attach via postMessage, then create the player.
|
| 119 |
+
// Intentionally do NOT include &start/&end in the URL - those round to
|
| 120 |
+
// integer seconds and on short clips (< 5s) the URL bounds fight the
|
| 121 |
+
// fractional bounds we set via loadVideoById/seekTo, causing the player
|
| 122 |
+
// to ENDED+seek+buffer in a tight loop that the user perceives as
|
| 123 |
+
// "stuck within the first second" (Squeeze soap, Open wine bottle).
|
| 124 |
+
const iframe = document.getElementById('yt-iframe');
|
| 125 |
+
if (!iframe) return;
|
| 126 |
+
iframe.src = `https://www.youtube.com/embed/${videoId}`
|
| 127 |
+
+ `?enablejsapi=1&autoplay=1&mute=1`
|
| 128 |
+
+ `&controls=1&rel=0&modestbranding=1&playsinline=1`
|
| 129 |
+
+ `&origin=${encodeURIComponent(location.origin)}`;
|
| 130 |
+
state.ytPlayer = new YT.Player('yt-iframe', {
|
| 131 |
+
events: {
|
| 132 |
+
onReady: (e) => {
|
| 133 |
+
state.ytReady = true;
|
| 134 |
+
// Set fractional start/end via API (no URL bounds) - this
|
| 135 |
+
// is the only way YT honours sub-second precision.
|
| 136 |
+
try {
|
| 137 |
+
e.target.loadVideoById({
|
| 138 |
+
videoId, startSeconds: state.ytStartSec, endSeconds: state.ytEndSec,
|
| 139 |
+
});
|
| 140 |
+
} catch {
|
| 141 |
+
try { e.target.playVideo(); } catch {}
|
| 142 |
+
}
|
| 143 |
+
},
|
| 144 |
+
// YT URL `loop` requires `playlist=`; we handle ENDED manually so the
|
| 145 |
+
// segment loops without re-buffering the whole 5-minute source video.
|
| 146 |
+
onStateChange: (e) => {
|
| 147 |
+
const S = YT.PlayerState;
|
| 148 |
+
// PLAYING or BUFFERING both mean the embed is permitted and loading,
|
| 149 |
+
// so the 7s "looks blocked" timeout should not fire for a slow start.
|
| 150 |
+
if (e.data === S.PLAYING || e.data === S.BUFFERING) state.ytStarted = true;
|
| 151 |
+
// Recovery: if a slow start (e.g. sign-in) already tripped the fallback
|
| 152 |
+
// but YT is now actually playing, drop the overlay and resume syncing
|
| 153 |
+
// the local panels to the YT master clock.
|
| 154 |
+
if (e.data === S.PLAYING && state.ytFallbackActive) _ytClearFallback();
|
| 155 |
+
if (e.data === S.ENDED && state.ytPlayer) {
|
| 156 |
+
try {
|
| 157 |
+
state.ytPlayer.seekTo(state.ytStartSec, true);
|
| 158 |
+
state.ytPlayer.playVideo();
|
| 159 |
+
} catch {}
|
| 160 |
+
}
|
| 161 |
+
},
|
| 162 |
+
// Embedding disabled / private / age-restricted (err 100/101/150) etc. β
|
| 163 |
+
// fall back to local-only playback immediately.
|
| 164 |
+
onError: () => { _ytEnterFallback(); },
|
| 165 |
+
},
|
| 166 |
+
});
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
// === YouTube-unavailable fallback ===========================================
|
| 170 |
+
// When the raw YouTube clip can't play (private / age-restricted / embedding
|
| 171 |
+
// disabled / sign-in required), drive the local mp4s standalone so the
|
| 172 |
+
// depth / mask / flow / robot panels still play, and overlay a "watch on
|
| 173 |
+
// YouTube" note on the raw pane.
|
| 174 |
+
const _LOCAL_VIDEO_IDS = [
|
| 175 |
+
'detail-depth', 'detail-mask', 'detail-flow',
|
| 176 |
+
'retarget-franka', 'retarget-g1', 'retarget-robonaut2', 'retarget-xlerobot',
|
| 177 |
+
];
|
| 178 |
+
|
| 179 |
+
function _ytEnterFallback() {
|
| 180 |
+
if (state.ytFallbackActive) return;
|
| 181 |
+
state.ytFallbackActive = true;
|
| 182 |
+
_showYtPlaceholder(true);
|
| 183 |
+
// depth/mask/flow are equal-length (re-encoded to the same window), so just
|
| 184 |
+
// loop them on their own clock; depth's `play` cascades to mask/flow.
|
| 185 |
+
for (const id of _LOCAL_VIDEO_IDS) {
|
| 186 |
+
const v = document.getElementById(id);
|
| 187 |
+
if (!v) continue;
|
| 188 |
+
v.loop = true;
|
| 189 |
+
v.playbackRate = 1;
|
| 190 |
+
try { if (Number.isFinite(v.duration)) v.currentTime = 0; } catch {}
|
| 191 |
+
v.play().catch(() => {});
|
| 192 |
+
}
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
+
function _ytClearFallback() {
|
| 196 |
+
state.ytFallbackActive = false;
|
| 197 |
+
_showYtPlaceholder(false);
|
| 198 |
+
// Synced mode drives the local panels off the YT clock; undo the standalone
|
| 199 |
+
// loop the fallback set so recovery resumes clean sync.
|
| 200 |
+
for (const id of _LOCAL_VIDEO_IDS) {
|
| 201 |
+
const v = document.getElementById(id);
|
| 202 |
+
if (v) v.loop = false;
|
| 203 |
+
}
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
function _showYtPlaceholder(show) {
|
| 207 |
+
const iframe = document.getElementById('yt-iframe');
|
| 208 |
+
const frame = iframe && iframe.closest('.sub-frame');
|
| 209 |
+
if (!frame) return;
|
| 210 |
+
let ph = frame.querySelector('.yt-fallback-msg');
|
| 211 |
+
if (!show) { if (ph) ph.hidden = true; return; }
|
| 212 |
+
if (!ph) {
|
| 213 |
+
if (getComputedStyle(frame).position === 'static') frame.style.position = 'relative';
|
| 214 |
+
ph = document.createElement('div');
|
| 215 |
+
ph.className = 'yt-fallback-msg';
|
| 216 |
+
ph.style.cssText = 'position:absolute;inset:0;z-index:2;display:flex;'
|
| 217 |
+
+ 'flex-direction:column;align-items:center;justify-content:center;gap:.6em;'
|
| 218 |
+
+ 'padding:1em;text-align:center;background:rgba(0,0,0,.74);color:#ddd;'
|
| 219 |
+
+ 'font-size:.82rem;line-height:1.4;';
|
| 220 |
+
frame.appendChild(ph);
|
| 221 |
+
}
|
| 222 |
+
const vid = state.ytVideoId;
|
| 223 |
+
const url = vid ? `https://www.youtube.com/watch?v=${encodeURIComponent(vid)}`
|
| 224 |
+
: 'https://www.youtube.com';
|
| 225 |
+
ph.innerHTML =
|
| 226 |
+
`<div>Raw YouTube clip can't be embedded here<br>(private / age-restricted / sign-in required).</div>`
|
| 227 |
+
+ `<a href="${url}" target="_blank" rel="noopener" style="color:#7ab7ff;font-weight:600">βΆ Watch on YouTube β</a>`
|
| 228 |
+
+ `<div style="opacity:.7">Depth / flow / mask / robot panels play normally.</div>`;
|
| 229 |
+
ph.hidden = false;
|
| 230 |
+
}
|
| 231 |
+
|
| 232 |
+
function syncLocalVideosToYouTube() {
|
| 233 |
+
if (state.ytFallbackActive) return; // YT unavailable β local videos run standalone
|
| 234 |
+
const yt = state.ytPlayer;
|
| 235 |
+
if (!state.ytReady || !yt || state.ytStartSec == null) return;
|
| 236 |
+
let ytTime, ytState;
|
| 237 |
+
try { ytTime = yt.getCurrentTime(); ytState = yt.getPlayerState(); }
|
| 238 |
+
catch { return; }
|
| 239 |
+
if (!Number.isFinite(ytTime)) return;
|
| 240 |
+
|
| 241 |
+
const PLAYING = YT.PlayerState.PLAYING, BUFFERING = YT.PlayerState.BUFFERING;
|
| 242 |
+
const wantPlaying = ytState === PLAYING || ytState === BUFFERING;
|
| 243 |
+
|
| 244 |
+
// YT.getCurrentTime() is updated via postMessage at ~1Hz; between updates it
|
| 245 |
+
// returns the LAST reported value (stale by up to ~1s). Naively trusting it
|
| 246 |
+
// makes the sync snap depth backwards every time the value catches up,
|
| 247 |
+
// which the user sees as "depth keeps running ahead". We extrapolate from
|
| 248 |
+
// the last fresh report using wall-clock elapsed time, assuming YT plays at
|
| 249 |
+
// 1Γ content rate. The estimate is reset on any reported-value change (a
|
| 250 |
+
// jump β loop / scrub / buffering pause).
|
| 251 |
+
const wall = performance.now();
|
| 252 |
+
if (state._ytLastReportedTime !== ytTime || !state._ytLastReportedAt) {
|
| 253 |
+
state._ytLastReportedTime = ytTime;
|
| 254 |
+
state._ytLastReportedAt = wall;
|
| 255 |
+
}
|
| 256 |
+
let estTime = ytTime;
|
| 257 |
+
if (wantPlaying) {
|
| 258 |
+
// Cap extrapolation so we don't run away if YT silently buffered.
|
| 259 |
+
const elapsedSec = (wall - state._ytLastReportedAt) / 1000;
|
| 260 |
+
estTime = ytTime + Math.min(Math.max(elapsedSec, 0), 1.5);
|
| 261 |
+
}
|
| 262 |
+
const ratio = state.depthToYtRatio || 1;
|
| 263 |
+
const target = (estTime - state.ytStartSec) * ratio;
|
| 264 |
+
|
| 265 |
+
for (const id of ['detail-depth', 'detail-mask', 'detail-flow',
|
| 266 |
+
'retarget-franka', 'retarget-g1',
|
| 267 |
+
'retarget-robonaut2', 'retarget-xlerobot']) {
|
| 268 |
+
const v = document.getElementById(id);
|
| 269 |
+
if (!v || !Number.isFinite(v.duration)) continue;
|
| 270 |
+
// Re-apply playbackRate defensively - some browsers reset it on loop /
|
| 271 |
+
// src change / buffering glitches; resetting every tick is harmless.
|
| 272 |
+
if (v.playbackRate !== ratio) v.playbackRate = ratio;
|
| 273 |
+
const clamped = Math.max(0, Math.min(v.duration, target));
|
| 274 |
+
if (Math.abs(v.currentTime - clamped) > FOLLOW_DRIFT_S) {
|
| 275 |
+
try { v.currentTime = clamped; } catch {}
|
| 276 |
+
}
|
| 277 |
+
if (wantPlaying) {
|
| 278 |
+
if (v.paused) v.play().catch(() => {});
|
| 279 |
+
} else if (!v.paused) {
|
| 280 |
+
v.pause();
|
| 281 |
+
}
|
| 282 |
+
}
|
| 283 |
+
}
|
| 284 |
+
|
| 285 |
+
const RETARGET_ROBOTS = ['franka', 'g1', 'robonaut2', 'xlerobot'];
|
| 286 |
+
|
| 287 |
+
// Wire the 4-cell retarget row at the bottom of the viewer section.
|
| 288 |
+
// Three states (mutually exclusive divs in index.html):
|
| 289 |
+
// #retarget-idle - initial, no clip picked
|
| 290 |
+
// #retarget-row - clip has retarget (has_retarget=true) β 4 sim videos
|
| 291 |
+
// #retarget-empty - clip lacks retarget (2 clips today) β fallback msg
|
| 292 |
+
function populateRetargets(ep, sampleBase) {
|
| 293 |
+
const row = document.getElementById('retarget-row');
|
| 294 |
+
const empty = document.getElementById('retarget-empty');
|
| 295 |
+
const idle = document.getElementById('retarget-idle');
|
| 296 |
+
if (idle) idle.hidden = true;
|
| 297 |
+
if (ep.has_retarget) {
|
| 298 |
+
if (row) row.hidden = false;
|
| 299 |
+
if (empty) empty.hidden = true;
|
| 300 |
+
for (const r of RETARGET_ROBOTS) {
|
| 301 |
+
const v = document.getElementById(`retarget-${r}`);
|
| 302 |
+
if (!v) continue;
|
| 303 |
+
v.src = `${sampleBase}/retarget/${r}/robot_sim.mp4`;
|
| 304 |
+
v.load();
|
| 305 |
+
}
|
| 306 |
+
} else {
|
| 307 |
+
if (row) row.hidden = true;
|
| 308 |
+
if (empty) empty.hidden = false;
|
| 309 |
+
// Clear stale sources so we don't keep a previous clip's video lingering.
|
| 310 |
+
for (const r of RETARGET_ROBOTS) {
|
| 311 |
+
const v = document.getElementById(`retarget-${r}`);
|
| 312 |
+
if (v) { v.removeAttribute('src'); v.load(); }
|
| 313 |
+
}
|
| 314 |
+
}
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
const state = {
|
| 318 |
+
episodes: [],
|
| 319 |
+
current: null, // current episode summary
|
| 320 |
+
detail: null, // detail JSON
|
| 321 |
+
timeseries: null, // timeseries JSON
|
| 322 |
+
filters: { search: '', source: '', hasGrasp: false, hasTracking: false, multiObj: false },
|
| 323 |
+
sort: { key: 'default', dir: 'asc' },
|
| 324 |
+
page: 0,
|
| 325 |
+
shuffleSeed: Math.floor(Math.random() * 0xffff_ffff),
|
| 326 |
+
view: localStorage.getItem('dsv-view') || 'grid',
|
| 327 |
+
theme: localStorage.getItem('dsv-theme') || 'noir',
|
| 328 |
+
panel: null,
|
| 329 |
+
viser: { port: null, ready: false, current: null, launchToken: 0 },
|
| 330 |
+
};
|
| 331 |
+
|
| 332 |
+
const fmtDur = (s) => {
|
| 333 |
+
if (s == null) return '-';
|
| 334 |
+
const m = Math.floor(s / 60);
|
| 335 |
+
const r = (s - m * 60);
|
| 336 |
+
return m > 0 ? `${m}m ${r.toFixed(0)}s` : `${r.toFixed(1)}s`;
|
| 337 |
+
};
|
| 338 |
+
|
| 339 |
+
document.body.dataset.theme = state.theme;
|
| 340 |
+
document.getElementById('theme-btn').addEventListener('click', () => {
|
| 341 |
+
const cycle = ['paper', 'noir', 'ink'];
|
| 342 |
+
const idx = (cycle.indexOf(state.theme) + 1) % cycle.length;
|
| 343 |
+
state.theme = cycle[idx];
|
| 344 |
+
document.body.dataset.theme = state.theme;
|
| 345 |
+
localStorage.setItem('dsv-theme', state.theme);
|
| 346 |
+
});
|
| 347 |
+
|
| 348 |
+
async function fetchJSON(url) {
|
| 349 |
+
const r = await fetch(url);
|
| 350 |
+
if (!r.ok) throw new Error(`${url}: ${r.status}`);
|
| 351 |
+
return r.json();
|
| 352 |
+
}
|
| 353 |
+
|
| 354 |
+
// ---------- top-level: load episode list, populate everything ----------
|
| 355 |
+
|
| 356 |
+
async function init() {
|
| 357 |
+
let data;
|
| 358 |
+
try {
|
| 359 |
+
data = await fetchJSON(INDEX_URL);
|
| 360 |
+
} catch (e) {
|
| 361 |
+
const sc = document.getElementById('showcase');
|
| 362 |
+
if (sc) sc.innerHTML = `<div class="loading" style="grid-column:1/-1; padding:40px; text-align:center; color: var(--accent)">Failed to load ${INDEX_URL}: ${e.message}</div>`;
|
| 363 |
+
return;
|
| 364 |
+
}
|
| 365 |
+
state.episodes = data.episodes || [];
|
| 366 |
+
|
| 367 |
+
// hero count (topbar pill was removed)
|
| 368 |
+
document.getElementById('hero-count').textContent = String(state.episodes.length);
|
| 369 |
+
|
| 370 |
+
// hero meta
|
| 371 |
+
const totalFrames = state.episodes.reduce((a, e) => a + (e.n_frames || 0), 0);
|
| 372 |
+
const totalDur = state.episodes.reduce((a, e) => a + (e.duration_sec || 0), 0);
|
| 373 |
+
document.getElementById('hm-eps').textContent = String(state.episodes.length);
|
| 374 |
+
document.getElementById('hm-frames').textContent = totalFrames.toLocaleString();
|
| 375 |
+
document.getElementById('hm-dur').textContent = fmtDur(totalDur);
|
| 376 |
+
document.getElementById('footer-counts').textContent = `${state.episodes.length} episodes Β· ${totalFrames.toLocaleString()} frames Β· ${fmtDur(totalDur)}`;
|
| 377 |
+
|
| 378 |
+
populateSourceFilter();
|
| 379 |
+
renderSideCliplist();
|
| 380 |
+
applyView(state.view); // calls renderBrowse internally
|
| 381 |
+
|
| 382 |
+
// hook filters - any change resets to page 1
|
| 383 |
+
const onFilterChange = () => {
|
| 384 |
+
state.filters.search = document.getElementById('f-search').value.trim().toLowerCase();
|
| 385 |
+
state.filters.source = document.getElementById('f-source').value;
|
| 386 |
+
state.filters.hasGrasp = document.getElementById('f-has-grasp').checked;
|
| 387 |
+
state.filters.hasTracking = document.getElementById('f-has-tracking').checked;
|
| 388 |
+
state.filters.multiObj = document.getElementById('f-multi-obj').checked;
|
| 389 |
+
state.page = 0;
|
| 390 |
+
renderBrowse();
|
| 391 |
+
};
|
| 392 |
+
document.getElementById('f-search').addEventListener('input', onFilterChange);
|
| 393 |
+
document.getElementById('f-source').addEventListener('change', onFilterChange);
|
| 394 |
+
['f-has-grasp', 'f-has-tracking', 'f-multi-obj'].forEach(id => {
|
| 395 |
+
document.getElementById(id).addEventListener('change', onFilterChange);
|
| 396 |
+
});
|
| 397 |
+
document.getElementById('f-sort').addEventListener('change', (e) => {
|
| 398 |
+
const [key, dir] = e.target.value.split(':');
|
| 399 |
+
state.sort = { key, dir };
|
| 400 |
+
state.page = 0;
|
| 401 |
+
renderBrowse();
|
| 402 |
+
});
|
| 403 |
+
document.getElementById('view-grid').addEventListener('click', () => applyView('grid'));
|
| 404 |
+
document.getElementById('view-list').addEventListener('click', () => applyView('list'));
|
| 405 |
+
document.getElementById('pg-prev').addEventListener('click', () => goToPage(state.page - 1));
|
| 406 |
+
document.getElementById('pg-next').addEventListener('click', () => goToPage(state.page + 1));
|
| 407 |
+
|
| 408 |
+
// signals
|
| 409 |
+
state.panel = new SignalPanel();
|
| 410 |
+
state.statePanel = new StateTimelinePanel();
|
| 411 |
+
|
| 412 |
+
document.getElementById('viser-open').addEventListener('click', () => {
|
| 413 |
+
if (!state.current) return;
|
| 414 |
+
window.open(viserClientUrl(state.current.name), '_blank');
|
| 415 |
+
});
|
| 416 |
+
|
| 417 |
+
// YouTube is the playback master clock - see syncLocalVideosToYouTube
|
| 418 |
+
// (a setInterval poll snaps depth/mask/flow to whatever YT reports).
|
| 419 |
+
// The depth element still drives:
|
| 420 |
+
// - the signal-panel playhead
|
| 421 |
+
// - the skeleton overlay
|
| 422 |
+
// ...because those are tied to depth's frame index (which now follows YT).
|
| 423 |
+
const dd = document.getElementById('detail-depth');
|
| 424 |
+
const df = document.getElementById('detail-flow');
|
| 425 |
+
const dm = document.getElementById('detail-mask');
|
| 426 |
+
|
| 427 |
+
const syncFollowers = () => {
|
| 428 |
+
if (!dd.duration) return;
|
| 429 |
+
for (const v of [df, dm]) {
|
| 430 |
+
if (!v || !v.duration) continue;
|
| 431 |
+
if (Math.abs(v.currentTime - dd.currentTime) > 0.08) {
|
| 432 |
+
try { v.currentTime = dd.currentTime; } catch {}
|
| 433 |
+
}
|
| 434 |
+
}
|
| 435 |
+
};
|
| 436 |
+
|
| 437 |
+
const onVideoTime = () => {
|
| 438 |
+
if (!state.scene || !dd.duration) return;
|
| 439 |
+
const fps = state.scene.fps || 10;
|
| 440 |
+
const f = Math.max(0, Math.min(state.scene.stats.n_frames - 1,
|
| 441 |
+
Math.round(dd.currentTime * fps)));
|
| 442 |
+
state.panel.setPlayheadFrame(f);
|
| 443 |
+
if (state.statePanel) state.statePanel.setPlayheadFrame(f);
|
| 444 |
+
syncFollowers();
|
| 445 |
+
drawSkeletonOverlay(f);
|
| 446 |
+
};
|
| 447 |
+
// requestVideoFrameCallback fires once per video frame (browser-decoded),
|
| 448 |
+
// giving us perfectly-synced overlays. timeupdate alone fires only 4-15Hz
|
| 449 |
+
// depending on browser, which is why the skeleton lagged behind the depth
|
| 450 |
+
// motion. Fall back to a rAF loop if rVFC is unavailable (older browsers).
|
| 451 |
+
const useRVFC = typeof dd.requestVideoFrameCallback === 'function';
|
| 452 |
+
if (useRVFC) {
|
| 453 |
+
const tick = () => {
|
| 454 |
+
onVideoTime();
|
| 455 |
+
dd.requestVideoFrameCallback(tick);
|
| 456 |
+
};
|
| 457 |
+
dd.requestVideoFrameCallback(tick);
|
| 458 |
+
} else {
|
| 459 |
+
let _rafId = null;
|
| 460 |
+
const rafLoop = () => {
|
| 461 |
+
if (!dd.paused && !dd.ended) onVideoTime();
|
| 462 |
+
_rafId = requestAnimationFrame(rafLoop);
|
| 463 |
+
};
|
| 464 |
+
rafLoop();
|
| 465 |
+
}
|
| 466 |
+
// Keep timeupdate / seeked / loadedmetadata as fallback triggers for cases
|
| 467 |
+
// rVFC misses (initial load before first decode, scrub).
|
| 468 |
+
dd.addEventListener('timeupdate', onVideoTime);
|
| 469 |
+
dd.addEventListener('seeked', onVideoTime);
|
| 470 |
+
dd.addEventListener('loadedmetadata', onVideoTime);
|
| 471 |
+
// Once depth.duration is known, compute the per-clip ratio that matches
|
| 472 |
+
// YouTube's natural 1Γ playback rate, and apply it to all three local
|
| 473 |
+
// videos. Re-applied on every loadedmetadata since some browsers reset
|
| 474 |
+
// playbackRate on load() or src change.
|
| 475 |
+
const recomputeRate = () => {
|
| 476 |
+
if (!Number.isFinite(dd.duration) || dd.duration <= 0) return;
|
| 477 |
+
if (state.ytStartSec == null || state.ytEndSec == null) return;
|
| 478 |
+
const ytDur = state.ytEndSec - state.ytStartSec;
|
| 479 |
+
if (ytDur <= 0) return;
|
| 480 |
+
const rate = dd.duration / ytDur;
|
| 481 |
+
state.depthToYtRatio = rate;
|
| 482 |
+
for (const v of [dd, df, dm]) {
|
| 483 |
+
if (v) v.playbackRate = rate;
|
| 484 |
+
}
|
| 485 |
+
};
|
| 486 |
+
for (const v of [dd, df, dm]) {
|
| 487 |
+
if (v) v.addEventListener('loadedmetadata', recomputeRate);
|
| 488 |
+
}
|
| 489 |
+
|
| 490 |
+
// depth play/pause cascade to mask/flow only - YT is the master and
|
| 491 |
+
// controls all four panels via the setInterval below.
|
| 492 |
+
dd.addEventListener('play', () => {
|
| 493 |
+
df && df.play().catch(() => {});
|
| 494 |
+
dm && dm.play().catch(() => {});
|
| 495 |
+
});
|
| 496 |
+
dd.addEventListener('pause', () => {
|
| 497 |
+
df && df.pause();
|
| 498 |
+
dm && dm.pause();
|
| 499 |
+
});
|
| 500 |
+
|
| 501 |
+
// YT-as-master poll: snap depth/mask/flow to YT.getCurrentTime() periodically.
|
| 502 |
+
if (state._ytFollowTimer) clearInterval(state._ytFollowTimer);
|
| 503 |
+
state._ytFollowTimer = setInterval(syncLocalVideosToYouTube, FOLLOW_INTERVAL_MS);
|
| 504 |
+
dd.addEventListener('seeking', () => {
|
| 505 |
+
if (dd.currentTime < 0.05) {
|
| 506 |
+
try { df && (df.currentTime = 0); } catch {}
|
| 507 |
+
try { dm && (dm.currentTime = 0); } catch {}
|
| 508 |
+
}
|
| 509 |
+
});
|
| 510 |
+
// Re-render skeleton when the depth panel changes size (resize / theme)
|
| 511 |
+
window.addEventListener('resize', () => {
|
| 512 |
+
if (state.skel) drawSkeletonOverlay(state.panel?.frameIdx || 0);
|
| 513 |
+
});
|
| 514 |
+
|
| 515 |
+
// pick first episode by default (or restore from URL hash)
|
| 516 |
+
let initial = state.episodes[0];
|
| 517 |
+
const u = new URL(window.location.href);
|
| 518 |
+
const fromUrl = u.searchParams.get('ep');
|
| 519 |
+
if (fromUrl) {
|
| 520 |
+
const m = state.episodes.find(e => e.name === fromUrl);
|
| 521 |
+
if (m) initial = m;
|
| 522 |
+
}
|
| 523 |
+
if (initial) await selectEpisode(initial.name);
|
| 524 |
+
}
|
| 525 |
+
|
| 526 |
+
function populateSourceFilter() {
|
| 527 |
+
const sel = document.getElementById('f-source');
|
| 528 |
+
const seen = new Set();
|
| 529 |
+
state.episodes.forEach(e => seen.add(e.video_uid));
|
| 530 |
+
[...seen].sort().forEach(uid => {
|
| 531 |
+
const opt = document.createElement('option');
|
| 532 |
+
opt.value = uid; opt.textContent = uid;
|
| 533 |
+
sel.appendChild(opt);
|
| 534 |
+
});
|
| 535 |
+
}
|
| 536 |
+
|
| 537 |
+
// ---------- view toggle ----------
|
| 538 |
+
|
| 539 |
+
function applyView(view) {
|
| 540 |
+
const next = (view === 'list') ? 'list' : 'grid';
|
| 541 |
+
if (next !== state.view) state.page = 0;
|
| 542 |
+
state.view = next;
|
| 543 |
+
localStorage.setItem('dsv-view', state.view);
|
| 544 |
+
const root = document.getElementById('browse-content');
|
| 545 |
+
if (root) root.dataset.view = state.view;
|
| 546 |
+
document.getElementById('view-grid').setAttribute('aria-pressed', state.view === 'grid');
|
| 547 |
+
document.getElementById('view-list').setAttribute('aria-pressed', state.view === 'list');
|
| 548 |
+
renderBrowse();
|
| 549 |
+
}
|
| 550 |
+
|
| 551 |
+
function pageSize() { return state.view === 'list' ? 10 : 12; }
|
| 552 |
+
|
| 553 |
+
function goToPage(p) {
|
| 554 |
+
state.page = Math.max(0, p);
|
| 555 |
+
renderBrowse();
|
| 556 |
+
}
|
| 557 |
+
|
| 558 |
+
// ---------- combined render ----------
|
| 559 |
+
|
| 560 |
+
function renderBrowse() {
|
| 561 |
+
const visible = getVisible();
|
| 562 |
+
const ps = pageSize();
|
| 563 |
+
const totalPages = Math.max(1, Math.ceil(visible.length / ps));
|
| 564 |
+
if (state.page >= totalPages) state.page = totalPages - 1;
|
| 565 |
+
|
| 566 |
+
const start = state.page * ps;
|
| 567 |
+
const slice = visible.slice(start, start + ps);
|
| 568 |
+
|
| 569 |
+
document.getElementById('visible-count').textContent =
|
| 570 |
+
`${visible.length} of ${state.episodes.length}`;
|
| 571 |
+
renderStats(visible);
|
| 572 |
+
renderShowcase(slice);
|
| 573 |
+
renderTable(slice);
|
| 574 |
+
renderPagination(visible.length, totalPages, ps);
|
| 575 |
+
}
|
| 576 |
+
|
| 577 |
+
function renderPagination(total, totalPages, ps) {
|
| 578 |
+
const info = document.getElementById('pg-info');
|
| 579 |
+
if (total === 0) {
|
| 580 |
+
info.textContent = 'no results';
|
| 581 |
+
} else {
|
| 582 |
+
const start = state.page * ps + 1;
|
| 583 |
+
const end = Math.min(start + ps - 1, total);
|
| 584 |
+
info.textContent = `${start}β${end} of ${total}`;
|
| 585 |
+
}
|
| 586 |
+
document.getElementById('pg-prev').disabled = state.page <= 0;
|
| 587 |
+
document.getElementById('pg-next').disabled = state.page >= totalPages - 1;
|
| 588 |
+
|
| 589 |
+
const wrap = document.getElementById('pg-pages');
|
| 590 |
+
wrap.innerHTML = '';
|
| 591 |
+
const pages = pageNumbersToShow(state.page, totalPages);
|
| 592 |
+
pages.forEach(p => {
|
| 593 |
+
if (p === 'β¦') {
|
| 594 |
+
const e = document.createElement('span');
|
| 595 |
+
e.className = 'pg-ellipsis';
|
| 596 |
+
e.textContent = 'β¦';
|
| 597 |
+
wrap.appendChild(e);
|
| 598 |
+
} else {
|
| 599 |
+
const b = document.createElement('button');
|
| 600 |
+
b.className = 'pg-page';
|
| 601 |
+
b.textContent = String(p + 1);
|
| 602 |
+
if (p === state.page) b.setAttribute('aria-current', 'true');
|
| 603 |
+
b.addEventListener('click', () => goToPage(p));
|
| 604 |
+
wrap.appendChild(b);
|
| 605 |
+
}
|
| 606 |
+
});
|
| 607 |
+
}
|
| 608 |
+
|
| 609 |
+
function pageNumbersToShow(cur, total) {
|
| 610 |
+
if (total <= 7) return Array.from({ length: total }, (_, i) => i);
|
| 611 |
+
const out = [0];
|
| 612 |
+
const left = Math.max(1, cur - 1);
|
| 613 |
+
const right = Math.min(total - 2, cur + 1);
|
| 614 |
+
if (left > 1) out.push('β¦');
|
| 615 |
+
for (let i = left; i <= right; i++) out.push(i);
|
| 616 |
+
if (right < total - 2) out.push('β¦');
|
| 617 |
+
out.push(total - 1);
|
| 618 |
+
return out;
|
| 619 |
+
}
|
| 620 |
+
|
| 621 |
+
// ---------- showcase grid ----------
|
| 622 |
+
|
| 623 |
+
function renderShowcase(eps) {
|
| 624 |
+
const sc = document.getElementById('showcase');
|
| 625 |
+
sc.innerHTML = '';
|
| 626 |
+
eps.forEach(e => {
|
| 627 |
+
const el = document.createElement('div');
|
| 628 |
+
el.className = 'clip';
|
| 629 |
+
el.dataset.name = e.name;
|
| 630 |
+
const objsTxt = (e.objects || []).slice(0, 3).join(', ') + ((e.objects || []).length > 3 ? ` +${e.objects.length - 3}` : '');
|
| 631 |
+
const trustTxt = (e.mean_trust != null) ? `trust ${Math.round(e.mean_trust * 100)}%` : '';
|
| 632 |
+
const graspBadge = e.has_grasp ? `<span class="ov-grasp">grasp</span>` : '';
|
| 633 |
+
el.innerHTML = `
|
| 634 |
+
<img src="${e.thumb_url}" alt="${escapeAttr(e.action_brief)}" loading="lazy" decoding="async"
|
| 635 |
+
onerror="this.onerror=null;this.src='${ASSET_BASE}/${encodeURIComponent(e.name)}/thumb.jpg'">
|
| 636 |
+
<video data-src="${e.video_url}" loop muted playsinline preload="none"></video>
|
| 637 |
+
<span class="clip-tag">${escapeHtml(e.video_uid.slice(0, 8))}</span>
|
| 638 |
+
<div class="clip-label">
|
| 639 |
+
<span>${escapeHtml(e.action_brief || '(unlabeled)')}</span>
|
| 640 |
+
<span class="clip-sub">${e.n_frames}f Β· ${fmtDur(e.duration_sec)} Β· ${e.n_objects} obj</span>
|
| 641 |
+
</div>
|
| 642 |
+
<div class="clip-overlay">
|
| 643 |
+
<div class="ov-title">${escapeHtml(e.action_brief || '(unlabeled)')}</div>
|
| 644 |
+
<div class="ov-actor">${escapeHtml(truncate(e.actor || '-', 100))}</div>
|
| 645 |
+
${objsTxt ? `<div class="ov-objects">βΈ ${escapeHtml(objsTxt)}</div>` : ''}
|
| 646 |
+
<div class="ov-meta">
|
| 647 |
+
<span><strong>${e.n_frames}</strong> f</span>
|
| 648 |
+
<span class="ov-dot">Β·</span>
|
| 649 |
+
<span><strong>${fmtDur(e.duration_sec)}</strong></span>
|
| 650 |
+
<span class="ov-dot">Β·</span>
|
| 651 |
+
<span><strong>${e.n_objects}</strong> obj</span>
|
| 652 |
+
${graspBadge ? `<span class="ov-dot">Β·</span>${graspBadge}` : ''}
|
| 653 |
+
${trustTxt ? `<span class="ov-dot">Β·</span><span class="ov-trust">${trustTxt}</span>` : ''}
|
| 654 |
+
<span class="ov-dot" style="margin-left:auto"></span>
|
| 655 |
+
<span style="opacity:0.55">${escapeHtml(e.video_uid.slice(0, 8))}</span>
|
| 656 |
+
</div>
|
| 657 |
+
</div>
|
| 658 |
+
`;
|
| 659 |
+
// Lazy hover-to-play: only fetch the mp4 when user hovers.
|
| 660 |
+
const v = el.querySelector('video');
|
| 661 |
+
el.addEventListener('mouseenter', () => {
|
| 662 |
+
if (!v.src) v.src = v.dataset.src;
|
| 663 |
+
v.play().catch(() => {});
|
| 664 |
+
});
|
| 665 |
+
el.addEventListener('mouseleave', () => {
|
| 666 |
+
v.pause();
|
| 667 |
+
try { v.currentTime = 0; } catch {}
|
| 668 |
+
});
|
| 669 |
+
el.addEventListener('click', () => { selectEpisode(e.name); scrollToInspect(); });
|
| 670 |
+
sc.appendChild(el);
|
| 671 |
+
});
|
| 672 |
+
}
|
| 673 |
+
|
| 674 |
+
function scrollToInspect() {
|
| 675 |
+
const target = document.getElementById('inspect');
|
| 676 |
+
if (target) target.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
| 677 |
+
}
|
| 678 |
+
|
| 679 |
+
// ---------- stats ----------
|
| 680 |
+
|
| 681 |
+
function renderStats(filtered) {
|
| 682 |
+
document.getElementById('stat-eps').innerHTML = `${filtered.length}<sub>ep</sub>`;
|
| 683 |
+
const dur = filtered.reduce((a, e) => a + (e.duration_sec || 0), 0);
|
| 684 |
+
document.getElementById('stat-dur').innerHTML = `${dur.toFixed(1)}<sub>s</sub>`;
|
| 685 |
+
const objs = filtered.reduce((a, e) => a + (e.n_objects || 0), 0);
|
| 686 |
+
document.getElementById('stat-objs').innerHTML = `${objs}<sub>obj</sub>`;
|
| 687 |
+
const grasping = filtered.filter(e => e.has_grasp).length;
|
| 688 |
+
const pct = filtered.length ? Math.round(100 * grasping / filtered.length) : 0;
|
| 689 |
+
document.getElementById('stat-grasp').innerHTML = `${pct}<sub>%</sub>`;
|
| 690 |
+
}
|
| 691 |
+
|
| 692 |
+
// ---------- filters + sort ----------
|
| 693 |
+
|
| 694 |
+
function getVisible() {
|
| 695 |
+
const { search, source, hasGrasp, hasTracking, multiObj } = state.filters;
|
| 696 |
+
let out = state.episodes.filter(e => {
|
| 697 |
+
if (source && e.video_uid !== source) return false;
|
| 698 |
+
if (hasGrasp && !e.has_grasp) return false;
|
| 699 |
+
if (hasTracking && !(e.mean_trust != null || e.mean_iou != null)) return false;
|
| 700 |
+
if (multiObj && (e.n_objects || 0) < 2) return false;
|
| 701 |
+
if (search) {
|
| 702 |
+
const hay = [e.action_brief, e.actor, ...(e.objects || []), e.video_uid].join(' ').toLowerCase();
|
| 703 |
+
if (!hay.includes(search)) return false;
|
| 704 |
+
}
|
| 705 |
+
return true;
|
| 706 |
+
});
|
| 707 |
+
|
| 708 |
+
const { key, dir } = state.sort;
|
| 709 |
+
if (key === 'default') {
|
| 710 |
+
return shuffleAndDecluster(out, state.shuffleSeed);
|
| 711 |
+
}
|
| 712 |
+
const sign = dir === 'asc' ? 1 : -1;
|
| 713 |
+
const nullLow = sign; // nulls always at the bottom regardless of asc/desc
|
| 714 |
+
out.sort((a, b) => {
|
| 715 |
+
const va = a[key], vb = b[key];
|
| 716 |
+
if (va == null && vb == null) return 0;
|
| 717 |
+
if (va == null) return 1 * nullLow;
|
| 718 |
+
if (vb == null) return -1 * nullLow;
|
| 719 |
+
if (typeof va === 'string') return sign * va.localeCompare(vb);
|
| 720 |
+
return sign * (va < vb ? -1 : va > vb ? 1 : 0);
|
| 721 |
+
});
|
| 722 |
+
return out;
|
| 723 |
+
}
|
| 724 |
+
|
| 725 |
+
// Seeded Fisher-Yates + bucket-by-source round-robin merge.
|
| 726 |
+
// Same seed β same order (so paginating through doesn't reshuffle on every render).
|
| 727 |
+
// Round-robin guarantees no two clips from the same `video_uid` end up adjacent
|
| 728 |
+
// (when there are at least 2 distinct sources).
|
| 729 |
+
function shuffleAndDecluster(arr, seed) {
|
| 730 |
+
let s = (seed >>> 0) || 1;
|
| 731 |
+
const rng = () => {
|
| 732 |
+
s = (Math.imul(s, 1664525) + 1013904223) >>> 0;
|
| 733 |
+
return s / 0x1_0000_0000;
|
| 734 |
+
};
|
| 735 |
+
const shuffled = arr.slice();
|
| 736 |
+
for (let i = shuffled.length - 1; i > 0; i--) {
|
| 737 |
+
const j = Math.floor(rng() * (i + 1));
|
| 738 |
+
[shuffled[i], shuffled[j]] = [shuffled[j], shuffled[i]];
|
| 739 |
+
}
|
| 740 |
+
// Bucket by source video.
|
| 741 |
+
const buckets = new Map();
|
| 742 |
+
for (const e of shuffled) {
|
| 743 |
+
const k = e.video_uid || '';
|
| 744 |
+
if (!buckets.has(k)) buckets.set(k, []);
|
| 745 |
+
buckets.get(k).push(e);
|
| 746 |
+
}
|
| 747 |
+
// Drain biggest buckets first; round-robin one item from each bucket per pass.
|
| 748 |
+
const lists = [...buckets.values()].sort((a, b) => b.length - a.length);
|
| 749 |
+
const merged = [];
|
| 750 |
+
while (lists.some(l => l.length > 0)) {
|
| 751 |
+
for (const l of lists) {
|
| 752 |
+
if (l.length > 0) merged.push(l.shift());
|
| 753 |
+
}
|
| 754 |
+
}
|
| 755 |
+
return merged;
|
| 756 |
+
}
|
| 757 |
+
|
| 758 |
+
// ---------- table ----------
|
| 759 |
+
|
| 760 |
+
function renderTable(filtered) {
|
| 761 |
+
const body = document.getElementById('episodes-body');
|
| 762 |
+
body.innerHTML = '';
|
| 763 |
+
filtered.forEach(e => {
|
| 764 |
+
const tr = document.createElement('tr');
|
| 765 |
+
if (state.current && state.current.name === e.name) tr.classList.add('active');
|
| 766 |
+
tr.dataset.name = e.name;
|
| 767 |
+
const objsTxt = (e.objects || []).slice(0, 2).join(', ') + ((e.objects || []).length > 2 ? 'β¦' : '');
|
| 768 |
+
tr.innerHTML = `
|
| 769 |
+
<td>
|
| 770 |
+
<div class="task-cell">
|
| 771 |
+
<img class="task-thumb" src="${e.thumb_url}" alt="" loading="lazy" decoding="async"
|
| 772 |
+
onerror="this.onerror=null;this.src='${ASSET_BASE}/${encodeURIComponent(e.name)}/thumb.jpg'">
|
| 773 |
+
<div class="task-text">
|
| 774 |
+
<div class="task-name">${escapeHtml(e.action_brief || '(unlabeled)')}</div>
|
| 775 |
+
<div class="task-scene">${escapeHtml(e.name)}</div>
|
| 776 |
+
</div>
|
| 777 |
+
</div>
|
| 778 |
+
</td>
|
| 779 |
+
<td class="mono-cell">${escapeHtml((e.actor || '').slice(0, 36) + ((e.actor || '').length > 36 ? 'β¦' : ''))}</td>
|
| 780 |
+
<td class="mono-cell">${escapeHtml(e.video_uid)}</td>
|
| 781 |
+
<td class="mono-cell">${e.n_objects} <span style="opacity:0.6">${escapeHtml(objsTxt)}</span></td>
|
| 782 |
+
<td class="num-cell">${e.n_frames}</td>
|
| 783 |
+
<td class="num-cell">${fmtDur(e.duration_sec)}</td>
|
| 784 |
+
<td>${e.has_grasp ? '<span class="badge" style="--badge-color: var(--accent)">grasp</span>' : '<span class="mono-cell" style="opacity:0.5">-</span>'}</td>
|
| 785 |
+
`;
|
| 786 |
+
tr.addEventListener('click', () => { selectEpisode(e.name); scrollToInspect(); });
|
| 787 |
+
body.appendChild(tr);
|
| 788 |
+
});
|
| 789 |
+
}
|
| 790 |
+
|
| 791 |
+
// ---------- select / load episode ----------
|
| 792 |
+
|
| 793 |
+
async function selectEpisode(name) {
|
| 794 |
+
const ep = state.episodes.find(e => e.name === name);
|
| 795 |
+
if (!ep) return;
|
| 796 |
+
state.current = ep;
|
| 797 |
+
|
| 798 |
+
// update url hash
|
| 799 |
+
const u = new URL(window.location.href);
|
| 800 |
+
u.searchParams.set('ep', name);
|
| 801 |
+
history.replaceState(null, '', u.toString());
|
| 802 |
+
|
| 803 |
+
// selected state
|
| 804 |
+
document.querySelectorAll('.clip').forEach(c => c.classList.toggle('selected', c.dataset.name === name));
|
| 805 |
+
document.querySelectorAll('#episodes-body tr').forEach(r => r.classList.toggle('active', r.dataset.name === name));
|
| 806 |
+
|
| 807 |
+
// viewer chip
|
| 808 |
+
document.getElementById('viewer-clip-tag').textContent = name;
|
| 809 |
+
|
| 810 |
+
const sampleBase = `${ASSET_BASE}/${encodeURIComponent(name)}`;
|
| 811 |
+
|
| 812 |
+
// detail meta header (everything ep-summary already has)
|
| 813 |
+
document.getElementById('d-title').textContent = ep.action_brief || '(unlabeled)';
|
| 814 |
+
document.getElementById('d-id').textContent = `${ep.name} Β· segment ${ep.segment_id || '-'}`;
|
| 815 |
+
document.getElementById('d-dur').textContent = fmtDur(ep.duration_sec);
|
| 816 |
+
document.getElementById('d-frames').textContent = String(ep.n_frames);
|
| 817 |
+
document.getElementById('d-uid').textContent = ep.video_uid;
|
| 818 |
+
document.getElementById('d-start').textContent = ep.start_sec != null ? `${ep.start_sec.toFixed(2)}s` : '-';
|
| 819 |
+
document.getElementById('d-end').textContent = ep.end_sec != null ? `${ep.end_sec.toFixed(2)}s` : '-';
|
| 820 |
+
|
| 821 |
+
// viewer side panel
|
| 822 |
+
document.getElementById('loaded-title').textContent = ep.action_brief || ep.name;
|
| 823 |
+
document.getElementById('loaded-meta').textContent = `${ep.video_uid} Β· ${ep.n_frames}f Β· ${ep.n_objects} obj`;
|
| 824 |
+
document.getElementById('loaded-objects').innerHTML = '';
|
| 825 |
+
|
| 826 |
+
// load full scene.json (for fps + tracking summary) and signals.json
|
| 827 |
+
let scene, sig;
|
| 828 |
+
try {
|
| 829 |
+
[scene, sig] = await Promise.all([
|
| 830 |
+
fetchJSON(`${sampleBase}/scene.json`),
|
| 831 |
+
fetchJSON(`${sampleBase}/signals.json`),
|
| 832 |
+
]);
|
| 833 |
+
} catch (e) {
|
| 834 |
+
document.getElementById('loaded-meta').textContent = `error: ${e.message}`;
|
| 835 |
+
return;
|
| 836 |
+
}
|
| 837 |
+
|
| 838 |
+
state.scene = scene;
|
| 839 |
+
state.timeseries = sig;
|
| 840 |
+
document.getElementById('d-fps').textContent = (scene.fps || 10).toFixed(2);
|
| 841 |
+
|
| 842 |
+
// Description block: surface the original Action100M annotations from
|
| 843 |
+
// scene.json.action100m_metadata.
|
| 844 |
+
// - d-desc β action_detailed (structured action breakdown)
|
| 845 |
+
// - d-summary β summary (multi-sentence narrative)
|
| 846 |
+
// - d-source-title β video_title (original YouTube title)
|
| 847 |
+
// Fall back to a synthesized description when the metadata is absent.
|
| 848 |
+
const a100m = scene.action100m_metadata || {};
|
| 849 |
+
const desc_el = document.getElementById('d-desc');
|
| 850 |
+
const sum_label = document.getElementById('d-summary-label');
|
| 851 |
+
const sum_el = document.getElementById('d-summary');
|
| 852 |
+
const src_title_el = document.getElementById('d-source-title');
|
| 853 |
+
if (desc_el) {
|
| 854 |
+
desc_el.style.whiteSpace = 'pre-wrap';
|
| 855 |
+
if (a100m.action_detailed) {
|
| 856 |
+
desc_el.textContent = a100m.action_detailed;
|
| 857 |
+
} else if (a100m.summary) {
|
| 858 |
+
desc_el.textContent = a100m.summary;
|
| 859 |
+
} else {
|
| 860 |
+
const objsList = (ep.objects || []).filter(Boolean);
|
| 861 |
+
const objsTxt = objsList.length ? objsList.join(', ') : 'no tracked objects';
|
| 862 |
+
desc_el.textContent =
|
| 863 |
+
`${ep.action_brief || 'unlabeled action'}. ${ep.actor || 'unknown actor'}. ` +
|
| 864 |
+
`Captured at ${ep.start_sec?.toFixed(1) ?? '?'}s to ${ep.end_sec?.toFixed(1) ?? '?'}s of YouTube ` +
|
| 865 |
+
`video ${ep.video_uid}; ${ep.n_frames} frames over ${(ep.duration_sec || 0).toFixed(1)}s. ` +
|
| 866 |
+
`Tracked objects: ${objsTxt}.`;
|
| 867 |
+
}
|
| 868 |
+
}
|
| 869 |
+
|
| 870 |
+
if (sum_el && sum_label) {
|
| 871 |
+
sum_el.style.whiteSpace = 'pre-wrap';
|
| 872 |
+
const descText = desc_el ? desc_el.textContent : '';
|
| 873 |
+
if (a100m.summary && a100m.summary !== descText) {
|
| 874 |
+
sum_el.textContent = a100m.summary;
|
| 875 |
+
sum_label.style.display = '';
|
| 876 |
+
sum_el.style.display = '';
|
| 877 |
+
} else {
|
| 878 |
+
sum_label.style.display = 'none';
|
| 879 |
+
sum_el.style.display = 'none';
|
| 880 |
+
}
|
| 881 |
+
}
|
| 882 |
+
|
| 883 |
+
if (src_title_el) {
|
| 884 |
+
if (a100m.video_title) {
|
| 885 |
+
src_title_el.textContent = `from β${a100m.video_title}β`;
|
| 886 |
+
src_title_el.style.display = '';
|
| 887 |
+
} else {
|
| 888 |
+
src_title_el.textContent = '';
|
| 889 |
+
src_title_el.style.display = 'none';
|
| 890 |
+
}
|
| 891 |
+
}
|
| 892 |
+
|
| 893 |
+
renderSceneObjects(scene);
|
| 894 |
+
renderTrackingSummary(scene);
|
| 895 |
+
state.panel.setData(sig);
|
| 896 |
+
state.panel.setPlayheadFrame(0);
|
| 897 |
+
state.statePanel.setData(sig, scene);
|
| 898 |
+
state.statePanel.setPlayheadFrame(0);
|
| 899 |
+
|
| 900 |
+
// Inspect 4-up:
|
| 901 |
+
// panel 1 = YouTube iframe (raw original, served by YouTube)
|
| 902 |
+
// panel 2 = mask.mp4 (SAM-tracked region highlighted, rest dimmed)
|
| 903 |
+
// panel 3 = depth.mp4 + skeleton overlay (canvas)
|
| 904 |
+
// panel 4 = flow.mp4
|
| 905 |
+
const dd = document.getElementById('detail-depth');
|
| 906 |
+
const df = document.getElementById('detail-flow');
|
| 907 |
+
const dm = document.getElementById('detail-mask');
|
| 908 |
+
// YouTube iframe - set up FIRST so state.ytStartSec/ytEndSec are populated
|
| 909 |
+
// before depth's `loadedmetadata` event fires (recomputeRate reads them).
|
| 910 |
+
if (ep.video_uid) {
|
| 911 |
+
const startSec = ep.start_sec || 0;
|
| 912 |
+
const endSec = ep.end_sec || (startSec + (ep.duration_sec || 4));
|
| 913 |
+
ensureYouTubePlayer(ep.video_uid, startSec, endSec);
|
| 914 |
+
}
|
| 915 |
+
// Local videos - playbackRate is set by recomputeRate on loadedmetadata
|
| 916 |
+
// (per-clip ratio = depth.duration / yt_window_duration).
|
| 917 |
+
if (dd) { dd.src = `${sampleBase}/depth.mp4`; dd.load(); }
|
| 918 |
+
if (df) { df.src = `${sampleBase}/flow.mp4`; df.load(); }
|
| 919 |
+
if (dm) { dm.src = `${sampleBase}/mask.mp4`; dm.load(); }
|
| 920 |
+
|
| 921 |
+
// Robot-embodiment retargets row: 4 sim replay videos, synced to YouTube
|
| 922 |
+
// the same way depth/mask/flow are. `has_retarget=false` (2 clips today)
|
| 923 |
+
// β show fallback message instead of loading. `has_retarget=true` β
|
| 924 |
+
// unhide the row and point each <video>.src at samples/<clip>/retarget/<robot>/robot_sim.mp4.
|
| 925 |
+
populateRetargets(ep, sampleBase);
|
| 926 |
+
|
| 927 |
+
// Load hand_joints.bin for skeleton overlay
|
| 928 |
+
await loadSkeletonOverlay(scene, sampleBase);
|
| 929 |
+
|
| 930 |
+
// 3D viewer = official viser client (viser-build-client output) loading
|
| 931 |
+
// the per-sample .viser binary. We use an absolute URL anchored to the
|
| 932 |
+
// page's location to avoid HF Static Space's sandbox baseURI quirks.
|
| 933 |
+
const iframe = document.getElementById('viser-iframe');
|
| 934 |
+
iframe.src = viserClientUrl(name);
|
| 935 |
+
document.getElementById('viser-state').textContent = 'loaded';
|
| 936 |
+
const overlay = document.getElementById('viser-overlay');
|
| 937 |
+
if (overlay) overlay.style.display = 'none';
|
| 938 |
+
|
| 939 |
+
updateSideCliplistActive(name);
|
| 940 |
+
}
|
| 941 |
+
|
| 942 |
+
// ---------- skeleton overlay on depth video (perspective projection) ----------
|
| 943 |
+
|
| 944 |
+
const HAND_EDGES = [
|
| 945 |
+
[0,1],[1,2],[2,3],[3,4],
|
| 946 |
+
[0,5],[5,6],[6,7],[7,8],
|
| 947 |
+
[0,9],[9,10],[10,11],[11,12],
|
| 948 |
+
[0,13],[13,14],[14,15],[15,16],
|
| 949 |
+
[0,17],[17,18],[18,19],[19,20],
|
| 950 |
+
];
|
| 951 |
+
const FINGER_HEX = ['#d92e33', '#f28c19', '#33a640', '#d9bf0d', '#2e73d9'];
|
| 952 |
+
|
| 953 |
+
async function loadSkeletonOverlay(scene, sampleBase) {
|
| 954 |
+
state.skel = null;
|
| 955 |
+
const cam = scene.camera || {};
|
| 956 |
+
const focal = cam.focal, cx = cam.cx, cy = cam.cy;
|
| 957 |
+
const W = cam.width, H = cam.height;
|
| 958 |
+
const r = scene.reconstruction || {};
|
| 959 |
+
if (!r.hand_joints || !W || !H) return;
|
| 960 |
+
const T = scene.stats.n_frames;
|
| 961 |
+
try {
|
| 962 |
+
// Prefer WiLoR-native 2D joints (MoGe-2-independent, image-pixel
|
| 963 |
+
// space). Fall back to projecting 3D with the depth-camera focal,
|
| 964 |
+
// which can be off when MoGe-2's per-frame focal is unreliable.
|
| 965 |
+
if (r.hand_joints_2d) {
|
| 966 |
+
const buf = await (await fetch(`${sampleBase}/${r.hand_joints_2d}`)).arrayBuffer();
|
| 967 |
+
state.skel = {
|
| 968 |
+
mode: '2d',
|
| 969 |
+
joints2d: new Float32Array(buf), // (T, 2, 21, 2)
|
| 970 |
+
T, H_max: 2, J: 21,
|
| 971 |
+
srcW: W, srcH: H,
|
| 972 |
+
};
|
| 973 |
+
} else {
|
| 974 |
+
const buf = await (await fetch(`${sampleBase}/${r.hand_joints}`)).arrayBuffer();
|
| 975 |
+
state.skel = {
|
| 976 |
+
mode: '3d',
|
| 977 |
+
joints: new Float32Array(buf), // (T, 2, 21, 3)
|
| 978 |
+
T, H_max: 2, J: 21,
|
| 979 |
+
focal, cx, cy, srcW: W, srcH: H,
|
| 980 |
+
};
|
| 981 |
+
}
|
| 982 |
+
} catch (e) {
|
| 983 |
+
console.warn('skeleton overlay load failed', e);
|
| 984 |
+
}
|
| 985 |
+
drawSkeletonOverlay(0);
|
| 986 |
+
}
|
| 987 |
+
|
| 988 |
+
function drawSkeletonOverlay(frameIdx) {
|
| 989 |
+
const canvas = document.getElementById('detail-skeleton');
|
| 990 |
+
if (!canvas) return;
|
| 991 |
+
const ctx = canvas.getContext('2d');
|
| 992 |
+
const s = state.skel;
|
| 993 |
+
if (!s) { ctx.clearRect(0, 0, canvas.width, canvas.height); return; }
|
| 994 |
+
// Match canvas size to the mask video element's display size
|
| 995 |
+
const video = document.getElementById('detail-mask');
|
| 996 |
+
const rect = video.getBoundingClientRect();
|
| 997 |
+
if (canvas.width !== rect.width || canvas.height !== rect.height) {
|
| 998 |
+
canvas.width = rect.width;
|
| 999 |
+
canvas.height = rect.height;
|
| 1000 |
+
}
|
| 1001 |
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
| 1002 |
+
|
| 1003 |
+
const t = Math.max(0, Math.min(s.T - 1, frameIdx | 0));
|
| 1004 |
+
const is2d = s.mode === '2d';
|
| 1005 |
+
const compsPerJoint = is2d ? 2 : 3;
|
| 1006 |
+
const stride21 = s.J * compsPerJoint, strideH = stride21 * s.H_max;
|
| 1007 |
+
const buf = is2d ? s.joints2d : s.joints;
|
| 1008 |
+
// Source-pixel β display-pixel scale (object-fit:cover)
|
| 1009 |
+
const dispW = canvas.width, dispH = canvas.height;
|
| 1010 |
+
const srcAspect = s.srcW / s.srcH;
|
| 1011 |
+
const dispAspect = dispW / dispH;
|
| 1012 |
+
let scale, offX, offY;
|
| 1013 |
+
if (dispAspect > srcAspect) {
|
| 1014 |
+
scale = dispW / s.srcW;
|
| 1015 |
+
offX = 0;
|
| 1016 |
+
offY = (dispH - s.srcH * scale) / 2;
|
| 1017 |
+
} else {
|
| 1018 |
+
scale = dispH / s.srcH;
|
| 1019 |
+
offX = (dispW - s.srcW * scale) / 2;
|
| 1020 |
+
offY = 0;
|
| 1021 |
+
}
|
| 1022 |
+
|
| 1023 |
+
for (let h = 0; h < s.H_max; h++) {
|
| 1024 |
+
const off = t * strideH + h * stride21;
|
| 1025 |
+
if (!Number.isFinite(buf[off])) continue;
|
| 1026 |
+
const px = new Array(s.J), py = new Array(s.J);
|
| 1027 |
+
for (let j = 0; j < s.J; j++) {
|
| 1028 |
+
if (is2d) {
|
| 1029 |
+
const u = buf[off + j*2 + 0];
|
| 1030 |
+
const v = buf[off + j*2 + 1];
|
| 1031 |
+
if (!Number.isFinite(u) || !Number.isFinite(v)) {
|
| 1032 |
+
px[j] = py[j] = NaN; continue;
|
| 1033 |
+
}
|
| 1034 |
+
px[j] = u * scale + offX;
|
| 1035 |
+
py[j] = v * scale + offY;
|
| 1036 |
+
} else {
|
| 1037 |
+
const X = buf[off + j*3 + 0];
|
| 1038 |
+
const Y = buf[off + j*3 + 1];
|
| 1039 |
+
const Z = buf[off + j*3 + 2];
|
| 1040 |
+
if (Z <= 0) { px[j] = py[j] = NaN; continue; }
|
| 1041 |
+
const u = s.focal * X / Z + s.cx;
|
| 1042 |
+
const v = s.focal * Y / Z + s.cy;
|
| 1043 |
+
px[j] = u * scale + offX;
|
| 1044 |
+
py[j] = v * scale + offY;
|
| 1045 |
+
}
|
| 1046 |
+
}
|
| 1047 |
+
ctx.lineCap = 'round';
|
| 1048 |
+
ctx.lineJoin = 'round';
|
| 1049 |
+
// Pass 1: dark halo behind every bone for legibility on warm depth bg
|
| 1050 |
+
ctx.strokeStyle = 'rgba(0,0,0,0.55)';
|
| 1051 |
+
ctx.lineWidth = 6;
|
| 1052 |
+
HAND_EDGES.forEach(([a, b]) => {
|
| 1053 |
+
if (!Number.isFinite(px[a]) || !Number.isFinite(px[b])) return;
|
| 1054 |
+
ctx.beginPath();
|
| 1055 |
+
ctx.moveTo(px[a], py[a]);
|
| 1056 |
+
ctx.lineTo(px[b], py[b]);
|
| 1057 |
+
ctx.stroke();
|
| 1058 |
+
});
|
| 1059 |
+
// Pass 2: finger-coloured bones on top
|
| 1060 |
+
ctx.lineWidth = 3.5;
|
| 1061 |
+
HAND_EDGES.forEach(([a, b], ei) => {
|
| 1062 |
+
if (!Number.isFinite(px[a]) || !Number.isFinite(px[b])) return;
|
| 1063 |
+
ctx.strokeStyle = FINGER_HEX[(ei / 4) | 0];
|
| 1064 |
+
ctx.beginPath();
|
| 1065 |
+
ctx.moveTo(px[a], py[a]);
|
| 1066 |
+
ctx.lineTo(px[b], py[b]);
|
| 1067 |
+
ctx.stroke();
|
| 1068 |
+
});
|
| 1069 |
+
// Joint dots: small, just at junctions
|
| 1070 |
+
ctx.fillStyle = 'white';
|
| 1071 |
+
ctx.strokeStyle = 'rgba(0,0,0,0.7)';
|
| 1072 |
+
ctx.lineWidth = 1.2;
|
| 1073 |
+
for (let j = 0; j < s.J; j++) {
|
| 1074 |
+
if (!Number.isFinite(px[j])) continue;
|
| 1075 |
+
ctx.beginPath();
|
| 1076 |
+
ctx.arc(px[j], py[j], 2.0, 0, Math.PI * 2);
|
| 1077 |
+
ctx.fill();
|
| 1078 |
+
ctx.stroke();
|
| 1079 |
+
}
|
| 1080 |
+
}
|
| 1081 |
+
}
|
| 1082 |
+
|
| 1083 |
+
// ---------- objects + tracking summary (rendered from scene.json) ----------
|
| 1084 |
+
|
| 1085 |
+
function renderSceneObjects(scene) {
|
| 1086 |
+
const objs = (scene.reconstruction && scene.reconstruction.objects) || [];
|
| 1087 |
+
const trackSummary = scene.tracking_summary || {};
|
| 1088 |
+
const detail = { objects: objs.map(o => ({
|
| 1089 |
+
id: o.id, prompt: o.prompt, color_hex: o.color_hex, n_points: o.n_points,
|
| 1090 |
+
tracking: trackSummary[String(o.id)] || trackSummary[o.id] || {},
|
| 1091 |
+
})) };
|
| 1092 |
+
// viewer side per-object list
|
| 1093 |
+
const wrap = document.getElementById('loaded-objects');
|
| 1094 |
+
wrap.innerHTML = '';
|
| 1095 |
+
detail.objects.forEach(o => {
|
| 1096 |
+
const t = o.tracking || {};
|
| 1097 |
+
const row = document.createElement('div');
|
| 1098 |
+
row.className = 'obj-row';
|
| 1099 |
+
const fitness = (t.anchor_fitness != null) ? t.anchor_fitness.toFixed(2) : '-';
|
| 1100 |
+
const tag = t.path || '-';
|
| 1101 |
+
row.innerHTML = `
|
| 1102 |
+
<span class="obj-swatch" style="background:${o.color_hex}"></span>
|
| 1103 |
+
<span class="obj-prompt" title="${escapeAttr(o.prompt)}">${escapeHtml(truncate(o.prompt, 28))}</span>
|
| 1104 |
+
<span class="obj-stat">${o.n_points ? Math.round(o.n_points / 1000) + 'k pts' : '-'}</span>
|
| 1105 |
+
<span class="obj-tag" title="anchor fitness ${fitness}">${tag}</span>
|
| 1106 |
+
`;
|
| 1107 |
+
wrap.appendChild(row);
|
| 1108 |
+
});
|
| 1109 |
+
|
| 1110 |
+
// inspect side object pills
|
| 1111 |
+
const olist = document.getElementById('d-objects');
|
| 1112 |
+
olist.innerHTML = '';
|
| 1113 |
+
detail.objects.forEach(o => {
|
| 1114 |
+
const span = document.createElement('span');
|
| 1115 |
+
span.className = 'object-pill';
|
| 1116 |
+
span.style.setProperty('--obj-color', o.color_hex);
|
| 1117 |
+
span.textContent = o.prompt || `obj ${o.id}`;
|
| 1118 |
+
olist.appendChild(span);
|
| 1119 |
+
});
|
| 1120 |
+
}
|
| 1121 |
+
|
| 1122 |
+
function renderTrackingSummary(scene) {
|
| 1123 |
+
const wrap = document.getElementById('d-tracking');
|
| 1124 |
+
wrap.innerHTML = '';
|
| 1125 |
+
const objs = (scene.reconstruction && scene.reconstruction.objects) || [];
|
| 1126 |
+
const trackSummary = scene.tracking_summary || {};
|
| 1127 |
+
const lines = objs.map(o => {
|
| 1128 |
+
const t = trackSummary[String(o.id)] || trackSummary[o.id] || {};
|
| 1129 |
+
|
| 1130 |
+
// state breakdown (5-state schema collapses grasped_{l,r,both} β grasped)
|
| 1131 |
+
let stateStr;
|
| 1132 |
+
const sf = t.state_fractions;
|
| 1133 |
+
if (sf) {
|
| 1134 |
+
const pct = (v) => `${Math.round((v || 0) * 100)}%`;
|
| 1135 |
+
const globalTag = t.is_static_global ? ' GLOBAL' : '';
|
| 1136 |
+
stateStr = `s${pct(sf.static)}/g${pct(sf.grasped)}/m${pct(sf.moving)}${globalTag}`;
|
| 1137 |
+
} else {
|
| 1138 |
+
stateStr = '-';
|
| 1139 |
+
}
|
| 1140 |
+
|
| 1141 |
+
// dominant hand (-, L, R, both)
|
| 1142 |
+
const hand = t.dominant_hand || '-';
|
| 1143 |
+
|
| 1144 |
+
// mesh: N pts + longest axis in cm
|
| 1145 |
+
let meshStr = '-';
|
| 1146 |
+
if (t.mesh_n_pts != null || t.mesh_extent_cm != null) {
|
| 1147 |
+
const ptsPart = t.mesh_n_pts != null
|
| 1148 |
+
? (t.mesh_n_pts >= 1000
|
| 1149 |
+
? `${(t.mesh_n_pts / 1000).toFixed(t.mesh_n_pts >= 100000 ? 0 : 1)}k pts`
|
| 1150 |
+
: `${t.mesh_n_pts} pts`)
|
| 1151 |
+
: '-';
|
| 1152 |
+
const cmPart = t.mesh_extent_cm != null
|
| 1153 |
+
? `${Number(t.mesh_extent_cm).toFixed(0)}cm`
|
| 1154 |
+
: '-';
|
| 1155 |
+
meshStr = `${ptsPart}, ${cmPart}`;
|
| 1156 |
+
}
|
| 1157 |
+
|
| 1158 |
+
return `<div style="padding:4px 0;border-top:1px solid var(--rule)"><span style="color:${o.color_hex};font-weight:600">obj ${o.id}</span> Β· state=${stateStr} Β· hand=${hand} Β· mesh=${meshStr}</div>`;
|
| 1159 |
+
});
|
| 1160 |
+
wrap.innerHTML = lines.join('');
|
| 1161 |
+
}
|
| 1162 |
+
|
| 1163 |
+
// ---------- viewer-side cliplist (quick clip switcher beside the 3D viewer) ----------
|
| 1164 |
+
|
| 1165 |
+
function renderSideCliplist() {
|
| 1166 |
+
const wrap = document.getElementById('side-cliplist');
|
| 1167 |
+
if (!wrap) return;
|
| 1168 |
+
// Use the same shuffled+declustered order as Browse default so the panel
|
| 1169 |
+
// feels stable across navigations but still mixes sources.
|
| 1170 |
+
const eps = shuffleAndDecluster(state.episodes, state.shuffleSeed);
|
| 1171 |
+
const cur = state.current && state.current.name;
|
| 1172 |
+
wrap.innerHTML = '';
|
| 1173 |
+
eps.forEach(e => {
|
| 1174 |
+
const row = document.createElement('div');
|
| 1175 |
+
row.className = 'side-clip';
|
| 1176 |
+
row.dataset.name = e.name;
|
| 1177 |
+
if (cur === e.name) row.classList.add('active');
|
| 1178 |
+
row.innerHTML = `
|
| 1179 |
+
<img class="side-clip-thumb" src="${e.thumb_url}" alt="" loading="lazy" decoding="async"
|
| 1180 |
+
onerror="this.onerror=null;this.src='${ASSET_BASE}/${encodeURIComponent(e.name)}/thumb.jpg'">
|
| 1181 |
+
<div class="side-clip-text">
|
| 1182 |
+
<div class="side-clip-title">${escapeHtml(e.action_brief || '(unlabeled)')}</div>
|
| 1183 |
+
<div class="side-clip-id">${escapeHtml(e.name)}</div>
|
| 1184 |
+
</div>`;
|
| 1185 |
+
// Click stays in the 3D viewer - do NOT call scrollToInspect()
|
| 1186 |
+
row.addEventListener('click', () => selectEpisode(e.name));
|
| 1187 |
+
wrap.appendChild(row);
|
| 1188 |
+
});
|
| 1189 |
+
}
|
| 1190 |
+
|
| 1191 |
+
function updateSideCliplistActive(name) {
|
| 1192 |
+
const wrap = document.getElementById('side-cliplist');
|
| 1193 |
+
if (!wrap) return;
|
| 1194 |
+
let activated = null;
|
| 1195 |
+
wrap.querySelectorAll('.side-clip').forEach(r => {
|
| 1196 |
+
const on = r.dataset.name === name;
|
| 1197 |
+
r.classList.toggle('active', on);
|
| 1198 |
+
if (on) activated = r;
|
| 1199 |
+
});
|
| 1200 |
+
if (activated) activated.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
|
| 1201 |
+
}
|
| 1202 |
+
|
| 1203 |
+
// ---------- helpers ----------
|
| 1204 |
+
|
| 1205 |
+
function escapeHtml(s) {
|
| 1206 |
+
if (s == null) return '';
|
| 1207 |
+
return String(s).replace(/[&<>"']/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
| 1208 |
+
}
|
| 1209 |
+
function escapeAttr(s) { return escapeHtml(s); }
|
| 1210 |
+
function truncate(s, n) { s = s || ''; return s.length > n ? s.slice(0, n - 1) + 'β¦' : s; }
|
| 1211 |
+
|
| 1212 |
+
init().catch(e => {
|
| 1213 |
+
console.error(e);
|
| 1214 |
+
const sc = document.getElementById('showcase');
|
| 1215 |
+
if (sc) sc.innerHTML = `<div class="loading" style="grid-column:1/-1; padding:40px; text-align:center; color:var(--accent)">init failed: ${e.message}</div>`;
|
| 1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's paper theme
|
| 3 |
+
// - hand MESH (778v + 1538f) and SKELETON (21 joints + bones) toggleable
|
| 4 |
+
// - YouTube iframe drives playback (autoplay + clip-loop, muted)
|
| 5 |
+
// - depth.mp4 + flow.mp4 sync via the same wall-clock as YouTube (fps now
|
| 6 |
+
// derived from manifest.start_sec/end_sec β matches real time)
|
| 7 |
+
// Object point clouds intentionally NOT rendered in Phase 1.
|
| 8 |
+
|
| 9 |
+
import * as THREE from 'three';
|
| 10 |
+
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
|
| 11 |
+
import { PLYLoader } from 'three/addons/loaders/PLYLoader.js';
|
| 12 |
+
|
| 13 |
+
// ββ params ββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 14 |
+
const u = new URL(window.location.href);
|
| 15 |
+
const SAMPLE_ID = u.searchParams.get('id') || '-4eiU1SHpzY_319.4_323.4';
|
| 16 |
+
const ASSET_BASE = u.searchParams.get('base') || `../_dist/samples/${SAMPLE_ID}`;
|
| 17 |
+
|
| 18 |
+
// MANO 21-joint kinematic edges (matches exo2ego_pipeline/config.py).
|
| 19 |
+
const HAND_EDGES = [
|
| 20 |
+
[0,1],[1,2],[2,3],[3,4],
|
| 21 |
+
[0,5],[5,6],[6,7],[7,8],
|
| 22 |
+
[0,9],[9,10],[10,11],[11,12],
|
| 23 |
+
[0,13],[13,14],[14,15],[15,16],
|
| 24 |
+
[0,17],[17,18],[18,19],[19,20],
|
| 25 |
+
];
|
| 26 |
+
// 5 fingers Γ 4 bones each, deeper-saturated to read on light bg.
|
| 27 |
+
const FINGER_COLOURS = [
|
| 28 |
+
[0.85, 0.18, 0.20], // thumb Β· red
|
| 29 |
+
[0.95, 0.55, 0.10], // index Β· orange
|
| 30 |
+
[0.20, 0.65, 0.25], // middle Β· green
|
| 31 |
+
[0.85, 0.75, 0.05], // ring Β· yellow
|
| 32 |
+
[0.18, 0.45, 0.85], // pinky Β· blue
|
| 33 |
+
];
|
| 34 |
+
|
| 35 |
+
// ββ state βββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 36 |
+
const state = {
|
| 37 |
+
scene: null,
|
| 38 |
+
fps: 10,
|
| 39 |
+
T: 0,
|
| 40 |
+
joints: null,
|
| 41 |
+
jointsShape: null, // [T, MAX_HANDS, 21, 3]
|
| 42 |
+
verts: null,
|
| 43 |
+
vertsShape: null, // [T, MAX_HANDS, 778, 3]
|
| 44 |
+
faces: null, // Int32Array (1538 * 3)
|
| 45 |
+
hands: [], // [{ mesh, skeleton, dots }]
|
| 46 |
+
objects: [], // [{ pts, obb, oid }]
|
| 47 |
+
poses: null, // Float32Array (T, N_obj, 4, 4) row-major
|
| 48 |
+
posesShape: null,
|
| 49 |
+
obbs: null, // Float32Array (N_obj, 8, 3)
|
| 50 |
+
three: null,
|
| 51 |
+
toggle: { mesh: true, skeleton: true, joints: true, objects: true, obb: false },
|
| 52 |
+
};
|
| 53 |
+
|
| 54 |
+
// ββ bootstrap βββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 55 |
+
async function main() {
|
| 56 |
+
document.getElementById('sub').textContent =
|
| 57 |
+
`id = ${SAMPLE_ID} Β· base = ${ASSET_BASE}`;
|
| 58 |
+
initThree();
|
| 59 |
+
|
| 60 |
+
const scene = await fetchJSON(`${ASSET_BASE}/scene.json`);
|
| 61 |
+
state.scene = scene;
|
| 62 |
+
state.fps = scene.fps;
|
| 63 |
+
state.T = scene.stats.n_frames;
|
| 64 |
+
|
| 65 |
+
document.getElementById('scene-meta').textContent = JSON.stringify({
|
| 66 |
+
id: scene.id,
|
| 67 |
+
youtube_id: scene.video_source.youtube_id,
|
| 68 |
+
fps: scene.fps,
|
| 69 |
+
duration_s: scene.duration,
|
| 70 |
+
n_frames: scene.stats.n_frames,
|
| 71 |
+
n_objects: scene.stats.n_objects,
|
| 72 |
+
has_grasp: scene.stats.has_grasp,
|
| 73 |
+
license: scene._license,
|
| 74 |
+
}, null, 2);
|
| 75 |
+
|
| 76 |
+
// Load binary assets
|
| 77 |
+
const r = scene.reconstruction;
|
| 78 |
+
const [jBuf, vBuf, fBuf, pBuf, oBuf] = await Promise.all([
|
| 79 |
+
fetchBin(`${ASSET_BASE}/${r.hand_joints}`),
|
| 80 |
+
fetchBin(`${ASSET_BASE}/${r.hand_verts}`),
|
| 81 |
+
r.hand_faces ? fetchBin(`${ASSET_BASE}/${r.hand_faces}`) : Promise.resolve(null),
|
| 82 |
+
r.object_pose_traj ? fetchBin(`${ASSET_BASE}/${r.object_pose_traj}`) : Promise.resolve(null),
|
| 83 |
+
r.object_obb ? fetchBin(`${ASSET_BASE}/${r.object_obb}`) : Promise.resolve(null),
|
| 84 |
+
]);
|
| 85 |
+
state.joints = new Float32Array(jBuf);
|
| 86 |
+
state.jointsShape = [state.T, 2, 21, 3];
|
| 87 |
+
state.verts = new Float32Array(vBuf);
|
| 88 |
+
state.vertsShape = [state.T, 2, 778, 3];
|
| 89 |
+
if (fBuf) state.faces = new Int32Array(fBuf);
|
| 90 |
+
if (pBuf) {
|
| 91 |
+
state.poses = new Float32Array(pBuf);
|
| 92 |
+
state.posesShape = r.object_pose_shape;
|
| 93 |
+
}
|
| 94 |
+
if (oBuf) state.obbs = new Float32Array(oBuf);
|
| 95 |
+
|
| 96 |
+
buildHandObjects();
|
| 97 |
+
await buildObjectMeshes(scene);
|
| 98 |
+
fitCameraToHand();
|
| 99 |
+
|
| 100 |
+
// Wire video + slider
|
| 101 |
+
setupVideos(scene);
|
| 102 |
+
setupSlider();
|
| 103 |
+
setupGUI();
|
| 104 |
+
|
| 105 |
+
setFrame(0);
|
| 106 |
+
animate();
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
// ββ three boilerplate βββββββββββββββββββββββββββββββββββββββββ
|
| 110 |
+
function initThree() {
|
| 111 |
+
const canvas = document.getElementById('three-canvas');
|
| 112 |
+
const stage = canvas.parentElement;
|
| 113 |
+
const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: false });
|
| 114 |
+
renderer.setPixelRatio(window.devicePixelRatio);
|
| 115 |
+
|
| 116 |
+
const scene = new THREE.Scene();
|
| 117 |
+
// Match viser's paper theme: warm off-white.
|
| 118 |
+
scene.background = new THREE.Color('#f6f4ee');
|
| 119 |
+
|
| 120 |
+
const camera = new THREE.PerspectiveCamera(35, 16/10, 0.005, 50);
|
| 121 |
+
camera.position.set(0, -0.3, 1.2);
|
| 122 |
+
// Gravity in our pipeline is roughly -Y; align Three.js up accordingly so
|
| 123 |
+
// OrbitControls "up" feels right (we'll re-target to hand center later).
|
| 124 |
+
camera.up.set(0, -1, 0);
|
| 125 |
+
|
| 126 |
+
const controls = new OrbitControls(camera, canvas);
|
| 127 |
+
controls.target.set(0, 0, 1.0);
|
| 128 |
+
controls.enableDamping = true;
|
| 129 |
+
controls.dampingFactor = 0.08;
|
| 130 |
+
|
| 131 |
+
// Lighting: ambient + a single soft directional. Mesh material is unshaded
|
| 132 |
+
// (MeshStandardMaterial with low metalness) so it reads on white.
|
| 133 |
+
scene.add(new THREE.AmbientLight(0xffffff, 0.85));
|
| 134 |
+
const dir = new THREE.DirectionalLight(0xffffff, 0.55);
|
| 135 |
+
dir.position.set(0.5, -0.8, 0.5);
|
| 136 |
+
scene.add(dir);
|
| 137 |
+
|
| 138 |
+
// Ground grid (matches viser's gravity-aligned grid). XZ plane.
|
| 139 |
+
const grid = new THREE.GridHelper(2, 20, 0x999999, 0xcccccc);
|
| 140 |
+
grid.material.opacity = 0.6;
|
| 141 |
+
grid.material.transparent = true;
|
| 142 |
+
scene.add(grid);
|
| 143 |
+
|
| 144 |
+
// Axes helper at world origin
|
| 145 |
+
scene.add(new THREE.AxesHelper(0.15));
|
| 146 |
+
|
| 147 |
+
function resize() {
|
| 148 |
+
const w = stage.clientWidth, h = stage.clientHeight;
|
| 149 |
+
renderer.setSize(w, h, false);
|
| 150 |
+
camera.aspect = w / h;
|
| 151 |
+
camera.updateProjectionMatrix();
|
| 152 |
+
}
|
| 153 |
+
window.addEventListener('resize', resize);
|
| 154 |
+
resize();
|
| 155 |
+
|
| 156 |
+
state.three = { scene, camera, renderer, controls };
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
function buildHandObjects() {
|
| 160 |
+
// edge colours: 20 segments Γ 2 endpoints Γ 3 channels
|
| 161 |
+
const edgeColors = new Float32Array(HAND_EDGES.length * 2 * 3);
|
| 162 |
+
HAND_EDGES.forEach((_e, ei) => {
|
| 163 |
+
const fi = Math.floor(ei / 4) % 5;
|
| 164 |
+
const c = FINGER_COLOURS[fi];
|
| 165 |
+
for (let s = 0; s < 2; s++) {
|
| 166 |
+
edgeColors[(ei * 2 + s) * 3 + 0] = c[0];
|
| 167 |
+
edgeColors[(ei * 2 + s) * 3 + 1] = c[1];
|
| 168 |
+
edgeColors[(ei * 2 + s) * 3 + 2] = c[2];
|
| 169 |
+
}
|
| 170 |
+
});
|
| 171 |
+
|
| 172 |
+
for (let h = 0; h < 2; h++) {
|
| 173 |
+
// ββ mesh ββ
|
| 174 |
+
const meshGeom = new THREE.BufferGeometry();
|
| 175 |
+
meshGeom.setAttribute('position', new THREE.BufferAttribute(new Float32Array(778 * 3), 3));
|
| 176 |
+
if (state.faces) {
|
| 177 |
+
meshGeom.setIndex(new THREE.Uint32BufferAttribute(state.faces.slice(), 1));
|
| 178 |
+
}
|
| 179 |
+
const meshMat = new THREE.MeshStandardMaterial({
|
| 180 |
+
color: h === 0 ? 0xc89089 : 0x8aa3c0, // skin-pink left, blue-grey right
|
| 181 |
+
roughness: 0.9, metalness: 0.0,
|
| 182 |
+
side: THREE.DoubleSide,
|
| 183 |
+
transparent: true, opacity: 0.92,
|
| 184 |
+
flatShading: false,
|
| 185 |
+
});
|
| 186 |
+
const mesh = new THREE.Mesh(meshGeom, meshMat);
|
| 187 |
+
mesh.visible = false;
|
| 188 |
+
state.three.scene.add(mesh);
|
| 189 |
+
|
| 190 |
+
// ββ skeleton ββ
|
| 191 |
+
const skelGeom = new THREE.BufferGeometry();
|
| 192 |
+
skelGeom.setAttribute('position', new THREE.BufferAttribute(new Float32Array(HAND_EDGES.length * 2 * 3), 3));
|
| 193 |
+
skelGeom.setAttribute('color', new THREE.BufferAttribute(edgeColors.slice(), 3));
|
| 194 |
+
const skelMat = new THREE.LineBasicMaterial({ vertexColors: true });
|
| 195 |
+
const skeleton = new THREE.LineSegments(skelGeom, skelMat);
|
| 196 |
+
skeleton.visible = false;
|
| 197 |
+
state.three.scene.add(skeleton);
|
| 198 |
+
|
| 199 |
+
// ββ joint dots ββ
|
| 200 |
+
const dotGeom = new THREE.BufferGeometry();
|
| 201 |
+
dotGeom.setAttribute('position', new THREE.BufferAttribute(new Float32Array(21 * 3), 3));
|
| 202 |
+
const dotMat = new THREE.PointsMaterial({
|
| 203 |
+
color: 0x222222, size: 0.013, sizeAttenuation: true,
|
| 204 |
+
});
|
| 205 |
+
const dots = new THREE.Points(dotGeom, dotMat);
|
| 206 |
+
dots.visible = false;
|
| 207 |
+
state.three.scene.add(dots);
|
| 208 |
+
|
| 209 |
+
state.hands.push({ mesh, skeleton, dots });
|
| 210 |
+
}
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
// Load each object's PLY, scale by scale_correction (the missing factor that
|
| 214 |
+
// brings canonical points into world units), build a Points + OBB wireframe.
|
| 215 |
+
// Per-frame we drive the matrix from object_pose.bin; at rest the OBB sits at
|
| 216 |
+
// the canonical box corners since obbs[oi] are stored in mesh-local frame.
|
| 217 |
+
async function buildObjectMeshes(scene) {
|
| 218 |
+
const loader = new PLYLoader();
|
| 219 |
+
const objs = scene.reconstruction.objects || [];
|
| 220 |
+
for (let oi = 0; oi < objs.length; oi++) {
|
| 221 |
+
const o = objs[oi];
|
| 222 |
+
const url = `${ASSET_BASE}/${o.ply}`;
|
| 223 |
+
let geom;
|
| 224 |
+
try {
|
| 225 |
+
geom = await new Promise((res, rej) => loader.load(url, res, undefined, rej));
|
| 226 |
+
} catch (e) {
|
| 227 |
+
console.warn(`obj ${o.id}: PLY load failed`, e);
|
| 228 |
+
continue;
|
| 229 |
+
}
|
| 230 |
+
// Scale geometry vertices by scale_correction so per-frame pose_R/pose_t
|
| 231 |
+
// (which expects canonical-scaled-to-world points) is applied correctly.
|
| 232 |
+
const sc = (o.scale_correction != null) ? o.scale_correction : 1.0;
|
| 233 |
+
if (Math.abs(sc - 1.0) > 1e-6) {
|
| 234 |
+
const pos = geom.getAttribute('position');
|
| 235 |
+
for (let i = 0; i < pos.count * 3; i++) pos.array[i] *= sc;
|
| 236 |
+
pos.needsUpdate = true;
|
| 237 |
+
geom.computeBoundingSphere();
|
| 238 |
+
}
|
| 239 |
+
const hasColor = geom.getAttribute('color') !== undefined;
|
| 240 |
+
const mat = new THREE.PointsMaterial({
|
| 241 |
+
size: 0.003,
|
| 242 |
+
sizeAttenuation: true,
|
| 243 |
+
vertexColors: hasColor,
|
| 244 |
+
color: hasColor ? 0xffffff : new THREE.Color(o.color_hex),
|
| 245 |
+
});
|
| 246 |
+
const pts = new THREE.Points(geom, mat);
|
| 247 |
+
pts.matrixAutoUpdate = false;
|
| 248 |
+
state.three.scene.add(pts);
|
| 249 |
+
|
| 250 |
+
// OBB wireframe: 12 edges of an axis-aligned-ish box from 8 corner indices.
|
| 251 |
+
const obbGeom = new THREE.BufferGeometry();
|
| 252 |
+
obbGeom.setAttribute('position', new THREE.BufferAttribute(new Float32Array(12 * 2 * 3), 3));
|
| 253 |
+
const obbMat = new THREE.LineBasicMaterial({ color: new THREE.Color(o.color_hex) });
|
| 254 |
+
const obb = new THREE.LineSegments(obbGeom, obbMat);
|
| 255 |
+
obb.visible = false;
|
| 256 |
+
state.three.scene.add(obb);
|
| 257 |
+
|
| 258 |
+
state.objects.push({ pts, obb, oid: o.id, color_hex: o.color_hex });
|
| 259 |
+
}
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
+
// 8-corner index pairs to form the 12 edges of an axis-aligned bounding box.
|
| 263 |
+
// SAM3D obb_corners ordering: it's the 8 cuboid vertices but the exact
|
| 264 |
+
// permutation depends on the producer; convex-hull edges are robust.
|
| 265 |
+
const OBB_EDGES = [
|
| 266 |
+
[0,1],[1,2],[2,3],[3,0],
|
| 267 |
+
[4,5],[5,6],[6,7],[7,4],
|
| 268 |
+
[0,4],[1,5],[2,6],[3,7],
|
| 269 |
+
];
|
| 270 |
+
|
| 271 |
+
function fitCameraToHand() {
|
| 272 |
+
// Centre OrbitControls on the median wrist position over all frames.
|
| 273 |
+
const T = state.jointsShape[0], H = state.jointsShape[1];
|
| 274 |
+
const stride21 = 21 * 3, strideH = stride21 * H;
|
| 275 |
+
const xs = [], ys = [], zs = [];
|
| 276 |
+
for (let t = 0; t < T; t++) {
|
| 277 |
+
for (let h = 0; h < H; h++) {
|
| 278 |
+
const off = t * strideH + h * stride21 + 0; // wrist = joint 0
|
| 279 |
+
const x = state.joints[off], y = state.joints[off+1], z = state.joints[off+2];
|
| 280 |
+
if (Number.isFinite(x) && Number.isFinite(y) && Number.isFinite(z)) {
|
| 281 |
+
xs.push(x); ys.push(y); zs.push(z);
|
| 282 |
+
}
|
| 283 |
+
}
|
| 284 |
+
}
|
| 285 |
+
if (xs.length === 0) return;
|
| 286 |
+
const median = (a) => a.slice().sort((p, q) => p - q)[Math.floor(a.length / 2)];
|
| 287 |
+
const cx = median(xs), cy = median(ys), cz = median(zs);
|
| 288 |
+
const c = state.three.controls;
|
| 289 |
+
c.target.set(cx, cy, cz);
|
| 290 |
+
// Position camera ~0.6m back along -Z, slightly above hand (in viser's
|
| 291 |
+
// gravity-up frame, "above" = -Y).
|
| 292 |
+
state.three.camera.position.set(cx, cy - 0.25, cz - 0.6);
|
| 293 |
+
c.update();
|
| 294 |
+
}
|
| 295 |
+
|
| 296 |
+
// ββ per-frame update ββββββββββββββββββββββββββββββββββββββββββ
|
| 297 |
+
function setFrame(t) {
|
| 298 |
+
t = Math.max(0, Math.min(state.T - 1, Math.round(t)));
|
| 299 |
+
|
| 300 |
+
const H = state.jointsShape[1];
|
| 301 |
+
const J = 21, V = 778;
|
| 302 |
+
const stride_j_h = J * 3, stride_j_t = stride_j_h * H;
|
| 303 |
+
const stride_v_h = V * 3, stride_v_t = stride_v_h * H;
|
| 304 |
+
const showMesh = state.toggle?.mesh !== false;
|
| 305 |
+
const showSkel = state.toggle?.skeleton !== false;
|
| 306 |
+
const showDots = state.toggle?.joints !== false;
|
| 307 |
+
|
| 308 |
+
for (let h = 0; h < H; h++) {
|
| 309 |
+
const off_j = t * stride_j_t + h * stride_j_h;
|
| 310 |
+
const off_v = t * stride_v_t + h * stride_v_h;
|
| 311 |
+
const valid = Number.isFinite(state.joints[off_j]);
|
| 312 |
+
const hand = state.hands[h];
|
| 313 |
+
hand.mesh.visible = valid && showMesh;
|
| 314 |
+
hand.skeleton.visible = valid && showSkel;
|
| 315 |
+
hand.dots.visible = valid && showDots;
|
| 316 |
+
if (!valid) continue;
|
| 317 |
+
|
| 318 |
+
// skeleton edges
|
| 319 |
+
const sArr = hand.skeleton.geometry.getAttribute('position').array;
|
| 320 |
+
HAND_EDGES.forEach(([a, b], ei) => {
|
| 321 |
+
sArr[ei*6+0] = state.joints[off_j + a*3 + 0];
|
| 322 |
+
sArr[ei*6+1] = state.joints[off_j + a*3 + 1];
|
| 323 |
+
sArr[ei*6+2] = state.joints[off_j + a*3 + 2];
|
| 324 |
+
sArr[ei*6+3] = state.joints[off_j + b*3 + 0];
|
| 325 |
+
sArr[ei*6+4] = state.joints[off_j + b*3 + 1];
|
| 326 |
+
sArr[ei*6+5] = state.joints[off_j + b*3 + 2];
|
| 327 |
+
});
|
| 328 |
+
hand.skeleton.geometry.getAttribute('position').needsUpdate = true;
|
| 329 |
+
|
| 330 |
+
// joint dots
|
| 331 |
+
const dArr = hand.dots.geometry.getAttribute('position').array;
|
| 332 |
+
for (let j = 0; j < J; j++) {
|
| 333 |
+
dArr[j*3+0] = state.joints[off_j + j*3 + 0];
|
| 334 |
+
dArr[j*3+1] = state.joints[off_j + j*3 + 1];
|
| 335 |
+
dArr[j*3+2] = state.joints[off_j + j*3 + 2];
|
| 336 |
+
}
|
| 337 |
+
hand.dots.geometry.getAttribute('position').needsUpdate = true;
|
| 338 |
+
|
| 339 |
+
// mesh verts
|
| 340 |
+
if (state.verts && state.faces) {
|
| 341 |
+
const vAttr = hand.mesh.geometry.getAttribute('position');
|
| 342 |
+
const vArr = vAttr.array;
|
| 343 |
+
for (let i = 0; i < V * 3; i++) vArr[i] = state.verts[off_v + i];
|
| 344 |
+
vAttr.needsUpdate = true;
|
| 345 |
+
hand.mesh.geometry.computeVertexNormals();
|
| 346 |
+
hand.mesh.geometry.computeBoundingSphere();
|
| 347 |
+
}
|
| 348 |
+
}
|
| 349 |
+
|
| 350 |
+
// ββ objects ββ
|
| 351 |
+
if (state.poses && state.objects.length) {
|
| 352 |
+
const N = state.posesShape[1];
|
| 353 |
+
const strideObj = 16;
|
| 354 |
+
const strideFrame = strideObj * N;
|
| 355 |
+
const showObj = state.toggle.objects !== false;
|
| 356 |
+
const showObb = state.toggle.obb !== false;
|
| 357 |
+
for (let oi = 0; oi < state.objects.length; oi++) {
|
| 358 |
+
const o = state.objects[oi];
|
| 359 |
+
const off = t * strideFrame + oi * strideObj;
|
| 360 |
+
// Numpy float32 .tofile() is row-major; Matrix4.set takes row-major args.
|
| 361 |
+
o.pts.matrix.set(
|
| 362 |
+
state.poses[off+0], state.poses[off+1], state.poses[off+2], state.poses[off+3],
|
| 363 |
+
state.poses[off+4], state.poses[off+5], state.poses[off+6], state.poses[off+7],
|
| 364 |
+
state.poses[off+8], state.poses[off+9], state.poses[off+10], state.poses[off+11],
|
| 365 |
+
state.poses[off+12], state.poses[off+13], state.poses[off+14], state.poses[off+15],
|
| 366 |
+
);
|
| 367 |
+
o.pts.matrixWorldNeedsUpdate = true;
|
| 368 |
+
o.pts.visible = showObj;
|
| 369 |
+
|
| 370 |
+
// OBB: 8 mesh-local corners β push through same per-frame matrix.
|
| 371 |
+
if (state.obbs) {
|
| 372 |
+
const cornersOff = oi * 24;
|
| 373 |
+
const m = o.pts.matrix;
|
| 374 |
+
const obbArr = o.obb.geometry.getAttribute('position').array;
|
| 375 |
+
const corner = new THREE.Vector3();
|
| 376 |
+
const xformed = [];
|
| 377 |
+
for (let k = 0; k < 8; k++) {
|
| 378 |
+
corner.set(state.obbs[cornersOff + k*3 + 0],
|
| 379 |
+
state.obbs[cornersOff + k*3 + 1],
|
| 380 |
+
state.obbs[cornersOff + k*3 + 2]);
|
| 381 |
+
corner.applyMatrix4(m);
|
| 382 |
+
xformed.push(corner.x, corner.y, corner.z);
|
| 383 |
+
}
|
| 384 |
+
OBB_EDGES.forEach(([a, b], ei) => {
|
| 385 |
+
obbArr[ei*6+0] = xformed[a*3+0];
|
| 386 |
+
obbArr[ei*6+1] = xformed[a*3+1];
|
| 387 |
+
obbArr[ei*6+2] = xformed[a*3+2];
|
| 388 |
+
obbArr[ei*6+3] = xformed[b*3+0];
|
| 389 |
+
obbArr[ei*6+4] = xformed[b*3+1];
|
| 390 |
+
obbArr[ei*6+5] = xformed[b*3+2];
|
| 391 |
+
});
|
| 392 |
+
o.obb.geometry.getAttribute('position').needsUpdate = true;
|
| 393 |
+
}
|
| 394 |
+
o.obb.visible = showObb;
|
| 395 |
+
}
|
| 396 |
+
}
|
| 397 |
+
|
| 398 |
+
document.getElementById('frame').value = String(t);
|
| 399 |
+
document.getElementById('frame-label').textContent = `${t + 1} / ${state.T}`;
|
| 400 |
+
}
|
| 401 |
+
|
| 402 |
+
// ββ playback synchronisation ββββββββββββββββββββββββββββββββββ
|
| 403 |
+
function setupVideos(scene) {
|
| 404 |
+
const fps = scene.fps;
|
| 405 |
+
const dv = document.getElementById('depth-video');
|
| 406 |
+
const fv = document.getElementById('flow-video');
|
| 407 |
+
const av = document.getElementById('annotated-video');
|
| 408 |
+
dv.src = `${ASSET_BASE}/${scene.reconstruction.depth_video}`;
|
| 409 |
+
fv.src = `${ASSET_BASE}/${scene.reconstruction.flow_video}`;
|
| 410 |
+
// Phase 1: no annotated mp4. Re-use depth.mp4 in the spare pane.
|
| 411 |
+
av.src = `${ASSET_BASE}/${scene.reconstruction.depth_video}`;
|
| 412 |
+
|
| 413 |
+
const yt = document.getElementById('yt-iframe');
|
| 414 |
+
const v = scene.video_source;
|
| 415 |
+
if (v && v.youtube_id) {
|
| 416 |
+
const start = Math.floor(v.start_seconds || 0);
|
| 417 |
+
const end = Math.ceil(v.end_seconds || (start + scene.duration));
|
| 418 |
+
// autoplay=1 + mute=1 β satisfies browser autoplay gate
|
| 419 |
+
// loop=1 + playlist=<id> β YouTube quirk: single-video loops require playlist
|
| 420 |
+
// Playback re-enters at `start` once it reaches `end`.
|
| 421 |
+
const params = new URLSearchParams({
|
| 422 |
+
autoplay: '1', mute: '1', loop: '1', playlist: v.youtube_id,
|
| 423 |
+
start: String(start), end: String(end),
|
| 424 |
+
controls: '1', rel: '0', modestbranding: '1', playsinline: '1',
|
| 425 |
+
});
|
| 426 |
+
yt.src = `https://www.youtube.com/embed/${v.youtube_id}?${params.toString()}`;
|
| 427 |
+
}
|
| 428 |
+
|
| 429 |
+
// Master clock = depth.mp4 (encoded at native fps to match real-time).
|
| 430 |
+
dv.addEventListener('timeupdate', () => {
|
| 431 |
+
setFrame(Math.floor(dv.currentTime * fps));
|
| 432 |
+
});
|
| 433 |
+
}
|
| 434 |
+
|
| 435 |
+
function setupSlider() {
|
| 436 |
+
const slider = document.getElementById('frame');
|
| 437 |
+
slider.max = String(state.T - 1);
|
| 438 |
+
slider.addEventListener('input', () => {
|
| 439 |
+
const t = parseInt(slider.value, 10);
|
| 440 |
+
const dv = document.getElementById('depth-video');
|
| 441 |
+
const fv = document.getElementById('flow-video');
|
| 442 |
+
const tt = t / state.fps;
|
| 443 |
+
dv.currentTime = tt; fv.currentTime = tt;
|
| 444 |
+
setFrame(t);
|
| 445 |
+
});
|
| 446 |
+
document.getElementById('play').addEventListener('click', () => {
|
| 447 |
+
const dv = document.getElementById('depth-video');
|
| 448 |
+
const fv = document.getElementById('flow-video');
|
| 449 |
+
if (dv.paused) { dv.play(); fv.play(); } else { dv.pause(); fv.pause(); }
|
| 450 |
+
});
|
| 451 |
+
}
|
| 452 |
+
|
| 453 |
+
function setupGUI() {
|
| 454 |
+
// state.toggle initialised in `state` declaration above.
|
| 455 |
+
const ids = {
|
| 456 |
+
mesh: 't-mesh', skeleton: 't-skeleton', joints: 't-joints',
|
| 457 |
+
objects: 't-objects', obb: 't-obb',
|
| 458 |
+
};
|
| 459 |
+
const apply = () => {
|
| 460 |
+
Object.entries(ids).forEach(([k, id]) => {
|
| 461 |
+
state.toggle[k] = document.getElementById(id).checked;
|
| 462 |
+
});
|
| 463 |
+
setFrame(parseInt(document.getElementById('frame').value, 10) || 0);
|
| 464 |
+
};
|
| 465 |
+
Object.values(ids).forEach((id) => {
|
| 466 |
+
const el = document.getElementById(id);
|
| 467 |
+
if (el) {
|
| 468 |
+
el.checked = state.toggle[Object.keys(ids).find(k => ids[k] === id)];
|
| 469 |
+
el.addEventListener('change', apply);
|
| 470 |
+
}
|
| 471 |
+
});
|
| 472 |
+
}
|
| 473 |
+
|
| 474 |
+
function animate() {
|
| 475 |
+
state.three.controls.update();
|
| 476 |
+
state.three.renderer.render(state.three.scene, state.three.camera);
|
| 477 |
+
requestAnimationFrame(animate);
|
| 478 |
+
}
|
| 479 |
+
|
| 480 |
+
// ββ helpers ββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 481 |
+
async function fetchJSON(url) {
|
| 482 |
+
const r = await fetch(url);
|
| 483 |
+
if (!r.ok) throw new Error(`${url}: ${r.status}`);
|
| 484 |
+
return r.json();
|
| 485 |
+
}
|
| 486 |
+
async function fetchBin(url) {
|
| 487 |
+
const r = await fetch(url);
|
| 488 |
+
if (!r.ok) throw new Error(`${url}: ${r.status}`);
|
| 489 |
+
return await r.arrayBuffer();
|
| 490 |
+
}
|
| 491 |
+
|
| 492 |
+
main().catch(e => {
|
| 493 |
+
console.error(e);
|
| 494 |
+
document.getElementById('sub').textContent = `error: ${e.message}`;
|
| 495 |
+
});
|
js/timeseries.js
ADDED
|
@@ -0,0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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Render per-frame signals (contact_l, contact_r, grasp, motion, trust) into 5 mini SVGs.
|
| 2 |
+
// Each SVG is 200x18 viewBox. We scale to 0..1 vertically (motion uses log(1+x)/log(1+max)).
|
| 3 |
+
|
| 4 |
+
const VB_W = 200, VB_H = 18;
|
| 5 |
+
|
| 6 |
+
function clearSvg(svg) {
|
| 7 |
+
while (svg.firstChild) svg.removeChild(svg.firstChild);
|
| 8 |
+
}
|
| 9 |
+
|
| 10 |
+
function pathFromSeries(values, normalize) {
|
| 11 |
+
if (!values || values.length === 0) return '';
|
| 12 |
+
const n = values.length;
|
| 13 |
+
let pts = [];
|
| 14 |
+
for (let i = 0; i < n; i++) {
|
| 15 |
+
const x = (i / Math.max(n - 1, 1)) * VB_W;
|
| 16 |
+
const v = normalize(values[i]);
|
| 17 |
+
const y = VB_H - v * VB_H;
|
| 18 |
+
pts.push(`${i === 0 ? 'M' : 'L'}${x.toFixed(2)},${y.toFixed(2)}`);
|
| 19 |
+
}
|
| 20 |
+
return pts.join(' ');
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
function fillBars(svg, values, normalize, color) {
|
| 24 |
+
// For binary trust: render as horizontal bars where True
|
| 25 |
+
const n = values.length;
|
| 26 |
+
if (n === 0) return;
|
| 27 |
+
const w = VB_W / n;
|
| 28 |
+
let i = 0;
|
| 29 |
+
while (i < n) {
|
| 30 |
+
if (values[i]) {
|
| 31 |
+
let j = i;
|
| 32 |
+
while (j < n && values[j]) j++;
|
| 33 |
+
const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
|
| 34 |
+
rect.setAttribute('x', (i * w).toFixed(2));
|
| 35 |
+
rect.setAttribute('y', '4');
|
| 36 |
+
rect.setAttribute('width', ((j - i) * w).toFixed(2));
|
| 37 |
+
rect.setAttribute('height', String(VB_H - 8));
|
| 38 |
+
rect.setAttribute('fill', color);
|
| 39 |
+
rect.setAttribute('opacity', '0.7');
|
| 40 |
+
svg.appendChild(rect);
|
| 41 |
+
i = j;
|
| 42 |
+
} else {
|
| 43 |
+
i++;
|
| 44 |
+
}
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
function drawArea(svg, values, normalize, fill, stroke) {
|
| 49 |
+
const n = values.length;
|
| 50 |
+
if (n === 0) return;
|
| 51 |
+
let pts = [`M0,${VB_H}`];
|
| 52 |
+
for (let i = 0; i < n; i++) {
|
| 53 |
+
const x = (i / Math.max(n - 1, 1)) * VB_W;
|
| 54 |
+
const v = Math.max(0, Math.min(1, normalize(values[i])));
|
| 55 |
+
const y = VB_H - v * VB_H;
|
| 56 |
+
pts.push(`L${x.toFixed(2)},${y.toFixed(2)}`);
|
| 57 |
+
}
|
| 58 |
+
pts.push(`L${VB_W},${VB_H}Z`);
|
| 59 |
+
const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
|
| 60 |
+
path.setAttribute('d', pts.join(' '));
|
| 61 |
+
path.setAttribute('fill', fill);
|
| 62 |
+
path.setAttribute('stroke', stroke);
|
| 63 |
+
path.setAttribute('stroke-width', '0.8');
|
| 64 |
+
svg.appendChild(path);
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
function addPlayhead(svg, frac) {
|
| 68 |
+
const x = frac * VB_W;
|
| 69 |
+
const line = document.createElementNS('http://www.w3.org/2000/svg', 'line');
|
| 70 |
+
line.setAttribute('x1', x.toFixed(2));
|
| 71 |
+
line.setAttribute('x2', x.toFixed(2));
|
| 72 |
+
line.setAttribute('y1', '0');
|
| 73 |
+
line.setAttribute('y2', String(VB_H));
|
| 74 |
+
line.setAttribute('class', 'signal-playhead');
|
| 75 |
+
line.setAttribute('stroke', 'var(--accent)');
|
| 76 |
+
line.setAttribute('stroke-width', '1');
|
| 77 |
+
svg.appendChild(line);
|
| 78 |
+
return line;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
export class SignalPanel {
|
| 82 |
+
constructor() {
|
| 83 |
+
this.svgs = {
|
| 84 |
+
contact_l: document.getElementById('sig-contact-l'),
|
| 85 |
+
contact_r: document.getElementById('sig-contact-r'),
|
| 86 |
+
grasp: document.getElementById('sig-grasp'),
|
| 87 |
+
motion: document.getElementById('sig-motion'),
|
| 88 |
+
trust: document.getElementById('sig-trust'),
|
| 89 |
+
};
|
| 90 |
+
this.vals = {
|
| 91 |
+
contact_l: document.getElementById('sig-val-contact-l'),
|
| 92 |
+
contact_r: document.getElementById('sig-val-contact-r'),
|
| 93 |
+
grasp: document.getElementById('sig-val-grasp'),
|
| 94 |
+
motion: document.getElementById('sig-val-motion'),
|
| 95 |
+
trust: document.getElementById('sig-val-trust'),
|
| 96 |
+
};
|
| 97 |
+
this.playheads = {};
|
| 98 |
+
this.data = null;
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
setData(timeseries) {
|
| 102 |
+
this.data = timeseries;
|
| 103 |
+
if (!timeseries) {
|
| 104 |
+
Object.values(this.svgs).forEach(clearSvg);
|
| 105 |
+
Object.values(this.vals).forEach(v => v.textContent = '-');
|
| 106 |
+
return;
|
| 107 |
+
}
|
| 108 |
+
const scene = timeseries.scene || {};
|
| 109 |
+
this._render('contact_l', scene.contact_l || [], v => v, 'rgba(217,119,87,0.25)', 'oklch(0.68 0.18 40)');
|
| 110 |
+
this._render('contact_r', scene.contact_r || [], v => v, 'rgba(106,148,96,0.25)', 'oklch(0.58 0.12 150)');
|
| 111 |
+
this._render('grasp', scene.grasp || [], v => v, 'rgba(160,88,72,0.30)', 'oklch(0.58 0.18 30)');
|
| 112 |
+
|
| 113 |
+
// motion: log scale
|
| 114 |
+
const motion = scene.motion || [];
|
| 115 |
+
const maxMotion = Math.max(1, ...motion.map(v => v || 0));
|
| 116 |
+
this._render('motion', motion, v => Math.log1p(v) / Math.log1p(maxMotion), 'rgba(120,120,160,0.22)', 'oklch(0.55 0.10 240)');
|
| 117 |
+
|
| 118 |
+
// trust: union over per-object trust booleans (if any object trusted that frame, mark trusted)
|
| 119 |
+
const perObj = timeseries.per_object || {};
|
| 120 |
+
const n = timeseries.n_frames || (motion.length || 0);
|
| 121 |
+
const trustUnion = new Array(n).fill(false);
|
| 122 |
+
Object.values(perObj).forEach(o => {
|
| 123 |
+
const arr = o.trust || [];
|
| 124 |
+
for (let i = 0; i < n; i++) if (arr[i]) trustUnion[i] = true;
|
| 125 |
+
});
|
| 126 |
+
clearSvg(this.svgs.trust);
|
| 127 |
+
fillBars(this.svgs.trust, trustUnion, v => v ? 1 : 0, 'oklch(0.68 0.18 40)');
|
| 128 |
+
// playhead overlay
|
| 129 |
+
this.playheads.trust = addPlayhead(this.svgs.trust, 0);
|
| 130 |
+
this._lastTrust = trustUnion;
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
_render(key, series, normalize, fill, stroke) {
|
| 134 |
+
const svg = this.svgs[key];
|
| 135 |
+
clearSvg(svg);
|
| 136 |
+
drawArea(svg, series, normalize, fill, stroke);
|
| 137 |
+
this.playheads[key] = addPlayhead(svg, 0);
|
| 138 |
+
}
|
| 139 |
+
|
| 140 |
+
setPlayheadFrame(frameIdx) {
|
| 141 |
+
if (!this.data) return;
|
| 142 |
+
const n = this.data.n_frames || 1;
|
| 143 |
+
const frac = Math.max(0, Math.min(1, frameIdx / Math.max(n - 1, 1)));
|
| 144 |
+
Object.values(this.playheads).forEach(line => {
|
| 145 |
+
if (!line) return;
|
| 146 |
+
const x = (frac * VB_W).toFixed(2);
|
| 147 |
+
line.setAttribute('x1', x);
|
| 148 |
+
line.setAttribute('x2', x);
|
| 149 |
+
});
|
| 150 |
+
// update value labels
|
| 151 |
+
const scene = this.data.scene || {};
|
| 152 |
+
const f = Math.max(0, Math.min(n - 1, Math.round(frameIdx)));
|
| 153 |
+
const fmt = (v) => (v == null ? '-' : (typeof v === 'number' ? v.toFixed(2) : String(v)));
|
| 154 |
+
this.vals.contact_l.textContent = fmt(scene.contact_l && scene.contact_l[f]);
|
| 155 |
+
this.vals.contact_r.textContent = fmt(scene.contact_r && scene.contact_r[f]);
|
| 156 |
+
this.vals.grasp.textContent = fmt(scene.grasp && scene.grasp[f]);
|
| 157 |
+
this.vals.motion.textContent = fmt(scene.motion && scene.motion[f]);
|
| 158 |
+
this.vals.trust.textContent = (this._lastTrust && this._lastTrust[f]) ? 'yes' : 'no';
|
| 159 |
+
}
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
// βββ Per-object state timeline (static / grasped / moving) ββββββββ
|
| 164 |
+
// Rendered into #state-timeline-rows from signals.json.per_object[oid].state
|
| 165 |
+
// One row per object: prompt label + horizontal SVG strip + per-frame value.
|
| 166 |
+
// Colors must match the .state-chip classes in styles.css.
|
| 167 |
+
|
| 168 |
+
const STATE_COLOR = {
|
| 169 |
+
static: 'oklch(0.78 0.01 240)', // light gray
|
| 170 |
+
grasped_l: 'oklch(0.70 0.16 50)', // warm orange = left hand
|
| 171 |
+
grasped_r: 'oklch(0.60 0.20 20)', // red-orange = right hand
|
| 172 |
+
grasped_both: 'oklch(0.42 0.20 15)', // deep red = both hands
|
| 173 |
+
moving: 'oklch(0.55 0.10 240)', // cool blue
|
| 174 |
+
// back-compat: clips processed before the L/R split write plain "grasped"
|
| 175 |
+
grasped: 'oklch(0.58 0.18 30)',
|
| 176 |
+
};
|
| 177 |
+
|
| 178 |
+
export class StateTimelinePanel {
|
| 179 |
+
constructor() {
|
| 180 |
+
this.container = document.getElementById('state-timeline-rows');
|
| 181 |
+
this.rows = []; // [{oid, svg, valEl, playhead, states}]
|
| 182 |
+
this.nFrames = 0;
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
setData(timeseries, scene) {
|
| 186 |
+
if (!this.container) return;
|
| 187 |
+
this.container.innerHTML = '';
|
| 188 |
+
this.rows = [];
|
| 189 |
+
this.nFrames = (timeseries && timeseries.n_frames) || 0;
|
| 190 |
+
|
| 191 |
+
const perObj = (timeseries && timeseries.per_object) || {};
|
| 192 |
+
const objs = (scene && scene.reconstruction && scene.reconstruction.objects) || [];
|
| 193 |
+
|
| 194 |
+
// Need at least one object with a state array to render anything
|
| 195 |
+
const haveState = Object.values(perObj).some(o => Array.isArray(o.state));
|
| 196 |
+
if (!haveState) {
|
| 197 |
+
const empty = document.createElement('div');
|
| 198 |
+
empty.style.cssText = 'font-size:10px;color:var(--ink-3);padding:4px 0;';
|
| 199 |
+
empty.textContent = 'No state data; clip may pre-date the state-machine refresh.';
|
| 200 |
+
this.container.appendChild(empty);
|
| 201 |
+
return;
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
objs.forEach(o => {
|
| 205 |
+
const oidKey = String(o.id);
|
| 206 |
+
const po = perObj[oidKey] || {};
|
| 207 |
+
const states = po.state || [];
|
| 208 |
+
if (!states.length) return;
|
| 209 |
+
|
| 210 |
+
const row = document.createElement('div');
|
| 211 |
+
row.className = 'state-row';
|
| 212 |
+
|
| 213 |
+
const label = document.createElement('div');
|
| 214 |
+
label.className = 'state-label';
|
| 215 |
+
label.style.color = o.color_hex || 'inherit';
|
| 216 |
+
label.title = o.prompt || `obj ${o.id}`;
|
| 217 |
+
label.textContent = (o.prompt || `obj ${o.id}`).slice(0, 18);
|
| 218 |
+
row.appendChild(label);
|
| 219 |
+
|
| 220 |
+
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
| 221 |
+
svg.setAttribute('preserveAspectRatio', 'none');
|
| 222 |
+
svg.setAttribute('viewBox', `0 0 ${VB_W} ${VB_H}`);
|
| 223 |
+
// Paint segments
|
| 224 |
+
const n = states.length;
|
| 225 |
+
let i = 0;
|
| 226 |
+
const w = VB_W / Math.max(n, 1);
|
| 227 |
+
while (i < n) {
|
| 228 |
+
const s = states[i];
|
| 229 |
+
let j = i;
|
| 230 |
+
while (j < n && states[j] === s) j++;
|
| 231 |
+
const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
|
| 232 |
+
rect.setAttribute('x', (i * w).toFixed(2));
|
| 233 |
+
rect.setAttribute('y', '2');
|
| 234 |
+
rect.setAttribute('width', ((j - i) * w).toFixed(2));
|
| 235 |
+
rect.setAttribute('height', String(VB_H - 4));
|
| 236 |
+
rect.setAttribute('fill', STATE_COLOR[s] || 'oklch(0.78 0.01 240)');
|
| 237 |
+
svg.appendChild(rect);
|
| 238 |
+
i = j;
|
| 239 |
+
}
|
| 240 |
+
const playhead = addPlayhead(svg, 0);
|
| 241 |
+
row.appendChild(svg);
|
| 242 |
+
|
| 243 |
+
const valEl = document.createElement('div');
|
| 244 |
+
valEl.className = 'state-value';
|
| 245 |
+
valEl.textContent = '-';
|
| 246 |
+
row.appendChild(valEl);
|
| 247 |
+
|
| 248 |
+
this.container.appendChild(row);
|
| 249 |
+
this.rows.push({ oid: o.id, svg, valEl, playhead, states });
|
| 250 |
+
});
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
setPlayheadFrame(frameIdx) {
|
| 254 |
+
if (!this.rows.length) return;
|
| 255 |
+
const n = this.nFrames || 1;
|
| 256 |
+
const frac = Math.max(0, Math.min(1, frameIdx / Math.max(n - 1, 1)));
|
| 257 |
+
const x = (frac * VB_W).toFixed(2);
|
| 258 |
+
const f = Math.max(0, Math.min(n - 1, Math.round(frameIdx)));
|
| 259 |
+
for (const r of this.rows) {
|
| 260 |
+
if (r.playhead) {
|
| 261 |
+
r.playhead.setAttribute('x1', x);
|
| 262 |
+
r.playhead.setAttribute('x2', x);
|
| 263 |
+
}
|
| 264 |
+
r.valEl.textContent = r.states[f] || '-';
|
| 265 |
+
}
|
| 266 |
+
}
|
| 267 |
+
}
|
stats/ngrams.png
ADDED
|
Git LFS Details
|
stats/sunburst_categories.png
ADDED
|
Git LFS Details
|
stats/word_cloud.png
ADDED
|
Git LFS Details
|
style.css
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
body {
|
| 2 |
+
padding: 2rem;
|
| 3 |
+
font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
|
| 4 |
+
}
|
| 5 |
+
|
| 6 |
+
h1 {
|
| 7 |
+
font-size: 16px;
|
| 8 |
+
margin-top: 0;
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
p {
|
| 12 |
+
color: rgb(107, 114, 128);
|
| 13 |
+
font-size: 15px;
|
| 14 |
+
margin-bottom: 10px;
|
| 15 |
+
margin-top: 5px;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
.card {
|
| 19 |
+
max-width: 620px;
|
| 20 |
+
margin: 0 auto;
|
| 21 |
+
padding: 16px;
|
| 22 |
+
border: 1px solid lightgray;
|
| 23 |
+
border-radius: 16px;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
.card p:last-child {
|
| 27 |
+
margin-bottom: 0;
|
| 28 |
+
}
|
viser-client/index.html
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|