|
Download fuxicfd-model/inference_example/README.md from daisy1212/FuXi-CFD-model: direct link, hf CLI and curl.
- Browser
- Download file 876 Bytes
-
https://huggingface.co/daisy1212/FuXi-CFD-model/resolve/main/fuxicfd-model/inference_example/README.md
- Command line
-
hf download hf://daisy1212/FuXi-CFD-model/fuxicfd-model/inference_example/README.md
-
curl -L -o README.md https://huggingface.co/daisy1212/FuXi-CFD-model/resolve/main/fuxicfd-model/inference_example/README.md
876 Bytes
| # Inference example | |
| This folder demonstrates how to run FuXi-CFD ONNX inference end-to-end: | |
| - load raw inputs (`data/inputs.npz`) | |
| - normalize + resample to model input grid | |
| - run ONNX with onnxruntime | |
| - de-normalize model outputs back to physical scale | |
| ## Run | |
| ```bash | |
| python scripts/infer.py \ | |
| --model ../model/fuxicfd_model.onnx \ | |
| --input data/inputs.npz \ | |
| --output data/prediction.npz | |
| ``` | |
| ## Input format | |
| `data/sample_input.npy` stores a Python dict (load with `allow_pickle=True`) containing: | |
| - `u_100m, v_100m`: shape `(9, 9)` | |
| - `dem, roughness`: shape `(301, 301)` | |
| The final model input tensor is built as `(4, 300, 300)` with channel order: | |
| `[u_100m, v_100m, dem, roughness]` | |
| ## Output format | |
| `data/prediction.npz` contains `u, v, w, k`, each of shape `(27, 300, 300)`. | |
| ## Normalization | |
| See `normalization/README.md` for exact variable orders and shapes. | |