magi-dalmau commited on
Commit
3d5fe81
·
verified ·
1 Parent(s): 0abab79

Update src/App.js

Browse files
Files changed (1) hide show
  1. src/App.js +310 -18
src/App.js CHANGED
@@ -1,25 +1,317 @@
1
- import logo from './logo.svg';
2
- import './App.css';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
- function App() {
5
  return (
6
- <div className="App">
7
- <header className="App-header">
8
- <img src={logo} className="App-logo" alt="logo" />
9
- <p>
10
- Edit <code>src/App.js</code> and save to reload.
11
- </p>
12
- <a
13
- className="App-link"
14
- href="https://reactjs.org"
15
- target="_blank"
16
- rel="noopener noreferrer"
17
- >
18
- Learn React
19
- </a>
20
  </header>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  </div>
22
  );
23
  }
24
 
25
- export default App;
 
1
+ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
2
+ import { ArrowRight, Database, GitBranch, Box, Layers, Cloud, GitMerge, Play, Settings } from "lucide-react";
3
+ import { motion } from "framer-motion";
4
+
5
+ export default function Diagram() {
6
+ const BoxCard = ({ icon: Icon, title, children }) => (
7
+ <Card className="rounded-2xl shadow-sm border bg-white/70 backdrop-blur">
8
+ <CardHeader className="pb-2">
9
+ <CardTitle className="text-lg flex items-center gap-2"><Icon className="w-5 h-5"/>{title}</CardTitle>
10
+ </CardHeader>
11
+ <CardContent className="text-sm text-gray-700 space-y-2">
12
+ {children}
13
+ </CardContent>
14
+ </Card>
15
+ );
16
+
17
+ const Arrow = () => (
18
+ <div className="flex items-center justify-center">
19
+ <ArrowRight className="w-6 h-6"/>
20
+ </div>
21
+ );
22
 
 
23
  return (
24
+ <div className="p-6 md:p-10 max-w-6xl mx-auto space-y-10">
25
+ <header className="space-y-2">
26
+ <h1 className="text-2xl md:text-3xl font-semibold">Hugging Face–Centric Minimal Data Stack</h1>
27
+ <p className="text-gray-600">Single-backbone workflow for robotics datasets (manipulation, perception, reasoning, HRI) with minimal tools and frictionless integration.</p>
 
 
 
 
 
 
 
 
 
 
28
  </header>
29
+
30
+ {/* Stage definitions */}
31
+ <section className="space-y-4">
32
+ <h2 className="text-xl font-semibold">Stage Definitions & Examples</h2>
33
+ <ul className="list-disc pl-6 text-gray-700 space-y-2">
34
+ <li><strong>Data Collection:</strong> Raw recordings from robots or simulations. Example: RGB-D video, audio, and joint states captured during human-robot interaction.</li>
35
+ <li><strong>Annotation:</strong> Assign labels or semantics to collected data. Example: gesture type, emotion, manipulated object, speech act.</li>
36
+ <li><strong>Curation:</strong> Filter, validate, and organize annotated data into usable splits (train/val/test). Example: remove bad frames, balance human/robot perspectives.</li>
37
+ <li><strong>Publishing (Hub):</strong> Versioned dataset hosting on <a href="https://huggingface.co/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Hugging Face Hub</a>, with metadata and documentation. Example: pushing curated subsets for manipulation learning.</li>
38
+ <li><strong>Visualization (Spaces):</strong> Interactive dashboards or viewers built in <a href="https://gradio.app/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Gradio</a> or <a href="https://streamlit.io/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Streamlit</a> for exploration or validation. Example: playback of synchronized gaze, pose, and audio segments.</li>
39
+ <li><strong>Reuse & Training:</strong> Loading datasets directly via <a href="https://huggingface.co/docs/datasets" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">🤗 Datasets API</a> for fine-tuning multimodal or planning models. Example: training z<sub>social</sub> encoders or expressive decoders.</li>
40
+ </ul>
41
+ </section>
42
+
43
+ {/* Main flow diagram */}
44
+ <section className="grid grid-cols-1 md:grid-cols-5 gap-4 items-stretch">
45
+ <motion.div initial={{opacity:0, y:10}} animate={{opacity:1, y:0}} transition={{delay:0.05}} className="md:col-span-1">
46
+ <BoxCard icon={Layers} title="Data Sources">
47
+ <ul className="list-disc pl-5 space-y-1">
48
+ <li>Robot logs (RGB-D, audio, pose)</li>
49
+ <li>Sim runs & demos</li>
50
+ <li>Interaction clips</li>
51
+ <li>Planning/intent traces</li>
52
+ </ul>
53
+ </BoxCard>
54
+ </motion.div>
55
+ <Arrow/>
56
+ <motion.div initial={{opacity:0, y:10}} animate={{opacity:1, y:0}} transition={{delay:0.1}} className="md:col-span-1">
57
+ <BoxCard icon={Settings} title="Annotation (min one)">
58
+ <ul className="list-disc pl-5 space-y-1">
59
+ <li><a href="https://labelstud.io/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Label Studio</a> (self-host or cloud)</li>
60
+ <li><a href="https://cvat.org/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">CVAT</a> / <a href="https://roboflow.com/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Roboflow</a> (export)</li>
61
+ <li>Exports: COCO, JSON, CSV</li>
62
+ </ul>
63
+ </BoxCard>
64
+ </motion.div>
65
+ <Arrow/>
66
+ <motion.div initial={{opacity:0, y:10}} animate={{opacity:1, y:0}} transition={{delay:0.15}} className="md:col-span-1">
67
+ <BoxCard icon={Box} title="Curation (optional)">
68
+ <ul className="list-disc pl-5 space-y-1">
69
+ <li><a href="https://voxel51.com/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">FiftyOne</a>: filter, QA, splits</li>
70
+ <li><a href="https://cleanlab.ai/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Cleanlab</a> / Pandas checks</li>
71
+ <li>Embed search for edge cases</li>
72
+ </ul>
73
+ </BoxCard>
74
+ </motion.div>
75
+ <Arrow/>
76
+ <motion.div initial={{opacity:0, y:10}} animate={{opacity:1, y:0}} transition={{delay:0.2}} className="md:col-span-1">
77
+ <BoxCard icon={GitBranch} title="HF Hub (Backbone)">
78
+ <ul className="list-disc pl-5 space-y-1">
79
+ <li><a href="https://huggingface.co/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Datasets & models</a> in repos</li>
80
+ <li>Git + LFS versioning</li>
81
+ <li>Private org, permissions</li>
82
+ <li>Tags, README, cards</li>
83
+ </ul>
84
+ </BoxCard>
85
+ </motion.div>
86
+ <Arrow/>
87
+ <motion.div initial={{opacity:0, y:10}} animate={{opacity:1, y:0}} transition={{delay:0.25}} className="md:col-span-1">
88
+ <BoxCard icon={Play} title="HF Spaces (Viz)">
89
+ <ul className="list-disc pl-5 space-y-1">
90
+ <li><a href="https://huggingface.co/spaces" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Gradio/Streamlit viewers</a></li>
91
+ <li>Clip browser, 3D previews</li>
92
+ <li>Eval dashboards & demos</li>
93
+ </ul>
94
+ </BoxCard>
95
+ </motion.div>
96
+ </section>
97
+
98
+ {/* Tool comparison */}
99
+ <section className="space-y-4">
100
+ <h2 className="text-xl font-semibold">Comparison: Annotation & Curation Tools</h2>
101
+ <div className="overflow-x-auto">
102
+ <table className="min-w-full text-sm border-collapse">
103
+ <thead>
104
+ <tr className="bg-gray-100 text-gray-700">
105
+ <th className="p-2 text-left">Tool</th>
106
+ <th className="p-2 text-left">Strengths</th>
107
+ <th className="p-2 text-left">Limitations</th>
108
+ <th className="p-2 text-left">Integration with HF</th>
109
+ </tr>
110
+ </thead>
111
+ <tbody className="divide-y">
112
+ <tr>
113
+ <td className="p-2 font-medium"><a href="https://labelstud.io/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Label Studio</a></td>
114
+ <td className="p-2">Open source, multi-modal (image, audio, text, video). Very flexible schema; plugin ecosystem.</td>
115
+ <td className="p-2">Requires setup for teams; interface slower with 100k+ samples.</td>
116
+ <td className="p-2">Native <a href="https://huggingface.co/docs/datasets/labelstudio" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">datasets connector</a>; can push directly to HF Hub.</td>
117
+ </tr>
118
+ <tr>
119
+ <td className="p-2 font-medium"><a href="https://cvat.org/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">CVAT</a></td>
120
+ <td className="p-2">Great for video and dense bounding-box/pose annotations; powerful auto-annotation tools.</td>
121
+ <td className="p-2">Primarily vision-focused; heavier deployment (Docker).</td>
122
+ <td className="p-2">Exports in COCO/VOC formats easily loadable with <code>datasets.load_dataset</code>.</td>
123
+ </tr>
124
+ <tr>
125
+ <td className="p-2 font-medium"><a href="https://roboflow.com/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Roboflow</a></td>
126
+ <td className="p-2">Cloud-based; fast web UI and built-in preprocessing and augmentation.</td>
127
+ <td className="p-2">Closed-source, limited free tier; less flexible schemas.</td>
128
+ <td className="p-2">Exports compatible with HF datasets; no native connector but simple upload via API.</td>
129
+ </tr>
130
+ <tr>
131
+ <td className="p-2 font-medium"><a href="https://voxel51.com/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">FiftyOne</a></td>
132
+ <td className="p-2">Advanced filtering, visualization, embedding-based analysis.</td>
133
+ <td className="p-2">Not for annotation itself; local-first.</td>
134
+ <td className="p-2">Direct push/export to HF Hub for curated dataset versions.</td>
135
+ </tr>
136
+ </tbody>
137
+ </table>
138
+ </div>
139
+ </section>
140
+
141
+ {/* Output / training */}
142
+ <section className="grid grid-cols-1 md:grid-cols-3 gap-4 items-stretch">
143
+ <motion.div initial={{opacity:0, y:10}} animate={{opacity:1, y:0}} transition={{delay:0.3}}>
144
+ <BoxCard icon={GitMerge} title="Train & Reuse">
145
+ <ul className="list-disc pl-5 space-y-1">
146
+ <li>Load via <a href="https://huggingface.co/docs/datasets" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">datasets streaming</a></li>
147
+ <li>Fine-tune VL/VLA/ASR models</li>
148
+ <li>Push checkpoints to HF</li>
149
+ </ul>
150
+ </BoxCard>
151
+ </motion.div>
152
+ <motion.div initial={{opacity:0, y:10}} animate={{opacity:1, y:0}} transition={{delay:0.35}}>
153
+ <BoxCard icon={Database} title="Raw Storage (optional)">
154
+ <ul className="list-disc pl-5 space-y-1">
155
+ <li><a href="https://aws.amazon.com/s3/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">AWS S3</a> / <a href="https://cloud.google.com/storage" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">GCS</a> / <a href="https://min.io/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">MinIO</a> for TB+ raw</li>
156
+ <li>Keep curated subsets on HF</li>
157
+ <li>Link via metadata/URIs</li>
158
+ </ul>
159
+ </BoxCard>
160
+ </motion.div>
161
+ <motion.div initial={{opacity:0, y:10}} animate={{opacity:1, y:0}} transition={{delay:0.4}}>
162
+ <BoxCard icon={Cloud} title="Governance (lite)">
163
+ <ul className="list-disc pl-5 space-y-1">
164
+ <li>Repo permissions & reviews</li>
165
+ <li>Semantic tags & licenses</li>
166
+ <li>Changelogs & model cards</li>
167
+ </ul>
168
+ </BoxCard>
169
+ </motion.div>
170
+ </section>
171
+
172
+ {/* Notes */}
173
+ <section className="grid grid-cols-1 md:grid-cols-2 gap-4">
174
+ <Card className="rounded-2xl">
175
+ <CardHeader className="pb-2"><CardTitle className="text-lg">Operating Principles</CardTitle></CardHeader>
176
+ <CardContent className="text-sm text-gray-700 space-y-2">
177
+ <ul className="list-disc pl-5 space-y-1">
178
+ <li>Keep the workflow lean: Hugging Face Hub as the single backbone.</li>
179
+ <li>One annotation tool (<a href="https://labelstud.io/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Label Studio</a>, <a href="https://cvat.org/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">CVAT</a>, or <a href="https://roboflow.com/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Roboflow</a>).</li>
180
+ <li>Optional curation with <a href="https://voxel51.com/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">FiftyOne</a> before each release.</li>
181
+ <li>Push each validated dataset as a new HF Hub version.</li>
182
+ <li>Provide <a href="https://huggingface.co/spaces" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Spaces</a> for exploration, demo, and review.</li>
183
+ </ul>
184
+ </CardContent>
185
+ </Card>
186
+ <Card className="rounded-2xl">
187
+ <CardHeader className="pb-2"><CardTitle className="text-lg">Typical Repo Layout (HF)</CardTitle></CardHeader>
188
+ <CardContent className="text-sm text-gray-700 space-y-2 font-mono">
189
+ <pre className="text-xs md:text-sm overflow-auto">
190
+ {`datasets/
191
+ eurecat/haru-social-vla/
192
+ README.md # dataset card with tags + license
193
+ data/ # small/curated samples or manifests
194
+ annotations/
195
+ splits/ # train/val/test lists
196
+ scripts/ # loading + eval utils
197
+ models/
198
+ eurecat/haru-expressive-decoder/
199
+ README.md # model card (training data, metrics)
200
+ config/
201
+ checkpoints/`}
202
+ </pre>
203
+ </CardContent>
204
+ </Card>
205
+ </section>
206
+
207
+ <footer className="text-xs text-gray-500">
208
+ Tip: enforce tagging conventions (task=manipulation | hri | planning; modality=rgbd | audio | pose; license; privacy). Automate checks in CI before merging a dataset release.
209
+ </footer>
210
+
211
+ {/* ============================= */}
212
+ {/* MODEL TRAINING & REUSE STACK */}
213
+ {/* ============================= */}
214
+
215
+ <section className="space-y-8 mt-16">
216
+ <header className="space-y-2">
217
+ <h2 className="text-2xl font-semibold">Hugging Face–Centric Model Lifecycle Stack</h2>
218
+ <p className="text-gray-600">Unified workflow for model training, evaluation, storage, deployment, and reuse — using the fewest possible tools while supporting robotics and multimodal tasks.</p>
219
+ </header>
220
+
221
+ {/* Stage definitions */}
222
+ <section className="space-y-4">
223
+ <h3 className="text-xl font-semibold">Stage Definitions & Examples</h3>
224
+ <ul className="list-disc pl-6 text-gray-700 space-y-2">
225
+ <li><strong>Training:</strong> Model optimization using GPUs (local or <a href="https://www.runpod.io/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">RunPod</a> cloud). Example: fine-tuning a multimodal encoder on robot-social datasets.</li>
226
+ <li><strong>Evaluation:</strong> Measure metrics, visualize results. Example: compute CCC for valence/arousal or success rate for manipulation plans.</li>
227
+ <li><strong>Storage & Versioning:</strong> Upload model checkpoints and configs to <a href="https://huggingface.co/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Hugging Face Hub</a> for long-term reproducibility.</li>
228
+ <li><strong>Deployment:</strong> Serve models for inference in <a href="https://huggingface.co/spaces" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Spaces</a> or local robots; optional private inference endpoints.</li>
229
+ <li><strong>Reuse / Continual Learning:</strong> Load models via <code>transformers</code> API; continue training or integrate into reasoning/interaction systems.</li>
230
+ </ul>
231
+ </section>
232
+
233
+ {/* Model lifecycle flow */}
234
+ <section className="grid grid-cols-1 md:grid-cols-5 gap-4 items-stretch">
235
+ <motion.div initial={{opacity:0, y:10}} animate={{opacity:1, y:0}} transition={{delay:0.05}} className="md:col-span-1">
236
+ <BoxCard icon={Settings} title="Training (GPU/RunPod)">
237
+ <ul className="list-disc pl-5 space-y-1">
238
+ <li>Train locally or on <a href="https://www.runpod.io/" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">RunPod</a> cloud GPUs</li>
239
+ <li>Use <a href="https://huggingface.co/docs/transformers" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Transformers</a> + <a href="https://huggingface.co/docs/accelerate" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Accelerate</a> for training</li>
240
+ <li>Track metrics with <a href="https://wandb.ai/site" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Weights & Biases</a> or built-in logs</li>
241
+ </ul>
242
+ </BoxCard>
243
+ </motion.div>
244
+ <Arrow/>
245
+ <motion.div initial={{opacity:0, y:10}} animate={{opacity:1, y:0}} transition={{delay:0.1}} className="md:col-span-1">
246
+ <BoxCard icon={Play} title="Evaluation">
247
+ <ul className="list-disc pl-5 space-y-1">
248
+ <li>Use <a href="https://huggingface.co/docs/evaluate" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Evaluate</a> library for metrics</li>
249
+ <li>Visualize predictions with FiftyOne or Spaces</li>
250
+ <li>Generate benchmark reports</li>
251
+ </ul>
252
+ </BoxCard>
253
+ </motion.div>
254
+ <Arrow/>
255
+ <motion.div initial={{opacity:0, y:10}} animate={{opacity:1, y:0}} transition={{delay:0.15}} className="md:col-span-1">
256
+ <BoxCard icon={GitBranch} title="Model Storage (HF Hub)">
257
+ <ul className="list-disc pl-5 space-y-1">
258
+ <li>Push models via <code>huggingface_hub</code> API</li>
259
+ <li>Keep config, tokenizer, and weights</li>
260
+ <li>Versioned releases, changelogs, model cards</li>
261
+ </ul>
262
+ </BoxCard>
263
+ </motion.div>
264
+ <Arrow/>
265
+ <motion.div initial={{opacity:0, y:10}} animate={{opacity:1, y:0}} transition={{delay:0.2}} className="md:col-span-1">
266
+ <BoxCard icon={Cloud} title="Deployment & Inference">
267
+ <ul className="list-disc pl-5 space-y-1">
268
+ <li>Serve via HF <a href="https://huggingface.co/inference-api" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Inference API</a> or Spaces</li>
269
+ <li>Integrate into robot planner / dialogue manager</li>
270
+ <li>Optional local FastAPI wrapper for on-prem use</li>
271
+ </ul>
272
+ </BoxCard>
273
+ </motion.div>
274
+ <Arrow/>
275
+ <motion.div initial={{opacity:0, y:10}} animate={{opacity:1, y:0}} transition={{delay:0.25}} className="md:col-span-1">
276
+ <BoxCard icon={GitMerge} title="Reuse & Continual Learning">
277
+ <ul className="list-disc pl-5 space-y-1">
278
+ <li>Load via <a href="https://huggingface.co/docs/transformers/quicktour" target="_blank" rel="noreferrer noopener" className="text-blue-600 underline">Transformers.load_pretrained</a></li>
279
+ <li>Adapt models for new domains or robot skills</li>
280
+ <li>Fine-tune periodically with new curated data</li>
281
+ </ul>
282
+ </BoxCard>
283
+ </motion.div>
284
+ </section>
285
+
286
+ {/* Summary */}
287
+ <section className="grid grid-cols-1 md:grid-cols-2 gap-4">
288
+ <Card className="rounded-2xl">
289
+ <CardHeader className="pb-2"><CardTitle className="text-lg">Minimal Tool Stack</CardTitle></CardHeader>
290
+ <CardContent className="text-sm text-gray-700 space-y-2">
291
+ <ul className="list-disc pl-5 space-y-1">
292
+ <li><strong>Training:</strong> RunPod + HF Accelerate</li>
293
+ <li><strong>Evaluation:</strong> HF Evaluate + simple scripts</li>
294
+ <li><strong>Storage:</strong> Hugging Face Hub</li>
295
+ <li><strong>Deployment:</strong> HF Spaces or Inference API</li>
296
+ <li><strong>Reuse:</strong> Transformers API</li>
297
+ </ul>
298
+ </CardContent>
299
+ </Card>
300
+ <Card className="rounded-2xl">
301
+ <CardHeader className="pb-2"><CardTitle className="text-lg">Best Practices</CardTitle></CardHeader>
302
+ <CardContent className="text-sm text-gray-700 space-y-2">
303
+ <ul className="list-disc pl-5 space-y-1">
304
+ <li>Keep one model repo per skill (e.g., gaze decoder, z<sub>social</sub> encoder)</li>
305
+ <li>Tag model cards with dataset and evaluation metrics</li>
306
+ <li>Use Spaces for lightweight demos or robot simulations</li>
307
+ <li>Automate CI/CD: push training logs + model eval to Hub</li>
308
+ <li>Leverage private HF orgs for internal research models</li>
309
+ </ul>
310
+ </CardContent>
311
+ </Card>
312
+ </section>
313
+ </section>
314
  </div>
315
  );
316
  }
317