[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-116162":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":25,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},116162,"Pi4","yyfz\u002FPi4","yyfz","π^4: A Foundation Model for 4D Scene Geometry and Motion","",null,"Python",483,19,4,1,0,36,312,158,93.9,"Other",false,"main",[],"2026-11-18 04:32:55","2026-11-23 18:56:38","\u003Cdiv align=\"center\">\n\n\u003Ch2>🌌 π⁴: A Foundation Model for 4D Scene Geometry and Motion\u003C\u002Fh2>\n\n\u003Cp>Physical Intelligence Team, Shanghai Artificial Intelligence Laboratory\u003C\u002Fp>\n\n\u003Cp>\n  \u003Ca href=\"https:\u002F\u002Fyyfz.github.io\u002Fpi4\">\u003Cimg src=\"docs\u002Fassets\u002Fproject-page-badge.svg\" alt=\"Project Page\" height=\"36\">\u003C\u002Fa>\n  &nbsp;\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2611.23144\">\u003Cimg src=\"docs\u002Fassets\u002Fpaper-badge.svg\" alt=\"Paper\" height=\"36\">\u003C\u002Fa>\n  &nbsp;\n  \u003Ca href=\"https:\u002F\u002Fweiguangzhao.github.io\u002FGameRealm\u002F\">\u003Cimg src=\"docs\u002Fassets\u002Fdataset-badge.svg\" alt=\"GameRealm Dataset\" height=\"36\">\u003C\u002Fa>\n  &nbsp;\n  \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fyyfz233\u002FPi4\">\u003Cimg src=\"docs\u002Fassets\u002Fhuggingface-demo-badge.svg\" alt=\"Hugging Face Demo\" height=\"36\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp>\n  \u003Ca href=\"#overview\">Overview\u003C\u002Fa> &nbsp;·&nbsp;\n  \u003Ca href=\"#quickstart\">Quickstart\u003C\u002Fa> &nbsp;·&nbsp;\n  \u003Ca href=\"#python-api\">Python API\u003C\u002Fa> &nbsp;·&nbsp;\n  \u003Ca href=\"docs\u002Finference.md\">Inference Guide\u003C\u002Fa> &nbsp;·&nbsp;\n  \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fyyfz233\u002FPi4\">Weights\u003C\u002Fa> &nbsp;·&nbsp;\n  \u003Ca href=\"#citation\">Citation\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp>\n  \u003Cimg src=\"docs\u002Fassets\u002Ffigure_skating.gif\" alt=\"Figure Skating: joint geometry and motion with synchronized global and RGB insets.\" width=\"49%\">\n  \u003Cimg src=\"docs\u002Fassets\u002Fwaterfall.gif\" alt=\"Waterfall: joint geometry and motion with synchronized global and RGB insets.\" width=\"49%\">\n\u003C\u002Fp>\n\n\u003Cp>\u003Csub>Geometry and motion in a single network forward pass, with synchronized global and RGB views.\u003C\u002Fsub>\u003C\u002Fp>\n\n\u003C\u002Fdiv>\n\n## Overview\n\n**From pixels to a scene in motion.** Pi4 brings geometric reconstruction and\nmotion estimation into a single model. It accepts single images, unordered image\ncollections, and videos without supplied camera calibration, building a shared\n3D scene representation in one forward pass.\n\n- **One compact model.** Approximately **0.5B parameters** for joint geometry\n  and motion.\n- **Strong across tasks.** The best overall average rank among the compared\n  methods across the paper's **16 geometry evaluation settings**, with competitive\n  results in single- and multiview 2D\u002F3D tracking and moving-object segmentation.\n- **Thousands of images, one forward pass.** Joint reconstruction and tracking\n  from **thousands of input images**, despite training with at most **64 views**.\n\n## Quickstart\n\n### 1. Install\n\nUse **Linux x86-64**, **Python 3.11**, an **NVIDIA GPU with BF16 support**, and a\nCUDA 12.6-compatible NVIDIA driver. Run the commands from the repository root:\n\n```bash\nconda create -n pi4 python=3.11 -y\nconda activate pi4\npython -m pip install --upgrade pip\npython -m pip install -r requirements-cu126.txt\npython -m pip check\npython -c \"import torch; assert torch.cuda.is_available(), 'CUDA is not available'; print(torch.__version__, torch.version.cuda)\"\n```\n\nThis installs **PyTorch 2.12.1 + CUDA 12.6**, **Triton 3.7.1**, the pinned\nFlexGEMM backend, and Pi4 with its image\u002Fvideo dependencies. Git and a C compiler\n(such as GCC) are required for the backend and Triton's runtime compilation.\nThe CUDA runtime is supplied by the PyTorch dependencies; a separate toolkit\ninstallation is not needed. See the\n[installation notes](docs\u002Finference.md#install) for checks and other CUDA builds.\n\n**Weights:** the example automatically downloads and caches the checkpoint from\n[yyfz233\u002FPi4](https:\u002F\u002Fhuggingface.co\u002Fyyfz233\u002FPi4). If the automatic download is\nslow, [download model.safetensors manually](https:\u002F\u002Fhuggingface.co\u002Fyyfz233\u002FPi4\u002Fresolve\u002Fmain\u002Fmodel.safetensors)\nand pass its local path with `--weights \u002Fpath\u002Fto\u002Fmodel.safetensors`.\n\n### 2. Reconstruct and Track\n\n**Figure Skating — stride 1, first 150 frames:**\n\n```bash\npython example.py examples\u002Ffigure_skating.mp4 \\\n  --output outputs\u002Fquickstart \\\n  --query-frame 0 --stride 1 --max-frames 150 --viewer\n```\n\nThis processes **150 frames at 512 × 288** together in one forward pass,\ncovering the first approximately **12 seconds** of the 60-second source.\nThe full video is long, so this quickstart sets `--max-frames 150` to reduce\nruntime and GPU memory use. This is an optional limit, not a model requirement;\nomitting it processes every frame remaining after `--stride` sampling.\nThe GIFs above are short previews of the paper demos, not the quickstart output.\nOmit `--query-frame` for geometry-only inference; use a new output directory\nfor each run.\n\nThe 150-frame configuration measured **12.03 GiB peak GPU memory** on an\nA800 80 GB. For smaller GPUs, reduce the frame count; the measured 25-frame\nconfiguration uses `--stride 1 --max-frames 25`. These are reference\nmeasurements, not hardware guarantees. See the\n[memory and timing table](docs\u002Finference.md#quickstart).\n\n**Kart — full clip, stride 2:**\n\n```bash\npython example.py examples\u002Fkart.mp4 \\\n  --output outputs\u002Fkart \\\n  --query-frame 0 --stride 2 --viewer\n```\n\n**Cycling — full clip, stride 2:**\n\n```bash\npython example.py examples\u002Fcycling.mp4 \\\n  --output outputs\u002Fcycling \\\n  --query-frame 0 --stride 2 --viewer\n```\n\nAll three clips are stored at their inference resolution: **512 × 288** for\nFigure Skating and Kart, **288 × 512** for Cycling. The videos retain every\nsource frame; `--stride` samples frames at loading time. Each command runs its sampled sequence\nin one forward pass; the Cycling example has more frames than the 150-frame\nmemory measurement above.\n\n**Reproduce the full Figure Skating demo from the paper and project page:**\nkeep stride 1 and omit `--max-frames` to process all **750 frames** together.\n\n```bash\nPYTORCH_ALLOC_CONF=expandable_segments:True \\\n  python example.py examples\u002Ffigure_skating.mp4 \\\n  --output outputs\u002Ffigure_skating_full \\\n  --query-frame 0 --stride 1 --viewer\n```\n\nThe full run needs substantially more GPU memory; see the\n[full-sequence measurements](docs\u002Finference.md#reproduce-the-project-page-demo).\n\n### 3. Explore in Your Browser\n\n```bash\npython viewer\u002Fserve.py outputs\u002Fquickstart --port 8080\n```\n\nOpen the address printed by the server. Orbit the reconstruction, inspect\ncamera motion and point tracks, or play the sequence alongside the RGB input.\nViewing exported results requires **no GPU or model weights**; the server uses\nthe Python standard library and bundled Three.js, with no Node build or CDN.\nForward port 8080 if inference runs on a remote machine.\n\nReplace `outputs\u002Fquickstart` with `outputs\u002Fkart`, `outputs\u002Fcycling`, or\n`outputs\u002Ffigure_skating_full` to view another run. See\n[example videos](examples\u002FREADME.md) for clip details.\n\n## Python API\n\n```python\nimport torch\nfrom pi4 import Pi4\nfrom pi4.io import load_images\n\nmodel = Pi4.from_pretrained(\"yyfz233\u002FPi4\").cuda().eval()\nframes, metadata = load_images(\n    \"examples\u002Ffigure_skating.mp4\", stride=1, max_frames=25, max_size=512\n)\nimages = torch.from_numpy(frames.copy()).permute(0, 3, 1, 2)\nimages = images.float().div(255).unsqueeze(0).cuda()\n\nprediction = model(images, query_frame=0)\n```\n\nInputs are floating-point RGB in `[0, 1]`, shaped `[B, T, 3, H, W]`, with\nheight and width divisible by 16. Normalization, inference precision, and\ngradient disabling are handled internally. Tracking requires at least two\nimages; omit `query_frame` to return geometry only.\n\n| Output | Keys |\n| :--- | :--- |\n| Scene geometry | `local_points`, `camera_poses`, `metric_scale`, `confidence` |\n| Dense correspondences | `tracks_2d`, `tracks_3d`, `query_frame` |\n| Motion and reliability | `dynamic_mask`, `visibility`, `tracking_confidence` |\n\n`local_points` and camera translations use the model's native scale;\n`tracks_3d` are already in predicted metric world coordinates. See the\n[output contract](docs\u002Finference.md#outputs) for tensor shapes, coordinate\nconventions, and visibility semantics.\n\n`from_pretrained` accepts a local Safetensors file, a directory containing\n`model.safetensors`, or a Hugging Face repository ID with optional `revision=`.\nCalling it without arguments loads `yyfz233\u002FPi4`. Loading is strict; no\nadditional pretrained models or configuration files are required.\n\n## Go Further\n\n- [Inference guide](docs\u002Finference.md) — full API, export formats, track loading, and viewer controls.\n- [Full-length Figure Skating demo](docs\u002Finference.md#reproduce-the-project-page-demo) — all 750 frames in one forward pass, with measured memory requirements.\n- [Example videos](examples\u002FREADME.md) — figure skating, indoor karting, and cycling.\n\n## Citation\n\nIf you use Pi4 in your research, please cite:\n\n```bibtex\n@misc{wang2026pi4,\n  title         = {{$\\pi^4$}: A Foundation Model for {4D} Scene Geometry and Motion},\n  author        = {Wang, Yifan and Zhao, Weiguang and Yang, Ni and Guo, Haoyu and Dong, Junting and Zhang, Weinan and Shen, Chunhua},\n  year          = {2026},\n  eprint        = {2611.23144},\n  archivePrefix = {arXiv},\n  primaryClass  = {cs.CV},\n  url           = {https:\u002F\u002Farxiv.org\u002Fabs\u002F2611.23144}\n}\n```\n\n## License\n\n| Component | License | Commercial Use |\n| :--- | :--- | :--- |\n| Original Pi4 code | [CC BY-NC 4.0](LICENSE) | Not permitted |\n| Pi4 model weights | [CC BY-NC 4.0](LICENSE_MODEL) | Not permitted |\n\nThird-party components retain their upstream licenses. See [NOTICE](NOTICE) and [upstream licenses](licenses\u002F).\n","Pi4 是一个面向4D场景几何与运动建模的基础模型，支持从单图、无序图像集合或视频中端到端联合估计3D场景结构与动态运动，无需相机标定。其核心特点是0.5B参数量的紧凑架构、单次前向传播即可同步输出全局几何与RGB对齐的运动表示，并在16种几何评估任务中综合性能领先；支持千级图像规模的联合重建与跟踪。适用于自动驾驶感知、AR\u002FVR场景理解、机器人环境建模及影视内容生成等需联合建模空间结构与时间动态的视觉任务。",2,"2026-11-24 04:53:00","CREATED_QUERY"]