Zongqi He ·
Hanmin Li ·
Kin-Chung Chan ·
Yushen Zuo ·
Hao Xie·
Zhe Xiao
Jun Xiao ·
Xiaoyang Bai ·
Yifan Peng ·
Kin-Man Lam
This repository provides the cleaned and reproducible implementation of the paper. It reconstructs a 3D Gaussian scene from only two unposed images by combining dense stereo initialization, coherent view interpolation, and sparse-view Gaussian regularization.
The implementation keeps the validated research behavior unchanged while replacing the original mixed working directories with pinned upstream revisions, tracked source overlays, a unified environment, and reproducible shell entry points.
Extremely sparse inputs make conventional SfM initialization unreliable and leave too little visual evidence for high-quality 3D Gaussian Splatting. Our framework replaces SfM with dense stereo pose and geometry estimation, then synthesizes coherent intermediate views as additional training supervision. Multi-scale appearance and spatially adaptive geometry regularization further stabilize sparse-view optimization. The resulting system reconstructs detailed, view-consistent scenes from only two training images while retaining real-time 3DGS rendering.
The validated server setup uses one Conda environment:
- Python 3.9.16
- PyTorch 1.13.1 with CUDA 11.7 runtime
- PyTorch3D 0.7.5
- CUDA 11.8 toolkit for compiling the ViewGS extensions
git clone https://github.com/wuyou012/viewgs.git
cd viewgs
cp config.example.env .env
# Set the three checkpoint paths in .env.
bash scripts/setup.shsetup.sh clones the exact upstream commits from sources.lock.env, applies the tracked overlays, creates the unified environment, compiles the CUDA extensions, and validates all three model entry points. The generated source trees are stored in the ignored runtime/ directory.
Checkpoint names and verified hashes are listed in docs/CHECKPOINTS.md.
Each scene uses the following minimal layout. The two directories must contain matching filenames; images/ is used by MASt3R and images_full/ supplies full-resolution ViewGS supervision.
scene/
├── images/
│ ├── image_000.jpg
│ └── image_001.jpg
└── images_full/
├── image_000.jpg
└── image_001.jpg
The selected pair is read back from MASt3R's generated images.txt, ensuring that geometry reconstruction and view interpolation always use the same two images.
Run the complete two-view pipeline:
bash scripts/run_pipeline.sh \
--scene-root /path/to/scene \
--scene-name Barn \
--output-root /path/to/output \
--gpu 0 \
--iterations 10000Use --force to regenerate the MASt3R and ViewCrafter stages. For a wiring-only smoke test, use a new output directory together with --iterations 5 --ddim-steps 2.
If the point cloud and interpolated frames already exist, run only the reconstruction stage:
bash scripts/run_reconstruction.sh \
--source-path /path/to/scene/sparse_2 \
--diff-path /path/to/output/diffusion/Barn \
--model-path /path/to/output/reconstruction/Barn \
--gpu 0 \
--iterations 10000Additional training arguments can be appended after --.
The clean-clone validation was completed on an NVIDIA RTX 4090 server:
- exact upstream source revisions assembled successfully;
- one fresh unified environment installed successfully;
- MASt3R produced a 293,901-point downsampled initialization;
- ViewCrafter produced 25 frames and ViewGS loaded the expected 23 interior views;
- a five-iteration end-to-end smoke run completed and saved the Gaussian model.
This smoke run verifies installation and data flow, not the paper's final quantitative quality. Full details are recorded in docs/VALIDATION.md, and known behavior-preserving limitations are documented in docs/KNOWN_ISSUES.md.
viewgs-repro/
├── assets/ # Paper figures used by this README
├── environment/ # Unified Conda and pip specifications
├── overlays/ # Minimal active modifications over pinned sources
├── scripts/ # Setup, full pipeline, and reconstruction entry points
├── docs/ # Validation, checkpoints, code map, and known issues
├── sources.lock.env # Exact upstream repository revisions
└── config.example.env # Machine-specific paths
This implementation builds on the following open-source projects:
If this code or paper is useful for your research, please cite:
@article{he2026sfmfree,
title = {SfM-free 3D Gaussian Splatting from extremely sparse view},
author = {He, Zongqi and Li, Hanmin and Chan, Kin-Chung and Zuo, Yushen and Xie, Hao and Xiao, Zhe and Xiao, Jun and Bai, Xiaoyang and Peng, Yifan and Lam, Kin-Man},
journal = {Computers \& Graphics},
volume = {139},
pages = {104684},
year = {2026},
doi = {10.1016/j.cag.2026.104684}
}