Grounding Image Matching in 3D with MASt3R
Paper
•
2406.09756
•
Published
•
2
Official MASt3R (Matching And Stereo 3D Reconstruction) checkpoint converted to SafeTensors format for efficient inference.
| File | Description | Size |
|---|---|---|
unified.safetensors |
Main model (encoder + decoder) | ~1.3 GB |
retrieval.safetensors |
Retrieval head for SfM | ~2 MB |
codebook.pkl |
Codebook for image retrieval | ~256 MB |
from mast3r_runtime import load_model
model = load_model("aedelon/mast3r-vit-large")
points, descriptors = model.forward(image1, image2)
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file
import pickle
# Load main model
unified = load_file(hf_hub_download("Aedelon/mast3r-vit-large-fp16", "unified.safetensors"))
# Load retrieval head
retrieval = load_file(hf_hub_download("Aedelon/mast3r-vit-large-fp16", "retrieval.safetensors"))
# Load codebook (pickle)
codebook_path = hf_hub_download("Aedelon/mast3r-vit-large-fp16", "codebook.pkl")
with open(codebook_path, "rb") as f:
codebook = pickle.load(f)
from mast3r.model import AsymmetricMASt3R
from safetensors.torch import load_file
weights = load_file("unified.safetensors")
model = AsymmetricMASt3R()
model.load_state_dict(weights)
# Per image pair:
{
"pts3d_1": Tensor[B, H, W, 3], # 3D points from view 1
"pts3d_2": Tensor[B, H, W, 3], # 3D points from view 2
"desc_1": Tensor[B, H, W, D], # Descriptors from view 1
"desc_2": Tensor[B, H, W, D], # Descriptors from view 2
"conf_1": Tensor[B, H, W], # Confidence map view 1
"conf_2": Tensor[B, H, W], # Confidence map view 2
}
@article{leroy2024mast3r,
title={Grounding Image Matching in 3D with MASt3R},
author={Leroy, Vincent and Cabon, Yohann and Revaud, J{\'e}r{\^o}me},
journal={arXiv preprint arXiv:2406.09756},
year={2024}
}
@inproceedings{wang2024dust3r,
title={DUSt3R: Geometric 3D Vision Made Easy},
author={Wang, Shuzhe and Leroy, Vincent and Cabon, Yohann and Chidlovskii, Boris and Revaud, J{\'e}r{\^o}me},
booktitle={CVPR},
year={2024}
}
Weights from naver/mast3r converted to SafeTensors.
Original download URLs:
CC BY-NC-SA 4.0 (Creative Commons Attribution-NonCommercial-ShareAlike 4.0)
For commercial licensing: Naver Labs Europe
SafeTensors conversion for mast3r-runtime (Apache 2.0).