from pathlib import Path
import torch
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from src.misc.image_io import save_interpolated_video
from src.model.model.anysplat import AnySplat
from src.utils.image import process_image
# Load the model from Hugging Face
model = AnySplat.from_pretrained("anysplat_ckpt_v1")
device = torch.device("cuda"if torch.cuda.is_available() else"cpu")
model = model.to(device)
model.eval()
for param in model.parameters():
param.requires_grad = False# Load and preprocess example images (replace with your own image paths)
image_names = ["path/to/imageA.png", "path/to/imageB.png", "path/to/imageC.png"]
images = [process_image(image_name) for image_name in image_names]
images = torch.stack(images, dim=0).unsqueeze(0).to(device) # [1, K, 3, 448, 448]
b, v, _, h, w = images.shape
# Run Inference
gaussians, pred_context_pose = model.inference((images+1)*0.5)
pred_all_extrinsic = pred_context_pose['extrinsic']
pred_all_intrinsic = pred_context_pose['intrinsic']
save_interpolated_video(pred_all_extrinsic, pred_all_intrinsic, b, h, w, gaussians, image_folder, model.decoder)
Citation
@article{jiang2025anysplat,
title={AnySplat: Feed-forward 3D Gaussian Splatting from Unconstrained Views},
author={Jiang, Lihan and Mao, Yucheng and Xu, Linning and Lu, Tao and Ren, Kerui and Jin, Yichen and Xu, Xudong and Yu, Mulin and Pang, Jiangmiao and Zhao, Feng and others},
journal={arXiv preprint arXiv:2505.23716},
year={2025}
}
License
The code and models are licensed under the
MIT License
.
Runs of lhjiang anysplat on huggingface.co
15.8K
Total runs
-181
24-hour runs
-464
3-day runs
-1.1K
7-day runs
9.0K
30-day runs
More Information About anysplat huggingface.co Model
anysplat huggingface.co is an AI model on huggingface.co that provides anysplat's model effect (), which can be used instantly with this lhjiang anysplat model. huggingface.co supports a free trial of the anysplat model, and also provides paid use of the anysplat. Support call anysplat model through api, including Node.js, Python, http.
anysplat huggingface.co is an online trial and call api platform, which integrates anysplat's modeling effects, including api services, and provides a free online trial of anysplat, you can try anysplat online for free by clicking the link below.
lhjiang anysplat online free url in huggingface.co:
anysplat is an open source model from GitHub that offers a free installation service, and any user can find anysplat on GitHub to install. At the same time, huggingface.co provides the effect of anysplat install, users can directly use anysplat installed effect in huggingface.co for debugging and trial. It also supports api for free installation.