AIR: Amortized Image Reconstruction Framework for Self-Supervised Feed-Forward 2D Gaussian Splatting
This repository contains the official implementation of AIR: Amortized Image Reconstruction Framework for Self-Supervised Feed-Forward 2D Gaussian Splatting.
AIR addresses image reconstruction with 2D Gaussian splatting. It predicts a compact Gaussian representation in a single feed-forward pass, avoiding the costly per-image iterative optimization used by previous Gaussian-based image representation methods.
The main contributions are:
- A self-supervised feed-forward framework for amortized 2D Gaussian image reconstruction.
- A stage-wise residual prediction design with Stage Control, which adds Gaussians only to under-reconstructed regions.
- A Predict-Optimize-Distill training strategy that stabilizes Gaussian prediction, followed by finetuning and image-adaptive quantization for compact storage.
For a complete understanding of the method, please refer to our paper: AIR: Amortized Image Reconstruction Framework for Self-Supervised Feed-Forward 2D Gaussian Splatting. [TODO: add paper/arXiv link]
The pipeline progressively reconstructs an image from an empty canvas. At each stage, AIR predicts Gaussian increments from the current residual, uses Stage Control to keep only necessary primitives, and accumulates the activated Gaussians into the final representation.
Overview of AIR. Overview of AIR. AIR amortizes the iterative optimization of GaussianImage through self-supervised stage-wise residual prediction. At each stage, the network predicts Gaussian increments from the current reconstruction residual, while an explicit stage-control mechanism activates additional primitives only in under-reconstructed regions. During POD pretraining, a short-horizon optimizer refines a detached copy of each predicted increment and distills the refined increment back as Gaussian-space supervision. After POD stabilizes the predictor, cross-stage rendering finetuning supervises the accumulated reconstructions directly, promoting stage coordination for the final output..
├── configs # Training configuration files
├── model # AIRNet, Gaussian heads, quantization, rendering utilities
├── train # PyTorch Lightning training pipeline
├── test # Inference, metrics, visualization, and I/O helpers
├── submodules # Local dependencies: gsplat and fused-ssim
├── train.sh # Example training command
├── run_slurm.sh # SLURM multi-node DDP training template
├── infer.sh # Example inference command
└── requirements.txt # Python dependenciesClone the repository and create the conda environment:
git clone https://github.com/whoiszzj/AIR.git
cd AIR
conda create -n AIR python=3.12
conda activate AIR
pip install -r requirements.txt
mkdir -p checkpoints data output workspacePrepare your image dataset and checkpoints:
./data # demo datasets
├── kodak
│ ├── kodim01.png
│ ├── kodim02.png
│ └── kodim03.png
└── 0844x2.png
./checkpoints
├── dinov3_vitb16_pretrain_lvd1689m-73cec8be.pth # from offical
├── pod.pt
├── ps_5.pt
├── ps_6.pt
├── ps_7.pt
└── ps_14.ptDownload the pretrained checkpoints from the checkpoints subdirectory in Google Drive and place the downloaded .pt files under checkpoints/, or run:
python download_checkpoints.pyRun inference on a single image with the default script:
bash infer.shThe default inference script expects:
CHECKPOINT=checkpoints/ps_7.pt
IMAGE=data/0844x2.png
OUTPUT=outputYou can also call the Python entrypoint directly:
python test/infer.py \
--checkpoint checkpoints/ps_7.pt \
--image data/0844x2.png \
--output outputThe --image argument accepts either a single image file or a directory containing supported image formats (.jpg, .jpeg, .png, .bmp, .tif, .tiff, .webp).
The output structure for a single image is:
./output
└── 0844x2
├── info.json
├── image.jpg
├── render_stage_*.jpg
├── error_stage_*.png
├── mse_error_stage_*.png
├── ssim_error_stage_*.png
├── image_points.png
├── position_density.png
└── position_density.npyIf quantization is enabled in the checkpoint, the output may also include:
render_quant.jpgThe info.json file records metrics such as PSNR, MS-SSIM, LPIPS when available, Gaussian counts, timing, and quantization statistics when applicable.
Note that the inference script runs the same image 10 times for timing. For practical use, you can comment out that timing block to improve per-image processing speed. You can also disable unnecessary visualization outputs.
- Put images into a directory, for example:
./data/my_images
├── image_001.png
├── image_002.png
└── image_003.png- Run batch inference:
python test/infer.py \
--checkpoint checkpoints/ps_7.pt \
--image data/my_images \
--output output- Results will be saved as:
./output
└── my_images
├── summary.json
├── image_001
│ ├── info.json
│ ├── image.jpg
│ └── render_stage_*.jpg
├── image_002
└── image_003Training uses JSON config files under configs/:
./configs
├── 0_pod_config.json
├── 1_finetune_config.json
├── 2_finetune_quantize_config.json
├── 3_div2k_refine_config.json
└── 4_patch_size_finetune_config.jsonBefore training, update dataset paths in the selected config file:
{
"train_data": {
"datasets": [
{
"name": "[TODO: dataset name]",
"path": "[TODO: path to training images]",
"weight": 1.0,
"label_type": "normal"
}
]
},
"valid_data": {
"datasets": [
{
"name": "[TODO: validation dataset name]",
"path": "[TODO: path to validation images]",
"weight": 1.0,
"label_type": "normal"
}
]
}
}Run the provided training script:
bash train.shThe script currently launches a short POD training/debug run:
python train/train_airnet_pl.py \
--config configs/0_pod_config.json \
--workspace workspace/debug \
--batch_size_forward 5 \ # Batch size per GPU
--gradient_accumulation_steps 1 \
--enable_gradient_checkpointing True \
--enable_mixed_precision False \
--pod True \
--max_epochs 12 \ # Number of epochs
--num_iterations 10000 \ # Maximum iterations per epoch; if the number of training samples is smaller, use the size of the training set
--log_every 20 \ # Log to TensorBoard every N steps
--vis_every 2000 \ # Run visualization every N iterations; images are selected from the val set
--num_vis_images 32 \ # Number of images per visualization
--enable_tensorboard True \
--seed 0After POD pretraining, launch the finetuning stage with configs/1_finetune_config.json. The --checkpoint argument should point to the checkpoint produced by the previous POD stage:
python train/train_airnet_pl.py \
--config configs/1_finetune_config.json \
--workspace workspace/finetune \
--checkpoint workspace/pod/checkpoint/latest.pt \
--batch_size_forward 2 \
--gradient_accumulation_steps 1 \
--enable_gradient_checkpointing True \
--enable_mixed_precision True \
--pod False \
--max_epochs 30 \
--num_iterations 10000 \
--log_every 20 \
--vis_every 2000 \
--num_vis_images 32 \
--seed 0For multi-node training on a SLURM cluster, we also provide train_slurm.sh as a DDP launch template:
sbatch train_slurm.shBefore submitting the job, update the TODO fields in train_slurm.sh, including the partition, project path, conda environment, config file, workspace, and checkpoint path.
Training outputs are saved under the selected workspace:
./workspace/debug
├── config.json
├── checkpoint
│ ├── latest.pt
│ ├── 00000000.pt
│ ├── 00000000_optimizer.pt
│ └── ...
└── tensorboard_logs
└── ...Launch TensorBoard with:
tensorboard --logdir workspace/debug/tensorboard_logsA typical workflow is:
- Prepare ImageNet-style or large-scale natural image training data for POD pretraining.
- Prepare DIV2K or another high-resolution target dataset for refinement.
- Edit the dataset paths in
configs/*.json. - Start from
configs/0_pod_config.jsonwith--pod True. - Fine-tune with
configs/1_finetune_config.json. - Enable quantization-aware training with
configs/2_finetune_quantize_config.jsonif compact storage is required. - Adapt patch size with
configs/4_patch_size_finetune_config.jsonwhen a different Gaussian density or bitrate operating point is needed. - Refine on the target dataset with
configs/3_div2k_refine_config.json. - Use the generated checkpoint with
test/infer.py.
This work is supported by the Natural Science Foundation of China under Grant 62302174. The computation is completed in the HPC Platform of Huazhong University of Science and Technology. We also thank Farsee2 Technology Ltd for providing devices to support the validation of our method.
Thanks to the following open-source projects and libraries:
If you find this work useful or relevant to your research, please cite:
@misc{zeng2026airamortizedimagereconstruction,
title={AIR: Amortized Image Reconstruction Framework for Self-Supervised Feed-Forward 2D Gaussian Splatting},
author={Zhaojie Zeng and Yuesong Wang and Yawei Luo and Tao Guan},
year={2026},
eprint={2605.20820},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2605.20820},
}This project is released under the MIT License.
This library is under active development, and there may be bugs or incomplete documentation. If you encounter any issues, please feel free to open an issue or submit a pull request.
