File size: 11,090 Bytes
a1c201e
 
 
 
 
07c2379
0fc4a34
a1c201e
 
 
 
 
 
 
b51a96f
9ffebcc
 
 
 
 
a1c201e
 
 
9ffebcc
 
 
 
 
 
 
 
 
 
 
 
 
a1c201e
9ffebcc
07c2379
9ffebcc
 
 
 
 
 
a1c201e
9ffebcc
 
 
 
 
 
 
 
 
07c2379
96c23a5
 
 
 
 
9ffebcc
 
 
 
 
a1c201e
 
 
96c23a5
 
9ffebcc
 
 
 
 
a1c201e
9ffebcc
 
b51a96f
9ffebcc
a1c201e
9ffebcc
 
 
 
 
 
 
 
 
 
 
 
 
a1c201e
9ffebcc
 
 
 
 
 
 
 
 
 
96c23a5
9ffebcc
 
 
 
 
 
 
 
 
a1c201e
9ffebcc
 
07c2379
96c23a5
9ffebcc
a1c201e
9ffebcc
 
07c2379
9ffebcc
96c23a5
 
9ffebcc
 
 
 
 
 
 
 
a1c201e
9ffebcc
 
 
 
 
 
 
 
 
 
b1f2278
9ffebcc
b1f2278
9ffebcc
 
 
 
 
 
 
a1c201e
 
9ffebcc
95e1d19
 
 
 
 
 
 
96c23a5
a1c201e
9ffebcc
a1c201e
9ffebcc
 
 
a1c201e
9ffebcc
 
a1c201e
 
9ffebcc
 
a1c201e
 
 
 
 
 
9ffebcc
a1c201e
 
 
 
 
 
 
 
 
9ffebcc
a1c201e
9ffebcc
a1c201e
 
 
 
07c2379
 
 
 
 
 
 
 
 
9ffebcc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a1c201e
 
07c2379
a1c201e
 
 
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
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>3D Subset Builder</title>
  <meta name="description" content="Browse free 3D libraries (Google Scanned Objects, Smithsonian, Amazon Berkeley Objects, NASA, Thingi10K, OmniObject3D, Scenario), build your own subset, download it or push it to the Hugging Face Hub, and fine-tune TRELLIS.2 on it.">
  <link rel="icon" href="data:,">
  <link rel="stylesheet" href="/static/style.css">
  <script type="module" src="https://unpkg.com/@google/model-viewer@3.5.0/dist/model-viewer.min.js"></script>
</head>
<body>
<header class="top">
  <div class="brand">
    <h1>3D Subset Builder <button id="lib-btn" class="lib-btn" aria-haspopup="dialog">Library: <b id="lib-name">…</b> ▾</button> <span id="lib-lat" class="badge" hidden></span></h1>
    <p class="flow"><span>1</span> Pick 3D objects <i>→</i> <span>2</span> Review <i>→</i> <span>3</span> Download, or save to the Hub</p>
  </div>
  <div class="top-actions">
    <button id="help-btn" class="ghost">How it works</button>
    <div id="auth" class="auth"></div>
  </div>
</header>

<main class="browse" aria-label="Objects">
  <section id="find" class="find">
    <div class="find-row">
      <input id="q" type="search" placeholder="Search 1,030 scanned objects: shoe, mug, lego…" autocomplete="off">
      <button id="filters-btn" class="ghost" aria-expanded="false" aria-controls="more-filters">Filters <span id="filters-count" class="pill" hidden></span></button>
      <select id="sort" aria-label="Sort">
        <option value="name">Sort: name</option>
        <option value="size">Sort: size</option>
        <option value="faces">Sort: most detailed</option>
        <option value="category">Sort: category</option>
      </select>
    </div>
    <div id="cats" class="chips" aria-label="Categories"></div>

    <div id="more-filters" class="more-filters" hidden>
      <div class="mf-group" id="size-group">
        <h2>Real-world size <span class="hint">longest side, cm</span></h2>
        <div class="range">
          <input id="size-min" type="number" min="0" step="1" placeholder="min">
          <span>to</span>
          <input id="size-max" type="number" min="0" step="1" placeholder="max">
        </div>
      </div>
      <div class="mf-group">
        <h2>Shape</h2>
        <label class="check"><input id="flat" type="checkbox"> <span class="lbl">Flat objects only <span class="hint">plates, boards, boxes</span></span></label>
        <label class="check"><input id="watertight" type="checkbox"> <span class="lbl">Closed meshes only <span class="hint">no holes, good for 3D printing</span></span></label>
      </div>
      <div class="mf-group">
        <h2>Color variants</h2>
        <label class="check"><input id="one-per-group" type="checkbox"> <span class="lbl">Show one per shape <span class="hint">hide recolors of the same model</span></span></label>
      </div>
      <div id="facet-extra" class="mf-extra"></div>
      <div class="mf-group" id="license-group" hidden>
        <h2>License</h2>
        <select id="lic-filter" aria-label="License"></select>
        <label class="check"><input id="commercial" type="checkbox"> <span class="lbl">Commercial use allowed <span class="hint">hide non-commercial objects</span></span></label>
      </div>
      <div class="mf-group" id="latents-group">
        <h2>TRELLIS.2</h2>
        <label class="check"><input id="latents" type="checkbox"> <span class="lbl">Ready to train <span class="hint">already preprocessed</span></span></label>
      </div>
      <button id="reset" class="ghost small">Clear all filters</button>
    </div>
  </section>

  <div id="lic-bar" class="lic-bar" aria-label="License of this library"></div>

  <div class="toolbar">
    <span id="count" class="count"></span>
    <div class="toolbar-actions">
      <button id="remove-all" class="ghost" hidden>Remove these</button>
      <button id="add-all">Add all</button>
    </div>
  </div>
  <div id="grid" class="grid"></div>
  <div id="loading" class="loading" role="status" hidden><span class="spinner"></span> <span id="loading-msg">Loading…</span></div>
</main>

<div id="selbar" class="selbar" role="region" aria-label="Your dataset">
  <div class="sel-info">
    <div id="sel-thumbs" class="sel-thumbs"></div>
    <div class="sel-text">
      <b id="sel-count">Nothing picked yet</b>
      <span id="sel-sub" class="hint">Click <b>+</b> on any object to add it to your dataset.</span>
    </div>
  </div>
  <div class="sel-actions">
    <button id="clear" class="ghost small" hidden>Clear</button>
    <button id="review-btn" class="primary" disabled>Review &amp; download →</button>
  </div>
</div>

<dialog id="drawer" class="drawer" aria-label="Your dataset">
  <div class="drawer-head">
    <h2>Your dataset</h2>
    <button id="drawer-close" class="ghost small" aria-label="Close">Close</button>
  </div>
  <div class="drawer-body">
    <section class="step">
      <h3><span class="num">1</span> Review your picks</h3>
      <div id="stats" class="stats"></div>
      <div id="cat-bars" class="bars"></div>
      <div id="lic-box" class="lic-box"></div>
      <details class="list-wrap">
        <summary>See all objects <span id="list-count"></span></summary>
        <ul id="basket-list" class="basket-list"></ul>
      </details>
      <details id="tips-wrap" class="tips-wrap" hidden>
        <summary>Tips if you'll train a model on this <span id="tips-count" class="pill"></span></summary>
        <div id="warnings"></div>
      </details>
    </section>

    <section class="step">
      <h3><span class="num">2</span> Choose your files</h3>
      <div id="formats" class="formats"></div>
      <p class="hint">Always included: a table of object details (<code>catalog.parquet</code>), the object list, a README, and <code>ATTRIBUTION.md</code> with every object's license and credit line.</p>
    </section>

    <section class="step">
      <h3><span class="num">3</span> Get it</h3>
      <label class="field">Dataset name <input id="name" value="my-3d-subset" spellcheck="false"></label>

      <label id="lic-ack-wrap" class="check lic-ack" hidden><input id="lic-ack" type="checkbox"> <span class="lbl" id="lic-ack-text"></span></label>

      <div class="dest">
        <div class="dest-card">
          <h4>Download to this computer</h4>
          <div class="btn-row">
            <button id="dl-zip" class="primary">Download zip</button>
            <button id="dl-script" class="ghost">Python script</button>
          </div>
          <p id="zip-note" class="hint"></p>
        </div>

        <div class="dest-card">
          <h4>Save to Hugging Face</h4>
          <p class="hint">Creates a dataset in your account that you can load with one line of code, share, or train on.</p>
          <div id="hub-export">
            <div class="field-row">
              <select id="owner" aria-label="Owner"></select>
              <span class="slash">/</span>
              <span id="repo-name" class="repo-name"></span>
            </div>
            <p id="name-status" class="name-status" aria-live="polite"></p>
            <label class="check"><input id="private" type="checkbox" checked> Keep it private</label>
            <p id="exported-note" class="exported-note" hidden></p>
            <button id="export" class="primary wide">Create dataset</button>
            <div id="export-status" class="export-status" hidden>
              <div class="bar"><div id="export-bar"></div></div>
              <p id="export-msg"></p>
            </div>
          </div>
          <p id="hub-login" hidden><a class="btn primary" href="/oauth/huggingface/login">Sign in with Hugging Face</a></p>
        </div>
      </div>

      <div id="train-link" class="train-box" hidden>
        <h3>Optional: fine-tune TRELLIS.2 on it</h3>
        <p class="hint">Teach <a href="https://huggingface.co/microsoft/TRELLIS.2-4B" target="_blank" rel="noopener">TRELLIS.2</a>,
          Microsoft's image-to-3D model, the shapes in your dataset. Training runs as jobs on your
          Hugging Face account in the trainer Space, which shows the cost before anything starts.</p>
        <a id="train-go" class="btn primary" target="_blank" rel="noopener">Open in the TRELLIS.2 trainer →</a>
        <p id="train-note" class="hint"></p>
        <p id="train-lic" class="hint"></p>
      </div>
    </section>

    <section class="extras">
      <button id="share" class="link">Copy a link to this selection</button>
      <button id="import-btn" class="link">Paste a list of objects</button>
      <div id="import-box" hidden>
        <textarea id="import-text" rows="4" placeholder="Object ids or a subset.txt, one per line"></textarea>
        <button id="import-go" class="small">Add them</button>
      </div>
    </section>
  </div>
</dialog>

<dialog id="detail">
  <form method="dialog" class="close-row"><button class="ghost small" aria-label="Close">Close</button></form>
  <div class="detail-body">
    <div class="viewer">
      <model-viewer id="mv" camera-controls auto-rotate shadow-intensity="0.6" exposure="1.0" environment-image="neutral" loading="eager"></model-viewer>
      <p class="hint center">Drag to rotate, scroll to zoom.</p>
      <div id="thumbs" class="thumbs"></div>
    </div>
    <div class="meta">
      <h2 id="d-name"></h2>
      <p id="d-desc" class="desc"></p>
      <div class="btn-row">
        <button id="d-toggle" class="primary"></button>
        <button id="d-group"></button>
      </div>
      <dl id="d-props"></dl>
      <div id="d-siblings" class="siblings"></div>
      <details class="cmd"><summary>Download just this object</summary><code id="d-cmd"></code></details>
    </div>
  </div>
</dialog>

<dialog id="libs" class="libs" aria-label="Choose a library">
  <form method="dialog" class="close-row"><button class="ghost small" aria-label="Close">Close</button></form>
  <div class="libs-body">
    <h2>Choose a 3D library</h2>
    <p class="hint">Each library keeps its own selection.</p>
    <div id="libs-list" class="libs-list"></div>
  </div>
</dialog>

<div id="tour" class="tour" hidden>
  <div id="tour-spot" class="tour-spot"></div>
  <div id="tour-card" class="tour-card" role="dialog" aria-modal="true" aria-labelledby="tour-title">
    <p id="tour-step" class="tour-step"></p>
    <h3 id="tour-title"></h3>
    <div id="tour-body"></div>
    <div class="tour-nav">
      <button id="tour-skip" class="link">Skip tour</button>
      <span>
        <button id="tour-back" class="ghost small">Back</button>
        <button id="tour-next" class="primary small">Next</button>
      </span>
    </div>
  </div>
</div>

<form id="zip-form" method="post" action="/api/zip" hidden><input type="hidden" name="payload"></form>
<div id="toast" class="toast" role="status" hidden></div>
<footer><span id="credit"></span> · <a id="objects-link" target="_blank" rel="noopener">Source dataset</a></footer>
<script src="/static/app.js"></script>
</body>
</html>