Spaces:
Running on Zero
Running on Zero
File size: 2,225 Bytes
f19f18b f849e12 f19f18b dbd1ab1 a8bd965 5918f38 a8bd965 dbd1ab1 f849e12 dbd1ab1 f849e12 dbd1ab1 5918f38 dbd1ab1 | 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 | ---
title: DeepONet FPO Demo
colorFrom: green
colorTo: green
sdk: gradio
sdk_version: 6.1.0
app_file: app.py
pinned: false
license: mit
short_description: 'Demo of unsteady flow around varied geometries'
---
# DeepONet FPO Demo (FlowBench)
This Space runs **time-dependent DeepONet** checkpoints (s ∈ {1,4,8,16}) to generate **auto-regressive rollouts** of 2D velocity fields **(u, v)** around complex geometries (FPO / FlowBench).
---
## Associated Resources
- **Paper (arXiv):** https://arxiv.org/abs/2512.04434
- **Paper page on Hugging Face:** https://huggingface.co/papers/2512.04434
- **Dataset (FlowBench on Hugging Face):** https://huggingface.co/datasets/BGLab/FlowBench
- **Code (model implementation & training scripts):** https://github.com/baskargroup/TimeDependent-DeepONet
- **Interactive demo (Hugging Face Space):** https://huggingface.co/spaces/BGLab/DeepONet-FPO-demo
---
You have two runnable apps:
- **`app_v1.py` (GT + metrics)**
- Uses `sample_cases/` containing the **full target sequence**.
- Produces:
- Ground truth vs prediction **GIFs** for u and v
- Relative L2 error vs time **plot** + **CSV**, where
\[
\mathrm{rel}\_L_2(t) = \frac{\lVert \hat{y}(t) - y(t) \rVert_2}{\lVert y(t) \rVert_2}.
\]
- **`app_v2.py` (prediction-only, arbitrary rollout length)**
- Uses `sample_cases/few_timesteps/` containing **only the first 16 GT frames** (enough to seed any checkpoint).
- Produces:
- Prediction **GIFs** for u and v for any number of rollout steps
- User chooses rollout length **N** (seeding uses only the first `s` frames).
## Sample format
Each sample uses two files:
- `sample_{id}_input.npy` → SDF geometry: **[1, H, W]**
- `sample_{id}_output.npy` → velocity sequence: **[T, 2, H, W]** (channels are u, v)
For **v2**, `T = 16` and files must be located in:
- `sample_cases/few_timesteps/`
## Checkpoints
Checkpoints are downloaded from the Hub at runtime:
- `checkpoints/time-dependent-deeponet_1in.ckpt`
- `checkpoints/time-dependent-deeponet_4in.ckpt`
- `checkpoints/time-dependent-deeponet_8in.ckpt`
- `checkpoints/time-dependent-deeponet_16in.ckpt`
Repo ID used by both apps:
```text
BGLab/DeepONet-FlowBench-FPO
|