[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-115116":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":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":21,"topics":22,"createdAt":10,"pushedAt":25,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":13,"lastSyncTime":29,"discoverSource":30},115116,"GenSfm","dotb1ue\u002FGenSfm","dotb1ue","[NeurIPS 2026] GenSfm: Generative Structure from Motion with Native 3D Diffusion","https:\u002F\u002Fdotb1ue.github.io\u002FGenSfm\u002F",null,"Python",60,2,1,0,3,43.23,"MIT License",false,"main",true,[23,24],"3d-generation","3d-reconstruction","2026-11-05 14:04:29","2026-11-23 07:52:14","\u003Cdiv align=\"center\">\n\u003Ch1>GenSfM\u003C\u002Fh1>\n\u003Ch3>Generative Structure from Motion with Native 3D Diffusion\u003C\u002Fh3>\n\u003Cp>\u003Cstrong>NeurIPS 2026\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cp>Haobin Duan\u003Csup>1,2,&#42;\u003C\u002Fsup> · Binbin Huang\u003Csup>1,2,&#42;\u003C\u002Fsup> · Mochu Xiang\u003Csup>1,2\u003C\u002Fsup> · Yiqun Zhao\u003Csup>1,2\u003C\u002Fsup>\u003Cbr>Zibo Zhao\u003Csup>3\u003C\u002Fsup> · Yi Ma\u003Csup>1,2,4\u003C\u002Fsup> · Shenghua Gao\u003Csup>1,2,4,†\u003C\u002Fsup>\u003C\u002Fp>\n\u003Cp>\u003Csup>1\u003C\u002Fsup> The University of Hong Kong &nbsp; \u003Csup>2\u003C\u002Fsup> Transengram &nbsp; \u003Csup>3\u003C\u002Fsup> Tencent\u003Cbr>\u003Csup>4\u003C\u002Fsup> Shenzhen Loop Area Institute\u003Cbr>\u003Csup>&#42;\u003C\u002Fsup> Equal contribution &nbsp; \u003Csup>†\u003C\u002Fsup> Corresponding author\u003C\u002Fp>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2610.35522\">\u003Cimg src=\"assets\u002Fbadges\u002Fpaper.svg\" alt=\"Paper\">\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fdotb1ue.github.io\u002FGenSfm\u002F\">\u003Cimg src=\"assets\u002Fbadges\u002Fproject.svg\" alt=\"Project page\">\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fdotblue\u002FGenSfm\">\u003Cimg src=\"assets\u002Fbadges\u002Fmodels.svg\" alt=\"Models\">\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fdotb1ue.github.io\u002FGenSfm\u002F#video\">\u003Cimg src=\"assets\u002Fbadges\u002Fvideo.svg\" alt=\"Video\">\u003C\u002Fa>\u003C\u002Fp>\n\u003Cp>\u003Cstrong>A few images. One complete object. Its cameras.\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Ca href=\"https:\u002F\u002Fdotb1ue.github.io\u002FGenSfm\u002F#gallery\">\u003Cimg src=\"assets\u002Foverview.webp\" width=\"960\" alt=\"Four views of a fabric wagon, its textured 3D reconstruction inside a dashed unit cube, and recovered cameras with fading denoising trajectories\">\u003C\u002Fa>\n\u003C\u002Fdiv>\n\nGenSfM jointly recovers **3D geometry, appearance, and camera poses** from a few uncalibrated images of one object. A native 3D diffusion model generates shared shape and per-view pose latents; a pose-aware second stage recovers detailed geometry and texture using the estimated cameras.\n\n[Quick start](#quick-start) · [Python API](#python-api) · [Outputs](#outputs) · [Training and evaluation](#training-and-evaluation)\n\n## Quick start\n\n### 1. Install\n\nUse **Linux, an NVIDIA GPU, and the CUDA toolkit** (`nvcc`). Initialize Miniforge\u002FConda and Mamba in your shell. The default environment uses **Python 3.12, PyTorch 2.9.1, and CUDA 12.8**; use a compatible system CUDA toolkit to build the rendering extensions.\n\n```bash\ngit clone --recurse-submodules https:\u002F\u002Fgithub.com\u002Fdotb1ue\u002FGenSfm.git\ncd GenSfm\n\n. .\u002Fsetup.sh --new-env --basic --spconv --mipgaussian --nvdiffrast\nmamba activate gensfm\n\nexport ATTN_BACKEND=sdpa\nexport ATTN_BACKEND_WITH_ATTN_BIAS=sdpa\nexport SPCONV_ALGO=native\n```\n\n`--new-env` creates the `gensfm` environment. Omit it to use an existing environment with compatible PyTorch\u002FCUDA. PyTorch SDPA needs no optional attention packages. For an existing clone, run `git submodule update --init --recursive`. See `. .\u002Fsetup.sh --help` for installation options.\n\n### 2. Run the included example\n\n```bash\npython example_multi_image.py \\\n  --input-dir assets\u002Fexample\u002Fwagon \\\n  --pretrained dotblue\u002FGenSfm \\\n  --output-dir outputs\u002Fwagon\n```\n\nThe first run downloads the [pretrained models](https:\u002F\u002Fhuggingface.co\u002Fdotblue\u002FGenSfm) (approximately 5.8 GB) and the DINOv2 image encoder through Torch Hub. Open `outputs\u002Fwagon\u002Fmesh.glb` in a 3D viewer and compare `reprojection-00.png` through `reprojection-03.png` with the saved inputs. Choose a new output directory for each run.\n\nFive example sets are included, each with four masked views:\n\n| Input directory | Object | Images |\n| --- | --- | --- |\n| `assets\u002Fexample\u002Fspongebob` | SpongeBob plush | Photographs |\n| `assets\u002Fexample\u002Fhead-sculpture` | Metal head sculpture | Photographs from NeRD |\n| `assets\u002Fexample\u002Fgarden-gnome` | Garden gnome | Photographs from Stanford-ORB |\n| `assets\u002Fexample\u002Ffloral-teapot` | Floral teapot | Photographs from Stanford-ORB |\n| `assets\u002Fexample\u002Fwagon` | Fabric wagon | Synthetic ABO renders |\n\nTo try another set, replace `--input-dir` and choose a new `--output-dir` in the command above. The images retain their original source terms; see [asset attribution](assets\u002FATTRIBUTION.md).\n\n### 3. Use your own images\n\nPrepare **two to four views of the same rigid object**; four views covering different sides are recommended. Supply foreground-masked RGBA images with transparent backgrounds, keeping the complete object, holes, and thin parts in the mask.\n\n```bash\npython example_multi_image.py \\\n  --images \u002Fpath\u002Fto\u002Fobject\u002F00.png \u002Fpath\u002Fto\u002Fobject\u002F01.png \\\n           \u002Fpath\u002Fto\u002Fobject\u002F02.png \u002Fpath\u002Fto\u002Fobject\u002F03.png \\\n  --pretrained dotblue\u002FGenSfm \\\n  --output-dir outputs\u002Fmy-object\n```\n\nFor RGB photographs, add `--remove-background` to create masks with rembg; inspect the masks when using cluttered backgrounds. Existing foreground alpha is preserved.\n\n`--images` preserves the supplied order. `--input-dir` loads all supported images in filename order, so keep one object's views in that directory. The seed defaults to `1`; `--steps` sets the denoising steps in both stages. `--pretrained` also accepts a downloaded bundle directory; `--revision` selects a Hugging Face revision.\n\n## Python API\n\nSet the attention environment variables shown above before importing the pipeline.\n\n```python\nfrom trellis.pipelines import GenSfMPipeline\n\npipeline = GenSfMPipeline.from_pretrained(\"dotblue\u002FGenSfm\").cuda()\nresult = pipeline.run(\n    [f\"assets\u002Fexample\u002Fwagon\u002F{i:02d}.png\" for i in range(4)],\n    seed=1,\n)\n\nmesh = result[\"mesh\"][0]\ngaussians = result[\"gaussian\"][0]\nextrinsics, intrinsics = result[\"extrinsics\"], result[\"intrinsics\"]\n```\n\nThe pipeline returns a mesh, Gaussians, and predicted cameras. Use the CLI to save a textured GLB, PLY, and reprojection images.\n\n## Outputs\n\n| File | Contents |\n| --- | --- |\n| `mesh.glb` | Textured mesh, in Y-up coordinates |\n| `gaussian.ply` | 3D Gaussians |\n| `cameras.json` | Predicted cameras, source-image intrinsics, and the data-to-mesh transform |\n| `input-XX.png` \u002F `input-rgba-XX.png` | Exact model inputs \u002F cropped RGBA inputs |\n| `reprojection-XX.png` | Textured-mesh renders at the predicted cameras, on black |\n| `run.json` | Input order, crop mapping, seed, and inference settings |\n\nCamera extrinsics are **OpenCV world-to-camera** matrices in the model's Z-up frame. Intrinsics are normalized matrices, including skew and principal-point offsets, for both the model crop and the EXIF-oriented source image. The GLB uses `(x, z, -y)` instead of model coordinates `(x, y, z)`; apply the `data_to_mesh` transform from `cameras.json` when projecting the exported mesh.\n\n## Training and evaluation\n\nFollow [DATASET.md](DATASET.md) to download data, render views, voxelize shapes, and encode training targets. UV target encoding requires a trained UV encoder, which is not part of the inference bundle.\n\n| Component | Configuration |\n| --- | --- |\n| UV pose autoencoder | [uv_vae_conv3d_4l8_fp16.json](configs\u002Fvae\u002Fuv_vae_conv3d_4l8_fp16.json) |\n| Joint shape and camera generation | [suv_flow_imgmv4vis_dit_L_16l8_p4l8_fp16.json](configs\u002Fgeneration\u002Fsuv_flow_imgmv4vis_dit_L_16l8_p4l8_fp16.json) |\n| Pose-aware geometry and appearance | [slat_flow_imgmv4_dit_L_64l8p2_fp16-convnextvisuallatentcond.json](configs\u002Fgeneration\u002Fslat_flow_imgmv4_dit_L_64l8p2_fp16-convnextvisuallatentcond.json) |\n\nInstall the training extras and download the two upstream denoisers used to initialize generator training:\n\n```bash\n. .\u002Fsetup.sh --train --diffoctreerast\n\nhf download microsoft\u002FTRELLIS-image-large \\\n  --include 'ckpts\u002Fss_flow_img_dit_L_16l8_fp16.safetensors' \\\n            'ckpts\u002Fslat_flow_img_dit_L_64l8p2_fp16.safetensors' \\\n  --local-dir checkpoint\u002FTRELLIS-image-large\n```\n\nMatch the configuration's latent directory names and UV decoder to your prepared data, then run stage 1:\n\n```bash\npython train.py \\\n  --config configs\u002Fgeneration\u002Fsuv_flow_imgmv4vis_dit_L_16l8_p4l8_fp16.json \\\n  --data_dir \u002Fpath\u002Fto\u002Fprepared\u002FABO,\u002Fpath\u002Fto\u002Fprepared\u002FHSSD \\\n  --output_dir outputs\u002Fgensfm-stage1 \\\n  --num_gpus 1 --auto_retry 0\n```\n\nUse the stage-2 configuration and a new output directory to train the appearance model. The two generators train independently. Adjust `trainer.args.batch_size_per_gpu` and its gradient-accumulation split to fit your hardware; for example, add `--override trainer.args.batch_size_per_gpu=1 trainer.args.batch_split=1`. Run the same command again to resume from the latest complete checkpoint. `python train.py --help` lists resume and distributed options.\n\nFor quantitative evaluation, install a [PyTorch3D build](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fpytorch3d\u002Fblob\u002Fmain\u002FINSTALL.md) compatible with your PyTorch\u002FCUDA environment, then run `. .\u002Fsetup.sh --eval`. `python eval.py --help` describes dataset evaluation. A complete two-stage evaluation must use the chosen appearance model's normalization and sampler; `sample_ssuv=false` evaluates with prepared conditioning geometry\u002Fcameras rather than the complete image-only pipeline.\n\n\u003Cdetails>\n\u003Csummary>Using your own training checkpoints\u003C\u002Fsummary>\n\nKeep each denoiser inside its training run's `ckpts\u002F` directory, with the matching `config.json` one level above. Update `eval_models` dependencies to the correct trained UV decoder and appearance decoders. Named model configurations load local checkpoint files; model prefixes load matching JSON\u002Fsafetensors files locally or from Hugging Face.\n\n```bash\npython example_multi_image.py \\\n  --input-dir \u002Fpath\u002Fto\u002Fobject \\\n  --stage1 \u002Fpath\u002Fto\u002Fstage1\u002Fckpts\u002Fdenoiser.pt \\\n  --stage2 \u002Fpath\u002Fto\u002Fstage2\u002Fckpts\u002Fdenoiser.pt \\\n  --output-dir outputs\u002Fmy-checkpoints\n```\n\nUse `--pretrained` or both local checkpoint arguments. Full training continuation requires the original training state.\n\n\u003C\u002Fdetails>\n\n## Citation\n\n```bibtex\n@inproceedings{duan2026gensfm,\n  title = {Generative Structure from Motion with Native {3D} Diffusion},\n  author = {Duan, Haobin and Huang, Binbin and Xiang, Mochu and Zhao, Yiqun\n            and Zhao, Zibo and Ma, Yi and Gao, Shenghua},\n  booktitle = {Advances in Neural Information Processing Systems},\n  year = {2026},\n  eprint = {2610.35522},\n  archivePrefix = {arXiv},\n  primaryClass = {cs.CV},\n  url = {https:\u002F\u002Farxiv.org\u002Fabs\u002F2610.35522}\n}\n```\n\n## Acknowledgements and license\n\nGenSfM builds on [TRELLIS](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTRELLIS), including its Structured LATent representation, decoders, and data tooling. We also thank [DINOv2](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fdinov2) and the rendering libraries used by this project.\n\nOur code uses the [MIT License](LICENSE). Third-party licenses and original notices, including TRELLIS, are in [THIRD_PARTY.md](THIRD_PARTY.md). See [asset attribution](assets\u002FATTRIBUTION.md) for example image sources and terms.\n","GenSfM 是一个基于原生3D扩散模型的生成式运动恢复结构（SfM）方法，用于从少量未标定图像中联合估计目标物体的三维几何、外观纹理和相机位姿。其核心技术包括：端到端联合优化的3D潜变量生成、姿态感知的第二阶段重建、以及支持神经渲染与可微分光栅化的高效3D建模流程。项目依赖PyTorch与CUDA加速，提供预训练模型和开箱即用的多图重建示例。适用于单物体精细三维重建、AI生成内容（AIGC）中的3D资产创建、以及需弱监督条件的视觉-几何联合学习场景。","2026-11-24 04:50:23","CREATED_QUERY"]