class

GS::MASt3R::Model

Inherits Reference < Object

Full MASt3R model for dense stereo

Constructors

new(config : ModelConfig, device : Tensor::Device = Tensor::Device::GPU)
Source

Instance methods

config
Source
decoder
Source
encoder
Source
forward_pair(img1 : Autograd::Variable, img2 : Autograd::Variable) : Tuple(Autograd::Variable, Autograd::Variable, Autograd::Variable, Autograd::Variable)

Process image pair with cross-attention (full MASt3R) img1, img2: [batch, channels, height, width] Returns: {xyz1, conf1, xyz2, conf2}

Source
forward_single(img : Autograd::Variable) : Tuple(Autograd::Variable, Autograd::Variable)

Process a single image (no cross-attention) img: [batch, channels, height, width] Returns: {xyz: [batch, h, w, 3], conf: [batch, h, w, 1]}

Source
load_weights!(path : String)

Load weights from safetensors file

Source
parameters
Source
pointmap_head
Source
predict_pointcloud(img1 : Autograd::Variable, img2 : Autograd::Variable, conf_threshold : Float32 = 0.5_f32) : Tuple(Tensor, Tensor)

Convenience method: get merged point cloud from image pair Returns single point cloud with confidence filtering

Source