Jack Monas commited on
Commit
c00d4f9
·
1 Parent(s): bc53ed2
Files changed (1) hide show
  1. app.py +163 -329
app.py CHANGED
@@ -5,66 +5,10 @@ import glob
5
  import os
6
  import random
7
 
8
- def sidebar_toc():
9
- toc_html = """
10
- <style>
11
- .toc-container {
12
- padding: 10px;
13
- background-color: #1f1f1f;
14
- border-radius: 8px;
15
- margin: 10px 0;
16
- }
17
- .toc-title {
18
- color: #ffffff;
19
- font-size: 18px;
20
- font-weight: bold;
21
- margin-bottom: 10px;
22
- }
23
- .toc-list {
24
- list-style: none;
25
- padding: 0;
26
- }
27
- .toc-item {
28
- margin: 8px 0;
29
- }
30
- .toc-item a {
31
- text-decoration: none;
32
- color: #cccccc;
33
- font-size: 14px;
34
- transition: color 0.2s ease, padding-left 0.2s ease;
35
- }
36
- .toc-item a:hover {
37
- color: #ffffff;
38
- padding-left: 5px;
39
- }
40
- </style>
41
- <div class="toc-container">
42
- <div class="toc-title">Table of Contents</div>
43
- <ul class="toc-list">
44
- <li class="toc-item"><a href="#welcome" onclick="scrollToSection('welcome')">Welcome</a></li>
45
- <li class="toc-item"><a href="#motivation" onclick="scrollToSection('motivation')">Motivation</a></li>
46
- <li class="toc-item"><a href="#the-challenges" onclick="scrollToSection('the-challenges')">Challenges</a></li>
47
- <li class="toc-item"><a href="#datasets" onclick="scrollToSection('datasets')">Datasets</a></li>
48
- <li class="toc-item"><a href="#scoring" onclick="scrollToSection('scoring')">Scoring</a></li>
49
- <li class="toc-item"><a href="#rules" onclick="scrollToSection('rules')">Rules</a></li>
50
- <li class="toc-item"><a href="#faqs" onclick="scrollToSection('faqs')">FAQs</a></li>
51
- <li class="toc-item"><a href="#data--research-requests" onclick="scrollToSection('data--research-requests')">Data Requests</a></li>
52
- <li class="toc-item"><a href="#additional-resources" onclick="scrollToSection('additional-resources')">Resources</a></li>
53
- </ul>
54
- </div>
55
- <script>
56
- function scrollToSection(sectionId) {
57
- document.getElementById(sectionId).scrollIntoView({ behavior: 'smooth' });
58
- }
59
- </script>
60
- """
61
- st.sidebar.markdown(toc_html, unsafe_allow_html=True)
62
 
63
  def resources_section():
64
  st.markdown("## Additional Resources")
65
  st.write("For more information and updates, explore our blog posts or join our community channels:")
66
-
67
- # Define a custom HTML string to create dark-themed card-style links in a flexbox layout
68
  resources_html = """
69
  <style>
70
  .resource-cards {
@@ -74,7 +18,7 @@ def resources_section():
74
  margin-top: 10px;
75
  }
76
  .resource-card {
77
- background-color: #1f1f1f; /* Dark card background */
78
  border: 1px solid #333333;
79
  border-radius: 6px;
80
  width: 220px;
@@ -96,322 +40,212 @@ def resources_section():
96
  }
97
  .resource-card a {
98
  text-decoration: none;
99
- color: inherit; /* Inherits card's text color */
100
  }
101
  </style>
102
-
103
  <div class="resource-cards">
104
- <!-- Phase 1 Blog Post -->
105
  <a href="https://www.1x.tech/discover/1x-world-model" target="_blank" class="resource-card">
106
  <h4>Phase 1 Blog Post</h4>
107
  <p>World Model Challenge Launch</p>
108
  </a>
109
-
110
- <!-- Phase 2 Blog Post -->
111
  <a href="https://www.1x.tech/discover/1x-world-model-sampling-challenge" target="_blank" class="resource-card">
112
  <h4>Phase 2 Blog Post</h4>
113
  <p>Challenge Updates</p>
114
  </a>
115
-
116
- <!-- GitHub -->
117
  <a href="https://github.com/1x-technologies/world-model-challenge" target="_blank" class="resource-card">
118
  <h4>GitHub Repository</h4>
119
  <p>View code and issues</p>
120
  </a>
121
-
122
- <!-- Hugging Face -->
123
  <a href="https://huggingface.co/1x-technologies" target="_blank" class="resource-card">
124
  <h4>Hugging Face Repository</h4>
125
  <p>Datasets and Models</p>
126
  </a>
127
-
128
- <!-- Discord -->
129
  <a href="https://discord.gg/your-invite" target="_blank" class="resource-card">
130
  <h4>Discord Channel</h4>
131
  <p>Join the discussion</p>
132
  </a>
133
  </div>
134
  """
135
-
136
  st.markdown(resources_html, unsafe_allow_html=True)
137
 
138
  def scoring_section():
139
- # Title
140
  st.markdown("## Scoring")
141
-
142
- # Intro text
143
- st.write(
144
- "We weight performance across all three challenges, placing additional emphasis on the Evaluation Challenge. "
145
- "Each team's final rank is determined by the total points they accumulate from Compression, Sampling, and Evaluation."
146
- )
147
-
148
- # Points Breakdown in a table
149
  st.markdown("### Points Breakdown")
150
- # Create three columns for a more interesting layout
151
  col1, col2, col3 = st.columns(3)
152
-
153
  with col1:
154
  st.markdown('<h3 style="margin-left:15px;">Compression</h3>', unsafe_allow_html=True)
155
- st.markdown(
156
- """
157
- - **1st Place**: 10 points
158
- - **2nd Place**: 7 points
159
- - **3rd Place**: 5 points
160
- """
161
- )
162
-
163
  with col2:
164
  st.markdown('<h3 style="margin-left:15px;">Sampling</h3>', unsafe_allow_html=True)
165
- st.markdown(
166
- """
167
- - **1st Place**: 10 points
168
- - **2nd Place**: 7 points
169
- - **3rd Place**: 5 points
170
- """
171
- )
172
-
173
  with col3:
174
  st.markdown('<h3 style="margin-left:15px;">Evaluation</h3>', unsafe_allow_html=True)
175
- st.markdown(
176
- """
177
- - **1st Place**: 20 points
178
- - **2nd Place**: 14 points
179
- - **3rd Place**: 10 points
180
- """
181
- )
182
- # Tie-Breakers in an expander for a cleaner layout
183
  with st.expander("Tie-Breakers"):
184
- st.write(
185
- "The overall winner will be the team with the highest total points. "
186
- "In the event of a tie, the following tie-breakers will be applied in order:\n\n"
187
- "1. Highest Evaluation Challenge score\n"
188
- "2. Highest Sampling Challenge score\n"
189
- "3. Highest Compression Challenge score\n\n"
190
- )
191
 
192
- # Overall Leaderboard Section
193
- st.write(
194
- "The leaderboard, which shows the total points across all challenges, will go live on **March 10th**. "
195
- "Additionally, each challenge—**Compression**, **Sampling**, and **Evaluation**—will have its own leaderboard on their "
196
- "respective Hugging Face submission servers."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
  )
198
-
199
-
200
 
201
  def main():
202
- st.set_page_config(page_title="1X World Model Challenge")
203
- sidebar_toc()
204
- st.title("1X World Model Challenge")
205
- st.markdown("## Welcome")
206
- st.write(
207
- "Welcome to the 1X World Model Challenge. This platform hosts three challenges "
208
- "designed to advance research in world models for robotics: Compression, Sampling, and Evaluation."
209
- )
210
- st.write(
211
- "In partnership with Open Drive Lab, we are launching this challenge as part of the [Autonomous Grand Challenge 2025](https://opendrivelab.com/challenge2025/), held in conjunction with the CVPR 2025 (confirmed) and ICCV 2025 (tentative) workshops. With a total cash prize pool of up to USD 100,000, individual track awards exceeding USD 15,000, and travel grants available, we invite you to push the boundaries of robotics research and simulation."
212
- )
213
-
214
- st.markdown("---")
215
-
216
- st.markdown("## Motivation")
217
- st.write(
218
- "Real-world robotics faces a fundamental challenge: environments are dynamic and change over time, "
219
- "making consistent evaluation of policy performance difficult. Driven by recent advances in video generation, **world models** offer a solution by "
220
- "learning to simulate complex real-world interactions from image tokens paired with action data. We believe these learned simulators will enable "
221
- "robust evaluation and iterative improvement of robot policies without the constraints of a physical testbed."
222
- )
223
- st.image(
224
- "assets/model_performance_over_time.webp",
225
- caption="An example T-shirt folding model we trained that degrades in performance over the course of 50 days.",
226
- use_container_width=True
227
- )
228
- st.markdown("---")
229
-
230
- st.markdown("## The Challenges")
231
-
232
- st.write(
233
- "To accelerate reseach in this area, we've launched the 1X World Model Challenge. In this competition, your tasks will be center around predicting future first-person observations of the [EVE Android](https://www.1x.tech/eve) with the ultimate goal of solving policy evaluation."
234
- )
235
-
236
- st.markdown("#### Compression Challenge")
237
- st.write(
238
- "In the Compression Challenge, your task is to train a model to compress our robots logs effectively while preserving the critical details needed to understand and predict future interactions. Success in this challenge is measured by the loss of your model—the lower the loss, the better your model captures the complexities of real-world robot behavior."
239
- )
240
-
241
- st.markdown("#### Sampling Challenge")
242
- st.write(
243
- "In the Sampling Challenge, your task is to predict a future video frame two seconds in the future given a short clip of robot interactions. The goal is to produce a coherent and plausible continuation of the video, which accurately reflects the dynamics of the scene. Your submission will be judged on how closely it matches the actual frame."
244
- )
245
-
246
- st.markdown("#### Evaluation Challenge")
247
- st.write(
248
- "The Evaluation Challenge tackles the ultimate question: Can you predict a robot's performance in the real world without physically deploying it? In this challenge, you will be provided with many different policies for a specific task. Your task is to rank these policies according to their expected real-world performance. This ranking will be compared with the actual ranking of the policies."
249
- )
250
-
251
- st.markdown("**Note:** Links to the evaluation servers will be released on March 1st.")
252
-
253
- st.markdown("---")
254
-
255
-
256
- st.markdown("## Datasets")
257
- st.write(
258
- "We provide two datasets to support the 1X World Model Challenge:\n\n"
259
- "**Raw Data:** The [world_model_raw_data](https://huggingface.co/datasets/1x-technologies/world_model_raw_data) dataset "
260
- "provides raw sensor data, video logs, and annotated robot state sequences gathered from diverse real-world scenarios. "
261
- "This dataset is split into 100 shards—each containing a 512x512 MP4 video, a segment index mapping, and state arrays—"
262
- "and is licensed under CC-BY-NC-SA 4.0.\n\n"
263
- "**Tokenized Data:** The [world_model_tokenized_data](https://huggingface.co/datasets/1x-technologies/world_model_tokenized_data) dataset "
264
- "tokenizes the raw video sequences generated using the NVIDIA Cosmos Tokenizer. This compact representation of the raw data "
265
- "is optimal for the compression challenge and is released under the Apache 2.0 license.\n\n"
266
- )
267
-
268
- gif_folder = "assets/v1.0"
269
-
270
- # Get all GIF file paths from the folder, sorted by name
271
- gif_paths = glob.glob(os.path.join(gif_folder, "*.gif"))
272
- random.shuffle(gif_paths)
273
-
274
- # Display 4 GIFs per row
275
- for i in range(0, 16, 4):
276
- # Slice out a batch of 4 GIFs
277
- row_gifs = gif_paths[i:i+4]
278
-
279
- # Create columns for this row
280
- cols = st.columns(min(len(row_gifs), 4))
281
- # Display each GIF in its own column
282
- for col, gif_path in zip(cols, row_gifs):
283
- col.image(gif_path, use_container_width=True)
284
-
285
-
286
- st.markdown("---")
287
-
288
-
289
- scoring_section()
290
-
291
- def display_faq(question, answer):
292
- st.markdown(
293
- f"""
294
- <div style="
295
- padding: 12px;
296
- margin-bottom: 12px;
297
- background-color: #0d1b2a;
298
- border-radius: 8px;
299
- border: 1px solid #0d1b2a;">
300
- <p style="font-weight: bold; margin: 0 0 4px 0; color: #ffffff;">{question}</p>
301
- <p style="margin: 0; color: #ffffff;">{answer}</p>
302
- </div>
303
- """,
304
- unsafe_allow_html=True
305
- )
306
- st.markdown("---")
307
-
308
- st.markdown("## Rules")
309
- st.markdown(
310
- """
311
- **General Guidelines:**
312
- - The use of publicly available datasets and pretrained weights is allowed. The use of private datasets or pretrained weights is prohibited.
313
- - You may use future actions to guide your frame predictions, but you must not use any actual future frames during inference.
314
- - There is no limit on the inference time for any of the challenges.
315
- - Naive nearest-neighbor retrieval combined with seeking ahead to the next frames from the training set may yield reasonable performance but is not permitted in solutions.
316
-
317
- **Submissions:**
318
- - All submissions must be reproducible. Please expect to include code, configuration files, and any necessary instructions to replicate your results.
319
- - The leaderboard will display results on a public test set. However, the final winner will be determined based on performance on a private test set.
320
-
321
- **Eligibility:**
322
- - Prizes cannot be awarded to individuals in U.S. sanctioned countries. We reserve the right to withhold prizes if a submission violates the spirit of the challenge.
323
- """,
324
- unsafe_allow_html=True
325
- )
326
-
327
- st.markdown("**Note:** Each challenge has additional rules, which will be released when the challenges officially launch on March 1st.")
328
- st.markdown("---")
329
-
330
-
331
- st.markdown("## Already Started Working on These Challenges?")
332
- st.write(
333
- """
334
- Before partnering with Open Drive Lab to launch the World Model Challenge at CVPR 2025 and (tentatively) ICCV 2025, we had already released the Compression and Sampling challenges publicly, offering $10K for each. However, due to the rapid progress in the field, we have updated our competitions.
335
-
336
- For the Compression Challenge, we initially used the MAGVIT spatial tokenizer to compare participant losses. We are now switching to the highly performant Cosmos spatial-temporal tokenizer as our new standard.
337
-
338
- For the Sampling Challenge, the requirement has changed from predicting a frame 0.5 seconds in the future to predicting a frame 2 seconds ahead, in order to encourage more robust solutions.
339
-
340
- Additionally, a previous rule prohibited the use of future actions to condition frame predictions; this restriction has been lifted, and using future actions is now allowed.
341
-
342
- Please note that we will continue to honor solutions for the Compression Challenge $10K award submitted using the MAGVIT tokenizer—if you achieve a loss below 8.0 on our held-out test set—for six months from March 1, 2025. However, these solutions will not be eligible for the CVPR or ICCV competitions.
343
- """
344
- )
345
-
346
- st.markdown("---")
347
-
348
- st.markdown("## FAQs")
349
-
350
- with st.expander("How should I preprocess the dataset?"):
351
- st.write(
352
- "The raw data in the `world_model_raw_data` dataset is provided as-is, with no additional preprocessing. "
353
- "You are free to apply your own steps—such as resizing, normalization, or augmentation—but please document all preprocessing methods in your technical report."
354
- )
355
-
356
- with st.expander("What output format is expected for predictions?"):
357
- st.write(
358
- "For the Sampling Challenge, your model should output a predicted video frame in RGB format at a resolution of 512×512 pixels. "
359
- "For the Evaluation Challenge, you should submit a ranked list of the provided policies based on their expected real-world performance."
360
- )
361
-
362
- with st.expander("What evaluation metrics will be used?"):
363
- st.write(
364
- "The Compression Challenge is evaluated by the model's loss (e.g., cross-entropy or mean squared error). "
365
- "The Sampling Challenge will use image quality metrics like PSNR and SSIM, while the Evaluation Challenge is assessed by comparing your ranking "
366
- "against the ground-truth ranking using correlation metrics such as Spearman's rho."
367
- )
368
-
369
- with st.expander("Are there restrictions on using future frames or actions?"):
370
- st.write(
371
- "You are allowed to use future actions to condition your frame predictions, but you must not use any actual future frames during inference."
372
- )
373
-
374
- with st.expander("Can I modify the baseline models?"):
375
- st.write(
376
- "Yes, you are encouraged to enhance the provided baseline models. However, any modifications must be thoroughly documented in your technical report, "
377
- "and your final submission must be fully reproducible."
378
- )
379
-
380
- with st.expander("How do I ensure my submission is reproducible?"):
381
- st.write(
382
- "Include complete code, configuration files, and clear instructions for running your model. Non-reproducible submissions may be disqualified."
383
- )
384
-
385
- with st.expander("Is there a limit on model size or inference time?"):
386
- st.write(
387
- "There are no strict limits on model size or inference time, but solutions will be evaluated on both performance and efficiency."
388
- )
389
-
390
- with st.expander("What if I submit a Compression Challenge solution using the old tokenizer?"):
391
- st.write(
392
- "Solutions using the MAGVIT tokenizer that achieve a loss below 8.0 on our held-out test set will continue to be honored for the $10K award "
393
- "for six months from March 1, 2025. However, these submissions will not be eligible for the CVPR/ICCV competitions, which will use the Cosmos tokenizer as the standard."
394
- )
395
 
 
 
 
396
 
397
- st.markdown("---")
398
-
399
- st.markdown("## Data & Research Requests")
400
- st.markdown(
401
- """
402
- Beyond the World Model Challenge, we also want to make the challenges and datasets more useful for your research questions.
403
- Want more data interacting with humans? More safety-critical tasks like carrying cups of hot coffee without spilling?
404
- More dexterous tool use? Robots working with other robots? Robots dressing themselves in the mirror?
405
- Think of 1X as the operations team for getting you high-quality humanoid data in extremely diverse scenarios.
406
-
407
- Email [[email protected]](mailto:[email protected]) with your requests (and why you think the data is important) and we will try to include it in a future data release.
408
- You can also discuss your data questions with the community on Discord.
409
- """
410
- )
411
- st.markdown("---")
412
- resources_section()
413
-
414
 
 
 
415
 
416
- if __name__ == '__main__':
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
417
  main()
 
5
  import os
6
  import random
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
  def resources_section():
10
  st.markdown("## Additional Resources")
11
  st.write("For more information and updates, explore our blog posts or join our community channels:")
 
 
12
  resources_html = """
13
  <style>
14
  .resource-cards {
 
18
  margin-top: 10px;
19
  }
20
  .resource-card {
21
+ background-color: #1f1f1f;
22
  border: 1px solid #333333;
23
  border-radius: 6px;
24
  width: 220px;
 
40
  }
41
  .resource-card a {
42
  text-decoration: none;
43
+ color: inherit;
44
  }
45
  </style>
 
46
  <div class="resource-cards">
 
47
  <a href="https://www.1x.tech/discover/1x-world-model" target="_blank" class="resource-card">
48
  <h4>Phase 1 Blog Post</h4>
49
  <p>World Model Challenge Launch</p>
50
  </a>
 
 
51
  <a href="https://www.1x.tech/discover/1x-world-model-sampling-challenge" target="_blank" class="resource-card">
52
  <h4>Phase 2 Blog Post</h4>
53
  <p>Challenge Updates</p>
54
  </a>
 
 
55
  <a href="https://github.com/1x-technologies/world-model-challenge" target="_blank" class="resource-card">
56
  <h4>GitHub Repository</h4>
57
  <p>View code and issues</p>
58
  </a>
 
 
59
  <a href="https://huggingface.co/1x-technologies" target="_blank" class="resource-card">
60
  <h4>Hugging Face Repository</h4>
61
  <p>Datasets and Models</p>
62
  </a>
 
 
63
  <a href="https://discord.gg/your-invite" target="_blank" class="resource-card">
64
  <h4>Discord Channel</h4>
65
  <p>Join the discussion</p>
66
  </a>
67
  </div>
68
  """
 
69
  st.markdown(resources_html, unsafe_allow_html=True)
70
 
71
  def scoring_section():
 
72
  st.markdown("## Scoring")
73
+ st.write("We weight performance across all three challenges, placing additional emphasis on the Evaluation Challenge. Each team's final rank is determined by the total points they accumulate from Compression, Sampling, and Evaluation.")
 
 
 
 
 
 
 
74
  st.markdown("### Points Breakdown")
 
75
  col1, col2, col3 = st.columns(3)
 
76
  with col1:
77
  st.markdown('<h3 style="margin-left:15px;">Compression</h3>', unsafe_allow_html=True)
78
+ st.markdown("- **1st Place**: 10 points\n- **2nd Place**: 7 points\n- **3rd Place**: 5 points")
 
 
 
 
 
 
 
79
  with col2:
80
  st.markdown('<h3 style="margin-left:15px;">Sampling</h3>', unsafe_allow_html=True)
81
+ st.markdown("- **1st Place**: 10 points\n- **2nd Place**: 7 points\n- **3rd Place**: 5 points")
 
 
 
 
 
 
 
82
  with col3:
83
  st.markdown('<h3 style="margin-left:15px;">Evaluation</h3>', unsafe_allow_html=True)
84
+ st.markdown("- **1st Place**: 20 points\n- **2nd Place**: 14 points\n- **3rd Place**: 10 points")
 
 
 
 
 
 
 
85
  with st.expander("Tie-Breakers"):
86
+ st.write("The overall winner will be the team with the highest total points. In the event of a tie, tie-breakers are applied in order:\n1. Highest Evaluation Challenge score\n2. Highest Sampling Challenge score\n3. Highest Compression Challenge score")
87
+ st.write("The leaderboard, showing total points across all challenges, will go live on **March 10th**. Each challenge—**Compression**, **Sampling**, and **Evaluation**—will have its own leaderboard on their respective Hugging Face submission servers.")
 
 
 
 
 
88
 
89
+ def floating_toc(selected_section):
90
+ toc_html = """
91
+ <style>
92
+ .toc-container {
93
+ position: fixed;
94
+ top: 20px;
95
+ left: 20px;
96
+ width: 200px;
97
+ background-color: #1f1f1f;
98
+ border-radius: 8px;
99
+ padding: 10px;
100
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
101
+ z-index: 1000;
102
+ }
103
+ .toc-title {
104
+ color: #ffffff;
105
+ font-size: 16px;
106
+ font-weight: bold;
107
+ margin-bottom: 8px;
108
+ }
109
+ .toc-list {
110
+ list-style: none;
111
+ padding: 0;
112
+ }
113
+ .toc-item {
114
+ margin: 6px 0;
115
+ }
116
+ .toc-item a {
117
+ text-decoration: none;
118
+ color: #cccccc;
119
+ font-size: 13px;
120
+ transition: color 0.2s ease;
121
+ }
122
+ .toc-item a:hover {
123
+ color: #ffffff;
124
+ }
125
+ .toc-item.selected a {
126
+ color: #ffffff;
127
+ font-weight: bold;
128
+ }
129
+ </style>
130
+ <div class="toc-container">
131
+ <div class="toc-title">Table of Contents</div>
132
+ <ul class="toc-list">
133
+ <li class="toc-item {welcome_class}"><a href="#">Welcome</a></li>
134
+ <li class="toc-item {motivation_class}"><a href="#">Motivation</a></li>
135
+ <li class="toc-item {challenges_class}"><a href="#">Challenges</a></li>
136
+ <li class="toc-item {datasets_class}"><a href="#">Datasets</a></li>
137
+ <li class="toc-item {scoring_class}"><a href="#">Scoring</a></li>
138
+ <li class="toc-item {rules_class}"><a href="#">Rules</a></li>
139
+ <li class="toc-item {faqs_class}"><a href="#">FAQs</a></li>
140
+ <li class="toc-item {data_requests_class}"><a href="#">Data Requests</a></li>
141
+ <li class="toc-item {resources_class}"><a href="#">Resources</a></li>
142
+ </ul>
143
+ </div>
144
+ """.format(
145
+ welcome_class="selected" if selected_section == "Welcome" else "",
146
+ motivation_class="selected" if selected_section == "Motivation" else "",
147
+ challenges_class="selected" if selected_section == "Challenges" else "",
148
+ datasets_class="selected" if selected_section == "Datasets" else "",
149
+ scoring_class="selected" if selected_section == "Scoring" else "",
150
+ rules_class="selected" if selected_section == "Rules" else "",
151
+ faqs_class="selected" if selected_section == "FAQs" else "",
152
+ data_requests_class="selected" if selected_section == "Data Requests" else "",
153
+ resources_class="selected" if selected_section == "Resources" else ""
154
  )
155
+ st.markdown(toc_html, unsafe_allow_html=True)
 
156
 
157
  def main():
158
+ st.set_page_config(page_title="1X World Model Challenge", layout="wide")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
 
160
+ # Navigation state
161
+ if "section" not in st.session_state:
162
+ st.session_state.section = "Welcome"
163
 
164
+ # TOC with clickable buttons
165
+ sections = ["Welcome", "Motivation", "Challenges", "Datasets", "Scoring", "Rules", "FAQs", "Data Requests", "Resources"]
166
+ def set_section(section):
167
+ st.session_state.section = section
 
 
 
 
 
 
 
 
 
 
 
 
 
168
 
169
+ # Display floating TOC
170
+ floating_toc(st.session_state.section)
171
 
172
+ # Main content with navigation
173
+ col1, col2 = st.columns([1, 4]) # TOC takes 1/5, content takes 4/5
174
+ with col1:
175
+ st.empty() # Placeholder to push content away from TOC
176
+ with col2:
177
+ if st.session_state.section == "Welcome":
178
+ st.title("1X World Model Challenge")
179
+ st.markdown("## Welcome")
180
+ st.write("Welcome to the 1X World Model Challenge. This platform hosts three challenges designed to advance research in world models for robotics: Compression, Sampling, and Evaluation.")
181
+ st.write("In partnership with Open Drive Lab, we are launching this challenge as part of the [Autonomous Grand Challenge 2025](https://opendrivelab.com/challenge2025/).")
182
+ st.button("Next: Motivation", on_click=set_section, args=("Motivation",))
183
+
184
+ elif st.session_state.section == "Motivation":
185
+ st.markdown("## Motivation")
186
+ st.write("Real-world robotics faces a fundamental challenge: environments are dynamic and change over time...")
187
+ st.image("assets/model_performance_over_time.webp", caption="An example T-shirt folding model...", use_container_width=True)
188
+ st.button("Next: Challenges", on_click=set_section, args=("Challenges",))
189
+
190
+ elif st.session_state.section == "Challenges":
191
+ st.markdown("## The Challenges")
192
+ st.write("To accelerate research in this area, we've launched the 1X World Model Challenge...")
193
+ st.markdown("#### Compression Challenge")
194
+ st.write("In the Compression Challenge, your task is to train a model to compress our robot logs effectively...")
195
+ st.markdown("#### Sampling Challenge")
196
+ st.write("In the Sampling Challenge, your task is to predict a future video frame two seconds in the future...")
197
+ st.markdown("#### Evaluation Challenge")
198
+ st.write("The Evaluation Challenge tackles the ultimate question: Can you predict a robot's performance...")
199
+ st.button("Next: Datasets", on_click=set_section, args=("Datasets",))
200
+
201
+ elif st.session_state.section == "Datasets":
202
+ st.markdown("## Datasets")
203
+ st.write("We provide two datasets to support the 1X World Model Challenge...")
204
+ gif_folder = "assets/v1.0"
205
+ gif_paths = glob.glob(os.path.join(gif_folder, "*.gif"))
206
+ random.shuffle(gif_paths)
207
+ for i in range(0, 16, 4):
208
+ row_gifs = gif_paths[i:i+4]
209
+ cols = st.columns(len(row_gifs))
210
+ for col, gif_path in zip(cols, row_gifs):
211
+ col.image(gif_path, use_container_width=True)
212
+ st.button("Next: Scoring", on_click=set_section, args=("Scoring",))
213
+
214
+ elif st.session_state.section == "Scoring":
215
+ scoring_section()
216
+ st.button("Next: Rules", on_click=set_section, args=("Rules",))
217
+
218
+ elif st.session_state.section == "Rules":
219
+ st.markdown("## Rules")
220
+ st.markdown("""
221
+ **General Guidelines:**
222
+ - The use of publicly available datasets and pretrained weights is allowed...
223
+ """)
224
+ st.button("Next: FAQs", on_click=set_section, args=("FAQs",))
225
+
226
+ elif st.session_state.section == "FAQs":
227
+ st.markdown("## FAQs")
228
+ def display_faq(question, answer):
229
+ st.markdown(f"""
230
+ <div style="padding: 12px; margin-bottom: 12px; background-color: #0d1b2a; border-radius: 8px; border: 1px solid #0d1b2a;">
231
+ <p style="font-weight: bold; margin: 0 0 4px 0; color: #ffffff;">{question}</p>
232
+ <p style="margin: 0; color: #ffffff;">{answer}</p>
233
+ </div>
234
+ """, unsafe_allow_html=True)
235
+ display_faq("What preprocessing steps are applied to the raw data, and can we apply our own?",
236
+ "The raw data in the `world_model_raw_data` dataset includes unprocessed 512x512 MP4 video logs...")
237
+ # Add other FAQs...
238
+ st.button("Next: Data Requests", on_click=set_section, args=("Data Requests",))
239
+
240
+ elif st.session_state.section == "Data Requests":
241
+ st.markdown("## Data & Research Requests")
242
+ st.markdown("""
243
+ Beyond the World Model Challenge, we also want to make the challenges and datasets more useful...
244
+ """)
245
+ st.button("Next: Resources", on_click=set_section, args=("Resources",))
246
+
247
+ elif st.session_state.section == "Resources":
248
+ resources_section()
249
+
250
+ if __name__ == "__main__":
251
  main()