File size: 11,262 Bytes
992d47a
29924b3
4b7e1bc
4cedfff
 
3aac702
4b7e1bc
e530d5a
 
0a7536d
e530d5a
 
 
 
 
 
 
 
 
 
c00d4f9
e530d5a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c00d4f9
e530d5a
 
 
c5472a2
06b53c4
e530d5a
 
c5472a2
06b53c4
 
e530d5a
 
87626f0
e530d5a
 
 
87626f0
e530d5a
 
 
 
 
 
 
 
 
 
4b7e1bc
03997d7
c00d4f9
71cede3
ca1fd84
 
 
c00d4f9
ca1fd84
 
c00d4f9
ca1fd84
 
c00d4f9
4b7e1bc
c00d4f9
 
4b7e1bc
c00d4f9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80e3dd0
c00d4f9
4b7e1bc
 
c00d4f9
f3b18f0
c00d4f9
 
 
4b7e1bc
c00d4f9
 
 
 
03e5818
c00d4f9
 
ffaf105
c00d4f9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4b7e1bc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
import streamlit as st
import pandas as pd
import streamlit.components.v1 as components
import glob 
import os
import random


def resources_section():
    st.markdown("## Additional Resources")
    st.write("For more information and updates, explore our blog posts or join our community channels:")
    resources_html = """
    <style>
    .resource-cards {
      display: flex;
      flex-wrap: wrap;
      gap: 20px;
      margin-top: 10px;
    }
    .resource-card {
      background-color: #1f1f1f;
      border: 1px solid #333333;
      border-radius: 6px;
      width: 220px;
      padding: 12px;
      text-align: center;
      transition: box-shadow 0.2s ease;
    }
    .resource-card:hover {
      box-shadow: 0 4px 8px rgba(255, 255, 255, 0.15);
    }
    .resource-card h4 {
      margin: 0;
      color: #ffffff;
    }
    .resource-card p {
      color: #cccccc;
      margin: 6px 0 0 0;
      font-size: 14px;
    }
    .resource-card a {
      text-decoration: none;
      color: inherit;
    }
    </style>
    <div class="resource-cards">
      <a href="https://www.1x.tech/discover/1x-world-model" target="_blank" class="resource-card">
        <h4>Phase 1 Blog Post</h4>
        <p>World Model Challenge Launch</p>
      </a>
      <a href="https://www.1x.tech/discover/1x-world-model-sampling-challenge" target="_blank" class="resource-card">
        <h4>Phase 2 Blog Post</h4>
        <p>Challenge Updates</p>
      </a>
      <a href="https://github.com/1x-technologies/world-model-challenge" target="_blank" class="resource-card">
        <h4>GitHub Repository</h4>
        <p>View code and issues</p>
      </a>
      <a href="https://huggingface.co/1x-technologies" target="_blank" class="resource-card">
        <h4>Hugging Face Repository</h4>
        <p>Datasets and Models</p>
      </a>
      <a href="https://discord.gg/your-invite" target="_blank" class="resource-card">
        <h4>Discord Channel</h4>
        <p>Join the discussion</p>
      </a>
    </div>
    """
    st.markdown(resources_html, unsafe_allow_html=True)

def scoring_section():
    st.markdown("## Scoring")
    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.")
    st.markdown("### Points Breakdown")
    col1, col2, col3 = st.columns(3)
    with col1:
        st.markdown('<h3 style="margin-left:15px;">Compression</h3>', unsafe_allow_html=True)
        st.markdown("- **1st Place**: 10 points\n- **2nd Place**: 7 points\n- **3rd Place**: 5 points")
    with col2:
        st.markdown('<h3 style="margin-left:15px;">Sampling</h3>', unsafe_allow_html=True)
        st.markdown("- **1st Place**: 10 points\n- **2nd Place**: 7 points\n- **3rd Place**: 5 points")
    with col3:
        st.markdown('<h3 style="margin-left:15px;">Evaluation</h3>', unsafe_allow_html=True)
        st.markdown("- **1st Place**: 20 points\n- **2nd Place**: 14 points\n- **3rd Place**: 10 points")
    with st.expander("Tie-Breakers"):
        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")
    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.")

def floating_toc(selected_section):
    toc_html = """
    <style>
    .toc-container {
        position: fixed;
        top: 20px;
        left: 20px;
        width: 200px;
        background-color: #1f1f1f;
        border-radius: 8px;
        padding: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }
    .toc-title {
        color: #ffffff;
        font-size: 16px;
        font-weight: bold;
        margin-bottom: 8px;
    }
    .toc-list {
        list-style: none;
        padding: 0;
    }
    .toc-item {
        margin: 6px 0;
    }
    .toc-item a {
        text-decoration: none;
        color: #cccccc;
        font-size: 13px;
        transition: color 0.2s ease;
    }
    .toc-item a:hover {
        color: #ffffff;
    }
    .toc-item.selected a {
        color: #ffffff;
        font-weight: bold;
    }
    </style>
    <div class="toc-container">
        <div class="toc-title">Table of Contents</div>
        <ul class="toc-list">
            <li class="toc-item {welcome_class}"><a href="#">Welcome</a></li>
            <li class="toc-item {motivation_class}"><a href="#">Motivation</a></li>
            <li class="toc-item {challenges_class}"><a href="#">Challenges</a></li>
            <li class="toc-item {datasets_class}"><a href="#">Datasets</a></li>
            <li class="toc-item {scoring_class}"><a href="#">Scoring</a></li>
            <li class="toc-item {rules_class}"><a href="#">Rules</a></li>
            <li class="toc-item {faqs_class}"><a href="#">FAQs</a></li>
            <li class="toc-item {data_requests_class}"><a href="#">Data Requests</a></li>
            <li class="toc-item {resources_class}"><a href="#">Resources</a></li>
        </ul>
    </div>
    """.format(
        welcome_class="selected" if selected_section == "Welcome" else "",
        motivation_class="selected" if selected_section == "Motivation" else "",
        challenges_class="selected" if selected_section == "Challenges" else "",
        datasets_class="selected" if selected_section == "Datasets" else "",
        scoring_class="selected" if selected_section == "Scoring" else "",
        rules_class="selected" if selected_section == "Rules" else "",
        faqs_class="selected" if selected_section == "FAQs" else "",
        data_requests_class="selected" if selected_section == "Data Requests" else "",
        resources_class="selected" if selected_section == "Resources" else ""
    )
    st.markdown(toc_html, unsafe_allow_html=True)

def main():
    st.set_page_config(page_title="1X World Model Challenge", layout="wide")

    # Navigation state
    if "section" not in st.session_state:
        st.session_state.section = "Welcome"
    
    # TOC with clickable buttons
    sections = ["Welcome", "Motivation", "Challenges", "Datasets", "Scoring", "Rules", "FAQs", "Data Requests", "Resources"]
    def set_section(section):
        st.session_state.section = section

    # Display floating TOC
    floating_toc(st.session_state.section)

    # Main content with navigation
    col1, col2 = st.columns([1, 4])  # TOC takes 1/5, content takes 4/5
    with col1:
        st.empty()  # Placeholder to push content away from TOC
    with col2:
        if st.session_state.section == "Welcome":
            st.title("1X World Model Challenge")
            st.markdown("## Welcome")
            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.")
            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/).")
            st.button("Next: Motivation", on_click=set_section, args=("Motivation",))

        elif st.session_state.section == "Motivation":
            st.markdown("## Motivation")
            st.write("Real-world robotics faces a fundamental challenge: environments are dynamic and change over time...")
            st.image("assets/model_performance_over_time.webp", caption="An example T-shirt folding model...", use_container_width=True)
            st.button("Next: Challenges", on_click=set_section, args=("Challenges",))

        elif st.session_state.section == "Challenges":
            st.markdown("## The Challenges")
            st.write("To accelerate research in this area, we've launched the 1X World Model Challenge...")
            st.markdown("#### Compression Challenge")
            st.write("In the Compression Challenge, your task is to train a model to compress our robot logs effectively...")
            st.markdown("#### Sampling Challenge")
            st.write("In the Sampling Challenge, your task is to predict a future video frame two seconds in the future...")
            st.markdown("#### Evaluation Challenge")
            st.write("The Evaluation Challenge tackles the ultimate question: Can you predict a robot's performance...")
            st.button("Next: Datasets", on_click=set_section, args=("Datasets",))

        elif st.session_state.section == "Datasets":
            st.markdown("## Datasets")
            st.write("We provide two datasets to support the 1X World Model Challenge...")
            gif_folder = "assets/v1.0"
            gif_paths = glob.glob(os.path.join(gif_folder, "*.gif"))
            random.shuffle(gif_paths)
            for i in range(0, 16, 4):
                row_gifs = gif_paths[i:i+4]
                cols = st.columns(len(row_gifs))
                for col, gif_path in zip(cols, row_gifs):
                    col.image(gif_path, use_container_width=True)
            st.button("Next: Scoring", on_click=set_section, args=("Scoring",))

        elif st.session_state.section == "Scoring":
            scoring_section()
            st.button("Next: Rules", on_click=set_section, args=("Rules",))

        elif st.session_state.section == "Rules":
            st.markdown("## Rules")
            st.markdown("""
            **General Guidelines:**
            - The use of publicly available datasets and pretrained weights is allowed...
            """)
            st.button("Next: FAQs", on_click=set_section, args=("FAQs",))

        elif st.session_state.section == "FAQs":
            st.markdown("## FAQs")
            def display_faq(question, answer):
                st.markdown(f"""
                    <div style="padding: 12px; margin-bottom: 12px; background-color: #0d1b2a; border-radius: 8px; border: 1px solid #0d1b2a;">
                        <p style="font-weight: bold; margin: 0 0 4px 0; color: #ffffff;">{question}</p>
                        <p style="margin: 0; color: #ffffff;">{answer}</p>
                    </div>
                """, unsafe_allow_html=True)
            display_faq("What preprocessing steps are applied to the raw data, and can we apply our own?", 
                        "The raw data in the `world_model_raw_data` dataset includes unprocessed 512x512 MP4 video logs...")
            # Add other FAQs...
            st.button("Next: Data Requests", on_click=set_section, args=("Data Requests",))

        elif st.session_state.section == "Data Requests":
            st.markdown("## Data & Research Requests")
            st.markdown("""
            Beyond the World Model Challenge, we also want to make the challenges and datasets more useful...
            """)
            st.button("Next: Resources", on_click=set_section, args=("Resources",))

        elif st.session_state.section == "Resources":
            resources_section()

if __name__ == "__main__":
    main()